gameplan: Fix videoram readback, fixes MT#3067

This commit is contained in:
Olivier Galibert 2021-06-07 23:03:31 +02:00
parent 7d65e376f0
commit 565e938c61
3 changed files with 5 additions and 1 deletions

View File

@ -938,6 +938,7 @@ void gameplan_state::machine_start()
save_item(NAME(m_video_y));
save_item(NAME(m_video_command));
save_item(NAME(m_video_data));
save_item(NAME(m_video_previous));
}
@ -948,6 +949,7 @@ void gameplan_state::machine_reset()
m_video_y = 0;
m_video_command = 0;
m_video_data = 0;
m_video_previous = 0;
}
void gameplan_state::gameplan(machine_config &config)

View File

@ -81,6 +81,7 @@ private:
uint8_t m_video_y;
uint8_t m_video_command;
uint8_t m_video_data;
uint8_t m_video_previous;
/* devices */
optional_device<cpu_device> m_audiocpu;

View File

@ -156,7 +156,7 @@ void gameplan_state::leprechn_video_command_w(uint8_t data)
uint8_t gameplan_state::leprechn_videoram_r()
{
return m_videoram[m_video_y * (HBSTART - HBEND) + m_video_x];
return m_video_previous;
}
@ -193,6 +193,7 @@ WRITE_LINE_MEMBER(gameplan_state::video_command_trigger_w)
m_video_y = m_video_y + 1;
}
m_video_previous = m_videoram[m_video_y * (HBSTART - HBEND) + m_video_x];
m_videoram[m_video_y * (HBSTART - HBEND) + m_video_x] = m_video_data & 0x0f;
break;