a2mockingboard.cpp: Fix 2 more off-by-ones in the Phasor address decoding [TomCh]

This commit is contained in:
arbee 2021-04-03 21:56:04 -04:00
parent 9c14a66139
commit 029f7fdf87

View File

@ -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;