gba: remove deprecated direct update handler. [R. Belmont]

This commit is contained in:
arbee 2017-01-06 22:30:15 -05:00
parent 27dfcb0419
commit bedb1f6d6e
2 changed files with 5 additions and 34 deletions

View File

@ -1141,8 +1141,10 @@ READ32_MEMBER(gba_state::gba_bios_r)
return 0;
}
if (m_bios_protected != 0)
offset = (m_bios_last_address + 8) / 4;
if (m_maincpu->state_int(ARM7_PC) >= 0x4000)
{
return 0;
}
return rom[offset & 0x3fff];
}
@ -1252,8 +1254,6 @@ void gba_state::machine_reset()
RCNT_SET(0x8000);
JOYSTAT_SET(0x0002);
m_bios_protected = 0;
m_dma_timer[0]->adjust(attotime::never);
m_dma_timer[1]->adjust(attotime::never, 1);
m_dma_timer[2]->adjust(attotime::never, 2);
@ -1371,8 +1371,6 @@ void gba_state::machine_start()
save_item(NAME(m_fifo_b_in));
save_item(NAME(m_fifo_a));
save_item(NAME(m_fifo_b));
save_item(NAME(m_bios_last_address));
save_item(NAME(m_bios_protected));
}
@ -1433,28 +1431,5 @@ ROM_START( gba )
ROM_END
// this emulates the GBA's hardware protection: the BIOS returns only zeros when the PC is not in it,
// and some games verify that as a protection check (notably Metroid Fusion)
DIRECT_UPDATE_MEMBER(gba_state::gba_direct)
{
if (address > 0x4000)
{
m_bios_protected = 1;
}
else
{
m_bios_protected = 0;
m_bios_last_address = address;
}
return address;
}
DRIVER_INIT_MEMBER(gba_state,gbadv)
{
m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(&gba_state::gba_direct, this));
}
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
CONS(2001, gba, 0, 0, gbadv, gbadv, gba_state, gbadv, "Nintendo", "Game Boy Advance", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)
CONS(2001, gba, 0, 0, gbadv, gbadv, driver_device, 0, "Nintendo", "Game Boy Advance", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)

View File

@ -62,10 +62,6 @@ public:
uint8_t m_fifo_a[20];
uint8_t m_fifo_b[20];
uint32_t m_bios_last_address;
int m_bios_protected;
DIRECT_UPDATE_MEMBER(gba_direct);
DECLARE_READ32_MEMBER(gba_io_r);
DECLARE_WRITE32_MEMBER(gba_io_w);
DECLARE_READ32_MEMBER(gba_bios_r);