diff options
Diffstat (limited to 'src/mame/drivers/umipoker.cpp')
-rw-r--r-- | src/mame/drivers/umipoker.cpp | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/src/mame/drivers/umipoker.cpp b/src/mame/drivers/umipoker.cpp index 91cc5211003..e65d31bae03 100644 --- a/src/mame/drivers/umipoker.cpp +++ b/src/mame/drivers/umipoker.cpp @@ -315,42 +315,45 @@ WRITE16_MEMBER(umipoker_state::saiyu_counters_w) } -ADDRESS_MAP_START(umipoker_state::umipoker_map) - ADDRESS_MAP_UNMAP_LOW - AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x400000, 0x403fff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x600000, 0x6007ff) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette") // Palette - AM_RANGE(0x800000, 0x801fff) AM_RAM_WRITE(umipoker_vram_0_w) AM_SHARE("vra0") - AM_RANGE(0x802000, 0x803fff) AM_RAM_WRITE(umipoker_vram_1_w) AM_SHARE("vra1") - AM_RANGE(0x804000, 0x805fff) AM_RAM_WRITE(umipoker_vram_2_w) AM_SHARE("vra2") - AM_RANGE(0x806000, 0x807fff) AM_RAM_WRITE(umipoker_vram_3_w) AM_SHARE("vra3") - AM_RANGE(0xc00000, 0xc0ffff) AM_READ8(z80_rom_readback_r,0x00ff) - AM_RANGE(0xc1f000, 0xc1ffff) AM_READWRITE8(z80_shared_ram_r,z80_shared_ram_w,0x00ff) - AM_RANGE(0xe00000, 0xe00001) AM_READ_PORT("IN0") - AM_RANGE(0xe00004, 0xe00005) AM_READ_PORT("IN1") // unused? - AM_RANGE(0xe00008, 0xe00009) AM_READ_PORT("IN2") +void umipoker_state::umipoker_map(address_map &map) +{ + map.unmap_value_low(); + map(0x000000, 0x03ffff).rom(); + map(0x400000, 0x403fff).ram().share("nvram"); + map(0x600000, 0x6007ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette + map(0x800000, 0x801fff).ram().w(this, FUNC(umipoker_state::umipoker_vram_0_w)).share("vra0"); + map(0x802000, 0x803fff).ram().w(this, FUNC(umipoker_state::umipoker_vram_1_w)).share("vra1"); + map(0x804000, 0x805fff).ram().w(this, FUNC(umipoker_state::umipoker_vram_2_w)).share("vra2"); + map(0x806000, 0x807fff).ram().w(this, FUNC(umipoker_state::umipoker_vram_3_w)).share("vra3"); + map(0xc00000, 0xc0ffff).r(this, FUNC(umipoker_state::z80_rom_readback_r)).umask16(0x00ff); + map(0xc1f000, 0xc1ffff).rw(this, FUNC(umipoker_state::z80_shared_ram_r), FUNC(umipoker_state::z80_shared_ram_w)).umask16(0x00ff); + map(0xe00000, 0xe00001).portr("IN0"); + map(0xe00004, 0xe00005).portr("IN1"); // unused? + map(0xe00008, 0xe00009).portr("IN2"); // AM_RANGE(0xe0000c, 0xe0000d) AM_WRITE(lamps_w) -----> lamps only for saiyukip. // AM_RANGE(0xe00010, 0xe00011) AM_WRITE(counters_w) --> coin counters for both games. - AM_RANGE(0xe00014, 0xe00015) AM_READ_PORT("DSW1-2") - AM_RANGE(0xe00018, 0xe00019) AM_READ_PORT("DSW3-4") - AM_RANGE(0xe00020, 0xe00021) AM_WRITE(umipoker_scrolly_0_w) - AM_RANGE(0xe00022, 0xe00023) AM_WRITE(umipoker_irq_ack_w) - AM_RANGE(0xe00026, 0xe00027) AM_WRITE(umipoker_scrolly_2_w) - AM_RANGE(0xe0002a, 0xe0002b) AM_WRITE(umipoker_scrolly_1_w) - AM_RANGE(0xe0002c, 0xe0002d) AM_WRITENOP // unknown meaning, bit 0 goes from 0 -> 1 on IRQ service routine - AM_RANGE(0xe0002e, 0xe0002f) AM_WRITE(umipoker_scrolly_3_w) -ADDRESS_MAP_END - -ADDRESS_MAP_START(umipoker_state::umipoker_audio_map) - AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0xf800, 0xffff) AM_READWRITE(z80_shared_ram_r,z80_shared_ram_w) AM_SHARE("z80_wram") -ADDRESS_MAP_END - -ADDRESS_MAP_START(umipoker_state::umipoker_audio_io_map) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0x10, 0x11) AM_DEVREADWRITE("ym", ym3812_device, read, write) -ADDRESS_MAP_END + map(0xe00014, 0xe00015).portr("DSW1-2"); + map(0xe00018, 0xe00019).portr("DSW3-4"); + map(0xe00020, 0xe00021).w(this, FUNC(umipoker_state::umipoker_scrolly_0_w)); + map(0xe00022, 0xe00023).w(this, FUNC(umipoker_state::umipoker_irq_ack_w)); + map(0xe00026, 0xe00027).w(this, FUNC(umipoker_state::umipoker_scrolly_2_w)); + map(0xe0002a, 0xe0002b).w(this, FUNC(umipoker_state::umipoker_scrolly_1_w)); + map(0xe0002c, 0xe0002d).nopw(); // unknown meaning, bit 0 goes from 0 -> 1 on IRQ service routine + map(0xe0002e, 0xe0002f).w(this, FUNC(umipoker_state::umipoker_scrolly_3_w)); +} + +void umipoker_state::umipoker_audio_map(address_map &map) +{ + map(0x0000, 0x7fff).rom(); + map(0xf800, 0xffff).rw(this, FUNC(umipoker_state::z80_shared_ram_r), FUNC(umipoker_state::z80_shared_ram_w)).share("z80_wram"); +} + +void umipoker_state::umipoker_audio_io_map(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x00).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); + map(0x10, 0x11).rw("ym", FUNC(ym3812_device::read), FUNC(ym3812_device::write)); +} static INPUT_PORTS_START( common ) |