diff options
Diffstat (limited to 'src/mame/drivers/statriv2.cpp')
-rw-r--r-- | src/mame/drivers/statriv2.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/mame/drivers/statriv2.cpp b/src/mame/drivers/statriv2.cpp index 29ea50afef1..4a0e82357a3 100644 --- a/src/mame/drivers/statriv2.cpp +++ b/src/mame/drivers/statriv2.cpp @@ -286,20 +286,22 @@ WRITE8_MEMBER(statriv2_state::ppi_portc_hi_w) * *************************************/ -ADDRESS_MAP_START(statriv2_state::statriv2_map) - AM_RANGE(0x0000, 0x3fff) AM_ROM - AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x4800, 0x48ff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(statriv2_videoram_w) AM_SHARE("videoram") -ADDRESS_MAP_END - -ADDRESS_MAP_START(statriv2_state::statriv2_io_map) - AM_RANGE(0x20, 0x23) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) - AM_RANGE(0x28, 0x2b) AM_READ(question_data_r) AM_WRITEONLY AM_SHARE("question_offset") - AM_RANGE(0xb0, 0xb1) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) - AM_RANGE(0xb1, 0xb1) AM_DEVREAD("aysnd", ay8910_device, data_r) - AM_RANGE(0xc0, 0xcf) AM_DEVREADWRITE("tms", tms9927_device, read, write) -ADDRESS_MAP_END +void statriv2_state::statriv2_map(address_map &map) +{ + map(0x0000, 0x3fff).rom(); + map(0x4000, 0x43ff).ram(); + map(0x4800, 0x48ff).ram().share("nvram"); + map(0xc800, 0xcfff).ram().w(this, FUNC(statriv2_state::statriv2_videoram_w)).share("videoram"); +} + +void statriv2_state::statriv2_io_map(address_map &map) +{ + map(0x20, 0x23).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x28, 0x2b).r(this, FUNC(statriv2_state::question_data_r)).writeonly().share("question_offset"); + map(0xb0, 0xb1).w("aysnd", FUNC(ay8910_device::address_data_w)); + map(0xb1, 0xb1).r("aysnd", FUNC(ay8910_device::data_r)); + map(0xc0, 0xcf).rw(m_tms, FUNC(tms9927_device::read), FUNC(tms9927_device::write)); +} /************************************* |