summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/merit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/merit.cpp')
-rw-r--r--src/mame/drivers/merit.cpp354
1 files changed, 184 insertions, 170 deletions
diff --git a/src/mame/drivers/merit.cpp b/src/mame/drivers/merit.cpp
index 2d8e43fbc77..de4a414b593 100644
--- a/src/mame/drivers/merit.cpp
+++ b/src/mame/drivers/merit.cpp
@@ -403,182 +403,196 @@ CUSTOM_INPUT_MEMBER(merit_state::rndbit_r)
return machine().rand();
}
-ADDRESS_MAP_START(merit_state::pitboss_map)
- AM_RANGE(0x0000, 0x5fff) AM_ROM
- AM_RANGE(0x6000, 0x67ff) AM_RAM
- AM_RANGE(0xa000, 0xa003) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xc000, 0xc003) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::casino5_map)
- AM_RANGE(0x0000, 0x1fff) AM_ROM
- AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
- AM_RANGE(0x4000, 0x5fff) AM_ROMBANK("bank2")
- AM_RANGE(0x6000, 0x6fff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0x7000, 0x7000) AM_WRITE(casino5_bank_w)
- AM_RANGE(0x7001, 0x7fff) AM_RAM
- AM_RANGE(0xa000, 0xa003) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xc000, 0xc003) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::bigappg_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::misdraw_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0xb000, 0xb7ff) AM_RAM AM_SHARE("cpunvram") // overlays other NVRAM? or is it banked?
- AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) // swapped compared to other set?
- AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::dodge_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
+void merit_state::pitboss_map(address_map &map)
+{
+ map(0x0000, 0x5fff).rom();
+ map(0x6000, 0x67ff).ram();
+ map(0xa000, 0xa003).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc000, 0xc003).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xe000, 0xe000).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::casino5_map(address_map &map)
+{
+ map(0x0000, 0x1fff).rom();
+ map(0x2000, 0x3fff).bankr("bank1");
+ map(0x4000, 0x5fff).bankr("bank2");
+ map(0x6000, 0x6fff).ram().share("nvram");
+ map(0x7000, 0x7000).w(this, FUNC(merit_state::casino5_bank_w));
+ map(0x7001, 0x7fff).ram();
+ map(0xa000, 0xa003).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc000, 0xc003).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xe000, 0xe000).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::bigappg_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0xa000, 0xbfff).ram().share("nvram");
+ map(0xc004, 0xc007).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc008, 0xc00b).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xe000, 0xe000).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::misdraw_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0xa000, 0xbfff).ram().share("nvram");
+ map(0xb000, 0xb7ff).ram().share("cpunvram"); // overlays other NVRAM? or is it banked?
+ map(0xc004, 0xc007).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write)); // swapped compared to other set?
+ map(0xc008, 0xc00b).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xe000, 0xe000).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::dodge_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0xa000, 0xbfff).ram().share("nvram");
+ map(0xc004, 0xc007).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc008, 0xc00b).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xe000, 0xe000).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
/* Address decoding is done by prom u13 on crt200a hardware. It decodes
* the following addr lines: 2,3,9,13,14,15 ==> E20C
* ==> mirror 1DF3 & ~effective_addr_lines
* */
-ADDRESS_MAP_START(merit_state::trvwhiz_map)
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4c00, 0x4cff) AM_READWRITE(questions_r, high_offset_w)
- AM_RANGE(0x5400, 0x54ff) AM_WRITE(low_offset_w)
- AM_RANGE(0x5800, 0x58ff) AM_WRITE(med_offset_w)
- AM_RANGE(0x6000, 0x67ff) AM_RAM
- AM_RANGE(0xa000, 0xa003) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xc000, 0xc003) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::trvwhiz_io_map)
- AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("aysnd", ay8912_device, address_w)
- AM_RANGE(0x8100, 0x8100) AM_DEVWRITE("aysnd", ay8912_device, data_w)
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(merit_state::phrcraze_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xa000, 0xbfff) AM_RAM
- AM_RANGE(0xc008, 0xc00b) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xc00c, 0xc00f) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w)
- AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w)
- AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w)
- AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::phrcraze_io_map)
- AM_RANGE(0xc004, 0xc004) AM_MIRROR(0x1cf3) AM_DEVWRITE("aysnd", ay8912_device, address_w)
- AM_RANGE(0xc104, 0xc104) AM_MIRROR(0x1cf3) AM_DEVWRITE("aysnd", ay8912_device, data_w)
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(merit_state::tictac_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0x9fff) AM_RAM
- AM_RANGE(0xc004, 0xc007) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xc008, 0xc00b) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w)
- AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w)
- AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w)
- AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::tictac_io_map)
- AM_RANGE(0xc00c, 0xc00c) AM_MIRROR(0x1cf3) AM_DEVWRITE("aysnd", ay8912_device, address_w)
- AM_RANGE(0xc10c, 0xc10c) AM_MIRROR(0x1cf3) AM_DEVWRITE("aysnd", ay8912_device, data_w)
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(merit_state::trvwhziv_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0xa000, 0xbfff) AM_RAM
- AM_RANGE(0xc004, 0xc007) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xc008, 0xc00b) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w)
- AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w)
- AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w)
- AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::dtrvwz5_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0x9fff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0xb000, 0xb0ff) AM_ROM /* protection? code jumps here */
- AM_RANGE(0xc004, 0xc007) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xc008, 0xc00b) AM_MIRROR(0x1df0) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xce00, 0xceff) AM_READWRITE(questions_r, high_offset_w)
- AM_RANGE(0xd600, 0xd6ff) AM_WRITE(low_offset_w)
- AM_RANGE(0xda00, 0xdaff) AM_WRITE(med_offset_w)
- AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_MIRROR(0x05f0) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(merit_state::couple_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0x9fff) AM_ROMBANK("bank1")
- AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("backup_ram")
- AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
- AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
- AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w)
- AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("crtc", mc6845_device, register_w)
- AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr")
- AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo")
- AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w)
-ADDRESS_MAP_END
+void merit_state::trvwhiz_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom();
+ map(0x4c00, 0x4cff).rw(this, FUNC(merit_state::questions_r), FUNC(merit_state::high_offset_w));
+ map(0x5400, 0x54ff).w(this, FUNC(merit_state::low_offset_w));
+ map(0x5800, 0x58ff).w(this, FUNC(merit_state::med_offset_w));
+ map(0x6000, 0x67ff).ram();
+ map(0xa000, 0xa003).mirror(0x1df0).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc000, 0xc003).mirror(0x1df0).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xe000, 0xe000).mirror(0x05f0).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).mirror(0x05f0).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::trvwhiz_io_map(address_map &map)
+{
+ map(0x8000, 0x8000).w("aysnd", FUNC(ay8912_device::address_w));
+ map(0x8100, 0x8100).w("aysnd", FUNC(ay8912_device::data_w));
+}
+
+
+void merit_state::phrcraze_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0xa000, 0xbfff).ram();
+ map(0xc008, 0xc00b).mirror(0x1df0).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc00c, 0xc00f).mirror(0x1df0).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xce00, 0xceff).rw(this, FUNC(merit_state::questions_r), FUNC(merit_state::high_offset_w));
+ map(0xd600, 0xd6ff).w(this, FUNC(merit_state::low_offset_w));
+ map(0xda00, 0xdaff).w(this, FUNC(merit_state::med_offset_w));
+ map(0xe000, 0xe000).mirror(0x05f0).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).mirror(0x05f0).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::phrcraze_io_map(address_map &map)
+{
+ map(0xc004, 0xc004).mirror(0x1cf3).w("aysnd", FUNC(ay8912_device::address_w));
+ map(0xc104, 0xc104).mirror(0x1cf3).w("aysnd", FUNC(ay8912_device::data_w));
+}
+
+
+void merit_state::tictac_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0x9fff).ram();
+ map(0xc004, 0xc007).mirror(0x1df0).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc008, 0xc00b).mirror(0x1df0).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xce00, 0xceff).rw(this, FUNC(merit_state::questions_r), FUNC(merit_state::high_offset_w));
+ map(0xd600, 0xd6ff).w(this, FUNC(merit_state::low_offset_w));
+ map(0xda00, 0xdaff).w(this, FUNC(merit_state::med_offset_w));
+ map(0xe000, 0xe000).mirror(0x05f0).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).mirror(0x05f0).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::tictac_io_map(address_map &map)
+{
+ map(0xc00c, 0xc00c).mirror(0x1cf3).w("aysnd", FUNC(ay8912_device::address_w));
+ map(0xc10c, 0xc10c).mirror(0x1cf3).w("aysnd", FUNC(ay8912_device::data_w));
+}
+
+
+void merit_state::trvwhziv_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0xa000, 0xbfff).ram();
+ map(0xc004, 0xc007).mirror(0x1df0).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc008, 0xc00b).mirror(0x1df0).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xce00, 0xceff).rw(this, FUNC(merit_state::questions_r), FUNC(merit_state::high_offset_w));
+ map(0xd600, 0xd6ff).w(this, FUNC(merit_state::low_offset_w));
+ map(0xda00, 0xdaff).w(this, FUNC(merit_state::med_offset_w));
+ map(0xe000, 0xe000).mirror(0x05f0).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).mirror(0x05f0).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::dtrvwz5_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0x9fff).ram().share("nvram");
+ map(0xb000, 0xb0ff).rom(); /* protection? code jumps here */
+ map(0xc004, 0xc007).mirror(0x1df0).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc008, 0xc00b).mirror(0x1df0).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xce00, 0xceff).rw(this, FUNC(merit_state::questions_r), FUNC(merit_state::high_offset_w));
+ map(0xd600, 0xd6ff).w(this, FUNC(merit_state::low_offset_w));
+ map(0xda00, 0xdaff).w(this, FUNC(merit_state::med_offset_w));
+ map(0xe000, 0xe000).mirror(0x05f0).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).mirror(0x05f0).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
+
+void merit_state::couple_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0x9fff).bankr("bank1");
+ map(0xa000, 0xbfff).ram().share("backup_ram");
+ map(0xc004, 0xc007).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xc008, 0xc00b).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0xe000, 0xe000).w("crtc", FUNC(mc6845_device::address_w));
+ map(0xe001, 0xe001).w("crtc", FUNC(mc6845_device::register_w));
+ map(0xe800, 0xefff).ram().share("raattr");
+ map(0xf000, 0xf7ff).ram().share("ravideo");
+ map(0xf800, 0xfbff).rw(this, FUNC(merit_state::palette_r), FUNC(merit_state::palette_w));
+}
static INPUT_PORTS_START( meritpoker )