summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/mpu401.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/mpu401.cpp')
-rw-r--r--src/devices/machine/mpu401.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/devices/machine/mpu401.cpp b/src/devices/machine/mpu401.cpp
index 16849816535..37f4c6c23a2 100644
--- a/src/devices/machine/mpu401.cpp
+++ b/src/devices/machine/mpu401.cpp
@@ -57,18 +57,20 @@
#define STAT_TX_FULL (0x40) // indicates the PC has written a new byte we haven't read yet
#define STAT_RX_EMPTY (0x80) // indicates we've written a new byte the PC hasn't read yet
-ADDRESS_MAP_START(mpu401_device::mpu401_map)
- AM_RANGE(0x0000, 0x001f) AM_READWRITE(regs_mode2_r, regs_mode2_w)
- AM_RANGE(0x0020, 0x0021) AM_READWRITE(asic_r, asic_w)
- AM_RANGE(0x0080, 0x00ff) AM_RAM // on-chip RAM
- AM_RANGE(0x0800, 0x0fff) AM_RAM // external RAM
- AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION(ROM_TAG, 0)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(mpu401_device::mpu401_io_map)
- AM_RANGE(M6801_PORT1, M6801_PORT1) AM_READWRITE(port1_r, port1_w)
- AM_RANGE(M6801_PORT2, M6801_PORT2) AM_READWRITE(port2_r, port2_w)
-ADDRESS_MAP_END
+void mpu401_device::mpu401_map(address_map &map)
+{
+ map(0x0000, 0x001f).rw(this, FUNC(mpu401_device::regs_mode2_r), FUNC(mpu401_device::regs_mode2_w));
+ map(0x0020, 0x0021).rw(this, FUNC(mpu401_device::asic_r), FUNC(mpu401_device::asic_w));
+ map(0x0080, 0x00ff).ram(); // on-chip RAM
+ map(0x0800, 0x0fff).ram(); // external RAM
+ map(0xf000, 0xffff).rom().region(ROM_TAG, 0);
+}
+
+void mpu401_device::mpu401_io_map(address_map &map)
+{
+ map(M6801_PORT1, M6801_PORT1).rw(this, FUNC(mpu401_device::port1_r), FUNC(mpu401_device::port1_w));
+ map(M6801_PORT2, M6801_PORT2).rw(this, FUNC(mpu401_device::port2_r), FUNC(mpu401_device::port2_w));
+}
ROM_START( mpu401 )
ROM_REGION(0x1000, ROM_TAG, 0)