summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/mcs48/mcs48.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/mcs48/mcs48.h')
-rw-r--r--src/devices/cpu/mcs48/mcs48.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h
index 4c915256152..210d2b84d3c 100644
--- a/src/devices/cpu/mcs48/mcs48.h
+++ b/src/devices/cpu/mcs48/mcs48.h
@@ -242,6 +242,23 @@ protected:
typedef int (mcs48_cpu_device::*mcs48_ophandler)();
static const mcs48_ophandler s_opcode_table[256];
+ /* ROM is mapped to AS_PROGRAM */
+ uint8_t program_r(offs_t a) { return m_program->read_byte(a); }
+
+ /* RAM is mapped to AS_DATA */
+ uint8_t ram_r(offs_t a) { return m_data->read_byte(a); }
+ void ram_w(offs_t a, uint8_t v) { m_data->write_byte(a, v); }
+
+ /* ports are mapped to AS_IO and callbacks */
+ uint8_t ext_r(offs_t a) { return m_io->read_byte(a); }
+ void ext_w(offs_t a, uint8_t v) { m_io->write_byte(a, v); }
+ uint8_t port_r(offs_t a) { return m_port_in_cb[a - 1](); }
+ void port_w(offs_t a, uint8_t v) { m_port_out_cb[a - 1](v); }
+ int test_r(offs_t a) { return m_test_in_cb[a](); }
+ uint8_t bus_r() { return m_bus_in_cb(); }
+ void bus_w(uint8_t v) { m_bus_out_cb(v); }
+ void prog_w(int v) { m_prog_out_cb(v); }
+
uint8_t opcode_fetch();
uint8_t argument_fetch();
void update_regptr();