summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/shaolins.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/shaolins.cpp')
-rw-r--r--src/mame/drivers/shaolins.cpp47
1 files changed, 25 insertions, 22 deletions
diff --git a/src/mame/drivers/shaolins.cpp b/src/mame/drivers/shaolins.cpp
index e9577900407..a5ef43474c1 100644
--- a/src/mame/drivers/shaolins.cpp
+++ b/src/mame/drivers/shaolins.cpp
@@ -37,8 +37,8 @@ void shaolins_state::shaolins_map(address_map &map)
map(0x0000, 0x0000).w(FUNC(shaolins_state::nmi_w)); /* bit 0 = flip screen, bit 1 = nmi enable, bit 2 = ? */
/* bit 3, bit 4 = coin counters */
map(0x0100, 0x0100).w("watchdog", FUNC(watchdog_timer_device::reset_w));
- map(0x0300, 0x0300).w("sn1", FUNC(sn76489a_device::write)); /* trigger chip to read from latch. The program always */
- map(0x0400, 0x0400).w("sn2", FUNC(sn76489a_device::write)); /* writes the same number as the latch, so we don't */
+ map(0x0300, 0x0300).w("sn1", FUNC(sn76489a_device::command_w)); /* trigger chip to read from latch. The program always */
+ map(0x0400, 0x0400).w("sn2", FUNC(sn76489a_device::command_w)); /* writes the same number as the latch, so we don't */
/* bother emulating them. */
map(0x0500, 0x0500).portr("DSW1");
map(0x0600, 0x0600).portr("DSW2");
@@ -193,22 +193,22 @@ static GFXDECODE_START( gfx_shaolins )
GFXDECODE_END
-void shaolins_state::shaolins(machine_config &config)
-{
+MACHINE_CONFIG_START(shaolins_state::shaolins)
+
/* basic machine hardware */
- MC6809E(config, m_maincpu, MASTER_CLOCK/12); /* verified on pcb */
- m_maincpu->set_addrmap(AS_PROGRAM, &shaolins_state::shaolins_map);
- TIMER(config, "scantimer").configure_scanline(FUNC(shaolins_state::interrupt), "screen", 0, 1);
+ MCFG_DEVICE_ADD("maincpu", MC6809E, MASTER_CLOCK/12) /* verified on pcb */
+ MCFG_DEVICE_PROGRAM_MAP(shaolins_map)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", shaolins_state, interrupt, "screen", 0, 1)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- 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(shaolins_state::screen_update));
- screen.set_palette(m_palette);
+ 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(shaolins_state, screen_update)
+ MCFG_SCREEN_PALETTE(m_palette)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_shaolins);
PALETTE(config, m_palette, FUNC(shaolins_state::shaolins_palette), 16*8*16+16*8*16, 256);
@@ -216,20 +216,23 @@ void shaolins_state::shaolins(machine_config &config)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- SN76489A(config, "sn1", MASTER_CLOCK/12).add_route(ALL_OUTPUTS, "mono", 1.0); /* verified on pcb */
+ MCFG_DEVICE_ADD("sn1", SN76489A, MASTER_CLOCK/12) /* verified on pcb */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- SN76489A(config, "sn2", MASTER_CLOCK/6).add_route(ALL_OUTPUTS, "mono", 1.0); /* verified on pcb */
-}
+ MCFG_DEVICE_ADD("sn2", SN76489A, MASTER_CLOCK/6) /* verified on pcb */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_CONFIG_END
#if 0 // a bootleg board was found with downgraded sound hardware, but is otherwise the same
-void shaolins_state::shaolinb(machine_config &config)
-{
+static MACHINE_CONFIG_START( shaolinb )
shaolins(config);
- SN76489(config.replace(), "sn1", MASTER_CLOCK/12).add_route(ALL_OUTPUTS, "mono", 1.0); /* only type verified on pcb */
+ MCFG_DEVICE_REPLACE("sn1", SN76489, MASTER_CLOCK/12) /* only type verified on pcb */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- SN76489(config.replace(), "sn2", MASTER_CLOCK/6).add_route(ALL_OUTPUTS, "mono", 1.0);
-}
+ MCFG_DEVICE_REPLACE("sn2", SN76489, MASTER_CLOCK/6) /* only type verified on pcb */
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+MACHINE_CONFIG_END
#endif
/***************************************************************************