diff options
author | Robbbert <Robbbert@users.noreply.github.com> | 2020-11-25 01:06:16 +1100 |
---|---|---|
committer | Robbbert <Robbbert@users.noreply.github.com> | 2020-11-25 01:06:16 +1100 |
commit | 47346ceaec707131a0cb7844a705c780d45fffa2 (patch) | |
tree | 9dc9caceebc82a3cf5ee3be72584f8231a7c0a85 | |
parent | 37b00ebe8c7152feafb3c6e04df72e702d5dacca (diff) |
tim100: prevent the unlikely possibility of a buffer overflow.
-rw-r--r-- | src/mame/drivers/tim100.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mame/drivers/tim100.cpp b/src/mame/drivers/tim100.cpp index 447708f15a9..b07c64add42 100644 --- a/src/mame/drivers/tim100.cpp +++ b/src/mame/drivers/tim100.cpp @@ -97,6 +97,7 @@ void tim100_state::machine_start() { m_palette->set_pen_colors(0, tim100_palette); save_item(NAME(m_dma_adr)); + m_dma_adr = 0; } const gfx_layout charlayout = @@ -143,7 +144,10 @@ I8275_DRAW_CHARACTER_MEMBER( tim100_state::crtc_display_pixels ) WRITE_LINE_MEMBER( tim100_state::drq_w ) { if (state) + { m_crtc->dack_w(m_p_videoram[m_dma_adr++]); + m_dma_adr &= 0x7ff; + } } WRITE_LINE_MEMBER( tim100_state::irq_w ) |