From ed624da99d38a6755cb2c8f094b8816560839c9e Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 23 Nov 2020 14:36:00 +0100 Subject: Fix dgpix. The patches were applied to the nvram before it was initialized, so they were lost --- src/mame/drivers/dgpix.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mame/drivers/dgpix.cpp b/src/mame/drivers/dgpix.cpp index 0dd5bed6326..0e130296b2a 100644 --- a/src/mame/drivers/dgpix.cpp +++ b/src/mame/drivers/dgpix.cpp @@ -630,7 +630,7 @@ ROM_END void dgpix_state::init_elfin() { - u8 *rom = (u8 *)(u32 *)m_flash + 0x1c00000; + u8 *rom = memregion("flash")->base() + 0x1c00000; rom[BYTE4_XOR_BE(0x3a9e94)] = 3; rom[BYTE4_XOR_BE(0x3a9e95)] = 0; @@ -644,7 +644,7 @@ void dgpix_state::init_elfin() void dgpix_state::init_jumpjump() { - u8 *rom = (u8 *)(u32 *)m_flash + 0x1c00000; + u8 *rom = memregion("flash")->base() + 0x1c00000; rom[BYTE4_XOR_BE(0x3a829a)] = 3; rom[BYTE4_XOR_BE(0x3a829b)] = 0; @@ -658,7 +658,7 @@ void dgpix_state::init_jumpjump() void dgpix_state::init_xfiles() { - u8 *rom = (u8 *)(u32 *)m_flash + 0x1c00000; + u8 *rom = memregion("flash")->base() + 0x1c00000; rom[BYTE4_XOR_BE(0x3a9a2a)] = 3; rom[BYTE4_XOR_BE(0x3a9a2b)] = 0; @@ -672,7 +672,7 @@ void dgpix_state::init_xfiles() void dgpix_state::init_xfilesk() { - u8 *rom = (u8 *)(u32 *)m_flash + 0x1c00000; + u8 *rom = memregion("flash")->base() + 0x1c00000; rom[BYTE4_XOR_BE(0x3aa92e)] = 3; rom[BYTE4_XOR_BE(0x3aa92f)] = 0; @@ -689,7 +689,7 @@ void dgpix_state::init_xfilesk() void dgpix_state::init_kdynastg() { - u8 *rom = (u8 *)(u32 *)m_flash + 0x1c00000; + u8 *rom = memregion("flash")->base() + 0x1c00000; rom[BYTE4_XOR_BE(0x3aaa10)] = 3; // 129f0 - nopped call rom[BYTE4_XOR_BE(0x3aaa11)] = 0; -- cgit v1.2.3