summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/z180/z180ops.h
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2020-05-25 16:42:42 +0200
committer Olivier Galibert <galibert@pobox.com>2020-05-25 16:42:57 +0200
commit22513fb6fe281f5ccb75aaddb6417a12a66c313d (patch)
tree3cf84032cc6482d685a8dbb57e015bd17c7f7fdc /src/devices/cpu/z180/z180ops.h
parente42c2d2874cf9c1092c01ab5ce9ef997d465ce25 (diff)
emumem: A little more speedup. cache and specific change syntax, and are not pointers anymore [O. Galibert]
The last(?) two changes are: - Add a template parameter to everything (theoretically the address space width, in practice a level derived from it to keep as much compatibility between widths as possible) so that the shift size becomes a constant. - Change the syntax of declaring and initializing the caches and specifics so that they're embedded in the owner device. Solves lifetime issues and also removes one indirection (looking up the base dispatch pointer through the cache/specific pointer).
Diffstat (limited to 'src/devices/cpu/z180/z180ops.h')
-rw-r--r--src/devices/cpu/z180/z180ops.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/cpu/z180/z180ops.h b/src/devices/cpu/z180/z180ops.h
index 7b4d0f159f2..0e57ff64532 100644
--- a/src/devices/cpu/z180/z180ops.h
+++ b/src/devices/cpu/z180/z180ops.h
@@ -27,7 +27,7 @@ inline u8 z180_device::IN(u16 port)
if (is_internal_io_address(port))
return z180_readcontrol(port);
m_extra_cycles += io_wait_states();
- return m_iospace->read_byte(port);
+ return m_io.read_byte(port);
}
/***************************************************************
@@ -40,7 +40,7 @@ inline void z180_device::OUT(u16 port, u8 value)
else
{
m_extra_cycles += io_wait_states();
- m_iospace->write_byte(port, value);
+ m_io.write_byte(port, value);
}
}
@@ -117,7 +117,7 @@ uint8_t z180_device::ROP()
offs_t addr = _PCD;
_PC++;
m_extra_cycles += memory_wait_states();
- return m_ocache->read_byte(MMU_REMAP_ADDR(addr));
+ return m_copcodes.read_byte(MMU_REMAP_ADDR(addr));
}
/****************************************************************
@@ -131,7 +131,7 @@ uint8_t z180_device::ARG()
offs_t addr = _PCD;
_PC++;
m_extra_cycles += memory_wait_states();
- return m_cache->read_byte(MMU_REMAP_ADDR(addr));
+ return m_cprogram.read_byte(MMU_REMAP_ADDR(addr));
}
uint32_t z180_device::ARG16()
@@ -139,7 +139,7 @@ uint32_t z180_device::ARG16()
offs_t addr = _PCD;
_PC += 2;
m_extra_cycles += memory_wait_states() * 2;
- return m_cache->read_byte(MMU_REMAP_ADDR(addr)) | (m_cache->read_byte(MMU_REMAP_ADDR(addr+1)) << 8);
+ return m_cprogram.read_byte(MMU_REMAP_ADDR(addr)) | (m_cprogram.read_byte(MMU_REMAP_ADDR(addr+1)) << 8);
}
/***************************************************************