summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-06-14 15:13:06 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-06-14 15:13:06 -0400
commit810da767b7cd71f971e3909ac3912a3df54539e2 (patch)
tree2ad4612ca7ed4b2a08624588a85d31595b688add
parent495dea1d88e0b0d8146ab10c6f56d4dae7799626 (diff)
i8275: Clean up code slightly (nw)
-rw-r--r--src/devices/video/i8275.cpp33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/devices/video/i8275.cpp b/src/devices/video/i8275.cpp
index 900e4194214..a2b561d6cbd 100644
--- a/src/devices/video/i8275.cpp
+++ b/src/devices/video/i8275.cpp
@@ -285,31 +285,28 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param,
if (m_scanline == 0)
vrtc_end();
- if ((m_status & ST_VE) && m_scanline <= (m_vrtc_scanline - SCANLINES_PER_ROW))
+ if ((m_status & ST_VE) && lc == 0 && m_scanline < m_vrtc_scanline)
{
- if (lc == 0)
+ if (!m_dma_stop && m_buffer_idx < CHARACTERS_PER_ROW)
{
- if (!m_dma_stop && m_buffer_idx < CHARACTERS_PER_ROW)
- {
- m_status |= ST_DU;
- m_dma_stop = true;
+ m_status |= ST_DU;
+ m_dma_stop = true;
- // blank screen until after VRTC
- m_end_of_screen = true;
+ // blank screen until after VRTC
+ m_end_of_screen = true;
- //LOG("I8275 y %u x %u DMA Underrun\n", y, x);
+ //LOG("I8275 y %u x %u DMA Underrun\n", y, x);
- m_write_drq(0);
- }
+ m_write_drq(0);
+ }
- if (!m_dma_stop)
- {
- // swap line buffers
- m_buffer_dma = !m_buffer_dma;
+ if (!m_dma_stop)
+ {
+ // swap line buffers
+ m_buffer_dma = !m_buffer_dma;
- if ((m_scanline < (m_vrtc_scanline - SCANLINES_PER_ROW)))
- dma_start();
- }
+ if (m_scanline < (m_vrtc_scanline - SCANLINES_PER_ROW))
+ dma_start();
}
}