diff options
Diffstat (limited to 'src/mame/drivers/famibox.cpp')
-rw-r--r-- | src/mame/drivers/famibox.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mame/drivers/famibox.cpp b/src/mame/drivers/famibox.cpp index 22db44c74b7..6df5adee03e 100644 --- a/src/mame/drivers/famibox.cpp +++ b/src/mame/drivers/famibox.cpp @@ -376,17 +376,18 @@ WRITE8_MEMBER(famibox_state::famibox_system_w) *******************************************************/ -ADDRESS_MAP_START(famibox_state::famibox_map) - AM_RANGE(0x0000, 0x1fff) AM_RAM - AM_RANGE(0x2000, 0x3fff) AM_DEVREADWRITE("ppu", ppu2c0x_device, read, write) - AM_RANGE(0x4014, 0x4014) AM_WRITE(sprite_dma_w) - AM_RANGE(0x4016, 0x4016) AM_READWRITE(famibox_IN0_r, famibox_IN0_w) /* IN0 - input port 1 */ - AM_RANGE(0x4017, 0x4017) AM_READ(famibox_IN1_r) /* IN1 - input port 2 / PSG second control register */ - AM_RANGE(0x5000, 0x5fff) AM_READWRITE(famibox_system_r, famibox_system_w) - AM_RANGE(0x6000, 0x7fff) AM_RAM - AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("cpubank1") - AM_RANGE(0xc000, 0xffff) AM_ROMBANK("cpubank2") -ADDRESS_MAP_END +void famibox_state::famibox_map(address_map &map) +{ + map(0x0000, 0x1fff).ram(); + map(0x2000, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write)); + map(0x4014, 0x4014).w(this, FUNC(famibox_state::sprite_dma_w)); + map(0x4016, 0x4016).rw(this, FUNC(famibox_state::famibox_IN0_r), FUNC(famibox_state::famibox_IN0_w)); /* IN0 - input port 1 */ + map(0x4017, 0x4017).r(this, FUNC(famibox_state::famibox_IN1_r)); /* IN1 - input port 2 / PSG second control register */ + map(0x5000, 0x5fff).rw(this, FUNC(famibox_state::famibox_system_r), FUNC(famibox_state::famibox_system_w)); + map(0x6000, 0x7fff).ram(); + map(0x8000, 0xbfff).bankr("cpubank1"); + map(0xc000, 0xffff).bankr("cpubank2"); +} /****************************************************** |