diff options
Diffstat (limited to 'src/mame/drivers/bw2.cpp')
-rw-r--r-- | src/mame/drivers/bw2.cpp | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/mame/drivers/bw2.cpp b/src/mame/drivers/bw2.cpp index 67366d42591..2ca8bb637b0 100644 --- a/src/mame/drivers/bw2.cpp +++ b/src/mame/drivers/bw2.cpp @@ -202,39 +202,42 @@ WRITE8_MEMBER( bw2_state::write ) // ADDRESS_MAP( bw2_mem ) //------------------------------------------------- -ADDRESS_MAP_START(bw2_state::bw2_mem) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0xffff) AM_READWRITE(read, write) -ADDRESS_MAP_END +void bw2_state::bw2_mem(address_map &map) +{ + map.unmap_value_high(); + map(0x0000, 0xffff).rw(this, FUNC(bw2_state::read), FUNC(bw2_state::write)); +} //------------------------------------------------- // ADDRESS_MAP( bw2_io ) //------------------------------------------------- -ADDRESS_MAP_START(bw2_state::bw2_io) - ADDRESS_MAP_UNMAP_HIGH - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x03) AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write) - AM_RANGE(0x10, 0x13) AM_DEVREADWRITE(I8253_TAG, pit8253_device, read, write) - AM_RANGE(0x20, 0x21) AM_DEVICE(MSM6255_TAG, msm6255_device, map) - AM_RANGE(0x30, 0x3f) AM_DEVREADWRITE(BW2_EXPANSION_SLOT_TAG, bw2_expansion_slot_device, slot_r, slot_w) - AM_RANGE(0x40, 0x40) AM_DEVREADWRITE(I8251_TAG, i8251_device, data_r, data_w) - AM_RANGE(0x41, 0x41) AM_DEVREADWRITE(I8251_TAG, i8251_device, status_r, control_w) - AM_RANGE(0x50, 0x50) AM_DEVWRITE("cent_data_out", output_latch_device, write) - AM_RANGE(0x60, 0x63) AM_DEVREADWRITE(WD2797_TAG, wd2797_device, read, write) - AM_RANGE(0x70, 0x7f) AM_DEVREADWRITE(BW2_EXPANSION_SLOT_TAG, bw2_expansion_slot_device, modsel_r, modsel_w) -ADDRESS_MAP_END +void bw2_state::bw2_io(address_map &map) +{ + map.unmap_value_high(); + map.global_mask(0xff); + map(0x00, 0x03).rw(I8255A_TAG, FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x10, 0x13).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write)); + map(0x20, 0x21).m(m_lcdc, FUNC(msm6255_device::map)); + map(0x30, 0x3f).rw(m_exp, FUNC(bw2_expansion_slot_device::slot_r), FUNC(bw2_expansion_slot_device::slot_w)); + map(0x40, 0x40).rw(m_uart, FUNC(i8251_device::data_r), FUNC(i8251_device::data_w)); + map(0x41, 0x41).rw(m_uart, FUNC(i8251_device::status_r), FUNC(i8251_device::control_w)); + map(0x50, 0x50).w("cent_data_out", FUNC(output_latch_device::write)); + map(0x60, 0x63).rw(m_fdc, FUNC(wd2797_device::read), FUNC(wd2797_device::write)); + map(0x70, 0x7f).rw(m_exp, FUNC(bw2_expansion_slot_device::modsel_r), FUNC(bw2_expansion_slot_device::modsel_w)); +} //------------------------------------------------- // ADDRESS_MAP( lcdc_map ) //------------------------------------------------- -ADDRESS_MAP_START(bw2_state::lcdc_map) - ADDRESS_MAP_GLOBAL_MASK(0x3fff) - AM_RANGE(0x0000, 0x3fff) AM_RAM AM_SHARE("videoram") -ADDRESS_MAP_END +void bw2_state::lcdc_map(address_map &map) +{ + map.global_mask(0x3fff); + map(0x0000, 0x3fff).ram().share("videoram"); +} |