diff options
Diffstat (limited to 'src/mame/drivers/aeroboto.cpp')
-rw-r--r-- | src/mame/drivers/aeroboto.cpp | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/src/mame/drivers/aeroboto.cpp b/src/mame/drivers/aeroboto.cpp index fc3b93ab26f..34c54bcaa97 100644 --- a/src/mame/drivers/aeroboto.cpp +++ b/src/mame/drivers/aeroboto.cpp @@ -74,37 +74,39 @@ WRITE8_MEMBER(aeroboto_state::aeroboto_1a2_w) m_disable_irq = 1; } -ADDRESS_MAP_START(aeroboto_state::main_map) - AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("mainram") // main RAM - AM_RANGE(0x01a2, 0x01a2) AM_WRITE(aeroboto_1a2_w) // affects IRQ line (more protection?) - AM_RANGE(0x0800, 0x08ff) AM_RAM // tile color buffer; copied to 0x2000 - AM_RANGE(0x0900, 0x09ff) AM_WRITEONLY // a backup of default tile colors - AM_RANGE(0x1000, 0x17ff) AM_RAM_WRITE(aeroboto_videoram_w) AM_SHARE("videoram") // tile RAM - AM_RANGE(0x1800, 0x183f) AM_RAM AM_SHARE("hscroll") // horizontal scroll regs - AM_RANGE(0x1840, 0x27ff) AM_WRITENOP // cleared during custom LSI test - AM_RANGE(0x2000, 0x20ff) AM_RAM_WRITE(aeroboto_tilecolor_w) AM_SHARE("tilecolor") // tile color RAM - AM_RANGE(0x2800, 0x28ff) AM_RAM AM_SHARE("spriteram") // sprite RAM - AM_RANGE(0x2900, 0x2fff) AM_WRITENOP // cleared along with sprite RAM - AM_RANGE(0x2973, 0x2973) AM_READ(aeroboto_2973_r) // protection read - AM_RANGE(0x3000, 0x3000) AM_READWRITE(aeroboto_in0_r, aeroboto_3000_w) - AM_RANGE(0x3001, 0x3001) AM_READ_PORT("DSW1") AM_DEVWRITE("soundlatch", generic_latch_8_device, write) - AM_RANGE(0x3002, 0x3002) AM_READ_PORT("DSW2") AM_DEVWRITE("soundlatch2", generic_latch_8_device, write) - AM_RANGE(0x3003, 0x3003) AM_WRITEONLY AM_SHARE("vscroll") - AM_RANGE(0x3004, 0x3004) AM_READ(aeroboto_201_r) AM_WRITEONLY AM_SHARE("starx") - AM_RANGE(0x3005, 0x3005) AM_WRITEONLY AM_SHARE("stary") // usable but probably wrong - AM_RANGE(0x3006, 0x3006) AM_WRITEONLY AM_SHARE("bgcolor") - AM_RANGE(0x3800, 0x3800) AM_READ(aeroboto_irq_ack_r) // watchdog or IRQ ack - AM_RANGE(0x4000, 0xffff) AM_ROM // main ROM -ADDRESS_MAP_END - -ADDRESS_MAP_START(aeroboto_state::sound_map) - AM_RANGE(0x0000, 0x0fff) AM_RAM - AM_RANGE(0x9000, 0x9001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) - AM_RANGE(0x9002, 0x9002) AM_DEVREAD("ay1", ay8910_device, data_r) - AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) - AM_RANGE(0xa002, 0xa002) AM_DEVREAD("ay2", ay8910_device, data_r) - AM_RANGE(0xf000, 0xffff) AM_ROM -ADDRESS_MAP_END +void aeroboto_state::main_map(address_map &map) +{ + map(0x0000, 0x07ff).ram().share("mainram"); // main RAM + map(0x01a2, 0x01a2).w(this, FUNC(aeroboto_state::aeroboto_1a2_w)); // affects IRQ line (more protection?) + map(0x0800, 0x08ff).ram(); // tile color buffer; copied to 0x2000 + map(0x0900, 0x09ff).writeonly(); // a backup of default tile colors + map(0x1000, 0x17ff).ram().w(this, FUNC(aeroboto_state::aeroboto_videoram_w)).share("videoram"); // tile RAM + map(0x1800, 0x183f).ram().share("hscroll"); // horizontal scroll regs + map(0x1840, 0x27ff).nopw(); // cleared during custom LSI test + map(0x2000, 0x20ff).ram().w(this, FUNC(aeroboto_state::aeroboto_tilecolor_w)).share("tilecolor"); // tile color RAM + map(0x2800, 0x28ff).ram().share("spriteram"); // sprite RAM + map(0x2900, 0x2fff).nopw(); // cleared along with sprite RAM + map(0x2973, 0x2973).r(this, FUNC(aeroboto_state::aeroboto_2973_r)); // protection read + map(0x3000, 0x3000).rw(this, FUNC(aeroboto_state::aeroboto_in0_r), FUNC(aeroboto_state::aeroboto_3000_w)); + map(0x3001, 0x3001).portr("DSW1").w("soundlatch", FUNC(generic_latch_8_device::write)); + map(0x3002, 0x3002).portr("DSW2").w("soundlatch2", FUNC(generic_latch_8_device::write)); + map(0x3003, 0x3003).writeonly().share("vscroll"); + map(0x3004, 0x3004).r(this, FUNC(aeroboto_state::aeroboto_201_r)).writeonly().share("starx"); + map(0x3005, 0x3005).writeonly().share("stary"); // usable but probably wrong + map(0x3006, 0x3006).writeonly().share("bgcolor"); + map(0x3800, 0x3800).r(this, FUNC(aeroboto_state::aeroboto_irq_ack_r)); // watchdog or IRQ ack + map(0x4000, 0xffff).rom(); // main ROM +} + +void aeroboto_state::sound_map(address_map &map) +{ + map(0x0000, 0x0fff).ram(); + map(0x9000, 0x9001).w("ay1", FUNC(ay8910_device::address_data_w)); + map(0x9002, 0x9002).r("ay1", FUNC(ay8910_device::data_r)); + map(0xa000, 0xa001).w("ay2", FUNC(ay8910_device::address_data_w)); + map(0xa002, 0xa002).r("ay2", FUNC(ay8910_device::data_r)); + map(0xf000, 0xffff).rom(); +} |