diff options
Diffstat (limited to 'src/mame/drivers/cswat.cpp')
-rw-r--r-- | src/mame/drivers/cswat.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/mame/drivers/cswat.cpp b/src/mame/drivers/cswat.cpp index 7e844dede43..4abc14e1fff 100644 --- a/src/mame/drivers/cswat.cpp +++ b/src/mame/drivers/cswat.cpp @@ -137,18 +137,19 @@ READ8_MEMBER(cswat_state::sensors_r) return machine().rand(); } -ADDRESS_MAP_START(cswat_state::cswat_map) - AM_RANGE(0x0000, 0x0bff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") - AM_RANGE(0x0c00, 0x0fff) AM_RAM +void cswat_state::cswat_map(address_map &map) +{ + map(0x0000, 0x0bff).ram().w(this, FUNC(cswat_state::videoram_w)).share("videoram"); + map(0x0c00, 0x0fff).ram(); // AM_RANGE(0x1800, 0x1800) AM_READNOP // ? reads here after writing to $4000 - AM_RANGE(0x2000, 0x2000) AM_WRITE(irq_ack_w) // writes 1 at end of vblank irq, 0 at gamestart - AM_RANGE(0x2000, 0x2001) AM_READ(dipswitch_r) - AM_RANGE(0x2002, 0x2002) AM_WRITE(irq_ack_w) // writes 0 at start of vblank irq - AM_RANGE(0x2002, 0x2002) AM_READ(sensors_r) - AM_RANGE(0x2003, 0x2003) AM_READ_PORT("IN0") + map(0x2000, 0x2000).w(this, FUNC(cswat_state::irq_ack_w)); // writes 1 at end of vblank irq, 0 at gamestart + map(0x2000, 0x2001).r(this, FUNC(cswat_state::dipswitch_r)); + map(0x2002, 0x2002).w(this, FUNC(cswat_state::irq_ack_w)); // writes 0 at start of vblank irq + map(0x2002, 0x2002).r(this, FUNC(cswat_state::sensors_r)); + map(0x2003, 0x2003).portr("IN0"); // AM_RANGE(0x4000, 0x4009) AM_NOP // ? - AM_RANGE(0x8000, 0xffff) AM_ROM -ADDRESS_MAP_END + map(0x8000, 0xffff).rom(); +} /*************************************************************************** |