diff options
Diffstat (limited to 'src/mame/drivers/channelf.cpp')
-rw-r--r-- | src/mame/drivers/channelf.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/mame/drivers/channelf.cpp b/src/mame/drivers/channelf.cpp index 73fa5b02a91..374d61460dc 100644 --- a/src/mame/drivers/channelf.cpp +++ b/src/mame/drivers/channelf.cpp @@ -119,17 +119,19 @@ WRITE8_MEMBER( channelf_state::port_5_w ) m_row_reg = (data | 0xc0) ^ 0xff; } -ADDRESS_MAP_START(channelf_state::channelf_map) - AM_RANGE(0x0000, 0x07ff) AM_ROM - AM_RANGE(0x0800, 0xffff) AM_DEVREAD("cartslot", channelf_cart_slot_device, read_rom) -ADDRESS_MAP_END - -ADDRESS_MAP_START(channelf_state::channelf_io) - AM_RANGE(0x00, 0x00) AM_READWRITE(port_0_r, port_0_w) /* Front panel switches */ - AM_RANGE(0x01, 0x01) AM_READWRITE(port_1_r, port_1_w) /* Right controller */ - AM_RANGE(0x04, 0x04) AM_READWRITE(port_4_r, port_4_w) /* Left controller */ - AM_RANGE(0x05, 0x05) AM_READWRITE(port_5_r, port_5_w) -ADDRESS_MAP_END +void channelf_state::channelf_map(address_map &map) +{ + map(0x0000, 0x07ff).rom(); + map(0x0800, 0xffff).r(m_cart, FUNC(channelf_cart_slot_device::read_rom)); +} + +void channelf_state::channelf_io(address_map &map) +{ + map(0x00, 0x00).rw(this, FUNC(channelf_state::port_0_r), FUNC(channelf_state::port_0_w)); /* Front panel switches */ + map(0x01, 0x01).rw(this, FUNC(channelf_state::port_1_r), FUNC(channelf_state::port_1_w)); /* Right controller */ + map(0x04, 0x04).rw(this, FUNC(channelf_state::port_4_r), FUNC(channelf_state::port_4_w)); /* Left controller */ + map(0x05, 0x05).rw(this, FUNC(channelf_state::port_5_r), FUNC(channelf_state::port_5_w)); +} |