summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/saturn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/saturn.cpp')
-rw-r--r--src/mame/drivers/saturn.cpp60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/mame/drivers/saturn.cpp b/src/mame/drivers/saturn.cpp
index d27f87e553a..d605e67d2ea 100644
--- a/src/mame/drivers/saturn.cpp
+++ b/src/mame/drivers/saturn.cpp
@@ -518,40 +518,42 @@ READ32_MEMBER( sat_console_state::abus_dummy_r )
return -1;
}
-ADDRESS_MAP_START(sat_console_state::saturn_mem)
- AM_RANGE(0x00000000, 0x0007ffff) AM_ROM AM_MIRROR(0x20000000) AM_REGION("bios", 0) AM_WRITENOP // bios
- AM_RANGE(0x00100000, 0x0010007f) AM_DEVREADWRITE8("smpc", smpc_hle_device, read, write, 0xffffffff)
- AM_RANGE(0x00180000, 0x0018ffff) AM_READWRITE8(saturn_backupram_r, saturn_backupram_w,0xffffffff) AM_SHARE("share1")
- AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_MIRROR(0x20100000) AM_SHARE("workram_l")
- AM_RANGE(0x01000000, 0x017fffff) AM_WRITE(saturn_minit_w)
- AM_RANGE(0x01800000, 0x01ffffff) AM_WRITE(saturn_sinit_w)
+void sat_console_state::saturn_mem(address_map &map)
+{
+ map(0x00000000, 0x0007ffff).rom().mirror(0x20000000).region("bios", 0).nopw(); // bios
+ map(0x00100000, 0x0010007f).rw(m_smpc_hle, FUNC(smpc_hle_device::read), FUNC(smpc_hle_device::write));
+ map(0x00180000, 0x0018ffff).rw(this, FUNC(sat_console_state::saturn_backupram_r), FUNC(sat_console_state::saturn_backupram_w)).share("share1");
+ map(0x00200000, 0x002fffff).ram().mirror(0x20100000).share("workram_l");
+ map(0x01000000, 0x017fffff).w(this, FUNC(sat_console_state::saturn_minit_w));
+ map(0x01800000, 0x01ffffff).w(this, FUNC(sat_console_state::saturn_sinit_w));
// AM_RANGE(0x02000000, 0x023fffff) AM_ROM AM_MIRROR(0x20000000) // Cartridge area
// AM_RANGE(0x02400000, 0x027fffff) AM_RAM // External Data RAM area
// AM_RANGE(0x04000000, 0x047fffff) AM_RAM // External Battery RAM area
- AM_RANGE(0x04fffffc, 0x04ffffff) AM_READ8(saturn_cart_type_r,0x000000ff)
- AM_RANGE(0x05000000, 0x057fffff) AM_READ(abus_dummy_r)
- AM_RANGE(0x05800000, 0x0589ffff) AM_DEVREADWRITE("stvcd", stvcd_device, stvcd_r, stvcd_w)
+ map(0x04ffffff, 0x04ffffff).r(this, FUNC(sat_console_state::saturn_cart_type_r));
+ map(0x05000000, 0x057fffff).r(this, FUNC(sat_console_state::abus_dummy_r));
+ map(0x05800000, 0x0589ffff).rw(m_stvcd, FUNC(stvcd_device::stvcd_r), FUNC(stvcd_device::stvcd_w));
/* Sound */
- AM_RANGE(0x05a00000, 0x05a7ffff) AM_READWRITE16(saturn_soundram_r, saturn_soundram_w,0xffffffff)
- AM_RANGE(0x05b00000, 0x05b00fff) AM_DEVREADWRITE16("scsp", scsp_device, read, write, 0xffffffff)
+ map(0x05a00000, 0x05a7ffff).rw(this, FUNC(sat_console_state::saturn_soundram_r), FUNC(sat_console_state::saturn_soundram_w));
+ map(0x05b00000, 0x05b00fff).rw("scsp", FUNC(scsp_device::read), FUNC(scsp_device::write));
/* VDP1 */
- AM_RANGE(0x05c00000, 0x05c7ffff) AM_READWRITE(saturn_vdp1_vram_r, saturn_vdp1_vram_w)
- AM_RANGE(0x05c80000, 0x05cbffff) AM_READWRITE(saturn_vdp1_framebuffer0_r, saturn_vdp1_framebuffer0_w)
- AM_RANGE(0x05d00000, 0x05d0001f) AM_READWRITE16(saturn_vdp1_regs_r, saturn_vdp1_regs_w,0xffffffff)
- AM_RANGE(0x05e00000, 0x05e7ffff) AM_MIRROR(0x80000) AM_READWRITE(saturn_vdp2_vram_r, saturn_vdp2_vram_w)
- AM_RANGE(0x05f00000, 0x05f7ffff) AM_READWRITE(saturn_vdp2_cram_r, saturn_vdp2_cram_w)
- AM_RANGE(0x05f80000, 0x05fbffff) AM_READWRITE16(saturn_vdp2_regs_r, saturn_vdp2_regs_w,0xffffffff)
- AM_RANGE(0x05fe0000, 0x05fe00cf) AM_DEVICE("scu", sega_scu_device, regs_map ) //AM_READWRITE(saturn_scu_r, saturn_scu_w)
- AM_RANGE(0x06000000, 0x060fffff) AM_RAM AM_MIRROR(0x21f00000) AM_SHARE("workram_h")
- AM_RANGE(0x45000000, 0x46ffffff) AM_WRITENOP
- AM_RANGE(0x60000000, 0x600003ff) AM_WRITENOP // cache address array
- AM_RANGE(0xc0000000, 0xc0000fff) AM_RAM // cache data array, Dragon Ball Z sprites relies on this
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(sat_console_state::sound_mem)
- AM_RANGE(0x000000, 0x0fffff) AM_RAM AM_SHARE("sound_ram")
- AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE("scsp", scsp_device, read, write)
-ADDRESS_MAP_END
+ map(0x05c00000, 0x05c7ffff).rw(this, FUNC(sat_console_state::saturn_vdp1_vram_r), FUNC(sat_console_state::saturn_vdp1_vram_w));
+ map(0x05c80000, 0x05cbffff).rw(this, FUNC(sat_console_state::saturn_vdp1_framebuffer0_r), FUNC(sat_console_state::saturn_vdp1_framebuffer0_w));
+ map(0x05d00000, 0x05d0001f).rw(this, FUNC(sat_console_state::saturn_vdp1_regs_r), FUNC(sat_console_state::saturn_vdp1_regs_w));
+ map(0x05e00000, 0x05e7ffff).mirror(0x80000).rw(this, FUNC(sat_console_state::saturn_vdp2_vram_r), FUNC(sat_console_state::saturn_vdp2_vram_w));
+ map(0x05f00000, 0x05f7ffff).rw(this, FUNC(sat_console_state::saturn_vdp2_cram_r), FUNC(sat_console_state::saturn_vdp2_cram_w));
+ map(0x05f80000, 0x05fbffff).rw(this, FUNC(sat_console_state::saturn_vdp2_regs_r), FUNC(sat_console_state::saturn_vdp2_regs_w));
+ map(0x05fe0000, 0x05fe00cf).m(m_scu, FUNC(sega_scu_device::regs_map)); //AM_READWRITE(saturn_scu_r, saturn_scu_w)
+ map(0x06000000, 0x060fffff).ram().mirror(0x21f00000).share("workram_h");
+ map(0x45000000, 0x46ffffff).nopw();
+ map(0x60000000, 0x600003ff).nopw(); // cache address array
+ map(0xc0000000, 0xc0000fff).ram(); // cache data array, Dragon Ball Z sprites relies on this
+}
+
+void sat_console_state::sound_mem(address_map &map)
+{
+ map(0x000000, 0x0fffff).ram().share("sound_ram");
+ map(0x100000, 0x100fff).rw("scsp", FUNC(scsp_device::read), FUNC(scsp_device::write));
+}
INPUT_CHANGED_MEMBER(sat_console_state::tray_open)