summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/igspoker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/igspoker.cpp')
-rw-r--r--src/mame/drivers/igspoker.cpp136
1 files changed, 70 insertions, 66 deletions
diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp
index c419fdde62e..331117a6db8 100644
--- a/src/mame/drivers/igspoker.cpp
+++ b/src/mame/drivers/igspoker.cpp
@@ -383,30 +383,32 @@ READ8_MEMBER(igspoker_state::exp_rom_r)
return rom[offset+0x10000];
}
-ADDRESS_MAP_START(igspoker_state::igspoker_prg_map)
- AM_RANGE(0x0000, 0xefff) AM_ROM
- AM_RANGE(0xf000, 0xffff) AM_RAM AM_REGION("maincpu", 0xf000)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(igspoker_state::igspoker_io_map)
- AM_RANGE(0x0000, 0xffff) AM_READ(exp_rom_r )
- AM_RANGE(0x2000, 0x27ff) AM_RAM_DEVWRITE("palette", palette_device, write8) AM_SHARE("palette")
- AM_RANGE(0x2800, 0x2fff) AM_RAM_DEVWRITE("palette", palette_device, write8_ext) AM_SHARE("palette_ext")
- AM_RANGE(0x4000, 0x4000) AM_READ_PORT("DSW1") /* DSW1 */
- AM_RANGE(0x4001, 0x4001) AM_READ_PORT("DSW2") /* DSW2 */
- AM_RANGE(0x4002, 0x4002) AM_READ_PORT("DSW3") /* DSW3 */
- AM_RANGE(0x4003, 0x4003) AM_READ_PORT("DSW4") /* DSW4 */
- AM_RANGE(0x4004, 0x4004) AM_READ_PORT("DSW5") /* DSW5 */
- AM_RANGE(0x5080, 0x5083) AM_DEVREADWRITE("ppi", i8255_device, read, write)
- AM_RANGE(0x5090, 0x5090) AM_WRITE(custom_io_w)
- AM_RANGE(0x5091, 0x5091) AM_READ(custom_io_r) AM_WRITE(igs_lamps_w ) /* Keyboard */
- AM_RANGE(0x50a0, 0x50a0) AM_READ_PORT("BUTTONS2") /* Not connected */
- AM_RANGE(0x50b0, 0x50b1) AM_DEVWRITE("ymsnd", ym2413_device, write)
- AM_RANGE(0x50c0, 0x50c0) AM_READ(igs_irqack_r) AM_WRITE(igs_irqack_w)
- AM_RANGE(0x6800, 0x6fff) AM_RAM_WRITE(bg_tile_w ) AM_SHARE("bg_tile_ram")
- AM_RANGE(0x7000, 0x77ff) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram")
- AM_RANGE(0x7800, 0x7fff) AM_RAM_WRITE(fg_color_w ) AM_SHARE("fg_color_ram")
-ADDRESS_MAP_END
+void igspoker_state::igspoker_prg_map(address_map &map)
+{
+ map(0x0000, 0xefff).rom();
+ map(0xf000, 0xffff).ram().region("maincpu", 0xf000);
+}
+
+void igspoker_state::igspoker_io_map(address_map &map)
+{
+ map(0x0000, 0xffff).r(this, FUNC(igspoker_state::exp_rom_r));
+ map(0x2000, 0x27ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
+ map(0x2800, 0x2fff).ram().w(m_palette, FUNC(palette_device::write8_ext)).share("palette_ext");
+ map(0x4000, 0x4000).portr("DSW1"); /* DSW1 */
+ map(0x4001, 0x4001).portr("DSW2"); /* DSW2 */
+ map(0x4002, 0x4002).portr("DSW3"); /* DSW3 */
+ map(0x4003, 0x4003).portr("DSW4"); /* DSW4 */
+ map(0x4004, 0x4004).portr("DSW5"); /* DSW5 */
+ map(0x5080, 0x5083).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0x5090, 0x5090).w(this, FUNC(igspoker_state::custom_io_w));
+ map(0x5091, 0x5091).r(this, FUNC(igspoker_state::custom_io_r)).w(this, FUNC(igspoker_state::igs_lamps_w)); /* Keyboard */
+ map(0x50a0, 0x50a0).portr("BUTTONS2"); /* Not connected */
+ map(0x50b0, 0x50b1).w("ymsnd", FUNC(ym2413_device::write));
+ map(0x50c0, 0x50c0).r(this, FUNC(igspoker_state::igs_irqack_r)).w(this, FUNC(igspoker_state::igs_irqack_w));
+ map(0x6800, 0x6fff).ram().w(this, FUNC(igspoker_state::bg_tile_w)).share("bg_tile_ram");
+ map(0x7000, 0x77ff).ram().w(this, FUNC(igspoker_state::fg_tile_w)).share("fg_tile_ram");
+ map(0x7800, 0x7fff).ram().w(this, FUNC(igspoker_state::fg_color_w)).share("fg_color_ram");
+}
/* MB: 05 Jun 99 Input ports and Dip switches are all verified! */
@@ -1140,50 +1142,52 @@ static INPUT_PORTS_START( igs_ncs )
INPUT_PORTS_END
-ADDRESS_MAP_START(igspoker_state::number10_io_map)
- AM_RANGE(0x0000, 0xffff) AM_READ(exp_rom_r )
- AM_RANGE(0x2000, 0x27ff) AM_RAM_DEVWRITE("palette", palette_device, write8) AM_SHARE("palette")
- AM_RANGE(0x2800, 0x2fff) AM_RAM_DEVWRITE("palette", palette_device, write8_ext) AM_SHARE("palette_ext")
- AM_RANGE(0x4000, 0x4000) AM_READ_PORT("DSW1") /* DSW1 */
- AM_RANGE(0x4001, 0x4001) AM_READ_PORT("DSW2") /* DSW2 */
- AM_RANGE(0x4002, 0x4002) AM_READ_PORT("DSW3") /* DSW3 */
- AM_RANGE(0x4003, 0x4003) AM_READ_PORT("DSW4") /* DSW4 */
- AM_RANGE(0x4004, 0x4004) AM_READ_PORT("DSW5") /* DSW5 */
- AM_RANGE(0x4006, 0x4006) AM_READ_PORT("DSW6")
- AM_RANGE(0x4007, 0x4007) AM_READ_PORT("DSW7")
- AM_RANGE(0x50f0, 0x50f0) AM_WRITE(igs_nmi_and_coins_w)
- AM_RANGE(0x5080, 0x5080) AM_READ_PORT("SERVICE") /* Services */
- AM_RANGE(0x5090, 0x5090) AM_WRITE(custom_io_w)
- AM_RANGE(0x5091, 0x5091) AM_READ(custom_io_r) AM_WRITE(igs_lamps_w ) /* Keyboard */
- AM_RANGE(0x50a0, 0x50a0) AM_READ_PORT("BUTTONS2")
+void igspoker_state::number10_io_map(address_map &map)
+{
+ map(0x0000, 0xffff).r(this, FUNC(igspoker_state::exp_rom_r));
+ map(0x2000, 0x27ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
+ map(0x2800, 0x2fff).ram().w(m_palette, FUNC(palette_device::write8_ext)).share("palette_ext");
+ map(0x4000, 0x4000).portr("DSW1"); /* DSW1 */
+ map(0x4001, 0x4001).portr("DSW2"); /* DSW2 */
+ map(0x4002, 0x4002).portr("DSW3"); /* DSW3 */
+ map(0x4003, 0x4003).portr("DSW4"); /* DSW4 */
+ map(0x4004, 0x4004).portr("DSW5"); /* DSW5 */
+ map(0x4006, 0x4006).portr("DSW6");
+ map(0x4007, 0x4007).portr("DSW7");
+ map(0x50f0, 0x50f0).w(this, FUNC(igspoker_state::igs_nmi_and_coins_w));
+ map(0x5080, 0x5080).portr("SERVICE"); /* Services */
+ map(0x5090, 0x5090).w(this, FUNC(igspoker_state::custom_io_w));
+ map(0x5091, 0x5091).r(this, FUNC(igspoker_state::custom_io_r)).w(this, FUNC(igspoker_state::igs_lamps_w)); /* Keyboard */
+ map(0x50a0, 0x50a0).portr("BUTTONS2");
/* Sound synthesys has been patched out, replaced by ADPCM samples */
- AM_RANGE(0x50b0, 0x50b0) AM_DEVREADWRITE("oki", okim6295_device, read, write)
- AM_RANGE(0x50c0, 0x50c0) AM_READ(igs_irqack_r) AM_WRITE(igs_irqack_w)
- AM_RANGE(0x7000, 0x77ff) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram")
- AM_RANGE(0x7800, 0x7fff) AM_RAM_WRITE(fg_color_w ) AM_SHARE("fg_color_ram")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(igspoker_state::cpokerpk_io_map)
- AM_RANGE(0x0000, 0xffff) AM_READ(exp_rom_r )
- AM_RANGE(0x2000, 0x27ff) AM_RAM_DEVWRITE("palette", palette_device, write8) AM_SHARE("palette")
- AM_RANGE(0x2800, 0x2fff) AM_RAM_DEVWRITE("palette", palette_device, write8_ext) AM_SHARE("palette_ext")
- AM_RANGE(0x4000, 0x4000) AM_READ_PORT("DSW1") /* DSW1 */
- AM_RANGE(0x4001, 0x4001) AM_READ_PORT("DSW2") /* DSW2 */
- AM_RANGE(0x4002, 0x4002) AM_READ_PORT("DSW3") /* DSW3 */
- AM_RANGE(0x4003, 0x4003) AM_READ_PORT("DSW4") /* DSW4 */
- AM_RANGE(0x4004, 0x4004) AM_READ_PORT("DSW5") /* DSW5 */
- AM_RANGE(0x50f0, 0x50f0) AM_WRITE(igs_nmi_and_coins_w)
- AM_RANGE(0x5081, 0x5081) AM_READ_PORT("SERVICE") /* Services */
- AM_RANGE(0x5082, 0x5082) AM_READ_PORT("COINS") /* Coing & Kbd */
- AM_RANGE(0x5090, 0x5090) AM_WRITE(custom_io_w)
- AM_RANGE(0x5091, 0x5091) AM_READ(custom_io_r) AM_WRITE(igs_lamps_w ) /* Keyboard */
- AM_RANGE(0x50a0, 0x50a0) AM_READ_PORT("BUTTONS2")
+ map(0x50b0, 0x50b0).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ map(0x50c0, 0x50c0).r(this, FUNC(igspoker_state::igs_irqack_r)).w(this, FUNC(igspoker_state::igs_irqack_w));
+ map(0x7000, 0x77ff).ram().w(this, FUNC(igspoker_state::fg_tile_w)).share("fg_tile_ram");
+ map(0x7800, 0x7fff).ram().w(this, FUNC(igspoker_state::fg_color_w)).share("fg_color_ram");
+}
+
+void igspoker_state::cpokerpk_io_map(address_map &map)
+{
+ map(0x0000, 0xffff).r(this, FUNC(igspoker_state::exp_rom_r));
+ map(0x2000, 0x27ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
+ map(0x2800, 0x2fff).ram().w(m_palette, FUNC(palette_device::write8_ext)).share("palette_ext");
+ map(0x4000, 0x4000).portr("DSW1"); /* DSW1 */
+ map(0x4001, 0x4001).portr("DSW2"); /* DSW2 */
+ map(0x4002, 0x4002).portr("DSW3"); /* DSW3 */
+ map(0x4003, 0x4003).portr("DSW4"); /* DSW4 */
+ map(0x4004, 0x4004).portr("DSW5"); /* DSW5 */
+ map(0x50f0, 0x50f0).w(this, FUNC(igspoker_state::igs_nmi_and_coins_w));
+ map(0x5081, 0x5081).portr("SERVICE"); /* Services */
+ map(0x5082, 0x5082).portr("COINS"); /* Coing & Kbd */
+ map(0x5090, 0x5090).w(this, FUNC(igspoker_state::custom_io_w));
+ map(0x5091, 0x5091).r(this, FUNC(igspoker_state::custom_io_r)).w(this, FUNC(igspoker_state::igs_lamps_w)); /* Keyboard */
+ map(0x50a0, 0x50a0).portr("BUTTONS2");
/* Sound synthesys has been patched out, replaced by ADPCM samples */
- AM_RANGE(0x50b0, 0x50b0) AM_DEVREADWRITE("oki", okim6295_device, read, write)
- AM_RANGE(0x50c0, 0x50c0) AM_READ(igs_irqack_r) AM_WRITE(igs_irqack_w)
- AM_RANGE(0x7000, 0x77ff) AM_RAM_WRITE(fg_tile_w ) AM_SHARE("fg_tile_ram")
- AM_RANGE(0x7800, 0x7fff) AM_RAM_WRITE(fg_color_w ) AM_SHARE("fg_color_ram")
-ADDRESS_MAP_END
+ map(0x50b0, 0x50b0).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write));
+ map(0x50c0, 0x50c0).r(this, FUNC(igspoker_state::igs_irqack_r)).w(this, FUNC(igspoker_state::igs_irqack_w));
+ map(0x7000, 0x77ff).ram().w(this, FUNC(igspoker_state::fg_tile_w)).share("fg_tile_ram");
+ map(0x7800, 0x7fff).ram().w(this, FUNC(igspoker_state::fg_color_w)).share("fg_color_ram");
+}
static INPUT_PORTS_START( number10 )
PORT_START("DSW1")