summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/taxidriv.cpp
diff options
context:
space:
mode:
authorGravatarGravatar Olivier Galibert <galibert@pobox.com>2018-03-13 07:36:43 +0100
committerGravatarGravatar Olivier Galibert <galibert@pobox.com>2018-03-14 14:07:14 +0100
commit115bb9936c5cd3faf955d7eb1e251a94e4744b7b (patch) (github)
treef0230f547f6c750f9974c61479eef28cbe4ad571 /src/mame/drivers/taxidriv.cpp
parentf155992daab88ad024cec995428a67108218b51d (diff)
downloadmame-115bb9936c5cd3faf955d7eb1e251a94e4744b7b.tar.bz2
mame-115bb9936c5cd3faf955d7eb1e251a94e4744b7b.zip
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/taxidriv.cpp')
-rw-r--r--src/mame/drivers/taxidriv.cpp100
1 files changed, 52 insertions, 48 deletions
diff --git a/src/mame/drivers/taxidriv.cpp b/src/mame/drivers/taxidriv.cpp
index 808e0636cea..cdaed919d08 100644
--- a/src/mame/drivers/taxidriv.cpp
+++ b/src/mame/drivers/taxidriv.cpp
@@ -110,55 +110,59 @@ WRITE8_MEMBER(taxidriv_state::p8910_0b_w)
m_s4 = data & 1;
}
-ADDRESS_MAP_START(taxidriv_state::main_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0x8fff) AM_RAM /* ??? */
- AM_RANGE(0x9000, 0x9fff) AM_RAM /* ??? */
- AM_RANGE(0xa000, 0xafff) AM_RAM /* ??? */
- AM_RANGE(0xb000, 0xbfff) AM_RAM /* ??? */
- AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("vram4") /* radar bitmap */
- AM_RANGE(0xc800, 0xcfff) AM_WRITEONLY AM_SHARE("vram5") /* "sprite1" bitmap */
- AM_RANGE(0xd000, 0xd7ff) AM_WRITEONLY AM_SHARE("vram6") /* "sprite2" bitmap */
- AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE("vram7") /* "sprite3" bitmap */
- AM_RANGE(0xe000, 0xf3ff) AM_READONLY
- AM_RANGE(0xe000, 0xe3ff) AM_WRITEONLY AM_SHARE("vram1") /* car tilemap */
- AM_RANGE(0xe400, 0xebff) AM_WRITEONLY AM_SHARE("vram2") /* bg1 tilemap */
- AM_RANGE(0xec00, 0xefff) AM_WRITEONLY AM_SHARE("vram0") /* fg tilemap */
- AM_RANGE(0xf000, 0xf3ff) AM_WRITEONLY AM_SHARE("vram3") /* bg2 tilemap */
- AM_RANGE(0xf400, 0xf403) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xf480, 0xf483) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) /* "sprite1" placement */
- AM_RANGE(0xf500, 0xf503) AM_DEVREADWRITE("ppi8255_3", i8255_device, read, write) /* "sprite2" placement */
- AM_RANGE(0xf580, 0xf583) AM_DEVREADWRITE("ppi8255_4", i8255_device, read, write) /* "sprite3" placement */
+void taxidriv_state::main_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0x8fff).ram(); /* ??? */
+ map(0x9000, 0x9fff).ram(); /* ??? */
+ map(0xa000, 0xafff).ram(); /* ??? */
+ map(0xb000, 0xbfff).ram(); /* ??? */
+ map(0xc000, 0xc7ff).ram().share("vram4"); /* radar bitmap */
+ map(0xc800, 0xcfff).writeonly().share("vram5"); /* "sprite1" bitmap */
+ map(0xd000, 0xd7ff).writeonly().share("vram6"); /* "sprite2" bitmap */
+ map(0xd800, 0xdfff).ram().share("vram7"); /* "sprite3" bitmap */
+ map(0xe000, 0xf3ff).readonly();
+ map(0xe000, 0xe3ff).writeonly().share("vram1"); /* car tilemap */
+ map(0xe400, 0xebff).writeonly().share("vram2"); /* bg1 tilemap */
+ map(0xec00, 0xefff).writeonly().share("vram0"); /* fg tilemap */
+ map(0xf000, 0xf3ff).writeonly().share("vram3"); /* bg2 tilemap */
+ map(0xf400, 0xf403).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xf480, 0xf483).rw("ppi8255_2", FUNC(i8255_device::read), FUNC(i8255_device::write)); /* "sprite1" placement */
+ map(0xf500, 0xf503).rw("ppi8255_3", FUNC(i8255_device::read), FUNC(i8255_device::write)); /* "sprite2" placement */
+ map(0xf580, 0xf583).rw("ppi8255_4", FUNC(i8255_device::read), FUNC(i8255_device::write)); /* "sprite3" placement */
//AM_RANGE(0xf780, 0xf781) AM_WRITEONLY /* more scroll registers? */
- AM_RANGE(0xf782, 0xf787) AM_WRITEONLY AM_SHARE("scroll") /* bg scroll (three copies always identical) */
- AM_RANGE(0xf800, 0xffff) AM_RAM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(taxidriv_state::cpu2_map)
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x6000, 0x67ff) AM_RAM
- AM_RANGE(0x8000, 0x87ff) AM_RAM
- AM_RANGE(0xa000, 0xa003) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_READ_PORT("DSW0")
- AM_RANGE(0xe001, 0xe001) AM_READ_PORT("DSW1")
- AM_RANGE(0xe002, 0xe002) AM_READ_PORT("DSW2")
- AM_RANGE(0xe003, 0xe003) AM_READ_PORT("P1")
- AM_RANGE(0xe004, 0xe004) AM_READ_PORT("P2")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(taxidriv_state::cpu3_map)
- AM_RANGE(0x0000, 0x1fff) AM_ROM
- AM_RANGE(0x2000, 0x2000) AM_READNOP /* irq ack? */
- AM_RANGE(0xfc00, 0xffff) AM_RAM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(taxidriv_state::cpu3_port_map)
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w)
- AM_RANGE(0x01, 0x01) AM_DEVREAD("ay1", ay8910_device, data_r)
- AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, address_data_w)
- AM_RANGE(0x03, 0x03) AM_DEVREAD("ay2", ay8910_device, data_r)
-ADDRESS_MAP_END
+ map(0xf782, 0xf787).writeonly().share("scroll"); /* bg scroll (three copies always identical) */
+ map(0xf800, 0xffff).ram();
+}
+
+void taxidriv_state::cpu2_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom();
+ map(0x6000, 0x67ff).ram();
+ map(0x8000, 0x87ff).ram();
+ map(0xa000, 0xa003).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xe000, 0xe000).portr("DSW0");
+ map(0xe001, 0xe001).portr("DSW1");
+ map(0xe002, 0xe002).portr("DSW2");
+ map(0xe003, 0xe003).portr("P1");
+ map(0xe004, 0xe004).portr("P2");
+}
+
+void taxidriv_state::cpu3_map(address_map &map)
+{
+ map(0x0000, 0x1fff).rom();
+ map(0x2000, 0x2000).nopr(); /* irq ack? */
+ map(0xfc00, 0xffff).ram();
+}
+
+void taxidriv_state::cpu3_port_map(address_map &map)
+{
+ map.global_mask(0xff);
+ map(0x00, 0x01).w("ay1", FUNC(ay8910_device::address_data_w));
+ map(0x01, 0x01).r("ay1", FUNC(ay8910_device::data_r));
+ map(0x02, 0x03).w("ay2", FUNC(ay8910_device::address_data_w));
+ map(0x03, 0x03).r("ay2", FUNC(ay8910_device::data_r));
+}
static INPUT_PORTS_START( taxidriv )