summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/1942.cpp
diff options
context:
space:
mode:
author andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
committer andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
commitb380514764cf857469bae61c11143a19f79a74c5 (patch)
tree63c8012e262618f08a332da31dd714281aa2c5ed /src/mame/drivers/1942.cpp
parentc24473ddff715ecec2e258a6eb38960cf8c8e98e (diff)
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/mame/drivers/1942.cpp')
-rw-r--r--src/mame/drivers/1942.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/mame/drivers/1942.cpp b/src/mame/drivers/1942.cpp
index 3dea5f551d8..a063ee16ef9 100644
--- a/src/mame/drivers/1942.cpp
+++ b/src/mame/drivers/1942.cpp
@@ -566,18 +566,17 @@ void _1942_state::machine_reset()
MACHINE_CONFIG_START(_1942_state::_1942)
/* basic machine hardware */
- Z80(config, m_maincpu, MAIN_CPU_CLOCK); /* 4 MHz ??? */
- m_maincpu->set_addrmap(AS_PROGRAM, &_1942_state::_1942_map);
+ MCFG_DEVICE_ADD("maincpu", Z80, MAIN_CPU_CLOCK) /* 4 MHz ??? */
+ MCFG_DEVICE_PROGRAM_MAP(_1942_map)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", _1942_state, _1942_scanline, "screen", 0, 1)
- TIMER(config, "scantimer").configure_scanline(FUNC(_1942_state::_1942_scanline), "screen", 0, 1);
-
- Z80(config, m_audiocpu, SOUND_CPU_CLOCK); /* 3 MHz ??? */
- m_audiocpu->set_addrmap(AS_PROGRAM, &_1942_state::sound_map);
- m_audiocpu->set_periodic_int(FUNC(_1942_state::irq0_line_hold), attotime::from_hz(4*60));
+ MCFG_DEVICE_ADD("audiocpu", Z80, SOUND_CPU_CLOCK) /* 3 MHz ??? */
+ MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ MCFG_DEVICE_PERIODIC_INT_DRIVER(_1942_state, irq0_line_hold, 4*60)
/* video hardware */
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_1942);
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_1942)
PALETTE(config, m_palette, FUNC(_1942_state::_1942_palette), 64*4+4*32*8+16*16, 256);
@@ -628,21 +627,21 @@ MACHINE_CONFIG_START(_1942_state::_1942)
MACHINE_CONFIG_END
-void _1942p_state::_1942p(machine_config &config)
-{
+MACHINE_CONFIG_START(_1942p_state::_1942p)
+
/* basic machine hardware */
- Z80(config, m_maincpu, MAIN_CPU_CLOCK_1942P); /* 4 MHz - verified on PCB */
- m_maincpu->set_addrmap(AS_PROGRAM, &_1942p_state::_1942p_map);
- m_maincpu->set_vblank_int("screen", FUNC(_1942p_state::irq0_line_hold)); // note, powerups won't move down the screen with the original '1942' logic.
+ MCFG_DEVICE_ADD("maincpu", Z80, MAIN_CPU_CLOCK_1942P) /* 4 MHz - verified on PCB */
+ MCFG_DEVICE_PROGRAM_MAP(_1942p_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", _1942p_state, irq0_line_hold) // note, powerups won't move down the screen with the original '1942' logic.
- Z80(config, m_audiocpu, SOUND_CPU_CLOCK_1942P); /* 4 MHz - verified on PCB */
- m_audiocpu->set_addrmap(AS_PROGRAM, &_1942p_state::_1942p_sound_map);
- m_audiocpu->set_addrmap(AS_IO, &_1942p_state::_1942p_sound_io);
- m_audiocpu->set_periodic_int(FUNC(_1942p_state::irq0_line_hold), attotime::from_hz(4*60));
+ MCFG_DEVICE_ADD("audiocpu", Z80, SOUND_CPU_CLOCK_1942P) /* 4 MHz - verified on PCB */
+ MCFG_DEVICE_PROGRAM_MAP(_1942p_sound_map)
+ MCFG_DEVICE_IO_MAP(_1942p_sound_io)
+ MCFG_DEVICE_PERIODIC_INT_DRIVER(_1942p_state, irq0_line_hold, 4*60)
/* video hardware */
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_1942p);
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_1942p)
PALETTE(config, m_palette, FUNC(_1942p_state::_1942p_palette), 0x500, 0x400);
@@ -663,7 +662,7 @@ void _1942p_state::_1942p(machine_config &config)
AY8910(config, "ay1", AUDIO_CLOCK_1942P).add_route(ALL_OUTPUTS, "mono", 0.25); // 1.25 MHz - verified on PCB
AY8910(config, "ay2", AUDIO_CLOCK_1942P).add_route(ALL_OUTPUTS, "mono", 0.25); // 1.25 MHz - verified on PCB
-}
+MACHINE_CONFIG_END
/***************************************************************************