FCare / Kronos

Kronos is a Sega Saturn emulator.
http://fcare.github.io
235 stars 23 forks source link

ST-V [Shienryu] & [Princess Clara Daisakusen] & [Golden Axe The Duel] controls not working. #676

Closed fastpop72 closed 4 years ago

fastpop72 commented 4 years ago

Controls aren't working in these ST-V rom.

barbudreadmon commented 4 years ago

I'll add some informations :

fastpop72 commented 4 years ago

There's a strange behaviour in Groove On Fight (ST-V), controls aren't working but each time you load the rom in Kronos (libretro core) the game adds 2 coin automatically. Maybe controls aren't working because there's some coin command stuck?

barbudreadmon commented 4 years ago

It seems the following code is never called in any of those games (same with Groove On Fight and VF remix) : https://github.com/FCare/Kronos/blob/673d7c17321e6ae03f6ca9e2a7b83de412dca657/yabause/src/smpc.c#L333-L337

Which explains why the controls don't work (backend never ask frontend if buttons were pressed).

barbudreadmon commented 4 years ago

Going further into the issue, it seems the following condition is never true after the title screen : https://github.com/FCare/Kronos/blob/673d7c17321e6ae03f6ca9e2a7b83de412dca657/yabause/src/smpc.c#L521-L522

This condition triggers the SmpcINTBACKPeripheral call. I think the bug is in SmpcSetTiming, which is supposed to set the SmpcInternalVars->timing value, i don't understand much about this function though.

barbudreadmon commented 4 years ago

I tried looking at https://github.com/mamedev/mame/blob/master/src/devices/machine/smpc.cpp and https://github.com/libretro/beetle-saturn-libretro/blob/master/mednafen/ss/smpc.cpp but couldn't figure out anything from them (i can tell they seem more complete though, with less warnings about unimplemented stuff). Interesting fact : mame has some comment about shienryu doing stuff that should be illegal on saturn's smpc.

fastpop72 commented 4 years ago

Together with Groove On Fight, there's also Astra Superstars with same behaviour.

The game starts, controls aren't working but at each start you have two more coins added automatically.

barbudreadmon commented 4 years ago

Finally fixed ! There was a big misunderstanding on how saturn/st-v actually handle inputs.

fastpop72 commented 4 years ago

Glad to hear!! I'm testing right now!! Now controls works on those games...

I have only a strange issue with Golden Axe Duel, the game runs ok but the characters move slowly. This does not occur in mame.

barbudreadmon commented 4 years ago

Yeah, there is an issue about it at https://github.com/FCare/Kronos/issues/731