summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/hx20.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/hx20.cpp')
-rw-r--r--src/mame/drivers/hx20.cpp75
1 files changed, 40 insertions, 35 deletions
diff --git a/src/mame/drivers/hx20.cpp b/src/mame/drivers/hx20.cpp
index e1f807263e5..1ce187e5f8a 100644
--- a/src/mame/drivers/hx20.cpp
+++ b/src/mame/drivers/hx20.cpp
@@ -548,65 +548,70 @@ WRITE8_MEMBER( hx20_state::slave_p4_w )
// ADDRESS_MAP( hx20_mem )
//-------------------------------------------------
-ADDRESS_MAP_START(hx20_state::hx20_mem)
- AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE(HD6301V1_MAIN_TAG, hd63701_cpu_device, m6801_io_r, m6801_io_w)
- AM_RANGE(0x0020, 0x0020) AM_WRITE(ksc_w)
- AM_RANGE(0x0022, 0x0022) AM_READ(krtn07_r)
- AM_RANGE(0x0026, 0x0026) AM_WRITE(lcd_cs_w)
- AM_RANGE(0x0028, 0x0028) AM_READ(krtn89_r)
- AM_RANGE(0x002a, 0x002a) AM_WRITE(lcd_data_w)
- AM_RANGE(0x002c, 0x002c) // mask interruption by using IC 8E in sleep mode
- AM_RANGE(0x0040, 0x007f) AM_DEVREADWRITE(MC146818_TAG, mc146818_device, read, write)
- AM_RANGE(0x0080, 0x00ff) AM_RAM
- AM_RANGE(0x0100, 0x3fff) AM_RAM
- AM_RANGE(0x6000, 0x7fff) AM_ROM AM_READ(optrom_r)
- AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION(HD6301V1_MAIN_TAG, 0)
-ADDRESS_MAP_END
+void hx20_state::hx20_mem(address_map &map)
+{
+ map(0x0000, 0x001f).rw(m_maincpu, FUNC(hd63701_cpu_device::m6801_io_r), FUNC(hd63701_cpu_device::m6801_io_w));
+ map(0x0020, 0x0020).w(this, FUNC(hx20_state::ksc_w));
+ map(0x0022, 0x0022).r(this, FUNC(hx20_state::krtn07_r));
+ map(0x0026, 0x0026).w(this, FUNC(hx20_state::lcd_cs_w));
+ map(0x0028, 0x0028).r(this, FUNC(hx20_state::krtn89_r));
+ map(0x002a, 0x002a).w(this, FUNC(hx20_state::lcd_data_w));
+ map(0x002c, 0x002c); // mask interruption by using IC 8E in sleep mode
+ map(0x0040, 0x007f).rw(m_rtc, FUNC(mc146818_device::read), FUNC(mc146818_device::write));
+ map(0x0080, 0x00ff).ram();
+ map(0x0100, 0x3fff).ram();
+ map(0x6000, 0x7fff).rom().r(this, FUNC(hx20_state::optrom_r));
+ map(0x8000, 0xffff).rom().region(HD6301V1_MAIN_TAG, 0);
+}
//-------------------------------------------------
// ADDRESS_MAP( hx20_io )
//-------------------------------------------------
-ADDRESS_MAP_START(hx20_state::hx20_io)
- AM_RANGE(M6801_PORT1, M6801_PORT1) AM_READWRITE(main_p1_r, main_p1_w)
- AM_RANGE(M6801_PORT2, M6801_PORT2) AM_READWRITE(main_p2_r, main_p2_w)
- AM_RANGE(M6801_PORT3, M6801_PORT3) AM_NOP // A0-A7, D0-D7
- AM_RANGE(M6801_PORT4, M6801_PORT4) AM_NOP // A8-A15
-ADDRESS_MAP_END
+void hx20_state::hx20_io(address_map &map)
+{
+ map(M6801_PORT1, M6801_PORT1).rw(this, FUNC(hx20_state::main_p1_r), FUNC(hx20_state::main_p1_w));
+ map(M6801_PORT2, M6801_PORT2).rw(this, FUNC(hx20_state::main_p2_r), FUNC(hx20_state::main_p2_w));
+ map(M6801_PORT3, M6801_PORT3).noprw(); // A0-A7, D0-D7
+ map(M6801_PORT4, M6801_PORT4).noprw(); // A8-A15
+}
//-------------------------------------------------
// ADDRESS_MAP( hx20_sub_mem )
//-------------------------------------------------
-ADDRESS_MAP_START(hx20_state::hx20_sub_mem)
- AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE(HD6301V1_SLAVE_TAG, hd63701_cpu_device, m6801_io_r, m6801_io_w)
- AM_RANGE(0x0080, 0x00ff) AM_RAM
- AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION(HD6301V1_SLAVE_TAG, 0)
-ADDRESS_MAP_END
+void hx20_state::hx20_sub_mem(address_map &map)
+{
+ map(0x0000, 0x001f).rw(m_subcpu, FUNC(hd63701_cpu_device::m6801_io_r), FUNC(hd63701_cpu_device::m6801_io_w));
+ map(0x0080, 0x00ff).ram();
+ map(0xf000, 0xffff).rom().region(HD6301V1_SLAVE_TAG, 0);
+}
//-------------------------------------------------
// ADDRESS_MAP( hx20_sub_io )
//-------------------------------------------------
-ADDRESS_MAP_START(hx20_state::hx20_sub_io)
- AM_RANGE(M6801_PORT1, M6801_PORT1) AM_READWRITE(slave_p1_r, slave_p1_w)
- AM_RANGE(M6801_PORT2, M6801_PORT2) AM_READWRITE(slave_p2_r, slave_p2_w)
- AM_RANGE(M6801_PORT3, M6801_PORT3) AM_READWRITE(slave_p3_r, slave_p3_w)
- AM_RANGE(M6801_PORT4, M6801_PORT4) AM_READWRITE(slave_p4_r, slave_p4_w)
-ADDRESS_MAP_END
+void hx20_state::hx20_sub_io(address_map &map)
+{
+ map(M6801_PORT1, M6801_PORT1).rw(this, FUNC(hx20_state::slave_p1_r), FUNC(hx20_state::slave_p1_w));
+ map(M6801_PORT2, M6801_PORT2).rw(this, FUNC(hx20_state::slave_p2_r), FUNC(hx20_state::slave_p2_w));
+ map(M6801_PORT3, M6801_PORT3).rw(this, FUNC(hx20_state::slave_p3_r), FUNC(hx20_state::slave_p3_w));
+ map(M6801_PORT4, M6801_PORT4).rw(this, FUNC(hx20_state::slave_p4_r), FUNC(hx20_state::slave_p4_w));
+}
//-------------------------------------------------
// ADDRESS_MAP( cm6000_mem )
//-------------------------------------------------
-ADDRESS_MAP_START(hx20_state::cm6000_mem)
- AM_IMPORT_FROM(hx20_mem)
- AM_RANGE(0x4000, 0xffff) AM_ROM AM_REGION(HD6301V1_MAIN_TAG, 0)
-ADDRESS_MAP_END
+void hx20_state::cm6000_mem(address_map &map)
+{
+ hx20_mem(map);
+ map(0x4000, 0xffff).rom().region(HD6301V1_MAIN_TAG, 0);
+}
//**************************************************************************