summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2020-08-22 19:03:28 +0200
committer hap <happppp@users.noreply.github.com>2020-08-22 19:03:43 +0200
commitb7f12265ab5e296e03fd2ac04bd7ae9f9fc1ee66 (patch)
treecb55be29afa8167b690fb0856b29df2125069bb8 /src/devices/video
parent784d6ceb8f5b1757b7551c39899169cf8569e518 (diff)
i8244: reduce partial screen update calls
Diffstat (limited to 'src/devices/video')
-rw-r--r--src/devices/video/i8244.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/video/i8244.cpp b/src/devices/video/i8244.cpp
index f2aaa56be48..6721f43ed2d 100644
--- a/src/devices/video/i8244.cpp
+++ b/src/devices/video/i8244.cpp
@@ -369,7 +369,7 @@ void i8244_device::write(offs_t offset, uint8_t data)
return;
// update screen before accessing video registers
- if (offset < 0xa4 || offset >= 0xc0)
+ if (offset >= 0x80 && offset < 0xa4)
screen().update_now();
// color registers d4-d7 are not connected
@@ -518,13 +518,13 @@ uint32_t i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap
int w = ( m_vdc.s.control & 0x80 ) ? width : 2;
/* Draw horizontal part of the grid */
- for ( int j = 1, y = 0; y < 9; y++, j <<= 1 )
+ for ( int y = 0; y < 9; y++ )
{
if ( y_grid_offset + y * height <= scanline && scanline < y_grid_offset + y * height + 3 )
{
for ( int i = 0; i < 9; i++ )
{
- if ( ( m_vdc.s.hgrid[0][i] & j ) || ( m_vdc.s.hgrid[1][i] & ( j >> 8 ) ) )
+ if ( BIT(m_vdc.s.hgrid[1][i] << 8 | m_vdc.s.hgrid[0][i], y) )
{
for ( int k = 0; k < width + 2; k++ )
{