ekeeke / Genesis-Plus-GX

An enhanced port of Genesis Plus - accurate & portable Sega 8/16 bit emulator
Other
676 stars 194 forks source link

BreakThru! lockup without DI/EI patch #399

Closed gameblabla closed 2 years ago

gameblabla commented 2 years ago

BreakThru!, a prototype for the Game Gear that was recently released, won't boot on Genesis Plus GX. (as well as MAME and any master system emulator that relies on pullmoll's z80 emulator.)

A patch has been released to make it more compatible, according to them :

The prototype build of "BreakThru!" that we obtained seems to have a bug preventing it 
to work on real hardware and many emulators (it accidentally relies on very precise timing,
SOME setups might run it but most won't).
We provide a patched version to fix this bug.

The changes that have been made are:

At offset $02E38: overwrote $F3 with $00 (DI -> NOP)
At offset $02E41: overwrote $FB with $00 (EI -> NOP)

(Patch by Calindro)

I also tested the GG2SMS conversion on my Megadrive 2 PAL after i reverted the DI/EI patch that was applied on top of it and it does break there. This is said to work ok on a Game Gear apparently but i can't try this nor can i actually try it on a master system.

After looking at one of the emulators that can boot it unpatched (GearSystem), it doesn't seem that DI/EI are improperly emulated. But i could be wrong...

ekeeke commented 2 years ago

The SMS Power release thread explicitely says the original/unpatched ROM dump does NOT work on real hardware so I don't understand the purpose of this issue. You even confirmed it yourself by running the unpatched code on your Mega Drive (which does not use different Z80 CPU or clock speed than Master System or Game Gear) so why would you expect it to work on this emulator?

Gear System is obviously doing something different from real hardware,which actually makes it less accurate than other emulators.

gameblabla commented 2 years ago

Hey, yeah i was under the impression it could have been a situation where the game relies on the initial state of the hardware. I guess it is supposed not to work then, which i found to be a bit puzzling. : P