summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/3x3puzzl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/3x3puzzl.cpp')
-rw-r--r--src/mame/drivers/3x3puzzl.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/mame/drivers/3x3puzzl.cpp b/src/mame/drivers/3x3puzzl.cpp
index 86dd7742ef0..fb05e097365 100644
--- a/src/mame/drivers/3x3puzzl.cpp
+++ b/src/mame/drivers/3x3puzzl.cpp
@@ -209,23 +209,24 @@ uint32_t _3x3puzzle_state::screen_update( screen_device &screen, bitmap_rgb32 &b
return 0;
}
-ADDRESS_MAP_START(_3x3puzzle_state::_3x3puzzle_map)
- AM_RANGE(0x000000, 0x07ffff) AM_ROM
- AM_RANGE(0x100000, 0x10ffff) AM_RAM
- AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_SHARE("videoram1")
- AM_RANGE(0x201000, 0x201fff) AM_RAM AM_SHARE("videoram2")
- AM_RANGE(0x202000, 0x202fff) AM_RAM AM_SHARE("videoram3")
- AM_RANGE(0x280000, 0x280001) AM_READ_PORT("VBLANK")
- AM_RANGE(0x300000, 0x3005ff) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette")
- AM_RANGE(0x400000, 0x400001) AM_WRITE(tilemap1_scrollx_w)
- AM_RANGE(0x480000, 0x480001) AM_WRITE(tilemap1_scrolly_w)
- AM_RANGE(0x500000, 0x500001) AM_READ_PORT("P1")
- AM_RANGE(0x580000, 0x580001) AM_READ_PORT("SYS")
- AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW01")
- AM_RANGE(0x700000, 0x700001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
- AM_RANGE(0x800000, 0x800001) AM_WRITE(gfx_ctrl_w)
- AM_RANGE(0x880000, 0x880001) AM_READNOP // read, but no tested afterwards
-ADDRESS_MAP_END
+void _3x3puzzle_state::_3x3puzzle_map(address_map &map)
+{
+ map(0x000000, 0x07ffff).rom();
+ map(0x100000, 0x10ffff).ram();
+ map(0x200000, 0x2007ff).ram().share("videoram1");
+ map(0x201000, 0x201fff).ram().share("videoram2");
+ map(0x202000, 0x202fff).ram().share("videoram3");
+ map(0x280000, 0x280001).portr("VBLANK");
+ map(0x300000, 0x3005ff).ram().w("palette", FUNC(palette_device::write16)).share("palette");
+ map(0x400000, 0x400001).w(this, FUNC(_3x3puzzle_state::tilemap1_scrollx_w));
+ map(0x480000, 0x480001).w(this, FUNC(_3x3puzzle_state::tilemap1_scrolly_w));
+ map(0x500000, 0x500001).portr("P1");
+ map(0x580000, 0x580001).portr("SYS");
+ map(0x600000, 0x600001).portr("DSW01");
+ map(0x700001, 0x700001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ map(0x800000, 0x800001).w(this, FUNC(_3x3puzzle_state::gfx_ctrl_w));
+ map(0x880000, 0x880001).nopr(); // read, but no tested afterwards
+}
static INPUT_PORTS_START( _3x3puzzle )
PORT_START("P1")