advision: Synchronize sound commands (fixes sound in turtles, nw)

This commit is contained in:
AJR 2017-09-14 07:22:27 -04:00
parent 3e75b424ac
commit 93eba4f596
2 changed files with 8 additions and 1 deletions

View File

@ -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 );

View File

@ -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))
{