diff options
Diffstat (limited to 'src/devices/cpu/upd78k/upd78k3.cpp')
-rw-r--r-- | src/devices/cpu/upd78k/upd78k3.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/devices/cpu/upd78k/upd78k3.cpp b/src/devices/cpu/upd78k/upd78k3.cpp index f2831c543b2..ef7ee4008e9 100644 --- a/src/devices/cpu/upd78k/upd78k3.cpp +++ b/src/devices/cpu/upd78k/upd78k3.cpp @@ -29,11 +29,7 @@ upd78k3_device::upd78k3_device(const machine_config &mconfig, device_type type, , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, mem_map) , m_iram_config("IRAM", ENDIANNESS_LITTLE, 16, 8, 0, address_map_constructor(FUNC(upd78k3_device::iram_map), this)) , m_sfr_config("SFR", ENDIANNESS_LITTLE, 16, 8, 0, sfr_map) - , m_program_space(nullptr) - , m_program_cache(nullptr) , m_iram(*this, "iram") - , m_iram_cache(nullptr) - , m_sfr_space(nullptr) , m_pc(0) , m_ppc(0) , m_psw(0) @@ -132,10 +128,10 @@ void upd78k3_device::state_add_psw() void upd78k3_device::device_start() { // get address spaces and access caches - m_program_space = &space(AS_PROGRAM); - m_program_cache = m_program_space->cache<0, 0, ENDIANNESS_LITTLE>(); - m_iram_cache = space(AS_DATA).cache<1, 0, ENDIANNESS_LITTLE>(); - m_sfr_space = &space(AS_IO); + space(AS_PROGRAM).cache(m_program_cache); + space(AS_PROGRAM).specific(m_program_space); + space(AS_DATA).cache(m_iram_cache); + space(AS_IO).specific(m_sfr_space); set_icountptr(m_icount); @@ -211,7 +207,7 @@ void upd78k3_device::device_reset() void upd78k3_device::execute_run() { - m_pc = m_program_cache->read_word(0); + m_pc = m_program_cache.read_word(0); m_ppc = m_pc; debugger_instruction_hook(m_pc); |