summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/pandoras.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/pandoras.cpp')
-rw-r--r--src/mame/drivers/pandoras.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/mame/drivers/pandoras.cpp b/src/mame/drivers/pandoras.cpp
index a6ceb3c40f6..c617c02f6c6 100644
--- a/src/mame/drivers/pandoras.cpp
+++ b/src/mame/drivers/pandoras.cpp
@@ -305,8 +305,8 @@ READ8_MEMBER(pandoras_state::pandoras_portB_r)
return (m_audiocpu->total_cycles() / 512) & 0x0f;
}
-MACHINE_CONFIG_START(pandoras_state::pandoras)
-
+void pandoras_state::pandoras(machine_config &config)
+{
/* basic machine hardware */
MC6809E(config, m_maincpu, MASTER_CLOCK/6); /* CPU A */
m_maincpu->set_addrmap(AS_PROGRAM, &pandoras_state::pandoras_master_map);
@@ -323,7 +323,7 @@ MACHINE_CONFIG_START(pandoras_state::pandoras)
m_mcu->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w));
m_mcu->p2_out_cb().set(FUNC(pandoras_state::i8039_irqen_and_status_w));
- MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - needed for correct synchronization of the sound CPUs */
+ config.m_minimum_quantum = attotime::from_hz(6000); /* 100 CPU slices per frame - needed for correct synchronization of the sound CPUs */
ls259_device &mainlatch(LS259(config, "mainlatch")); // C3
mainlatch.q_out_cb<0>().set(FUNC(pandoras_state::cpua_irq_enable_w)); // ENA
@@ -337,14 +337,14 @@ MACHINE_CONFIG_START(pandoras_state::pandoras)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(pandoras_state, screen_update_pandoras)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, pandoras_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(pandoras_state::screen_update_pandoras));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(pandoras_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_pandoras);
PALETTE(config, m_palette, FUNC(pandoras_state::pandoras_palette), 16*16+16*16, 32);
@@ -360,10 +360,11 @@ MACHINE_CONFIG_START(pandoras_state::pandoras)
aysnd.port_b_read_callback().set(FUNC(pandoras_state::pandoras_portB_r));
aysnd.add_route(ALL_OUTPUTS, "speaker", 0.4);
- MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.12) // unknown DAC
- MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.12); // unknown DAC
+ voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
+ vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
/***************************************************************************