summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/psikyo4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/psikyo4.cpp')
-rw-r--r--src/mame/drivers/psikyo4.cpp56
1 files changed, 29 insertions, 27 deletions
diff --git a/src/mame/drivers/psikyo4.cpp b/src/mame/drivers/psikyo4.cpp
index 9f9e48a1887..b224907621a 100644
--- a/src/mame/drivers/psikyo4.cpp
+++ b/src/mame/drivers/psikyo4.cpp
@@ -321,34 +321,36 @@ WRITE32_MEMBER(psikyo4_state::io_select_w)
logerror("Unk ioselect write %x mask %x\n", data, mem_mask);
}
-ADDRESS_MAP_START(psikyo4_state::ps4_map)
- AM_RANGE(0x00000000, 0x000fffff) AM_ROM // program ROM (1 meg)
- AM_RANGE(0x02000000, 0x021fffff) AM_ROM AM_REGION("maincpu", 0x100000) // data ROM
- AM_RANGE(0x03000000, 0x030037ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x03003fe0, 0x03003fe3) AM_READWRITE(ps4_eeprom_r,ps4_eeprom_w)
- AM_RANGE(0x03003fe4, 0x03003fef) AM_RAM_WRITE(ps4_vidregs_w) AM_SHARE("vidregs") // vid regs?
- AM_RANGE(0x03003fe4, 0x03003fe7) AM_READNOP // also writes to this address - might be vblank?
+void psikyo4_state::ps4_map(address_map &map)
+{
+ map(0x00000000, 0x000fffff).rom(); // program ROM (1 meg)
+ map(0x02000000, 0x021fffff).rom().region("maincpu", 0x100000); // data ROM
+ map(0x03000000, 0x030037ff).ram().share("spriteram");
+ map(0x03003fe0, 0x03003fe3).rw(this, FUNC(psikyo4_state::ps4_eeprom_r), FUNC(psikyo4_state::ps4_eeprom_w));
+ map(0x03003fe4, 0x03003fef).ram().w(this, FUNC(psikyo4_state::ps4_vidregs_w)).share("vidregs"); // vid regs?
+ map(0x03003fe4, 0x03003fe7).nopr(); // also writes to this address - might be vblank?
// AM_RANGE(0x03003fe4, 0x03003fe7) AM_WRITENOP // might be vblank?
- AM_RANGE(0x03003ff0, 0x03003ff3) AM_WRITE(ps4_screen1_brt_w) // screen 1 brightness
- AM_RANGE(0x03003ff4, 0x03003ff7) AM_WRITE(ps4_bgpen_1_dword_w) AM_SHARE("bgpen_1") // screen 1 clear colour
- AM_RANGE(0x03003ff8, 0x03003ffb) AM_WRITE(ps4_screen2_brt_w) // screen 2 brightness
- AM_RANGE(0x03003ffc, 0x03003fff) AM_WRITE(ps4_bgpen_2_dword_w) AM_SHARE("bgpen_2") // screen 2 clear colour
- AM_RANGE(0x03004000, 0x03005fff) AM_RAM_WRITE(ps4_paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w) AM_SHARE("paletteram") // palette
- AM_RANGE(0x03006000, 0x03007fff) AM_ROMBANK("gfxbank") // data for rom tests (gfx), data is controlled by vidreg
- AM_RANGE(0x05000000, 0x05000007) AM_DEVREADWRITE8("ymf", ymf278b_device, read, write, 0xffffffff)
- AM_RANGE(0x05800000, 0x05800003) AM_READ_PORT("P1_P2")
- AM_RANGE(0x05800004, 0x05800007) AM_READ_PORT("P3_P4")
- AM_RANGE(0x05800008, 0x0580000b) AM_WRITE(io_select_w) // Used by Mahjong games to choose input (also maps normal loderndf inputs to offsets)
-
- AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_SHARE("ram") // main RAM (1 meg)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(psikyo4_state::ps4_ymf_map)
- AM_RANGE(0x000000, 0x0fffff) AM_ROMBANK("ymfbank0")
- AM_RANGE(0x100000, 0x1fffff) AM_ROMBANK("ymfbank1")
- AM_RANGE(0x200000, 0x2fffff) AM_ROMBANK("ymfbank2")
- AM_RANGE(0x300000, 0x3fffff) AM_ROMBANK("ymfbank3")
-ADDRESS_MAP_END
+ map(0x03003ff0, 0x03003ff3).w(this, FUNC(psikyo4_state::ps4_screen1_brt_w)); // screen 1 brightness
+ map(0x03003ff4, 0x03003ff7).w(this, FUNC(psikyo4_state::ps4_bgpen_1_dword_w)).share("bgpen_1"); // screen 1 clear colour
+ map(0x03003ff8, 0x03003ffb).w(this, FUNC(psikyo4_state::ps4_screen2_brt_w)); // screen 2 brightness
+ map(0x03003ffc, 0x03003fff).w(this, FUNC(psikyo4_state::ps4_bgpen_2_dword_w)).share("bgpen_2"); // screen 2 clear colour
+ map(0x03004000, 0x03005fff).ram().w(this, FUNC(psikyo4_state::ps4_paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w)).share("paletteram"); // palette
+ map(0x03006000, 0x03007fff).bankr("gfxbank"); // data for rom tests (gfx), data is controlled by vidreg
+ map(0x05000000, 0x05000007).rw("ymf", FUNC(ymf278b_device::read), FUNC(ymf278b_device::write));
+ map(0x05800000, 0x05800003).portr("P1_P2");
+ map(0x05800004, 0x05800007).portr("P3_P4");
+ map(0x05800008, 0x0580000b).w(this, FUNC(psikyo4_state::io_select_w)); // Used by Mahjong games to choose input (also maps normal loderndf inputs to offsets)
+
+ map(0x06000000, 0x060fffff).ram().share("ram"); // main RAM (1 meg)
+}
+
+void psikyo4_state::ps4_ymf_map(address_map &map)
+{
+ map(0x000000, 0x0fffff).bankr("ymfbank0");
+ map(0x100000, 0x1fffff).bankr("ymfbank1");
+ map(0x200000, 0x2fffff).bankr("ymfbank2");
+ map(0x300000, 0x3fffff).bankr("ymfbank3");
+}
static INPUT_PORTS_START( hotgmck )