summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/vendetta.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/vendetta.cpp')
-rw-r--r--src/mame/drivers/vendetta.cpp36
1 files changed, 14 insertions, 22 deletions
diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp
index 2b53766ad76..f0cef5a9cb5 100644
--- a/src/mame/drivers/vendetta.cpp
+++ b/src/mame/drivers/vendetta.cpp
@@ -125,8 +125,8 @@ void vendetta_state::eeprom_w(uint8_t data)
m_irq_enabled = (data >> 6) & 1;
- m_videobank0->set_bank(BIT(data, 0));
- m_videobank1->set_bank(BIT(data, 0));
+ m_videoview0.select(BIT(data, 0));
+ m_videoview1.select(BIT(data, 0));
}
/********************************************/
@@ -205,7 +205,9 @@ void vendetta_state::main_map(address_map &map)
/* what is the desired effect of overlapping these memory regions anyway? */
map(0x4000, 0x7fff).rw(m_k052109, FUNC(k052109_device::read), FUNC(k052109_device::write));
- map(0x4000, 0x4fff).m(m_videobank0, FUNC(address_map_bank_device::amap8));
+ map(0x4000, 0x4fff).view(m_videoview0);
+ m_videoview0[0](0x4000, 0x4fff).rw(m_k052109, FUNC(k052109_device::read), FUNC(k052109_device::write));
+ m_videoview0[1](0x4000, 0x4fff).rw(m_k053246, FUNC(k053247_device::k053247_r), FUNC(k053247_device::k053247_w));
map(0x5f80, 0x5f9f).rw(m_k054000, FUNC(k054000_device::read), FUNC(k054000_device::write));
map(0x5fa0, 0x5faf).w(m_k053251, FUNC(k053251_device::write));
map(0x5fb0, 0x5fb7).w(m_k053246, FUNC(k053247_device::k053246_w));
@@ -221,8 +223,9 @@ void vendetta_state::main_map(address_map &map)
map(0x5fe6, 0x5fe7).rw("k053260", FUNC(k053260_device::main_read), FUNC(k053260_device::main_write));
map(0x5fe8, 0x5fe9).r(m_k053246, FUNC(k053247_device::k053246_r));
map(0x5fea, 0x5fea).r("watchdog", FUNC(watchdog_timer_device::reset_r));
- map(0x6000, 0x6fff).m(m_videobank1, FUNC(address_map_bank_device::amap8));
-
+ map(0x6000, 0x6fff).view(m_videoview1);
+ m_videoview1[0](0x6000, 0x6fff).rw(FUNC(vendetta_state::K052109_r), FUNC(vendetta_state::K052109_w));
+ m_videoview1[1](0x6000, 0x6fff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0x8000, 0xffff).rom().region("maincpu", 0x38000);
}
@@ -232,7 +235,9 @@ void vendetta_state::esckids_map(address_map &map)
/* what is the desired effect of overlapping these memory regions anyway? */
map(0x2000, 0x5fff).rw(m_k052109, FUNC(k052109_device::read), FUNC(k052109_device::write)); // 052109 (Tilemap)
- map(0x2000, 0x2fff).m(m_videobank0, FUNC(address_map_bank_device::amap8)); // 052109 (Tilemap) 0x0000-0x0fff - 052109 (Tilemap)
+ map(0x2000, 0x2fff).view(m_videoview0); // 052109 (Tilemap) 0x0000-0x0fff - 052109 (Tilemap)
+ m_videoview0[0](0x2000, 0x2fff).rw(m_k052109, FUNC(k052109_device::read), FUNC(k052109_device::write));
+ m_videoview0[1](0x2000, 0x2fff).rw(m_k053246, FUNC(k053247_device::k053247_r), FUNC(k053247_device::k053247_w));
map(0x3f80, 0x3f80).portr("P1");
map(0x3f81, 0x3f81).portr("P2");
map(0x3f82, 0x3f82).portr("P3"); // ??? (But not used)
@@ -248,23 +253,13 @@ void vendetta_state::esckids_map(address_map &map)
map(0x3fd6, 0x3fd7).rw("k053260", FUNC(k053260_device::main_read), FUNC(k053260_device::main_write)); // Sound
map(0x3fd8, 0x3fd9).r(m_k053246, FUNC(k053247_device::k053246_r)); // 053246 (Sprite)
map(0x3fda, 0x3fda).nopw(); // Not Emulated (Watchdog ???)
- map(0x4000, 0x4fff).m(m_videobank1, FUNC(address_map_bank_device::amap8)); // 0x2000-0x3fff, Tilemap mask ROM bank selector (mask ROM Test)
+ map(0x4000, 0x4fff).view(m_videoview1); // Tilemap mask ROM bank selector (mask ROM Test)
+ m_videoview1[0](0x4000, 0x4fff).rw(FUNC(vendetta_state::K052109_r), FUNC(vendetta_state::K052109_w));
+ m_videoview1[1](0x4000, 0x4fff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0x6000, 0x7fff).bankr("bank1"); // 053248 '975r01' 1M ROM (Banked)
map(0x8000, 0xffff).rom().region("maincpu", 0x18000); // 053248 '975r01' 1M ROM (0x18000-0x1ffff)
}
-void vendetta_state::videobank0_map(address_map &map)
-{
- map(0x0000, 0x0fff).rw(m_k052109, FUNC(k052109_device::read), FUNC(k052109_device::write));
- map(0x1000, 0x1fff).rw(m_k053246, FUNC(k053247_device::k053247_r), FUNC(k053247_device::k053247_w));
-}
-
-void vendetta_state::videobank1_map(address_map &map)
-{
- map(0x0000, 0x0fff).rw(FUNC(vendetta_state::K052109_r), FUNC(vendetta_state::K052109_w));
- map(0x1000, 0x1fff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
-}
-
void vendetta_state::sound_map(address_map &map)
{
map(0x0000, 0xefff).rom();
@@ -433,9 +428,6 @@ void vendetta_state::vendetta(machine_config &config)
m_maincpu->set_vblank_int("screen", FUNC(vendetta_state::irq));
m_maincpu->line().set(FUNC(vendetta_state::banking_callback));
- ADDRESS_MAP_BANK(config, "videobank0").set_map(&vendetta_state::videobank0_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000);
- ADDRESS_MAP_BANK(config, "videobank1").set_map(&vendetta_state::videobank1_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000);
-
Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified with PCB */
m_audiocpu->set_addrmap(AS_PROGRAM, &vendetta_state::sound_map); /* interrupts are triggered by the main CPU */