summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/m6805/m68705.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/m6805/m68705.cpp')
-rw-r--r--src/devices/cpu/m6805/m68705.cpp121
1 files changed, 62 insertions, 59 deletions
diff --git a/src/devices/cpu/m6805/m68705.cpp b/src/devices/cpu/m6805/m68705.cpp
index f56645c9381..cffddd1266d 100644
--- a/src/devices/cpu/m6805/m68705.cpp
+++ b/src/devices/cpu/m6805/m68705.cpp
@@ -647,28 +647,29 @@ void m68705_device::add_eprom_state()
* M68705Px family
****************************************************************************/
-ADDRESS_MAP_START(m68705p_device::p_map)
- ADDRESS_MAP_GLOBAL_MASK(0x07ff)
- ADDRESS_MAP_UNMAP_HIGH
+void m68705p_device::p_map(address_map &map)
+{
+ map.global_mask(0x07ff);
+ map.unmap_value_high();
- AM_RANGE(0x0000, 0x0000) AM_READWRITE(port_r<0>, port_latch_w<0>)
- AM_RANGE(0x0001, 0x0001) AM_READWRITE(port_r<1>, port_latch_w<1>)
- AM_RANGE(0x0002, 0x0002) AM_READWRITE(port_r<2>, port_latch_w<2>)
+ map(0x0000, 0x0000).rw(this, FUNC(m68705p_device::port_r<0>), FUNC(m68705p_device::port_latch_w<0>));
+ map(0x0001, 0x0001).rw(this, FUNC(m68705p_device::port_r<1>), FUNC(m68705p_device::port_latch_w<1>));
+ map(0x0002, 0x0002).rw(this, FUNC(m68705p_device::port_r<2>), FUNC(m68705p_device::port_latch_w<2>));
// 0x0003 not used (no port D)
- AM_RANGE(0x0004, 0x0004) AM_WRITE(port_ddr_w<0>)
- AM_RANGE(0x0005, 0x0005) AM_WRITE(port_ddr_w<1>)
- AM_RANGE(0x0006, 0x0006) AM_WRITE(port_ddr_w<2>)
+ map(0x0004, 0x0004).w(this, FUNC(m68705p_device::port_ddr_w<0>));
+ map(0x0005, 0x0005).w(this, FUNC(m68705p_device::port_ddr_w<1>));
+ map(0x0006, 0x0006).w(this, FUNC(m68705p_device::port_ddr_w<2>));
// 0x0007 not used (no port D)
- AM_RANGE(0x0008, 0x0008) AM_READWRITE(tdr_r, tdr_w)
- AM_RANGE(0x0009, 0x0009) AM_READWRITE(tcr_r, tcr_w)
+ map(0x0008, 0x0008).rw(this, FUNC(m68705p_device::tdr_r), FUNC(m68705p_device::tdr_w));
+ map(0x0009, 0x0009).rw(this, FUNC(m68705p_device::tcr_r), FUNC(m68705p_device::tcr_w));
// 0x000a not used
- AM_RANGE(0x000b, 0x000b) AM_READWRITE(pcr_r, pcr_w)
+ map(0x000b, 0x000b).rw(this, FUNC(m68705p_device::pcr_r), FUNC(m68705p_device::pcr_w));
// 0x000c-0x000f not used
- AM_RANGE(0x0010, 0x007f) AM_RAM
- AM_RANGE(0x0080, 0x0784) AM_READWRITE(eprom_r<0x0080>, eprom_w<0x0080>) // User EPROM
- AM_RANGE(0x0785, 0x07f7) AM_ROM AM_REGION("bootstrap", 0)
- AM_RANGE(0x07f8, 0x07ff) AM_READWRITE(eprom_r<0x07f8>, eprom_w<0x07f8>) // Interrupt vectors
-ADDRESS_MAP_END
+ map(0x0010, 0x007f).ram();
+ map(0x0080, 0x0784).rw(this, FUNC(m68705p_device::eprom_r<0x0080>), FUNC(m68705p_device::eprom_w<0x0080>)); // User EPROM
+ map(0x0785, 0x07f7).rom().region("bootstrap", 0);
+ map(0x07f8, 0x07ff).rw(this, FUNC(m68705p_device::eprom_r<0x07f8>), FUNC(m68705p_device::eprom_w<0x07f8>)); // Interrupt vectors
+}
m68705p_device::m68705p_device(
machine_config const &mconfig,
@@ -708,29 +709,30 @@ std::unique_ptr<util::disasm_interface> m68705p_device::create_disassembler()
* M68705Ux family
****************************************************************************/
-ADDRESS_MAP_START(m68705u_device::u_map)
- ADDRESS_MAP_GLOBAL_MASK(0x0fff)
- ADDRESS_MAP_UNMAP_HIGH
-
- AM_RANGE(0x0000, 0x0000) AM_READWRITE(port_r<0>, port_latch_w<0>)
- AM_RANGE(0x0001, 0x0001) AM_READWRITE(port_r<1>, port_latch_w<1>)
- AM_RANGE(0x0002, 0x0002) AM_READWRITE(port_r<2>, port_latch_w<2>)
- AM_RANGE(0x0003, 0x0003) AM_READWRITE(port_r<3>, port_latch_w<3>)
- AM_RANGE(0x0004, 0x0004) AM_WRITE(port_ddr_w<0>)
- AM_RANGE(0x0005, 0x0005) AM_WRITE(port_ddr_w<1>)
- AM_RANGE(0x0006, 0x0006) AM_WRITE(port_ddr_w<2>)
+void m68705u_device::u_map(address_map &map)
+{
+ map.global_mask(0x0fff);
+ map.unmap_value_high();
+
+ map(0x0000, 0x0000).rw(this, FUNC(m68705u_device::port_r<0>), FUNC(m68705u_device::port_latch_w<0>));
+ map(0x0001, 0x0001).rw(this, FUNC(m68705u_device::port_r<1>), FUNC(m68705u_device::port_latch_w<1>));
+ map(0x0002, 0x0002).rw(this, FUNC(m68705u_device::port_r<2>), FUNC(m68705u_device::port_latch_w<2>));
+ map(0x0003, 0x0003).rw(this, FUNC(m68705u_device::port_r<3>), FUNC(m68705u_device::port_latch_w<3>));
+ map(0x0004, 0x0004).w(this, FUNC(m68705u_device::port_ddr_w<0>));
+ map(0x0005, 0x0005).w(this, FUNC(m68705u_device::port_ddr_w<1>));
+ map(0x0006, 0x0006).w(this, FUNC(m68705u_device::port_ddr_w<2>));
// 0x0007 not used (port D is input only)
- AM_RANGE(0x0008, 0x0008) AM_READWRITE(tdr_r, tdr_w)
- AM_RANGE(0x0009, 0x0009) AM_READWRITE(tcr_r, tcr_w)
- AM_RANGE(0x000a, 0x000a) AM_READWRITE(misc_r, misc_w)
- AM_RANGE(0x000b, 0x000b) AM_READWRITE(pcr_r, pcr_w)
+ map(0x0008, 0x0008).rw(this, FUNC(m68705u_device::tdr_r), FUNC(m68705u_device::tdr_w));
+ map(0x0009, 0x0009).rw(this, FUNC(m68705u_device::tcr_r), FUNC(m68705u_device::tcr_w));
+ map(0x000a, 0x000a).rw(this, FUNC(m68705u_device::misc_r), FUNC(m68705u_device::misc_w));
+ map(0x000b, 0x000b).rw(this, FUNC(m68705u_device::pcr_r), FUNC(m68705u_device::pcr_w));
// 0x000c-0x000f not used
- AM_RANGE(0x0010, 0x007f) AM_RAM
- AM_RANGE(0x0080, 0x0f38) AM_READWRITE(eprom_r<0x0080>, eprom_w<0x0080>) // User EPROM
+ map(0x0010, 0x007f).ram();
+ map(0x0080, 0x0f38).rw(this, FUNC(m68705u_device::eprom_r<0x0080>), FUNC(m68705u_device::eprom_w<0x0080>)); // User EPROM
// 0x0f39-0x0f7f not used
- AM_RANGE(0x0f80, 0x0ff7) AM_ROM AM_REGION("bootstrap", 0)
- AM_RANGE(0x0ff8, 0x0fff) AM_READWRITE(eprom_r<0x0ff8>, eprom_w<0x0ff8>) // Interrupt vectors
-ADDRESS_MAP_END
+ map(0x0f80, 0x0ff7).rom().region("bootstrap", 0);
+ map(0x0ff8, 0x0fff).rw(this, FUNC(m68705u_device::eprom_r<0x0ff8>), FUNC(m68705u_device::eprom_w<0x0ff8>)); // Interrupt vectors
+}
m68705u_device::m68705u_device(
machine_config const &mconfig,
@@ -782,31 +784,32 @@ std::unique_ptr<util::disasm_interface> m68705u_device::create_disassembler()
* M68705Rx family
****************************************************************************/
-ADDRESS_MAP_START(m68705r_device::r_map)
- ADDRESS_MAP_GLOBAL_MASK(0x0fff)
- ADDRESS_MAP_UNMAP_HIGH
-
- AM_RANGE(0x0000, 0x0000) AM_READWRITE(port_r<0>, port_latch_w<0>)
- AM_RANGE(0x0001, 0x0001) AM_READWRITE(port_r<1>, port_latch_w<1>)
- AM_RANGE(0x0002, 0x0002) AM_READWRITE(port_r<2>, port_latch_w<2>)
- AM_RANGE(0x0003, 0x0003) AM_READWRITE(port_r<3>, port_latch_w<3>)
- AM_RANGE(0x0004, 0x0004) AM_WRITE(port_ddr_w<0>)
- AM_RANGE(0x0005, 0x0005) AM_WRITE(port_ddr_w<1>)
- AM_RANGE(0x0006, 0x0006) AM_WRITE(port_ddr_w<2>)
+void m68705r_device::r_map(address_map &map)
+{
+ map.global_mask(0x0fff);
+ map.unmap_value_high();
+
+ map(0x0000, 0x0000).rw(this, FUNC(m68705r_device::port_r<0>), FUNC(m68705r_device::port_latch_w<0>));
+ map(0x0001, 0x0001).rw(this, FUNC(m68705r_device::port_r<1>), FUNC(m68705r_device::port_latch_w<1>));
+ map(0x0002, 0x0002).rw(this, FUNC(m68705r_device::port_r<2>), FUNC(m68705r_device::port_latch_w<2>));
+ map(0x0003, 0x0003).rw(this, FUNC(m68705r_device::port_r<3>), FUNC(m68705r_device::port_latch_w<3>));
+ map(0x0004, 0x0004).w(this, FUNC(m68705r_device::port_ddr_w<0>));
+ map(0x0005, 0x0005).w(this, FUNC(m68705r_device::port_ddr_w<1>));
+ map(0x0006, 0x0006).w(this, FUNC(m68705r_device::port_ddr_w<2>));
// 0x0007 not used (port D is input only)
- AM_RANGE(0x0008, 0x0008) AM_READWRITE(tdr_r, tdr_w)
- AM_RANGE(0x0009, 0x0009) AM_READWRITE(tcr_r, tcr_w)
- AM_RANGE(0x000a, 0x000a) AM_READWRITE(misc_r, misc_w)
- AM_RANGE(0x000b, 0x000b) AM_READWRITE(pcr_r, pcr_w)
+ map(0x0008, 0x0008).rw(this, FUNC(m68705r_device::tdr_r), FUNC(m68705r_device::tdr_w));
+ map(0x0009, 0x0009).rw(this, FUNC(m68705r_device::tcr_r), FUNC(m68705r_device::tcr_w));
+ map(0x000a, 0x000a).rw(this, FUNC(m68705r_device::misc_r), FUNC(m68705r_device::misc_w));
+ map(0x000b, 0x000b).rw(this, FUNC(m68705r_device::pcr_r), FUNC(m68705r_device::pcr_w));
// 0x000c-0x000d not used
- AM_RANGE(0x000e, 0x000e) AM_READWRITE(acr_r, acr_w)
- AM_RANGE(0x000f, 0x000f) AM_READWRITE(arr_r, arr_w)
- AM_RANGE(0x0010, 0x007f) AM_RAM
- AM_RANGE(0x0080, 0x0f38) AM_READWRITE(eprom_r<0x0080>, eprom_w<0x0080>) // User EPROM
+ map(0x000e, 0x000e).rw(this, FUNC(m68705r_device::acr_r), FUNC(m68705r_device::acr_w));
+ map(0x000f, 0x000f).rw(this, FUNC(m68705r_device::arr_r), FUNC(m68705r_device::arr_w));
+ map(0x0010, 0x007f).ram();
+ map(0x0080, 0x0f38).rw(this, FUNC(m68705r_device::eprom_r<0x0080>), FUNC(m68705r_device::eprom_w<0x0080>)); // User EPROM
// 0x0f39-0x0f7f not used
- AM_RANGE(0x0f80, 0x0ff7) AM_ROM AM_REGION("bootstrap", 0)
- AM_RANGE(0x0ff8, 0x0fff) AM_READWRITE(eprom_r<0x0ff8>, eprom_w<0x0ff8>) // Interrupt vectors
-ADDRESS_MAP_END
+ map(0x0f80, 0x0ff7).rom().region("bootstrap", 0);
+ map(0x0ff8, 0x0fff).rw(this, FUNC(m68705r_device::eprom_r<0x0ff8>), FUNC(m68705r_device::eprom_w<0x0ff8>)); // Interrupt vectors
+}
m68705r_device::m68705r_device(
machine_config const &mconfig,