summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author David Haywood <mamehaze@users.noreply.github.com>2012-12-08 08:16:09 +0000
committer David Haywood <mamehaze@users.noreply.github.com>2012-12-08 08:16:09 +0000
commit5460d901f45db1d2d8bddb0446620a8b99985b5b (patch)
tree85269613599ee03d3d91fb90db9b006b9eaf5e4c
parent483c15bc8198a63f5cd9b76725bb07528f12ec87 (diff)
stop "neocdz lresort" and "neocdz kof98" from stomping over their own z80 data.. (nw)
-rw-r--r--hash/neocd.xml6
-rw-r--r--src/mame/includes/neogeo.h2
-rw-r--r--src/mess/drivers/ng_aes.c23
3 files changed, 24 insertions, 7 deletions
diff --git a/hash/neocd.xml b/hash/neocd.xml
index 97c796faf28..b309bbccaaf 100644
--- a/hash/neocd.xml
+++ b/hash/neocd.xml
@@ -552,8 +552,7 @@
</part>
</software>
- <!-- sound doesn't work? -->
- <software name="kof98" supported="no">
+ <software name="kof98">
<description>King of Fighters '98, The - The Slugfest (1998)(SNK)(JP)[!][King of Fighters '98, The - Dream Match Never Ends][NGCD-2420 MT A04, NGCD-2421]</description>
<year>199?</year>
<publisher>SNK</publisher>
@@ -597,8 +596,7 @@
</part>
</software>
- <!-- sound doesn't work? -->
- <software name="lresort" supported="no">
+ <software name="lresort">
<description>Last Resort (1994)(SNK)(JP-US)[!]</description>
<year>199?</year>
<publisher>SNK</publisher>
diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h
index 46d10a4e813..8a20f0bf1dd 100644
--- a/src/mame/includes/neogeo.h
+++ b/src/mame/includes/neogeo.h
@@ -45,6 +45,7 @@ public:
m_has_sprite_bus = true;
m_has_text_bus = true;
m_has_ymrom_bus = true;
+ m_has_z80_bus = true;
}
/* memory pointers */
@@ -239,6 +240,7 @@ public:
bool m_has_sprite_bus;
bool m_has_text_bus;
bool m_has_ymrom_bus;
+ bool m_has_z80_bus;
};
diff --git a/src/mess/drivers/ng_aes.c b/src/mess/drivers/ng_aes.c
index 0f63f663654..4aeb9d09f06 100644
--- a/src/mess/drivers/ng_aes.c
+++ b/src/mess/drivers/ng_aes.c
@@ -394,7 +394,10 @@ WRITE16_MEMBER(ng_aes_state::neocd_control_w)
case 0x0104:
// bprintf(PRINT_NORMAL, _T(" - NGCD 0xE00000 area -> 0x%02X (PC: 0x%06X)\n"), byteValue, SekGetPC(-1));
- nActiveTransferArea = byteValue;
+ if (ACCESSING_BITS_0_7)
+ {
+ nActiveTransferArea = byteValue;
+ }
break;
case 0x0120:
@@ -407,6 +410,7 @@ WRITE16_MEMBER(ng_aes_state::neocd_control_w)
break;
case 0x0126:
// bprintf(PRINT_NORMAL, _T(" - NGCD Z80 BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1));
+ m_has_z80_bus = false;
space.machine().scheduler().synchronize();
m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
break;
@@ -425,6 +429,7 @@ WRITE16_MEMBER(ng_aes_state::neocd_control_w)
break;
case 0x0146:
// bprintf(PRINT_NORMAL, _T(" - NGCD Z80 BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1));
+ m_has_z80_bus = true;
space.machine().scheduler().synchronize();
m_audiocpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
break;
@@ -582,9 +587,21 @@ WRITE8_MEMBER(ng_aes_state::neocd_transfer_w)
YM2610ADPCMAROM[nADPCMTransferBank + ((sekAddress & 0x0FFFFF) >> 1)] = byteValue;
break;
case 4: // Z80
- if ((sekAddress & 0xfffff) >= 0x20000) break;
- NeoZ80ROMActive[(sekAddress & 0x1FFFF) >> 1] = byteValue;
+ // kof98 and lresort attempt to write here when the system still has the z80 bank
+ // it seems they attempt to write regular samples (not even deltat) maybe there is
+ // some kind of fall-through behavior, or it shouldn't be allowed to select a
+ // transfer area without the bus? - this should really be checked on hw
+ if (m_has_z80_bus)
+ {
+ YM2610ADPCMAROM[nADPCMTransferBank + ((sekAddress & 0x0FFFFF) >> 1)] = byteValue;
+ }
+ else
+ {
+ // printf("sekAddress %08x %02x\n", sekAddress, data);
+ if ((sekAddress & 0xfffff) >= 0x20000) break;
+ NeoZ80ROMActive[(sekAddress & 0x1FFFF) >> 1] = byteValue;
+ }
break;
case 5: // Text
NeoTextRAM[(sekAddress & 0x3FFFF) >> 1] = byteValue;