diff options
author | 2017-09-14 07:22:27 -0400 | |
---|---|---|
committer | 2017-09-14 07:22:27 -0400 | |
commit | 93eba4f59610611f06ba7cd28ef4df63fbb149d4 (patch) | |
tree | ff7cf144cc7f4b46ebe36dbfd9ead435c3295fdd | |
parent | 3e75b424ac09ca90394adf3f430aa8c3ee6c7504 (diff) |
advision: Synchronize sound commands (fixes sound in turtles, nw)
-rw-r--r-- | src/mame/includes/advision.h | 2 | ||||
-rw-r--r-- | src/mame/machine/advision.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/mame/includes/advision.h b/src/mame/includes/advision.h index f0435127ae7..716e7522413 100644 --- a/src/mame/includes/advision.h +++ b/src/mame/includes/advision.h @@ -56,6 +56,8 @@ public: DECLARE_WRITE8_MEMBER( bankswitch_w ); DECLARE_WRITE8_MEMBER( av_control_w ); DECLARE_READ_LINE_MEMBER( vsync_r ); + + TIMER_CALLBACK_MEMBER( sound_cmd_sync ); DECLARE_READ8_MEMBER( sound_cmd_r ); DECLARE_WRITE8_MEMBER( sound_g_w ); DECLARE_WRITE8_MEMBER( sound_d_w ); diff --git a/src/mame/machine/advision.cpp b/src/mame/machine/advision.cpp index adc01887ead..baa59914536 100644 --- a/src/mame/machine/advision.cpp +++ b/src/mame/machine/advision.cpp @@ -109,6 +109,11 @@ WRITE8_MEMBER( advision_state::ext_ram_w ) /* Sound */ +TIMER_CALLBACK_MEMBER( advision_state::sound_cmd_sync ) +{ + m_sound_cmd = param; +} + READ8_MEMBER( advision_state::sound_cmd_r ) { return m_sound_cmd; @@ -138,7 +143,7 @@ WRITE8_MEMBER( advision_state::sound_d_w ) WRITE8_MEMBER( advision_state::av_control_w ) { - m_sound_cmd = data >> 4; + machine().scheduler().synchronize(timer_expired_delegate(FUNC(advision_state::sound_cmd_sync), this), data >> 4); if ((m_video_enable == 0x00) && (data & 0x10)) { |