summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/laserbas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/laserbas.cpp')
-rw-r--r--src/mame/drivers/laserbas.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/mame/drivers/laserbas.cpp b/src/mame/drivers/laserbas.cpp
index 0d9dae8a029..0df02156860 100644
--- a/src/mame/drivers/laserbas.cpp
+++ b/src/mame/drivers/laserbas.cpp
@@ -368,12 +368,12 @@ INPUT_PORTS_END
#define CLOCK 16680000
#define PIT_CLOCK (CLOCK/16) // 12 divider ?
-void laserbas_state::laserbas(machine_config &config)
-{
- Z80(config, m_maincpu, CLOCK / 4);
- m_maincpu->set_addrmap(AS_PROGRAM, &laserbas_state::laserbas_memory);
- m_maincpu->set_addrmap(AS_IO, &laserbas_state::laserbas_io);
- TIMER(config, "scantimer").configure_scanline(FUNC(laserbas_state::laserbas_scanline), "screen", 0, 1);
+MACHINE_CONFIG_START(laserbas_state::laserbas)
+
+ MCFG_DEVICE_ADD("maincpu", Z80, CLOCK / 4)
+ MCFG_DEVICE_PROGRAM_MAP(laserbas_memory)
+ MCFG_DEVICE_IO_MAP(laserbas_io)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", laserbas_state, laserbas_scanline, "screen", 0, 1)
/* TODO: clocks aren't known */
pit8253_device &pit0(PIT8253(config, "pit0", 0));
@@ -392,9 +392,9 @@ void laserbas_state::laserbas(machine_config &config)
pit1.out_handler<1>().set(FUNC(laserbas_state::pit_out_w<4>));
pit1.out_handler<2>().set(FUNC(laserbas_state::pit_out_w<5>));
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_raw(4000000, 256, 0, 256, 256, 0, 256); /* temporary, CRTC will configure screen */
- screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_RAW_PARAMS(4000000, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */
+ MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
h46505_device &crtc(H46505(config, "crtc", 3000000/4)); /* unknown clock, hand tuned to get ~60 fps */
crtc.set_screen("screen");
@@ -406,20 +406,21 @@ void laserbas_state::laserbas(machine_config &config)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- DAC_4BIT_R2R(config, m_dac[0], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
- DAC_4BIT_R2R(config, m_dac[1], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
- DAC_4BIT_R2R(config, m_dac[2], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
- DAC_4BIT_R2R(config, m_dac[3], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
- DAC_4BIT_R2R(config, m_dac[4], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
- DAC_4BIT_R2R(config, m_dac[5], 0).add_route(ALL_OUTPUTS, "speaker", 0.16);
- voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
- vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
- vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
- vref.add_route(0, "dac3", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac3", -1.0, DAC_VREF_NEG_INPUT);
- vref.add_route(0, "dac4", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac4", -1.0, DAC_VREF_NEG_INPUT);
- vref.add_route(0, "dac5", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac5", -1.0, DAC_VREF_NEG_INPUT);
- vref.add_route(0, "dac6", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac6", -1.0, DAC_VREF_NEG_INPUT);
-}
+ MCFG_DEVICE_ADD(m_dac[0], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
+ MCFG_DEVICE_ADD(m_dac[1], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
+ MCFG_DEVICE_ADD(m_dac[2], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
+ MCFG_DEVICE_ADD(m_dac[3], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
+ MCFG_DEVICE_ADD(m_dac[4], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
+ MCFG_DEVICE_ADD(m_dac[5], DAC_4BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.16)
+ MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
+ MCFG_SOUND_ROUTE(0, "dac1", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac1", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE(0, "dac2", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac2", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE(0, "dac3", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac3", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE(0, "dac4", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac4", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE(0, "dac5", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac5", -1.0, DAC_VREF_NEG_INPUT)
+ MCFG_SOUND_ROUTE(0, "dac6", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac6", -1.0, DAC_VREF_NEG_INPUT)
+
+MACHINE_CONFIG_END
/*
Amstar LaserBase 1981 (Hoei)