From 6571e6731ea84f09ec3c8cb29c1cd4b30b09c2a9 Mon Sep 17 00:00:00 2001 From: mooglyguy Date: Thu, 2 Nov 2017 22:23:00 +0100 Subject: -gba: By default, GPIO ports should pass ROM through on read. Fixes Doom 2 and Duke Nukem Advance. [Ryan Holtz] --- src/devices/bus/gba/rom.cpp | 4 +--- src/mame/drivers/gba.cpp | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/devices/bus/gba/rom.cpp b/src/devices/bus/gba/rom.cpp index 5d083f6479e..e3bcec5c442 100644 --- a/src/devices/bus/gba/rom.cpp +++ b/src/devices/bus/gba/rom.cpp @@ -158,7 +158,7 @@ void gba_rom_device::device_reset() m_gpio_regs[1] = 0; m_gpio_regs[2] = 0; m_gpio_regs[3] = 0; - m_gpio_write_only = 0; + m_gpio_write_only = 1; m_gpio_dirs = 0; } @@ -273,7 +273,6 @@ void gba_rom_3dmatrix_device::device_reset() READ32_MEMBER(gba_rom_device::read_gpio) { - logerror("read GPIO offs %X\n", offset); if (!m_gpio_write_only) { switch (offset) @@ -301,7 +300,6 @@ READ32_MEMBER(gba_rom_device::read_gpio) WRITE32_MEMBER(gba_rom_device::write_gpio) { - logerror("write GPIO offs %X data %X\n", offset, data); switch (offset) { case 0: diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index 1fbb615a811..af7fe7991f4 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -1181,6 +1181,10 @@ READ32_MEMBER(gba_state::gba_10000000_r) { uint32_t data; uint32_t pc = m_maincpu->state_int(ARM7_PC); + if (pc >= 0x10000000) + { + return 0; + } uint32_t cpsr = m_maincpu->state_int(ARM7_CPSR); if (T_IS_SET( cpsr)) { -- cgit v1.2.3