diff options
Diffstat (limited to 'src/mame/drivers/sengokmj.cpp')
-rw-r--r-- | src/mame/drivers/sengokmj.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/src/mame/drivers/sengokmj.cpp b/src/mame/drivers/sengokmj.cpp index 084c277021b..305a8b88fd3 100644 --- a/src/mame/drivers/sengokmj.cpp +++ b/src/mame/drivers/sengokmj.cpp @@ -390,32 +390,34 @@ READ16_MEMBER(sengokmj_state::system_r) return (ioport("SYSTEM")->read() & 0xffbf) | m_hopper_io; } -ADDRESS_MAP_START(sengokmj_state::sengokmj_map) - AM_RANGE(0x00000, 0x07fff) AM_RAM - AM_RANGE(0x08000, 0x09fff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x0c000, 0x0c7ff) AM_RAM_WRITE(seibucrtc_sc0vram_w) AM_SHARE("sc0_vram") - AM_RANGE(0x0c800, 0x0cfff) AM_RAM_WRITE(seibucrtc_sc1vram_w) AM_SHARE("sc1_vram") - AM_RANGE(0x0d000, 0x0d7ff) AM_RAM_WRITE(seibucrtc_sc2vram_w) AM_SHARE("sc2_vram") - AM_RANGE(0x0d800, 0x0e7ff) AM_RAM_WRITE(seibucrtc_sc3vram_w) AM_SHARE("sc3_vram") - AM_RANGE(0x0e800, 0x0f7ff) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette") - AM_RANGE(0x0f800, 0x0ffff) AM_RAM AM_SHARE("sprite_ram") - AM_RANGE(0xc0000, 0xfffff) AM_ROM -ADDRESS_MAP_END - -ADDRESS_MAP_START(sengokmj_state::sengokmj_io_map) - AM_RANGE(0x4000, 0x400f) AM_DEVREADWRITE8("seibu_sound", seibu_sound_device, main_r, main_w, 0x00ff) +void sengokmj_state::sengokmj_map(address_map &map) +{ + map(0x00000, 0x07fff).ram(); + map(0x08000, 0x09fff).ram().share("nvram"); + map(0x0c000, 0x0c7ff).ram().w(this, FUNC(sengokmj_state::seibucrtc_sc0vram_w)).share("sc0_vram"); + map(0x0c800, 0x0cfff).ram().w(this, FUNC(sengokmj_state::seibucrtc_sc1vram_w)).share("sc1_vram"); + map(0x0d000, 0x0d7ff).ram().w(this, FUNC(sengokmj_state::seibucrtc_sc2vram_w)).share("sc2_vram"); + map(0x0d800, 0x0e7ff).ram().w(this, FUNC(sengokmj_state::seibucrtc_sc3vram_w)).share("sc3_vram"); + map(0x0e800, 0x0f7ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); + map(0x0f800, 0x0ffff).ram().share("sprite_ram"); + map(0xc0000, 0xfffff).rom(); +} + +void sengokmj_state::sengokmj_io_map(address_map &map) +{ + map(0x4000, 0x400f).rw("seibu_sound", FUNC(seibu_sound_device::main_r), FUNC(seibu_sound_device::main_w)).umask16(0x00ff); /*Areas from 8000-804f are for the custom Seibu CRTC.*/ - AM_RANGE(0x8000, 0x804f) AM_DEVREADWRITE("crtc", seibu_crtc_device, read, write) + map(0x8000, 0x804f).rw("crtc", FUNC(seibu_crtc_device::read), FUNC(seibu_crtc_device::write)); // AM_RANGE(0x8080, 0x8081) CRTC extra register? // AM_RANGE(0x80c0, 0x80c1) CRTC extra register? // AM_RANGE(0x8100, 0x8101) AM_WRITENOP // always 0 - AM_RANGE(0x8180, 0x8181) AM_WRITE(out_w) - AM_RANGE(0x8140, 0x8141) AM_WRITE(mahjong_panel_w) - AM_RANGE(0xc000, 0xc001) AM_READ_PORT("DSW") - AM_RANGE(0xc002, 0xc003) AM_READ(mahjong_panel_r) - AM_RANGE(0xc004, 0xc005) AM_READ(system_r) //switches -ADDRESS_MAP_END + map(0x8180, 0x8181).w(this, FUNC(sengokmj_state::out_w)); + map(0x8140, 0x8141).w(this, FUNC(sengokmj_state::mahjong_panel_w)); + map(0xc000, 0xc001).portr("DSW"); + map(0xc002, 0xc003).r(this, FUNC(sengokmj_state::mahjong_panel_r)); + map(0xc004, 0xc005).r(this, FUNC(sengokmj_state::system_r)); //switches +} static INPUT_PORTS_START( sengokmj ) |