libretro / mame2003-libretro

MAME 0.78 for libretro. Compatible with MAME 0.78 sets.
Other
90 stars 74 forks source link

One rotation of 12 way joystick does not rotate character at certain points in SNK games #503

Closed zorro2055 closed 10 months ago

zorro2055 commented 11 months ago

Hello, I investigated this, and it looks like this issue is caused by a bug fix which intentionally feeds a invalid code to avoid a bug with Guerilla War.

I also came up with a patch (attached) that automatically rotates to the next code (which is a good code) that the character was rotating to in the next frame. So, the bug fix for Guerilla war still works, but the user never perceives the character did not rotate when the 12 way joystick is rotated.

Let me know if there are issues with the patch, method of fixing this bug, etc. I'm willing to correct as needed.

Reference: Some code in src/drivers/snk.c intentionally introducing the invalid code (0xf0):

        const int dial_12[13] = {
        0xb0,0xa0,0x90,0x80,0x70,0x60,
        0xf0,
        /* 0xf0 isn't a valid direction, but avoids the "joystick error"
        protection
        ** in Guerilla War which happens when direction changes directly from
        ** 0x50<->0x60 8 times.
        */
        0x50,0x40,0x30,0x20,0x10,0x00
        };

patchSNKFixRotate.txt

mahoneyt944 commented 10 months ago

Hi, thanks for submitting a proposal. Please submit a Pull Request (not a diff) and I'll review your submission. Thank you.

zorro2055 commented 10 months ago

Hi @mahoneyt944 , thanks for the response. I have submitted a pull request as directed.

mahoneyt944 commented 10 months ago

Merged #504 to resolve this issue. Thank you