summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/segas24.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/segas24.cpp')
-rw-r--r--src/mame/drivers/segas24.cpp195
1 files changed, 101 insertions, 94 deletions
diff --git a/src/mame/drivers/segas24.cpp b/src/mame/drivers/segas24.cpp
index 4f4fed049fb..62db06b7ee1 100644
--- a/src/mame/drivers/segas24.cpp
+++ b/src/mame/drivers/segas24.cpp
@@ -1064,51 +1064,54 @@ fc-ff ramhi
*/
-ADDRESS_MAP_START(segas24_state::system24_cpu1_map)
- AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x040000) AM_ROM AM_REGION("maincpu", 0)
- AM_RANGE(0x080000, 0x0bffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("share1")
- AM_RANGE(0x100000, 0x13ffff) AM_MIRROR(0x0c0000) AM_ROM AM_REGION("maincpu", 0)
- AM_RANGE(0x200000, 0x20ffff) AM_MIRROR(0x110000) AM_DEVREADWRITE("tile", segas24_tile_device, tile_r, tile_w)
- AM_RANGE(0x220000, 0x220001) AM_MIRROR(0x11fffe) AM_WRITENOP /* Horizontal split position (ABSEL) */
- AM_RANGE(0x240000, 0x240001) AM_MIRROR(0x11fffe) AM_WRITENOP /* Scanline trigger position (XHOUT) */
- AM_RANGE(0x260000, 0x260001) AM_MIRROR(0x10fffe) AM_WRITENOP /* Frame trigger position (XVOUT) */
- AM_RANGE(0x270000, 0x270001) AM_MIRROR(0x10fffe) AM_WRITENOP /* Synchronization mode */
- AM_RANGE(0x280000, 0x29ffff) AM_MIRROR(0x160000) AM_DEVREADWRITE("tile", segas24_tile_device, char_r, char_w)
- AM_RANGE(0x400000, 0x403fff) AM_MIRROR(0x1f8000) AM_READWRITE(sys16_paletteram_r, sys16_paletteram_w) AM_SHARE("paletteram")
- AM_RANGE(0x404000, 0x40401f) AM_MIRROR(0x1fbfe0) AM_DEVREADWRITE("mixer", segas24_mixer_device, read, write)
- AM_RANGE(0x600000, 0x63ffff) AM_MIRROR(0x180000) AM_DEVREADWRITE("sprite", segas24_sprite_device, read, write)
- AM_RANGE(0x800000, 0x80003f) AM_MIRROR(0x1ffe00) AM_DEVREADWRITE8("io", sega_315_5296_device, read, write, 0x00ff)
- AM_RANGE(0x800040, 0x80007f) AM_MIRROR(0x1ffe00) AM_READWRITE(iod_r, iod_w)
- AM_RANGE(0x800100, 0x800103) AM_MIRROR(0x1ffe00) AM_DEVREADWRITE8("ymsnd", ym2151_device, read, write, 0x00ff)
- AM_RANGE(0xa00000, 0xa00007) AM_MIRROR(0x0ffff8) AM_READWRITE(irq_r, irq_w)
- AM_RANGE(0xb00000, 0xb00007) AM_MIRROR(0x07fff0) AM_READWRITE(fdc_r, fdc_w)
- AM_RANGE(0xb00008, 0xb0000f) AM_MIRROR(0x07fff0) AM_READWRITE(fdc_status_r, fdc_ctrl_w)
- AM_RANGE(0xb80000, 0xbbffff) AM_ROMBANK("bank1")
- AM_RANGE(0xbc0000, 0xbc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
- AM_RANGE(0xbc0002, 0xbc0003) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_mode_r, frc_mode_w,0x00ff)
- AM_RANGE(0xbc0004, 0xbc0005) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_r, frc_w,0x00ff)
- AM_RANGE(0xbc0006, 0xbc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
- AM_RANGE(0xc80000, 0xcbffff) AM_ROMBANK("bank2")
- AM_RANGE(0xcc0000, 0xcc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
- AM_RANGE(0xcc0002, 0xcc0003) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_mode_r, frc_mode_w,0x00ff)
- AM_RANGE(0xcc0004, 0xcc0005) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_r, frc_w,0x00ff)
- AM_RANGE(0xcc0006, 0xcc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
- AM_RANGE(0xf00000, 0xf3ffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("subcpu")
- AM_RANGE(0xf80000, 0xfbffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("share1")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(segas24_state::roughrac_cpu1_map)
- AM_IMPORT_FROM(system24_cpu1_map)
- AM_RANGE(0xc00000, 0xc00007) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd4701", upd4701_device, read_xy, 0x00ff)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(segas24_state::hotrod_cpu1_map)
- AM_IMPORT_FROM(system24_cpu1_map)
- AM_RANGE(0xc00000, 0xc00007) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd1", upd4701_device, read_xy, 0x00ff)
- AM_RANGE(0xc00008, 0xc0000f) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd2", upd4701_device, read_xy, 0x00ff)
- AM_RANGE(0xc00010, 0xc00011) AM_MIRROR(0x07ffec) AM_DEVREADWRITE8("adc1", msm6253_device, d7_r, select_w, 0x00ff)
- AM_RANGE(0xc00012, 0xc00013) AM_MIRROR(0x07ffec) AM_DEVREADWRITE8("adc2", msm6253_device, d7_r, select_w, 0x00ff)
-ADDRESS_MAP_END
+void segas24_state::system24_cpu1_map(address_map &map)
+{
+ map(0x000000, 0x03ffff).mirror(0x040000).rom().region("maincpu", 0);
+ map(0x080000, 0x0bffff).mirror(0x040000).ram().share("share1");
+ map(0x100000, 0x13ffff).mirror(0x0c0000).rom().region("maincpu", 0);
+ map(0x200000, 0x20ffff).mirror(0x110000).rw("tile", FUNC(segas24_tile_device::tile_r), FUNC(segas24_tile_device::tile_w));
+ map(0x220000, 0x220001).mirror(0x11fffe).nopw(); /* Horizontal split position (ABSEL) */
+ map(0x240000, 0x240001).mirror(0x11fffe).nopw(); /* Scanline trigger position (XHOUT) */
+ map(0x260000, 0x260001).mirror(0x10fffe).nopw(); /* Frame trigger position (XVOUT) */
+ map(0x270000, 0x270001).mirror(0x10fffe).nopw(); /* Synchronization mode */
+ map(0x280000, 0x29ffff).mirror(0x160000).rw("tile", FUNC(segas24_tile_device::char_r), FUNC(segas24_tile_device::char_w));
+ map(0x400000, 0x403fff).mirror(0x1f8000).rw(this, FUNC(segas24_state::sys16_paletteram_r), FUNC(segas24_state::sys16_paletteram_w)).share("paletteram");
+ map(0x404000, 0x40401f).mirror(0x1fbfe0).rw("mixer", FUNC(segas24_mixer_device::read), FUNC(segas24_mixer_device::write));
+ map(0x600000, 0x63ffff).mirror(0x180000).rw("sprite", FUNC(segas24_sprite_device::read), FUNC(segas24_sprite_device::write));
+ map(0x800000, 0x80003f).mirror(0x1ffe00).rw("io", FUNC(sega_315_5296_device::read), FUNC(sega_315_5296_device::write)).umask16(0x00ff);
+ map(0x800040, 0x80007f).mirror(0x1ffe00).rw(this, FUNC(segas24_state::iod_r), FUNC(segas24_state::iod_w));
+ map(0x800100, 0x800103).mirror(0x1ffe00).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)).umask16(0x00ff);
+ map(0xa00000, 0xa00007).mirror(0x0ffff8).rw(this, FUNC(segas24_state::irq_r), FUNC(segas24_state::irq_w));
+ map(0xb00000, 0xb00007).mirror(0x07fff0).rw(this, FUNC(segas24_state::fdc_r), FUNC(segas24_state::fdc_w));
+ map(0xb00008, 0xb0000f).mirror(0x07fff0).rw(this, FUNC(segas24_state::fdc_status_r), FUNC(segas24_state::fdc_ctrl_w));
+ map(0xb80000, 0xbbffff).bankr("bank1");
+ map(0xbc0000, 0xbc0001).mirror(0x03fff8).rw(this, FUNC(segas24_state::curbank_r), FUNC(segas24_state::curbank_w));
+ map(0xbc0003, 0xbc0003).mirror(0x03fff8).rw(this, FUNC(segas24_state::frc_mode_r), FUNC(segas24_state::frc_mode_w));
+ map(0xbc0005, 0xbc0005).mirror(0x03fff8).rw(this, FUNC(segas24_state::frc_r), FUNC(segas24_state::frc_w));
+ map(0xbc0006, 0xbc0007).mirror(0x03fff8).rw(this, FUNC(segas24_state::mlatch_r), FUNC(segas24_state::mlatch_w));
+ map(0xc80000, 0xcbffff).bankr("bank2");
+ map(0xcc0000, 0xcc0001).mirror(0x03fff8).rw(this, FUNC(segas24_state::curbank_r), FUNC(segas24_state::curbank_w));
+ map(0xcc0003, 0xcc0003).mirror(0x03fff8).rw(this, FUNC(segas24_state::frc_mode_r), FUNC(segas24_state::frc_mode_w));
+ map(0xcc0005, 0xcc0005).mirror(0x03fff8).rw(this, FUNC(segas24_state::frc_r), FUNC(segas24_state::frc_w));
+ map(0xcc0006, 0xcc0007).mirror(0x03fff8).rw(this, FUNC(segas24_state::mlatch_r), FUNC(segas24_state::mlatch_w));
+ map(0xf00000, 0xf3ffff).mirror(0x040000).ram().share("subcpu");
+ map(0xf80000, 0xfbffff).mirror(0x040000).ram().share("share1");
+}
+
+void segas24_state::roughrac_cpu1_map(address_map &map)
+{
+ system24_cpu1_map(map);
+ map(0xc00000, 0xc00007).mirror(0x07ffe0).r("upd4701", FUNC(upd4701_device::read_xy)).umask16(0x00ff);
+}
+
+void segas24_state::hotrod_cpu1_map(address_map &map)
+{
+ system24_cpu1_map(map);
+ map(0xc00000, 0xc00007).mirror(0x07ffe0).r("upd1", FUNC(upd4701_device::read_xy)).umask16(0x00ff);
+ map(0xc00008, 0xc0000f).mirror(0x07ffe0).r("upd2", FUNC(upd4701_device::read_xy)).umask16(0x00ff);
+ map(0xc00011, 0xc00011).mirror(0x07ffec).rw("adc1", FUNC(msm6253_device::d7_r), FUNC(msm6253_device::select_w));
+ map(0xc00013, 0xc00013).mirror(0x07ffec).rw("adc2", FUNC(msm6253_device::d7_r), FUNC(msm6253_device::select_w));
+}
@@ -1118,55 +1121,59 @@ ADDRESS_MAP_END
*
*************************************/
-ADDRESS_MAP_START(segas24_state::system24_cpu2_map)
- AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("subcpu")
- AM_RANGE(0x080000, 0x0bffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("share1")
- AM_RANGE(0x100000, 0x13ffff) AM_MIRROR(0x0c0000) AM_ROM AM_REGION("maincpu", 0)
- AM_RANGE(0x200000, 0x20ffff) AM_MIRROR(0x110000) AM_DEVREADWRITE("tile", segas24_tile_device, tile_r, tile_w)
- AM_RANGE(0x220000, 0x220001) AM_MIRROR(0x11fffe) AM_WRITENOP /* Horizontal split position (ABSEL) */
- AM_RANGE(0x240000, 0x240001) AM_MIRROR(0x11fffe) AM_WRITENOP /* Scanline trigger position (XHOUT) */
- AM_RANGE(0x260000, 0x260001) AM_MIRROR(0x10fffe) AM_WRITENOP /* Frame trigger position (XVOUT) */
- AM_RANGE(0x270000, 0x270001) AM_MIRROR(0x10fffe) AM_WRITENOP /* Synchronization mode */
- AM_RANGE(0x280000, 0x29ffff) AM_MIRROR(0x160000) AM_DEVREADWRITE("tile", segas24_tile_device, char_r, char_w)
- AM_RANGE(0x400000, 0x403fff) AM_MIRROR(0x1f8000) AM_READWRITE(sys16_paletteram_r, sys16_paletteram_w) AM_SHARE("paletteram")
- AM_RANGE(0x404000, 0x40401f) AM_MIRROR(0x1fbfe0) AM_DEVREADWRITE("mixer", segas24_mixer_device, read, write)
- AM_RANGE(0x600000, 0x63ffff) AM_MIRROR(0x180000) AM_DEVREADWRITE("sprite", segas24_sprite_device, read, write)
- AM_RANGE(0x800000, 0x80003f) AM_MIRROR(0x1ffe00) AM_DEVREADWRITE8("io", sega_315_5296_device, read, write, 0x00ff)
- AM_RANGE(0x800040, 0x80007f) AM_MIRROR(0x1ffe00) AM_READWRITE(iod_r, iod_w)
- AM_RANGE(0x800100, 0x800103) AM_MIRROR(0x1ffe00) AM_DEVREADWRITE8("ymsnd", ym2151_device, read, write, 0x00ff)
- AM_RANGE(0xa00000, 0xa00007) AM_MIRROR(0x0ffff8) AM_READWRITE(irq_r, irq_w)
- AM_RANGE(0xb00000, 0xb00007) AM_MIRROR(0x07fff0) AM_READWRITE(fdc_r, fdc_w)
- AM_RANGE(0xb00008, 0xb0000f) AM_MIRROR(0x07fff0) AM_READWRITE(fdc_status_r, fdc_ctrl_w)
- AM_RANGE(0xb80000, 0xbbffff) AM_ROMBANK("bank1")
- AM_RANGE(0xbc0000, 0xbc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
- AM_RANGE(0xbc0002, 0xbc0003) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_mode_r, frc_mode_w,0x00ff)
- AM_RANGE(0xbc0004, 0xbc0005) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_r, frc_w,0x00ff)
- AM_RANGE(0xbc0006, 0xbc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
- AM_RANGE(0xc80000, 0xcbffff) AM_ROMBANK("bank2")
- AM_RANGE(0xcc0000, 0xcc0001) AM_MIRROR(0x03fff8) AM_READWRITE(curbank_r, curbank_w)
- AM_RANGE(0xcc0002, 0xcc0003) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_mode_r, frc_mode_w,0x00ff)
- AM_RANGE(0xcc0004, 0xcc0005) AM_MIRROR(0x03fff8) AM_READWRITE8(frc_r, frc_w,0x00ff)
- AM_RANGE(0xcc0006, 0xcc0007) AM_MIRROR(0x03fff8) AM_READWRITE(mlatch_r, mlatch_w)
- AM_RANGE(0xf00000, 0xf3ffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("subcpu")
- AM_RANGE(0xf80000, 0xfbffff) AM_MIRROR(0x040000) AM_RAM AM_SHARE("share1")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(segas24_state::roughrac_cpu2_map)
- AM_IMPORT_FROM(system24_cpu2_map)
- AM_RANGE(0xc00000, 0xc00007) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd4701", upd4701_device, read_xy, 0x00ff)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(segas24_state::hotrod_cpu2_map)
- AM_IMPORT_FROM(system24_cpu2_map)
- AM_RANGE(0xc00000, 0xc00007) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd1", upd4701_device, read_xy, 0x00ff)
- AM_RANGE(0xc00008, 0xc0000f) AM_MIRROR(0x07ffe0) AM_DEVREAD8("upd2", upd4701_device, read_xy, 0x00ff)
- AM_RANGE(0xc00010, 0xc00011) AM_MIRROR(0x07ffec) AM_DEVREADWRITE8("adc1", msm6253_device, d7_r, select_w, 0x00ff)
- AM_RANGE(0xc00012, 0xc00013) AM_MIRROR(0x07ffec) AM_DEVREADWRITE8("adc2", msm6253_device, d7_r, select_w, 0x00ff)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(segas24_state::decrypted_opcodes_map)
- AM_RANGE(0x00000, 0xfffff) AM_ROMBANK("fd1094_decrypted_opcodes")
-ADDRESS_MAP_END
+void segas24_state::system24_cpu2_map(address_map &map)
+{
+ map(0x000000, 0x03ffff).mirror(0x040000).ram().share("subcpu");
+ map(0x080000, 0x0bffff).mirror(0x040000).ram().share("share1");
+ map(0x100000, 0x13ffff).mirror(0x0c0000).rom().region("maincpu", 0);
+ map(0x200000, 0x20ffff).mirror(0x110000).rw("tile", FUNC(segas24_tile_device::tile_r), FUNC(segas24_tile_device::tile_w));
+ map(0x220000, 0x220001).mirror(0x11fffe).nopw(); /* Horizontal split position (ABSEL) */
+ map(0x240000, 0x240001).mirror(0x11fffe).nopw(); /* Scanline trigger position (XHOUT) */
+ map(0x260000, 0x260001).mirror(0x10fffe).nopw(); /* Frame trigger position (XVOUT) */
+ map(0x270000, 0x270001).mirror(0x10fffe).nopw(); /* Synchronization mode */
+ map(0x280000, 0x29ffff).mirror(0x160000).rw("tile", FUNC(segas24_tile_device::char_r), FUNC(segas24_tile_device::char_w));
+ map(0x400000, 0x403fff).mirror(0x1f8000).rw(this, FUNC(segas24_state::sys16_paletteram_r), FUNC(segas24_state::sys16_paletteram_w)).share("paletteram");
+ map(0x404000, 0x40401f).mirror(0x1fbfe0).rw("mixer", FUNC(segas24_mixer_device::read), FUNC(segas24_mixer_device::write));
+ map(0x600000, 0x63ffff).mirror(0x180000).rw("sprite", FUNC(segas24_sprite_device::read), FUNC(segas24_sprite_device::write));
+ map(0x800000, 0x80003f).mirror(0x1ffe00).rw("io", FUNC(sega_315_5296_device::read), FUNC(sega_315_5296_device::write)).umask16(0x00ff);
+ map(0x800040, 0x80007f).mirror(0x1ffe00).rw(this, FUNC(segas24_state::iod_r), FUNC(segas24_state::iod_w));
+ map(0x800100, 0x800103).mirror(0x1ffe00).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)).umask16(0x00ff);
+ map(0xa00000, 0xa00007).mirror(0x0ffff8).rw(this, FUNC(segas24_state::irq_r), FUNC(segas24_state::irq_w));
+ map(0xb00000, 0xb00007).mirror(0x07fff0).rw(this, FUNC(segas24_state::fdc_r), FUNC(segas24_state::fdc_w));
+ map(0xb00008, 0xb0000f).mirror(0x07fff0).rw(this, FUNC(segas24_state::fdc_status_r), FUNC(segas24_state::fdc_ctrl_w));
+ map(0xb80000, 0xbbffff).bankr("bank1");
+ map(0xbc0000, 0xbc0001).mirror(0x03fff8).rw(this, FUNC(segas24_state::curbank_r), FUNC(segas24_state::curbank_w));
+ map(0xbc0003, 0xbc0003).mirror(0x03fff8).rw(this, FUNC(segas24_state::frc_mode_r), FUNC(segas24_state::frc_mode_w));
+ map(0xbc0005, 0xbc0005).mirror(0x03fff8).rw(this, FUNC(segas24_state::frc_r), FUNC(segas24_state::frc_w));
+ map(0xbc0006, 0xbc0007).mirror(0x03fff8).rw(this, FUNC(segas24_state::mlatch_r), FUNC(segas24_state::mlatch_w));
+ map(0xc80000, 0xcbffff).bankr("bank2");
+ map(0xcc0000, 0xcc0001).mirror(0x03fff8).rw(this, FUNC(segas24_state::curbank_r), FUNC(segas24_state::curbank_w));
+ map(0xcc0003, 0xcc0003).mirror(0x03fff8).rw(this, FUNC(segas24_state::frc_mode_r), FUNC(segas24_state::frc_mode_w));
+ map(0xcc0005, 0xcc0005).mirror(0x03fff8).rw(this, FUNC(segas24_state::frc_r), FUNC(segas24_state::frc_w));
+ map(0xcc0006, 0xcc0007).mirror(0x03fff8).rw(this, FUNC(segas24_state::mlatch_r), FUNC(segas24_state::mlatch_w));
+ map(0xf00000, 0xf3ffff).mirror(0x040000).ram().share("subcpu");
+ map(0xf80000, 0xfbffff).mirror(0x040000).ram().share("share1");
+}
+
+void segas24_state::roughrac_cpu2_map(address_map &map)
+{
+ system24_cpu2_map(map);
+ map(0xc00000, 0xc00007).mirror(0x07ffe0).r("upd4701", FUNC(upd4701_device::read_xy)).umask16(0x00ff);
+}
+
+void segas24_state::hotrod_cpu2_map(address_map &map)
+{
+ system24_cpu2_map(map);
+ map(0xc00000, 0xc00007).mirror(0x07ffe0).r("upd1", FUNC(upd4701_device::read_xy)).umask16(0x00ff);
+ map(0xc00008, 0xc0000f).mirror(0x07ffe0).r("upd2", FUNC(upd4701_device::read_xy)).umask16(0x00ff);
+ map(0xc00011, 0xc00011).mirror(0x07ffec).rw("adc1", FUNC(msm6253_device::d7_r), FUNC(msm6253_device::select_w));
+ map(0xc00013, 0xc00013).mirror(0x07ffec).rw("adc2", FUNC(msm6253_device::d7_r), FUNC(msm6253_device::select_w));
+}
+
+void segas24_state::decrypted_opcodes_map(address_map &map)
+{
+ map(0x00000, 0xfffff).bankr("fd1094_decrypted_opcodes");
+}
/*************************************
*