summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-01-22 21:23:53 +0100
committer hap <happppp@users.noreply.github.com>2021-01-22 21:24:10 +0100
commitd40990b628b34c1b0aef3d3bd57d9a9fb7ed91b7 (patch)
treec48c3c82be8ce89fff69d09fd1466b1422f54b24
parent1eb22dd22c69b042dc2d24d906d251552d5795ba (diff)
i8244: fix recent regression
-rw-r--r--src/devices/video/i8244.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/devices/video/i8244.cpp b/src/devices/video/i8244.cpp
index 029dd593810..366a7ab5618 100644
--- a/src/devices/video/i8244.cpp
+++ b/src/devices/video/i8244.cpp
@@ -286,12 +286,12 @@ u8 i8244_device::read(offs_t offset)
default:
data = m_vdc.reg[offset];
- // object x/y/attr registers are not readable when display is enabled
+ // object x/y/attr registers are not accessible when display is enabled
// (sprite shape registers still are)
if (offset < 0x80 && m_vdc.s.control & 0x20)
data = 0;
- // grid registers are not readable when grid is enabled
+ // grid registers are not accessible when grid is enabled
else if (offset >= 0xc0 && m_vdc.s.control & 0x08)
data = 0;
@@ -306,8 +306,9 @@ void i8244_device::write(offs_t offset, u8 data)
{
offset = fix_register_mirrors(offset);
- // object registers are not accessible when display is enabled
- if (offset < 0xa0 && m_vdc.s.control & 0x20)
+ // object x/y/attr registers are not accessible when display is enabled
+ // (sprite shape registers still are)
+ if (offset < 0x80 && m_vdc.s.control & 0x20)
return;
// grid registers are not accessible when grid is enabled
@@ -316,7 +317,7 @@ void i8244_device::write(offs_t offset, u8 data)
return;
// update screen before accessing video registers
- if ((offset == 0xa0 || offset == 0xa2 || offset == 0xa3) && data != m_vdc.reg[offset])
+ if ((offset <= 0xa0 || offset == 0xa2 || offset == 0xa3) && data != m_vdc.reg[offset])
screen().update_now();
// color registers d4-d7 are not connected