mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
tatsumi.cpp: oki status is actually reversed active wise for Cycle Warriors and Big Fight, fixes "we got em" sample playback in former [Angelo Salese]
This commit is contained in:
parent
0ab56274c9
commit
221b16bcba
@ -286,7 +286,7 @@ void apache3_state::apache3_v20_map(address_map &map)
|
||||
map(0x04000, 0x04003).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
|
||||
map(0x06000, 0x06001).portr("IN0"); // esw
|
||||
map(0x08000, 0x08001).r(this, FUNC(apache3_state::tatsumi_hack_ym2151_r)).w(m_ym2151, FUNC(ym2151_device::write));
|
||||
map(0x0a000, 0x0a000).r(this, FUNC(apache3_state::tatsumi_hack_oki_r)).w(m_oki, FUNC(okim6295_device::write));
|
||||
map(0x0a000, 0x0a000).r(m_oki, FUNC(okim6295_device::read)).w(m_oki, FUNC(okim6295_device::write));
|
||||
map(0x0e000, 0x0e007).rw("adc", FUNC(adc0808_device::data_r), FUNC(adc0808_device::address_offset_start_w));
|
||||
map(0xf0000, 0xfffff).rom().region("sound_rom", 0);
|
||||
}
|
||||
@ -334,7 +334,7 @@ void roundup5_state::roundup5_z80_map(address_map &map)
|
||||
map(0x0000, 0xdfff).rom();
|
||||
map(0xe000, 0xffef).ram();
|
||||
map(0xfff0, 0xfff1).r(this, FUNC(roundup5_state::tatsumi_hack_ym2151_r)).w(m_ym2151, FUNC(ym2151_device::write));
|
||||
map(0xfff4, 0xfff4).r(this, FUNC(roundup5_state::tatsumi_hack_oki_r)).w(m_oki, FUNC(okim6295_device::write));
|
||||
map(0xfff4, 0xfff4).r(m_oki, FUNC(okim6295_device::read)).w(m_oki, FUNC(okim6295_device::write));
|
||||
map(0xfff8, 0xfffb).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
|
||||
map(0xfffc, 0xfffc).portr("STICKX");
|
||||
}
|
||||
@ -393,7 +393,7 @@ void cyclwarr_state::sound_map(address_map &map)
|
||||
map(0x0000, 0xdfff).rom();
|
||||
map(0xe000, 0xffef).ram();
|
||||
map(0xfff0, 0xfff1).r(this, FUNC(cyclwarr_state::tatsumi_hack_ym2151_r)).w(m_ym2151, FUNC(ym2151_device::write));
|
||||
map(0xfff4, 0xfff4).r(this, FUNC(cyclwarr_state::tatsumi_hack_oki_r)).w(m_oki, FUNC(okim6295_device::write));
|
||||
map(0xfff4, 0xfff4).r(this, FUNC(cyclwarr_state::oki_status_xor_r)).w(m_oki, FUNC(okim6295_device::write));
|
||||
map(0xfffc, 0xfffc).r(m_soundlatch, FUNC(generic_latch_8_device::read));
|
||||
map(0xfffe, 0xfffe).nopw();
|
||||
}
|
||||
|
@ -57,7 +57,6 @@ public:
|
||||
TILE_GET_INFO_MEMBER(get_text_tile_info);
|
||||
INTERRUPT_GEN_MEMBER(v30_interrupt);
|
||||
DECLARE_READ8_MEMBER(tatsumi_hack_ym2151_r);
|
||||
DECLARE_READ8_MEMBER(tatsumi_hack_oki_r);
|
||||
DECLARE_WRITE8_MEMBER(hd6445_crt_w);
|
||||
|
||||
void tatsumi_reset();
|
||||
@ -202,6 +201,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(cyclwarr_control_w);
|
||||
DECLARE_WRITE8_MEMBER(cyclwarr_sound_w);
|
||||
DECLARE_WRITE16_MEMBER(output_w);
|
||||
DECLARE_READ8_MEMBER(oki_status_xor_r);
|
||||
|
||||
template<int Bank> DECLARE_READ16_MEMBER(cyclwarr_videoram_r);
|
||||
template<int Bank> DECLARE_WRITE16_MEMBER(cyclwarr_videoram_w);
|
||||
|
||||
|
@ -316,10 +316,19 @@ READ8_MEMBER(tatsumi_state::tatsumi_hack_ym2151_r)
|
||||
return r;
|
||||
}
|
||||
|
||||
READ8_MEMBER(tatsumi_state::tatsumi_hack_oki_r)
|
||||
READ8_MEMBER(cyclwarr_state::oki_status_xor_r)
|
||||
{
|
||||
int r=m_oki->read(space,0);
|
||||
int r = m_oki->read(space,0);
|
||||
|
||||
// Cycle Warriors and Big Fight access this with reversed activeness.
|
||||
// this is particularly noticeable with the "We got em" sample played in CW at stage clear:
|
||||
// gets cut too early with the old hack below.
|
||||
// fwiw returning normal oki status doesn't work at all, both games don't make any sound.
|
||||
// TODO: verify with HW
|
||||
return (r ^ 0xff);
|
||||
#ifdef UNUSED_FUNCTION
|
||||
// old hack left for reference
|
||||
|
||||
if (m_audiocpu->pc()==0x2b70 || m_audiocpu->pc()==0x2bb5
|
||||
|| m_audiocpu->pc()==0x2acc
|
||||
|| m_audiocpu->pc()==0x1c79 // BigFight
|
||||
@ -330,4 +339,5 @@ READ8_MEMBER(tatsumi_state::tatsumi_hack_oki_r)
|
||||
|| m_audiocpu->pc()==0x1cac) // BigFight
|
||||
return 0;
|
||||
return r;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user