summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/notechan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/notechan.cpp')
-rw-r--r--src/mame/drivers/notechan.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/mame/drivers/notechan.cpp b/src/mame/drivers/notechan.cpp
index e164a390b22..8d77e85ed67 100644
--- a/src/mame/drivers/notechan.cpp
+++ b/src/mame/drivers/notechan.cpp
@@ -324,20 +324,22 @@ public:
* Memory Map Definition *
*********************************************/
-ADDRESS_MAP_START(notechan_state::notechan_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xa000, 0xbfff) AM_RAM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(notechan_state::notechan_port_map)
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0xf0, 0xf0) AM_DEVREADWRITE("oki", okim6295_device, read, write)
- AM_RANGE(0xf8, 0xf8) AM_READ_PORT("IN0") AM_WRITE(out_f8_w)
- AM_RANGE(0xf9, 0xf9) AM_READ_PORT("IN1") AM_WRITE(out_f9_w)
- AM_RANGE(0xfa, 0xfa) AM_READ_PORT("IN2") AM_WRITE(out_fa_w)
- AM_RANGE(0xfb, 0xfb) AM_READ_PORT("IN3")
- AM_RANGE(0xff, 0xff) AM_WRITE(out_ff_w) // watchdog reset? (written immediately upon reset, INT and NMI)
-ADDRESS_MAP_END
+void notechan_state::notechan_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0xa000, 0xbfff).ram();
+}
+
+void notechan_state::notechan_port_map(address_map &map)
+{
+ map.global_mask(0xff);
+ map(0xf0, 0xf0).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ map(0xf8, 0xf8).portr("IN0").w(this, FUNC(notechan_state::out_f8_w));
+ map(0xf9, 0xf9).portr("IN1").w(this, FUNC(notechan_state::out_f9_w));
+ map(0xfa, 0xfa).portr("IN2").w(this, FUNC(notechan_state::out_fa_w));
+ map(0xfb, 0xfb).portr("IN3");
+ map(0xff, 0xff).w(this, FUNC(notechan_state::out_ff_w)); // watchdog reset? (written immediately upon reset, INT and NMI)
+}
/*********************************************