[Core/MD] improved accuracy of 68k access to Z80 bus delays

This commit is contained in:
ekeeke 2024-02-23 11:23:13 +01:00
parent c04a9426b7
commit 4c4a762588
5 changed files with 8 additions and 2 deletions

View File

@ -81,6 +81,7 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke)
* improved console region auto-detection for a few PAL-only games (The Smurfs Travel the World & Williams Arcade's Greatest Hits)
* improved I2C EEPROM boards emulation accuracy
* improved SVP memory handlers accuracy (fixes Virtua Racing debug mode)
* improved accuracy of 68k access to Z80 bus delays
* fixed Realtec mapper behavior on soft-reset and with TMSS hardware
* fixed Game Genie / Pro Action Replay lock-on support when Mega CD hardware is enabled
* fixed Game Genie / Pro Action Replay lock-on support with games larger than 8MB
@ -167,9 +168,9 @@ Genesis Plus GX 1.7.5 (xx/xx/xxxx) (Eke-Eke)
* fixed Mode 1 rendering (TMS99xx "text" mode)
* fixed Master System II extended video modes sprite parsing (fixes Mega Man 2 demo)
* fixed Game Gear display rendering regression when left/right borders were disabled
* fixed 68k cycles delay on invalid VRAM writes (fixes "Microcosm" intro loop)
* fixed address/code potential corruption by one-instruction execution delay after HV interrupts activation (fixes Pugsy's Pyramids stage boss)
* optimized tile caching
* reverted FIFO access timings hack when using invalid write code value
[Core/Sound]
---------------

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 4.0 MiB

View File

@ -140,6 +140,9 @@ unsigned int m68k_lockup_r_16 (unsigned int address)
unsigned int z80_read_byte(unsigned int address)
{
/* Z80 bus access latency */
m68k.cycles += 1 * 7;
switch ((address >> 13) & 3)
{
case 2: /* YM2612 */
@ -172,6 +175,9 @@ unsigned int z80_read_word(unsigned int address)
void z80_write_byte(unsigned int address, unsigned int data)
{
/* Z80 bus access latency (fixes Pacman 2: New Adventures sound engine crashes & Puyo Puyo 2 crash when exiting option menu) */
m68k.cycles += 1 * 7;
switch ((address >> 13) & 3)
{
case 2: /* YM2612 */
@ -207,7 +213,6 @@ void z80_write_byte(unsigned int address, unsigned int data)
default: /* ZRAM */
{
zram[address & 0x1FFF] = data;
m68k.cycles += 2 * 7; /* ZRAM access latency (fixes Pacman 2: New Adventures & Puyo Puyo 2) */
return;
}
}