summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/thunderx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/thunderx.cpp')
-rw-r--r--src/mame/drivers/thunderx.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/mame/drivers/thunderx.cpp b/src/mame/drivers/thunderx.cpp
index 952a598388c..bb12253afd0 100644
--- a/src/mame/drivers/thunderx.cpp
+++ b/src/mame/drivers/thunderx.cpp
@@ -36,7 +36,6 @@
#include "includes/thunderx.h"
#include "includes/konamipt.h"
-#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */
#include "cpu/z80/z80.h"
#include "machine/gen_latch.h"
#include "machine/watchdog.h"
@@ -638,32 +637,32 @@ void thunderx_state::machine_reset()
m_priority = 0;
}
-MACHINE_CONFIG_START(thunderx_state::scontra)
-
+void thunderx_state::scontra(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/2/4) /* 052001 (verified on pcb) */
- MCFG_DEVICE_PROGRAM_MAP(scontra_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", thunderx_state, vblank_interrupt)
+ KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 052001 (verified on pcb) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &thunderx_state::scontra_map);
+ m_maincpu->set_vblank_int("screen", FUNC(thunderx_state::vblank_interrupt));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(scontra_sound_map)
+ Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &thunderx_state::scontra_sound_map);
ADDRESS_MAP_BANK(config, m_bank5800).set_map(&thunderx_state::scontra_bank5800_map).set_options(ENDIANNESS_BIG, 8, 12, 0x800);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.17) /* verified on pcb */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 2*8, 30*8-1 ) /* verified on scontra and thunderx PCBs */
- MCFG_SCREEN_UPDATE_DRIVER(thunderx_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 1024)
- MCFG_PALETTE_ENABLE_SHADOWS()
- MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.17); /* verified on pcb */
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(12*8, (64-12)*8-1, 2*8, 30*8-1); /* verified on scontra and thunderx PCBs */
+ screen.set_screen_update(FUNC(thunderx_state::screen_update));
+ screen.set_palette(m_palette);
+
+ PALETTE(config, m_palette, 1024);
+ m_palette->enable_shadows();
+ m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR);
K052109(config, m_k052109, 0);
m_k052109->set_palette(m_palette);
@@ -681,11 +680,11 @@ MACHINE_CONFIG_START(thunderx_state::scontra)
YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "mono", 1.0).add_route(1, "mono", 1.0); /* verified on pcb */
- MCFG_DEVICE_ADD("k007232", K007232, XTAL(3'579'545)) /* verified on pcb */
- MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, thunderx_state, volume_callback))
- MCFG_SOUND_ROUTE(0, "mono", 0.20)
- MCFG_SOUND_ROUTE(1, "mono", 0.20)
-MACHINE_CONFIG_END
+ K007232(config, m_k007232, XTAL(3'579'545)); /* verified on pcb */
+ m_k007232->port_write().set(FUNC(thunderx_state::volume_callback));
+ m_k007232->add_route(0, "mono", 0.20);
+ m_k007232->add_route(1, "mono", 0.20);
+}
WRITE8_MEMBER( thunderx_state::banking_callback )
@@ -694,32 +693,33 @@ WRITE8_MEMBER( thunderx_state::banking_callback )
m_rombank->set_entry(data & 0x0f);
}
-MACHINE_CONFIG_START(thunderx_state::thunderx)
+void thunderx_state::thunderx(machine_config &config)
+{
scontra(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu") /* 052001 (verified on pcb) */
- MCFG_DEVICE_PROGRAM_MAP(thunderx_map)
- MCFG_KONAMICPU_LINE_CB(WRITE8(*this, thunderx_state, banking_callback))
+ /* CPU type is 052001 (verified on pcb) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &thunderx_state::thunderx_map);
+ m_maincpu->line().set(FUNC(thunderx_state::banking_callback));
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_PROGRAM_MAP(thunderx_sound_map)
+ m_audiocpu->set_addrmap(AS_PROGRAM, &thunderx_state::thunderx_sound_map);
m_bank5800->set_map(&thunderx_state::thunderx_bank5800_map).set_addr_width(13);
- MCFG_DEVICE_REMOVE("k007232")
-MACHINE_CONFIG_END
+ config.device_remove("k007232");
+}
-MACHINE_CONFIG_START(thunderx_state::gbusters)
+void thunderx_state::gbusters(machine_config &config)
+{
scontra(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu") /* 052526 */
- MCFG_DEVICE_PROGRAM_MAP(gbusters_map)
- MCFG_KONAMICPU_LINE_CB(WRITE8(*this, thunderx_state, banking_callback))
+ /* CPU type is 052526 */
+ m_maincpu->set_addrmap(AS_PROGRAM, &thunderx_state::gbusters_map);
+ m_maincpu->line().set(FUNC(thunderx_state::banking_callback));
m_k052109->set_tile_callback(FUNC(thunderx_state::gbusters_tile_callback), this);
-MACHINE_CONFIG_END
+}
/***************************************************************************