MiSTer-devel / Arcade-CrazyKong_MiSTer

Arcade: Crazy Kong for MiSTer
4 stars 12 forks source link

DK Sprite is flipped when in 2-player game / Cocktail mode issues #33

Open M-Walrus opened 3 years ago

M-Walrus commented 3 years ago

Tested in Big Kong, Crazy Kong and Crazy Kong Part II -

2p mode has flipped DK sprite.

In "Big Kong" this is fixed if you have Cocktail mode enabled. Cocktail mode does not work properly in the game though, only fixes this issue.

Crazy Kong and Crazy Kong II lack the cocktail dip switch, but have the same issue with the flipped DK sprite in 2 player mode.

I suspect that cocktail is the default mode like Big Kong, and this will be fixed by disabling it or exposing that dip setting to be toggled.

mrfpga commented 1 year ago

I can confirm that there seems to be a bug with the way cocktail mode is implemented. You can test it with the flip screen patch below. The author of this patch used the built-in cocktail mode as base for his split screen patch. In cocktail mode, player two has his screen flipped. The author of the patch changed it so that player one will always have the flipped screen of player two (see the explanation of the author at https://scoresaves.com/CrazyKongHS.html). With MAME the rom works as expected and the screen is completely flipped in upright mode. On MiSTer (and MiST) however, only Crazy Kong's sprite will flip, indicating a problem with the way cocktail mode is implemented.

<misterromdescription>
    <name>Crazy Kong Part II Flipped</name>
    <region></region>
    <homebrew>no</homebrew>
    <bootleg>no</bootleg>
    <version>Set 1</version>
    <alternative></alternative>
    <platform></platform>
    <series>Donkey Kong</series>
    <year>1981</year>
    <manufacturer>Falcon</manufacturer>
    <category>Platform - Climb</category>

    <setname>ckongpt2f</setname>
    <parent>ckongpt2</parent>
    <mameversion>0224</mameversion>
    <rbf>crazykong</rbf>
    <about></about>

    <resolution>15kHz</resolution>
    <rotation>vertical (cw)</rotation>
    <flip>no</flip>

    <players>2 (alternating)</players>
    <joystick>4-way</joystick>
    <special_controls></special_controls>
    <num_buttons>1</num_buttons>
    <buttons default="A,Start,Select,R" names="Jump,Start 1P,Start 2P,Coin"></buttons>

    <switches></switches>

    <rom index="1"></rom>
    <rom index="0" md5="a489b3b318d3e53b4d837777cc9afeed" type="merged|nonmerged|split" zip="ckongpt2.zip">
        <!-- maincpu -->
        <part crc="b27df032" name="7.5d"></part>
        <patch offset="0x6">005E</patch>
        <patch offset="0x93">9800</patch>
        <patch offset="0x1BB">00</patch>
        <patch offset="0x1C0">0000</patch>
        <patch offset="0x24F">36</patch>
        <patch offset="0x251">3A00B007</patch>
        <patch offset="0x256">63</patch>
        <patch offset="0x258">
21505F11006101AA00EDB0CD405FC900
00
        </patch>
        <part crc="5dc1aaba" name="8.5e"></part>
        <patch offset="0x145D">000000</patch>
        <part crc="c9054c94" name="9.5h"></part>
        <part crc="069c4797" name="10.5k"></part>
        <part crc="ae159192" name="11.5l"></part>
        <patch offset="0x49CF">00</patch>
        <patch offset="0x49D4">00</patch>
        <part crc="966bc9ab" name="12.5n"></part>
        <patch offset="0x543A">20</patch>
        <patch offset="0x5E00">
2100901100043600231B7AB320F83A00
B82FFE0CC2305E0608210060AF4F7723
0D20FB10F8CD58020000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
21AA6111AB610155063600EDB0210060
11016001FF003600EDB0C3D63FFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
211D6111B860010300EDB0C9FFFFFFFF
9493012324FDFD000007060500FDFD13
22112A29FD1B1F1E17FDFD3F00507600
F4769693021E14FDFD000006010000FD
FD161C1920FD23132215151EFD3F0000
6100F6769893032214FDFD0000050905
00FDFD23131F2215FD23112615FDFD3F
00505900F8769A93042418FDFD000005
000500FDFD1D112424FD1F23121F221E
FD3F00505000FA769C93052418FDFD00
0004030000FDFDF0F0494A72707074FD
F0F0FD3F00004300FC92FFFFFFFFFFFF
        </patch>
        <part repeat="40960">00</part>
        <!-- gfx1 -->
        <part crc="2dcedd12" name="6.11n"></part>
        <part crc="fa7cbd91" name="5.11l"></part>
        <part crc="3375b3bd" name="4.11k"></part>
        <part crc="5655cc11" name="3.11h"></part>
        <!-- gfx2 -->
        <part crc="d1352c31" name="2.11c"></part>
        <part crc="a7a2fdbd" name="1.11a"></part>
        <part crc="d1352c31" name="2.11c"></part>
        <part crc="a7a2fdbd" name="1.11a"></part>
        <!-- cclimber_audio:samples -->
        <part crc="5f0bcdfb" name="14.5s"></part>
        <part crc="9003ffbd" name="13.5p"></part>
        <!-- proms -->
        <part crc="b3fc1505" name="prom.v6"></part>
        <part crc="26aada9e" name="prom.u6"></part>
        <part crc="676b3166" name="prom.t6"></part>
        </rom>
    <rom index="2"></rom>
    <rom index="3"></rom>
    <rom index="4"></rom>

    <nvram></nvram>

    <remark></remark>

    <mratimestamp>20230822163830</mratimestamp>
</misterromdescription>

Update: The flip screen implementation from the official MAME rom ckongmc has the same problem: <patch offset="0x49CE">2106C83E0077237732016BE1F1C9</patch>

mrfpga commented 7 months ago

I have another theory for the cocktail mode issue: the Crazy Kong sprite might be hardcoded in the core. This assumption stems from the fact that there exists a file rtl/ckong_big_sprite_palette.vhd within the core's source code.