From f726eeeee0a41aef1d333609da9ea2d474d21691 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Wed, 26 Oct 2022 17:03:50 +0200 Subject: emumem: Fix range tracking when creating a subdispatch --- src/emu/emumem_hedr.ipp | 4 ++++ src/emu/emumem_hedw.ipp | 4 ++++ src/mame/chess/ave_arb.cpp | 8 +------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/emu/emumem_hedr.ipp b/src/emu/emumem_hedr.ipp index 0efc37a478f..d24dc44a7c1 100644 --- a/src/emu/emumem_hedr.ipp +++ b/src/emu/emumem_hedr.ipp @@ -201,6 +201,8 @@ template void handler_entry_read_dispatc cur->unref(); m_u_dispatch[entry] = subdispatch; subdispatch->populate_nomirror(start, end, ostart, oend, handler); + range_cut_before(((entry - 1) << LowBits) - 1, entry); + range_cut_after((entry + 1) << LowBits, entry); } } @@ -276,6 +278,8 @@ template void handler_entry_read_dispatc cur->unref(); m_u_dispatch[entry] = subdispatch; subdispatch->populate_mirror(start, end, ostart, oend, mirror, handler); + range_cut_before(((entry - 1) << LowBits) - 1, entry); + range_cut_after((entry + 1) << LowBits, entry); } } diff --git a/src/emu/emumem_hedw.ipp b/src/emu/emumem_hedw.ipp index a45b5eceef9..4744a64fa39 100644 --- a/src/emu/emumem_hedw.ipp +++ b/src/emu/emumem_hedw.ipp @@ -200,6 +200,8 @@ template void handler_entry_write_dispat cur->unref(); m_u_dispatch[entry] = subdispatch; subdispatch->populate_nomirror(start, end, ostart, oend, handler); + range_cut_before(((entry - 1) << LowBits) - 1, entry); + range_cut_after((entry + 1) << LowBits, entry); } } @@ -275,6 +277,8 @@ template void handler_entry_write_dispat cur->unref(); m_u_dispatch[entry] = subdispatch; subdispatch->populate_mirror(start, end, ostart, oend, mirror, handler); + range_cut_before(((entry - 1) << LowBits) - 1, entry); + range_cut_after((entry + 1) << LowBits, entry); } } diff --git a/src/mame/chess/ave_arb.cpp b/src/mame/chess/ave_arb.cpp index 87ee5224580..2291331b417 100644 --- a/src/mame/chess/ave_arb.cpp +++ b/src/mame/chess/ave_arb.cpp @@ -36,8 +36,6 @@ boards without a module slot. CPU and VIA were replaced with new WDC 14MHz-rated chips, running at 16MHz. TODO: -- remove install_ram workaround when emumem bug is fixed, see: - https://github.com/mamedev/mame/commit/75caceb1c143757d10f874b0c2ebf0427f4dfc9f#commitcomment-84413054 - avelan, gms3, gms4, sargon35 rom labels ******************************************************************************/ @@ -172,11 +170,7 @@ DEVICE_IMAGE_LOAD_MEMBER(arb_state::cart_load) // extra ram (optional) if (image.get_feature("ram")) - { - //m_maincpu->space(AS_PROGRAM).install_ram(0x0800, 0x0fff, 0x1000, m_extram); - m_maincpu->space(AS_PROGRAM).install_ram(0x0800, 0x0fff, 0, m_extram); - m_maincpu->space(AS_PROGRAM).install_ram(0x1800, 0x1fff, 0, m_extram); - } + m_maincpu->space(AS_PROGRAM).install_ram(0x0800, 0x0fff, 0x1000, m_extram); m_altboard = bool(image.get_feature("altboard")); -- cgit v1.2.3