summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/taitosj.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/taitosj.cpp')
-rw-r--r--src/mame/drivers/taitosj.cpp70
1 files changed, 36 insertions, 34 deletions
diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp
index e34022abd85..41345a67756 100644
--- a/src/mame/drivers/taitosj.cpp
+++ b/src/mame/drivers/taitosj.cpp
@@ -1770,41 +1770,43 @@ WRITE8_MEMBER(taitosj_state::taitosj_dacvol_w)
m_dacvol->write(NODE_01, data ^ 0xff); // 7416 hex inverter
}
-void taitosj_state::nomcu(machine_config &config)
-{
+MACHINE_CONFIG_START(taitosj_state::nomcu)
+
/* basic machine hardware */
- Z80(config, m_maincpu, XTAL(8'000'000)/2); /* 8 MHz / 2, on CPU board */
- m_maincpu->set_addrmap(AS_PROGRAM, &taitosj_state::taitosj_main_nomcu_map);
- m_maincpu->set_vblank_int("screen", FUNC(taitosj_state::irq0_line_hold));
+ MCFG_DEVICE_ADD("maincpu",Z80,XTAL(8'000'000)/2) /* 8 MHz / 2, on CPU board */
+ MCFG_DEVICE_PROGRAM_MAP(taitosj_main_nomcu_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", taitosj_state, irq0_line_hold)
- Z80(config, m_audiocpu, XTAL(6'000'000)/2); /* 6 MHz / 2, on GAME board */
- m_audiocpu->set_addrmap(AS_PROGRAM, &taitosj_state::taitosj_audio_map);
+ MCFG_DEVICE_ADD("audiocpu", Z80,XTAL(6'000'000)/2) /* 6 MHz / 2, on GAME board */
+ MCFG_DEVICE_PROGRAM_MAP(taitosj_audio_map)
/* interrupts: */
/* - no interrupts synced with vblank */
/* - NMI triggered by the main CPU */
/* - periodic IRQ, with frequency 6000000/(4*16*16*10*16) = 36.621 Hz, */
- m_audiocpu->set_periodic_int(FUNC(taitosj_state::irq0_line_hold), attotime::from_hz(XTAL(6'000'000)/(4*16*16*10*16)));
+ MCFG_DEVICE_PERIODIC_INT_DRIVER(taitosj_state, irq0_line_hold, XTAL(6'000'000)/(4*16*16*10*16))
/* video hardware */
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
- m_screen->set_refresh_hz(60);
- m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
- m_screen->set_size(32*8, 32*8);
- m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
- m_screen->set_screen_update(FUNC(taitosj_state::screen_update_taitosj));
- m_screen->set_palette(m_palette);
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
+ 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(taitosj_state, screen_update_taitosj)
+ MCFG_SCREEN_PALETTE("palette")
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_taitosj);
- PALETTE(config, m_palette).set_entries(64);
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_taitosj)
+ MCFG_PALETTE_ADD("palette", 64)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- INPUT_MERGER_ALL_HIGH(config, m_soundnmi).output_handler().set(m_soundnmi2, FUNC(input_merger_device::in_w<0>));
+ MCFG_INPUT_MERGER_ALL_HIGH("soundnmi")
+ MCFG_INPUT_MERGER_OUTPUT_HANDLER(WRITELINE("soundnmi2", input_merger_device, in_w<0>))
- INPUT_MERGER_ANY_HIGH(config, m_soundnmi2).output_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI);
+ MCFG_INPUT_MERGER_ANY_HIGH("soundnmi2")
+ MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
AY8910(config, m_ay1, XTAL(6'000'000)/4); // 6mhz/4 on GAME board, AY-3-8910 @ IC53 (this is the only AY which uses proper mixing resistors, the 3 below have outputs tied together)
m_ay1->port_a_read_callback().set_ioport("DSW2");
@@ -1835,20 +1837,19 @@ void taitosj_state::nomcu(machine_config &config)
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // 74LS393 on CPU board, counts 128 vblanks before firing watchdog
- DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // 30k r-2r network
- DISCRETE(config, m_dacvol, taitosj_dacvol_discrete);
- m_dacvol->add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
- m_dacvol->add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-}
+ MCFG_DEVICE_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.15) // 30k r-2r network
+ MCFG_DEVICE_ADD("dacvol", DISCRETE, taitosj_dacvol_discrete)
+ 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
/* same as above, but with additional 68705 MCU */
-void taitosj_state::mcu(machine_config &config)
-{
+MACHINE_CONFIG_START(taitosj_state::mcu)
nomcu(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_PROGRAM, &taitosj_state::taitosj_main_mcu_map);
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(taitosj_main_mcu_map)
TAITO_SJ_SECURITY_MCU(config, m_mcu, XTAL(3'000'000)); /* xtal is 3MHz, divided by 4 internally */
m_mcu->set_int_mode(taito_sj_security_mcu_device::int_mode::LATCH);
@@ -1857,19 +1858,20 @@ void taitosj_state::mcu(machine_config &config)
m_mcu->m68intrq_cb().set(FUNC(taitosj_state::mcu_intrq_w));
m_mcu->busrq_cb().set(FUNC(taitosj_state::mcu_busrq_w));
- config.m_minimum_quantum = attotime::from_hz(6000);
-}
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
+MACHINE_CONFIG_END
-void taitosj_state::kikstart(machine_config &config)
-{
+MACHINE_CONFIG_START(taitosj_state::kikstart)
mcu(config);
/* basic machine hardware */
- m_maincpu->set_addrmap(AS_PROGRAM, &taitosj_state::kikstart_main_map);
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(kikstart_main_map)
- m_screen->set_screen_update(FUNC(taitosj_state::screen_update_kikstart));
-}
+ MCFG_SCREEN_MODIFY("screen")
+ MCFG_SCREEN_UPDATE_DRIVER(taitosj_state, screen_update_kikstart)
+MACHINE_CONFIG_END