summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/bt431.h
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2019-09-13 11:09:24 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2019-09-13 11:09:24 +0700
commit40de5e0551f18bef6694b360dcd7a4caa787e36e (patch)
treea5ff69a5e58521677a38fe3b243247fbe88afe75 /src/devices/video/bt431.h
parentbd50190cfe70f741590c9689872f7ff14111a83e (diff)
bt431: fix masking (nw)
Address and command register masking to match SGI IDE cursor test expectations.
Diffstat (limited to 'src/devices/video/bt431.h')
-rw-r--r--src/devices/video/bt431.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/devices/video/bt431.h b/src/devices/video/bt431.h
index 86241a8d87b..1ea71b56794 100644
--- a/src/devices/video/bt431.h
+++ b/src/devices/video/bt431.h
@@ -35,6 +35,8 @@ public:
CR_D4 = 0x10, // cursor format control
CR_D5 = 0x20, // cross hair cursor enable
CR_D6 = 0x40, // 64x64 cursor enable
+
+ CR_WM = 0x7f, // write mask
};
enum cr_d1d0_mask : u8
@@ -62,7 +64,7 @@ protected:
virtual void device_reset() override;
template <unsigned S> u8 addr_r() { return m_address >> S; }
- template <unsigned S> void addr_w(u8 data) { m_address = (m_address & (0xff00 >> S)) | (u16(data) << S); }
+ template <unsigned S> void addr_w(u8 data) { m_address = ((m_address & (0xff00 >> S)) | (u16(data) << S)) & ADDRESS_MASK; }
u8 ram_r();
void ram_w(u8 data);