summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/trvquest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/trvquest.cpp')
-rw-r--r--src/mame/drivers/trvquest.cpp50
1 files changed, 24 insertions, 26 deletions
diff --git a/src/mame/drivers/trvquest.cpp b/src/mame/drivers/trvquest.cpp
index 6cad05b5f61..31f3c82c119 100644
--- a/src/mame/drivers/trvquest.cpp
+++ b/src/mame/drivers/trvquest.cpp
@@ -178,13 +178,14 @@ INTERRUPT_GEN_MEMBER(gameplan_state::trvquest_interrupt)
m_via_2->write_ca1(0);
}
-MACHINE_CONFIG_START(gameplan_state::trvquest)
+void gameplan_state::trvquest(machine_config &config)
+{
+ M6809(config, m_maincpu, XTAL(6'000'000)/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &gameplan_state::cpu_map);
+ m_maincpu->set_vblank_int("screen", FUNC(gameplan_state::trvquest_interrupt));
- MCFG_DEVICE_ADD("maincpu", M6809,XTAL(6'000'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(cpu_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gameplan_state, trvquest_interrupt)
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
- MCFG_NVRAM_ADD_1FILL("nvram")
MCFG_MACHINE_START_OVERRIDE(gameplan_state,trvquest)
MCFG_MACHINE_RESET_OVERRIDE(gameplan_state,trvquest)
@@ -194,29 +195,26 @@ MACHINE_CONFIG_START(gameplan_state::trvquest)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ay1", AY8910, XTAL(6'000'000)/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-
- MCFG_DEVICE_ADD("ay2", AY8910, XTAL(6'000'000)/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ AY8910(config, "ay1", XTAL(6'000'000)/2).add_route(ALL_OUTPUTS, "mono", 0.25);
+ AY8910(config, "ay2", XTAL(6'000'000)/2).add_route(ALL_OUTPUTS, "mono", 0.25);
/* via */
- MCFG_DEVICE_ADD("via6522_0", VIA6522, XTAL(6'000'000)/4)
- MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(*this, gameplan_state, video_data_w))
- MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(*this, gameplan_state, gameplan_video_command_w))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(*this, gameplan_state, video_command_trigger_w))
-
- MCFG_DEVICE_ADD("via6522_1", VIA6522, XTAL(6'000'000)/4)
- MCFG_VIA6522_READPA_HANDLER(IOPORT("IN0"))
- MCFG_VIA6522_READPB_HANDLER(IOPORT("IN1"))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(*this, gameplan_state, trvquest_coin_w))
-
- MCFG_DEVICE_ADD("via6522_2", VIA6522, XTAL(6'000'000)/4)
- MCFG_VIA6522_READPA_HANDLER(IOPORT("UNK"))
- MCFG_VIA6522_READPB_HANDLER(IOPORT("DSW"))
- MCFG_VIA6522_CA2_HANDLER(WRITELINE(*this, gameplan_state, trvquest_misc_w))
- MCFG_VIA6522_IRQ_HANDLER(WRITELINE(*this, gameplan_state, via_irq))
-MACHINE_CONFIG_END
+ VIA6522(config, m_via_0, XTAL(6'000'000)/4);
+ m_via_0->writepa_handler().set(FUNC(gameplan_state::video_data_w));
+ m_via_0->writepb_handler().set(FUNC(gameplan_state::gameplan_video_command_w));
+ m_via_0->ca2_handler().set(FUNC(gameplan_state::video_command_trigger_w));
+
+ VIA6522(config, m_via_1, XTAL(6'000'000)/4);
+ m_via_1->readpa_handler().set_ioport("IN0");
+ m_via_1->readpb_handler().set_ioport("IN1");
+ m_via_1->ca2_handler().set(FUNC(gameplan_state::trvquest_coin_w));
+
+ VIA6522(config, m_via_2, XTAL(6'000'000)/4);
+ m_via_2->readpa_handler().set_ioport("UNK");
+ m_via_2->readpb_handler().set_ioport("DSW");
+ m_via_2->ca2_handler().set(FUNC(gameplan_state::trvquest_misc_w));
+ m_via_2->irq_handler().set(FUNC(gameplan_state::via_irq));
+}
ROM_START( trvquest )
ROM_REGION( 0x10000, "maincpu", 0 )