summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/qix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/qix.cpp')
-rw-r--r--src/mame/video/qix.cpp66
1 files changed, 31 insertions, 35 deletions
diff --git a/src/mame/video/qix.cpp b/src/mame/video/qix.cpp
index 16bc0572d2b..8326e52278c 100644
--- a/src/mame/video/qix.cpp
+++ b/src/mame/video/qix.cpp
@@ -19,7 +19,7 @@
*
*************************************/
-VIDEO_START_MEMBER(qix_state,qix)
+void qix_state::video_start()
{
/* allocate memory for the full video RAM */
m_videoram.allocate(256 * 256);
@@ -334,17 +334,17 @@ void qix_state::kram3_video_map(address_map &map)
}
-void qix_state::zookeep_video_map(address_map &map)
+void zookeep_state::video_map(address_map &map)
{
- map(0x0000, 0x7fff).rw(FUNC(qix_state::qix_videoram_r), FUNC(qix_state::qix_videoram_w));
+ map(0x0000, 0x7fff).rw(FUNC(zookeep_state::qix_videoram_r), FUNC(zookeep_state::qix_videoram_w));
map(0x8000, 0x83ff).ram().share("share1");
map(0x8400, 0x87ff).ram().share("nvram");
- map(0x8800, 0x8800).mirror(0x03fe).w(FUNC(qix_state::qix_palettebank_w));
- map(0x8801, 0x8801).mirror(0x03fe).w(FUNC(qix_state::zookeep_bankswitch_w));
- map(0x8c00, 0x8c00).mirror(0x03fe).rw(FUNC(qix_state::qix_data_firq_r), FUNC(qix_state::qix_data_firq_w));
- map(0x8c01, 0x8c01).mirror(0x03fe).rw(FUNC(qix_state::qix_video_firq_ack_r), FUNC(qix_state::qix_video_firq_ack_w));
- map(0x9000, 0x93ff).ram().w(FUNC(qix_state::qix_paletteram_w)).share("paletteram");
- map(0x9400, 0x9400).mirror(0x03fc).rw(FUNC(qix_state::qix_addresslatch_r), FUNC(qix_state::qix_addresslatch_w));
+ map(0x8800, 0x8800).mirror(0x03fe).w(FUNC(zookeep_state::qix_palettebank_w));
+ map(0x8801, 0x8801).mirror(0x03fe).w(FUNC(zookeep_state::bankswitch_w));
+ map(0x8c00, 0x8c00).mirror(0x03fe).rw(FUNC(zookeep_state::qix_data_firq_r), FUNC(zookeep_state::qix_data_firq_w));
+ map(0x8c01, 0x8c01).mirror(0x03fe).rw(FUNC(zookeep_state::qix_video_firq_ack_r), FUNC(zookeep_state::qix_video_firq_ack_w));
+ map(0x9000, 0x93ff).ram().w(FUNC(zookeep_state::qix_paletteram_w)).share("paletteram");
+ map(0x9400, 0x9400).mirror(0x03fc).rw(FUNC(zookeep_state::qix_addresslatch_r), FUNC(zookeep_state::qix_addresslatch_w));
map(0x9402, 0x9403).mirror(0x03fc).writeonly().share("videoram_addr");
map(0x9800, 0x9800).mirror(0x03ff).readonly().share("scanline_latch");
map(0x9c00, 0x9c00).mirror(0x03fe).w(m_crtc, FUNC(mc6845_device::address_w));
@@ -380,11 +380,10 @@ void qix_state::slither_video_map(address_map &map)
*
*************************************/
-MACHINE_CONFIG_START(qix_state::qix_video)
- MCFG_DEVICE_ADD("videocpu", MC6809E, MAIN_CLOCK_OSC/4/4) /* 1.25 MHz */
- MCFG_DEVICE_PROGRAM_MAP(qix_video_map)
-
- MCFG_VIDEO_START_OVERRIDE(qix_state,qix)
+void qix_state::qix_video(machine_config &config)
+{
+ MC6809E(config, m_videocpu, MAIN_CLOCK_OSC/4/4); /* 1.25 MHz */
+ m_videocpu->set_addrmap(AS_PROGRAM, &qix_state::qix_video_map);
MC6845(config, m_crtc, QIX_CHARACTER_CLOCK);
m_crtc->set_screen(m_screen);
@@ -395,27 +394,24 @@ MACHINE_CONFIG_START(qix_state::qix_video)
m_crtc->out_de_callback().set(FUNC(qix_state::display_enable_changed));
m_crtc->out_vsync_callback().set(FUNC(qix_state::qix_vsync_changed));
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(QIX_CHARACTER_CLOCK*8, 0x148, 0, 0x100, 0x111, 0, 0x100) /* from CRTC */
- MCFG_SCREEN_UPDATE_DEVICE("vid_u18", mc6845_device, screen_update)
-MACHINE_CONFIG_END
-
-
-MACHINE_CONFIG_START(qix_state::kram3_video)
- MCFG_DEVICE_MODIFY("videocpu")
- MCFG_DEVICE_PROGRAM_MAP(kram3_video_map)
- MCFG_MC6809E_LIC_CB(WRITELINE(*this, qix_state, kram3_lic_videocpu_changed))
-MACHINE_CONFIG_END
-
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(QIX_CHARACTER_CLOCK*8, 0x148, 0, 0x100, 0x111, 0, 0x100); /* from CRTC */
+ m_screen->set_screen_update("vid_u18", FUNC(mc6845_device::screen_update));
+}
-MACHINE_CONFIG_START(qix_state::zookeep_video)
- MCFG_DEVICE_MODIFY("videocpu")
- MCFG_DEVICE_PROGRAM_MAP(zookeep_video_map)
-MACHINE_CONFIG_END
+void qix_state::kram3_video(machine_config &config)
+{
+ m_videocpu->set_addrmap(AS_PROGRAM, &qix_state::kram3_video_map);
+ m_videocpu->lic().set(FUNC(qix_state::kram3_lic_videocpu_changed));
+}
+void zookeep_state::video(machine_config &config)
+{
+ m_videocpu->set_addrmap(AS_PROGRAM, &zookeep_state::video_map);
+}
-MACHINE_CONFIG_START(qix_state::slither_video)
- MCFG_DEVICE_MODIFY("videocpu")
- MCFG_DEVICE_CLOCK(SLITHER_CLOCK_OSC/4/4) /* 1.34 MHz */
- MCFG_DEVICE_PROGRAM_MAP(slither_video_map)
-MACHINE_CONFIG_END
+void qix_state::slither_video(machine_config &config)
+{
+ m_videocpu->set_clock(SLITHER_CLOCK_OSC/4/4); /* 1.34 MHz */
+ m_videocpu->set_addrmap(AS_PROGRAM, &qix_state::slither_video_map);
+}