From 13f03740d2a6f9a16a4e34db9cfb224bb1c6a381 Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Tue, 23 Jul 2013 21:30:11 +0000 Subject: [PATCH] Fix compile and improved sound comms in Street Fight --- src/mame/drivers/stfight.c | 2 +- src/mame/includes/stfight.h | 2 ++ src/mame/machine/stfight.c | 7 +++---- src/mame/video/cyberbal.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mame/drivers/stfight.c b/src/mame/drivers/stfight.c index 6559fb34467..81fadc39ede 100644 --- a/src/mame/drivers/stfight.c +++ b/src/mame/drivers/stfight.c @@ -274,7 +274,7 @@ static ADDRESS_MAP_START( cpu2_map, AS_PROGRAM, 8, stfight_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE("ym1", ym2203_device, read, write) AM_RANGE(0xc800, 0xc801) AM_DEVREADWRITE("ym2", ym2203_device, read, write) - AM_RANGE(0xe800, 0xe800) AM_WRITE(stfight_e800_w) + AM_RANGE(0xe800, 0xe800) AM_WRITE(stfight_fm_w) AM_RANGE(0xf000, 0xf000) AM_READ(stfight_fm_r) AM_RANGE(0xf800, 0xffff) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h index df3b0da8691..fab3a50b24f 100644 --- a/src/mame/includes/stfight.h +++ b/src/mame/includes/stfight.h @@ -16,6 +16,7 @@ public: m_vh_latch_ram(*this, "vh_latch_ram"), m_sprite_ram(*this, "sprite_ram"), m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), m_mcu(*this, "mcu"), m_msm(*this, "msm") { } @@ -25,6 +26,7 @@ public: required_shared_ptr m_vh_latch_ram; required_shared_ptr m_sprite_ram; required_device m_maincpu; + required_device m_audiocpu; optional_device m_mcu; required_device m_msm; UINT8 *m_decrypt; diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c index 0d84a597968..cf0393754a2 100644 --- a/src/mame/machine/stfight.c +++ b/src/mame/machine/stfight.c @@ -258,16 +258,15 @@ WRITE8_MEMBER(stfight_state::stfight_e800_w) WRITE8_MEMBER(stfight_state::stfight_fm_w) { - // the sound cpu ignores any fm data without bit 7 set - m_fm_data = 0x80 | data; + // the sound cpu ignores any fm data without bit 7 set, it's very likely to be xor'ed and both CPUs can write to it. + m_fm_data = 0x80 ^ data; } READ8_MEMBER(stfight_state::stfight_fm_r) { int data = m_fm_data; - // clear the latch?!? - m_fm_data &= 0x7f; + //m_fm_data &= 0x7f; return( data ); } diff --git a/src/mame/video/cyberbal.c b/src/mame/video/cyberbal.c index e1d4ab1dc3c..c86f9979f0a 100644 --- a/src/mame/video/cyberbal.c +++ b/src/mame/video/cyberbal.c @@ -261,7 +261,7 @@ void cyberbal_state::scanline_update(screen_device &screen, int scanline) UINT32 cyberbal_state::update_one_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int index) { // start drawing - atari_motion_objects_device *curmob = index ? m_mob2 : m_mob; + atari_motion_objects_device *curmob = index ? m_mob2.target() : m_mob.target(); curmob->draw_async(cliprect); /* draw the playfield */