summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/ddz.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/ddz.cpp')
-rw-r--r--src/mame/drivers/ddz.cpp101
1 files changed, 5 insertions, 96 deletions
diff --git a/src/mame/drivers/ddz.cpp b/src/mame/drivers/ddz.cpp
index 26af8b6ea3e..cb22b85054f 100644
--- a/src/mame/drivers/ddz.cpp
+++ b/src/mame/drivers/ddz.cpp
@@ -59,15 +59,10 @@ public:
ddz_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_workram(*this, "workram"),
- m_textureram(*this, "textureram"),
- m_frameram(*this, "frameram"),
m_ipl(*this, "ipl"),
m_encdata(*this, "enc_data"),
m_maincpu(*this, "maincpu"),
- m_vr0soc(*this, "vr0soc"),
- m_vr0vid(*this, "vr0vid"),
- m_vr0snd(*this, "vr0snd"),
- m_screen(*this, "screen")
+ m_vr0soc(*this, "vr0soc")
{ }
@@ -78,78 +73,25 @@ private:
/* memory pointers */
required_shared_ptr<uint32_t> m_workram;
- required_shared_ptr<uint32_t> m_textureram;
- required_shared_ptr<uint32_t> m_frameram;
required_region_ptr<uint8_t> m_ipl;
required_region_ptr<uint8_t> m_encdata;
/* devices */
required_device<se3208_device> m_maincpu;
required_device<vrender0soc_device> m_vr0soc;
- required_device<vr0video_device> m_vr0vid;
- required_device<vr0sound_device> m_vr0snd;
- required_device<screen_device> m_screen;
-
-#ifdef IDLE_LOOP_SPEEDUP
- uint8_t m_FlipCntRead;
- DECLARE_WRITE_LINE_MEMBER(idle_skip_resume_w);
- DECLARE_WRITE_LINE_MEMBER(idle_skip_speedup_w);
-#endif
IRQ_CALLBACK_MEMBER(icallback);
virtual void machine_start() override;
virtual void machine_reset() override;
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_WRITE_LINE_MEMBER(screen_vblank);
void ddz_mem(address_map &map);
};
-uint32_t ddz_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
-{
- if (m_vr0soc->crt_is_blanked()) // Blank Screen
- {
- bitmap.fill(0, cliprect);
- return 0;
- }
-
- m_vr0vid->screen_update(screen, bitmap, cliprect);
- return 0;
-}
-
-WRITE_LINE_MEMBER(ddz_state::screen_vblank)
-{
- // rising edge
- if (state)
- {
- if (m_vr0soc->crt_active_vblank_irq() == true)
- m_vr0soc->IntReq(24); //VRender0 VBlank
-
- m_vr0vid->execute_drawing();
- }
-}
-
IRQ_CALLBACK_MEMBER(ddz_state::icallback)
{
return m_vr0soc->irq_callback();
}
-#ifdef IDLE_LOOP_SPEEDUP
-WRITE_LINE_MEMBER(ddz_state::idle_skip_resume_w)
-{
- m_FlipCntRead = 0;
- m_maincpu->resume(SUSPEND_REASON_SPIN);
-}
-
-WRITE_LINE_MEMBER(ddz_state::idle_skip_speedup_w)
-{
- m_FlipCntRead++;
- if (m_FlipCntRead >= 16 && m_vr0soc->irq_pending() == false && state == ASSERT_LINE)
- m_maincpu->suspend(SUSPEND_REASON_SPIN, 1);
-}
-#endif
-
-
void ddz_state::ddz_mem(address_map &map)
{
map(0x00000000, 0x00ffffff).rom().nopw().region("ipl", 0);
@@ -162,10 +104,7 @@ void ddz_state::ddz_mem(address_map &map)
map(0x02000000, 0x027fffff).ram().share("workram");
- map(0x03000000, 0x0300ffff).m(m_vr0vid, FUNC(vr0video_device::regs_map));
- map(0x03800000, 0x03ffffff).ram().share("textureram");
- map(0x04000000, 0x047fffff).ram().share("frameram");
- map(0x04800000, 0x04800fff).rw(m_vr0snd, FUNC(vr0sound_device::vr0_snd_read), FUNC(vr0sound_device::vr0_snd_write));
+ map(0x03000000, 0x04ffffff).m(m_vr0soc, FUNC(vrender0soc_device::audiovideo_map));
}
static INPUT_PORTS_START( ddz )
@@ -181,19 +120,12 @@ INPUT_PORTS_END
void ddz_state::machine_start()
{
- m_vr0vid->set_areas(reinterpret_cast<uint8_t*>(m_textureram.target()), reinterpret_cast<uint16_t*>(m_frameram.target()));
- m_vr0snd->set_areas(m_textureram, m_frameram);
-
-#ifdef IDLE_LOOP_SPEEDUP
- save_item(NAME(m_FlipCntRead));
-#endif
+ // ...
}
void ddz_state::machine_reset()
{
-#ifdef IDLE_LOOP_SPEEDUP
- m_FlipCntRead = 0;
-#endif
+ // ...
}
void ddz_state::ddz(machine_config &config)
@@ -202,31 +134,8 @@ void ddz_state::ddz(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &ddz_state::ddz_mem);
m_maincpu->set_irq_acknowledge_callback(FUNC(ddz_state::icallback));
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
- // evolution soccer defaults
- m_screen->set_raw((XTAL(14'318'180)*2)/4, 455, 0, 320, 262, 0, 240);
- m_screen->set_screen_update(FUNC(ddz_state::screen_update));
- m_screen->screen_vblank().set(FUNC(ddz_state::screen_vblank));
- m_screen->set_palette("palette");
-
- VRENDER0_SOC(config, m_vr0soc, 0);
+ VRENDER0_SOC(config, m_vr0soc, 14318180 * 3);
m_vr0soc->set_host_cpu_tag(m_maincpu);
- m_vr0soc->set_host_screen_tag(m_screen);
-
- VIDEO_VRENDER0(config, m_vr0vid, 14318180, m_maincpu);
- #ifdef IDLE_LOOP_SPEEDUP
- m_vr0soc->idleskip_cb().set(FUNC(ddz_state::idle_skip_resume_w));
- m_vr0vid->idleskip_cb().set(FUNC(ddz_state::idle_skip_speedup_w));
- #endif
-
- PALETTE(config, "palette", palette_device::RGB_565);
-
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
-
- SOUND_VRENDER0(config, m_vr0snd, 0);
- m_vr0snd->add_route(0, "lspeaker", 1.0);
- m_vr0snd->add_route(1, "rspeaker", 1.0);
}
ROM_START( ddz )