summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/z80/kc82.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/z80/kc82.cpp')
-rw-r--r--src/devices/cpu/z80/kc82.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/devices/cpu/z80/kc82.cpp b/src/devices/cpu/z80/kc82.cpp
index 6dc575139de..440a4498c0a 100644
--- a/src/devices/cpu/z80/kc82.cpp
+++ b/src/devices/cpu/z80/kc82.cpp
@@ -206,7 +206,7 @@ bool kc82_device::memory_translate(int spacenum, int intention, offs_t &address,
// rm - read one byte from memory
//-------------------------------------------------
-u8 kc82_device::data_read(u16 addr)
+u8 kc82_device::rm(u16 addr)
{
return m_data.read_byte(addr + m_mmu_base[addr >> 10]);
}
@@ -216,7 +216,7 @@ u8 kc82_device::data_read(u16 addr)
// wm - write one byte to memory
//-------------------------------------------------
-void kc82_device::data_write(u16 addr, u8 value)
+void kc82_device::wm(u16 addr, u8 value)
{
m_data.write_byte(addr + m_mmu_base[addr >> 10], value);
}
@@ -226,9 +226,10 @@ void kc82_device::data_write(u16 addr, u8 value)
// rop - read opcode
//-------------------------------------------------
-u8 kc82_device::opcode_read()
+u8 kc82_device::rop()
{
u32 pc = m_pc.w.l + m_mmu_base[m_pc.b.h >> 2];
+ m_pc.w.l++;
// no refresh
return m_opcodes.read_byte(pc);
}
@@ -238,8 +239,21 @@ u8 kc82_device::opcode_read()
// arg - read 8-bit argument
//-------------------------------------------------
-u8 kc82_device::arg_read()
+u8 kc82_device::arg()
{
u32 pc = m_pc.w.l + m_mmu_base[m_pc.b.h >> 2];
+ m_pc.w.l++;
return m_args.read_byte(pc);
}
+
+
+//-------------------------------------------------
+// arg16 - read 16-bit argument
+//-------------------------------------------------
+
+u16 kc82_device::arg16()
+{
+ u16 d16 = arg();
+ d16 |= u16(arg()) << 8;
+ return d16;
+}