From 029f7fdf878f237d591a91a1c6f9b033c5cb7aa2 Mon Sep 17 00:00:00 2001 From: arbee Date: Sat, 3 Apr 2021 21:56:04 -0400 Subject: [PATCH] a2mockingboard.cpp: Fix 2 more off-by-ones in the Phasor address decoding [TomCh] --- src/devices/bus/a2bus/a2mockingboard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/bus/a2bus/a2mockingboard.cpp b/src/devices/bus/a2bus/a2mockingboard.cpp index dee688a9749..6073e843371 100644 --- a/src/devices/bus/a2bus/a2mockingboard.cpp +++ b/src/devices/bus/a2bus/a2mockingboard.cpp @@ -193,7 +193,7 @@ uint8_t a2bus_phasor_device::read_cnxx(uint8_t offset) via_sel = (offset & 0x80) ? 2 : 1; } - if ((offset < 0x20) || (offset >= 0x80 && offset <= 0xa0)) + if ((offset < 0x20) || (offset >= 0x80 && offset < 0xa0)) { if (BIT(via_sel, 0)) { @@ -229,7 +229,7 @@ void a2bus_ayboard_device::write_cnxx(uint8_t offset, uint8_t data) void a2bus_phasor_device::write_cnxx(uint8_t offset, uint8_t data) { - if ((offset < 0x20) || (offset >= 0x80 && offset <= 0xa0)) + if ((offset < 0x20) || (offset >= 0x80 && offset < 0xa0)) { int via_sel;