From bbeddce0b4b9fe02a3e9376787cf1b283e29f480 Mon Sep 17 00:00:00 2001 From: mamehaze Date: Mon, 9 Mar 2015 00:37:34 +0000 Subject: [PATCH] don't crash on garbage values roadedge / samsh64 write on startup (nw) --- src/emu/cpu/nec/v53.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/emu/cpu/nec/v53.c b/src/emu/cpu/nec/v53.c index 063eb3741a9..8831c99d4c6 100644 --- a/src/emu/cpu/nec/v53.c +++ b/src/emu/cpu/nec/v53.c @@ -202,6 +202,7 @@ void v53_base_device::install_peripheral_io() if (m_OPSEL & 0x01) // DMA Unit available { UINT16 base = (m_OPHA << 8) | m_DULA; + base &= 0xfffe; if (m_SCTL & 0x02) // uPD71037 mode { @@ -222,6 +223,7 @@ void v53_base_device::install_peripheral_io() if (m_OPSEL & 0x02) // Interupt Control Unit available { UINT16 base = (m_OPHA << 8) | m_IULA; + base &= 0xfffe; if (IOAG) // 8-bit { @@ -239,6 +241,7 @@ void v53_base_device::install_peripheral_io() { UINT16 base = (m_OPHA << 8) | m_TULA; //printf("installing TCU to %04x\n", base); + base &= 0xfffe; if (IOAG) // 8-bit { @@ -256,6 +259,8 @@ void v53_base_device::install_peripheral_io() if (m_OPSEL & 0x08) // Serial Control Unit available { UINT16 base = (m_OPHA << 8) | m_SULA; + base &= 0xfffe; + if (IOAG) // 8-bit {