ekeeke / Genesis-Plus-GX

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

Marko's Magic Football (Mega CD) Graphic Bug #482

Closed KamiLordus closed 7 months ago

KamiLordus commented 1 year ago

On one of the first screens (location map) there is a graphic error - the bottom of the screen. Please fix it.

215456644-1fb76b3e-a99c-4b44-bb0f-340eec470f23

Issue originally reported in: https://github.com/libretro/Genesis-Plus-GX/issues/318

ekeeke commented 1 year ago

Sorry, I meant this one should be kept open and the ones in libretro repository closed as it is easier for me to keep track of core issues here (and I doubt anyone else is going to look into this anyway).

As I indicated in libretro repository, this is caused by sub-cpu trying to write into word-ram while it is allocated to main-cpu (RET bit set in 2M mode). On real hardware, sub-cpu is halted in this case, which delays the writes after word-ram has been read through VDP DMA so there is no graphics corruption. This is not emulated by this emulator (and apparently neither by most software emulators as this bug also occurs In Kega Fusion, Gens, Picodrive,...) and will require some changes to both Mega-CD hardware and 68k cpu core emulation, as current core (MAME's Musashi) does not permit to halt cpu in the middle of an instruction (and postpone read or write memory access until cpu is not halted anymore).

KamiLordus commented 1 year ago

Thank you for clarification and interest in reporting the issue. However, it looks very complicated and probably impossible to fix. I have one more question: Would it be possible to fix only this particular screen (map) instead of fixing the problem with the emulation itself? I mean, from what I can see, the Sege Genesis version of the screen is clearly lower. Would it be possible to lower it and hide this graphic glitch? Bez tytułu

ekeeke commented 7 months ago

Fixed by https://github.com/ekeeke/Genesis-Plus-GX/commit/6cc8bbc2776dfbe62411fc1e8fbc5807c8e3558d