summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/apple2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/apple2.cpp')
-rw-r--r--src/mame/drivers/apple2.cpp42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index f816ac89ed9..a9a0398b6bd 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -952,26 +952,28 @@ WRITE8_MEMBER(napple2_state::ram_w)
}
}
-ADDRESS_MAP_START(napple2_state::apple2_map)
- AM_RANGE(0x0000, 0xbfff) AM_READWRITE(ram_r, ram_w)
- AM_RANGE(0xc000, 0xc000) AM_MIRROR(0xf) AM_READ(keyb_data_r) AM_WRITENOP
- AM_RANGE(0xc010, 0xc010) AM_MIRROR(0xf) AM_READWRITE(keyb_strobe_r, keyb_strobe_w)
- AM_RANGE(0xc020, 0xc020) AM_MIRROR(0xf) AM_READWRITE(cassette_toggle_r, cassette_toggle_w)
- AM_RANGE(0xc030, 0xc030) AM_MIRROR(0xf) AM_READWRITE(speaker_toggle_r, speaker_toggle_w)
- AM_RANGE(0xc040, 0xc040) AM_MIRROR(0xf) AM_READWRITE(utility_strobe_r, utility_strobe_w)
- AM_RANGE(0xc050, 0xc05f) AM_READ(switches_r) AM_DEVWRITE("softlatch", addressable_latch_device, write_a0)
- AM_RANGE(0xc060, 0xc067) AM_MIRROR(0x8) AM_READ(flags_r) AM_WRITENOP // includes IIgs STATE register, which ProDOS touches
- AM_RANGE(0xc070, 0xc070) AM_MIRROR(0xf) AM_READWRITE(controller_strobe_r, controller_strobe_w)
- AM_RANGE(0xc080, 0xc0ff) AM_READWRITE(c080_r, c080_w)
- AM_RANGE(0xc100, 0xc7ff) AM_READWRITE(c100_r, c100_w)
- AM_RANGE(0xc800, 0xcfff) AM_READWRITE(c800_r, c800_w)
- AM_RANGE(0xd000, 0xffff) AM_DEVICE(A2_UPPERBANK_TAG, address_map_bank_device, amap8)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(napple2_state::inhbank_map)
- AM_RANGE(0x0000, 0x2fff) AM_ROM AM_REGION("maincpu", 0x1000) AM_WRITE(inh_w)
- AM_RANGE(0x3000, 0x5fff) AM_READWRITE(inh_r, inh_w)
-ADDRESS_MAP_END
+void napple2_state::apple2_map(address_map &map)
+{
+ map(0x0000, 0xbfff).rw(this, FUNC(napple2_state::ram_r), FUNC(napple2_state::ram_w));
+ map(0xc000, 0xc000).mirror(0xf).r(this, FUNC(napple2_state::keyb_data_r)).nopw();
+ map(0xc010, 0xc010).mirror(0xf).rw(this, FUNC(napple2_state::keyb_strobe_r), FUNC(napple2_state::keyb_strobe_w));
+ map(0xc020, 0xc020).mirror(0xf).rw(this, FUNC(napple2_state::cassette_toggle_r), FUNC(napple2_state::cassette_toggle_w));
+ map(0xc030, 0xc030).mirror(0xf).rw(this, FUNC(napple2_state::speaker_toggle_r), FUNC(napple2_state::speaker_toggle_w));
+ map(0xc040, 0xc040).mirror(0xf).rw(this, FUNC(napple2_state::utility_strobe_r), FUNC(napple2_state::utility_strobe_w));
+ map(0xc050, 0xc05f).r(this, FUNC(napple2_state::switches_r)).w(m_softlatch, FUNC(addressable_latch_device::write_a0));
+ map(0xc060, 0xc067).mirror(0x8).r(this, FUNC(napple2_state::flags_r)).nopw(); // includes IIgs STATE register, which ProDOS touches
+ map(0xc070, 0xc070).mirror(0xf).rw(this, FUNC(napple2_state::controller_strobe_r), FUNC(napple2_state::controller_strobe_w));
+ map(0xc080, 0xc0ff).rw(this, FUNC(napple2_state::c080_r), FUNC(napple2_state::c080_w));
+ map(0xc100, 0xc7ff).rw(this, FUNC(napple2_state::c100_r), FUNC(napple2_state::c100_w));
+ map(0xc800, 0xcfff).rw(this, FUNC(napple2_state::c800_r), FUNC(napple2_state::c800_w));
+ map(0xd000, 0xffff).m(m_upperbank, FUNC(address_map_bank_device::amap8));
+}
+
+void napple2_state::inhbank_map(address_map &map)
+{
+ map(0x0000, 0x2fff).rom().region("maincpu", 0x1000).w(this, FUNC(napple2_state::inh_w));
+ map(0x3000, 0x5fff).rw(this, FUNC(napple2_state::inh_r), FUNC(napple2_state::inh_w));
+}
/***************************************************************************
KEYBOARD