summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/dirom.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/dirom.ipp')
-rw-r--r--src/emu/dirom.ipp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/emu/dirom.ipp b/src/emu/dirom.ipp
index 24697a0fbba..d41da70a618 100644
--- a/src/emu/dirom.ipp
+++ b/src/emu/dirom.ipp
@@ -9,6 +9,7 @@ template<int AddrWidth, int DataWidth, int AddrShift, endianness_t Endian>
device_rom_interface<AddrWidth, DataWidth, AddrShift, Endian>::device_rom_interface(const machine_config &mconfig, device_t &device) :
device_memory_interface(mconfig, device),
m_rom_region(device, DEVICE_SELF),
+ m_rom_space(device, finder_base::DUMMY_TAG, -1),
m_rom_config("rom", Endian, 8 << DataWidth, AddrWidth, AddrShift),
m_bank(device, "bank"),
m_cur_bank(-1)
@@ -45,9 +46,10 @@ void device_rom_interface<AddrWidth, DataWidth, AddrShift, Endian>::set_rom_bank
}
if (m_cur_bank != bank) {
+ rom_bank_pre_change();
m_cur_bank = bank;
m_bank->set_entry(bank);
- rom_bank_updated();
+ rom_bank_post_change();
}
}
@@ -108,6 +110,11 @@ void device_rom_interface<AddrWidth, DataWidth, AddrShift, Endian>::interface_pr
{
device_memory_interface::interface_pre_start();
+ if(m_rom_space.spacenum() != -1) {
+ m_rom_space->cache(m_rom_cache);
+ return;
+ }
+
if(!has_space(0))
return;