diff --git a/HISTORY.txt b/HISTORY.txt index 6a5d61c..5186916 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -76,7 +76,8 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke) * added support for Everdrive extended SSF mapper * added support for MegaSD CD hardware overlay (MD+ hacks) and extended SSF2 / ROM write mappers * added emulation of Z80 halt when accessing 68k bus during DMA from 68k bus -* added basic emulation of 68k bus access refresh delays (fixes Super Airwolf graphical glitch during intro & some Krikzz's mcd-verificator timing tests) +* added emulation of 68k delay during Z80 acccess to 68k bus +* added (basic) emulation of 68k bus refresh delays (fixes Super Airwolf graphical glitch during intro & some Krikzz's mcd-verificator timing tests) * added (very basic) emulation of Flashkit MD hardware * added emulation of Micro Machines USA on-board TMSS bypass logic hardware * added SRAM support for games larger than 8MB diff --git a/builds/genesis_plus_gx_libretro.dll b/builds/genesis_plus_gx_libretro.dll index cf73ebf..90e0dd4 100644 Binary files a/builds/genesis_plus_gx_libretro.dll and b/builds/genesis_plus_gx_libretro.dll differ diff --git a/builds/genplus_cube.dol b/builds/genplus_cube.dol index 62ffa56..12a21b1 100644 Binary files a/builds/genplus_cube.dol and b/builds/genplus_cube.dol differ diff --git a/builds/genplus_wii.dol b/builds/genplus_wii.dol index 67ce077..e0940a9 100644 Binary files a/builds/genplus_wii.dol and b/builds/genplus_wii.dol differ diff --git a/core/memz80.c b/core/memz80.c index 521403e..75e1a20 100644 --- a/core/memz80.c +++ b/core/memz80.c @@ -108,8 +108,13 @@ static void z80_request_68k_bus_access(void) } } - /* average Z80 wait-states when accessing 68k area */ - Z80.cycles += 3 * 15; + /* approximate 68k wait-states during Z80 access to 68k bus (cf https://docs.google.com/document/d/1ST9GbFfPnIjLT5loytFCm3pB0kWQ1Oe34DCBBV8saY8) */ + /* value is adjusted to get ride of graphical glitches in Rick Dangerous 2 title screen when bus refresh delays are also emulated and still get */ + /* "M68K DELAY ON Z80 ROM READ" test "passed" in Ti_'s test ROM (misc_test.bin), although the measured delay value is still slightly too high. */ + m68k.cycles += ((Z80.cycles % 7) + 68); + + /* average Z80 wait-states when accessing 68k bus (cf https://docs.google.com/document/d/1ST9GbFfPnIjLT5loytFCm3pB0kWQ1Oe34DCBBV8saY8) */ + Z80.cycles += (3 * 15); } unsigned char z80_memory_r(unsigned int address)