From 8a44816c0679d94b4a175804618d0b447a71f028 Mon Sep 17 00:00:00 2001 From: mooglyguy Date: Sat, 15 Dec 2018 16:49:34 +0100 Subject: -mb88xx, m6809, konami: Removed MCFG macros. [Ryan Holtz] -namco50, namco51, namco52, namco53, namco54: Removed MACHINE_CONFIG macros. [Ryan Holtz] -88games, aliens, arabian, blockhl, crimfght, parodius, rollerg, simpsons, surpratk, thunderx, vendetta: Removed MACHINE_CONFIG macros. [Ryan Holtz] --- src/devices/cpu/m6809/konami.h | 6 +--- src/devices/cpu/m6809/m6809.h | 7 +--- src/devices/cpu/mb88xx/mb88xx.h | 79 +++++++++++------------------------------ src/devices/sound/k007232.h | 1 + src/mame/audio/namco52.cpp | 23 ++++++------ src/mame/audio/namco54.cpp | 15 ++++---- src/mame/drivers/88games.cpp | 47 ++++++++++++------------ src/mame/drivers/aliens.cpp | 41 +++++++++++---------- src/mame/drivers/arabian.cpp | 63 ++++++++++++++++---------------- src/mame/drivers/blockhl.cpp | 33 ++++++++--------- src/mame/drivers/crimfght.cpp | 47 ++++++++++++------------ src/mame/drivers/markham.cpp | 26 +++++++------- src/mame/drivers/parodius.cpp | 47 ++++++++++++------------ src/mame/drivers/rollerg.cpp | 49 ++++++++++++------------- src/mame/drivers/simpsons.cpp | 45 ++++++++++++----------- src/mame/drivers/surpratk.cpp | 39 ++++++++++---------- src/mame/drivers/thunderx.cpp | 74 +++++++++++++++++++------------------- src/mame/drivers/vendetta.cpp | 66 ++++++++++++++++------------------ src/mame/includes/88games.h | 7 ++-- src/mame/includes/aliens.h | 5 +-- src/mame/includes/arabian.h | 3 +- src/mame/includes/crimfght.h | 3 +- src/mame/includes/markham.h | 2 +- src/mame/includes/parodius.h | 5 +-- src/mame/includes/rollerg.h | 5 +-- src/mame/includes/simpsons.h | 5 +-- src/mame/includes/surpratk.h | 5 +-- src/mame/includes/thunderx.h | 6 ++-- src/mame/includes/vendetta.h | 7 ++-- src/mame/machine/namco50.cpp | 15 ++++---- src/mame/machine/namco51.cpp | 17 ++++----- src/mame/machine/namco53.cpp | 21 +++++------ src/mame/machine/namco62.cpp | 17 ++++----- 33 files changed, 391 insertions(+), 440 deletions(-) diff --git a/src/devices/cpu/m6809/konami.h b/src/devices/cpu/m6809/konami.h index 0ca8adda93f..edb595d771e 100644 --- a/src/devices/cpu/m6809/konami.h +++ b/src/devices/cpu/m6809/konami.h @@ -20,10 +20,6 @@ // TYPE DEFINITIONS //************************************************************************** -#define MCFG_KONAMICPU_LINE_CB(_devcb) \ - downcast(*device).set_line_callback(DEVCB_##_devcb); - - // device type definition DECLARE_DEVICE_TYPE(KONAMI, konami_cpu_device) @@ -36,7 +32,7 @@ public: konami_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration - template devcb_base &set_line_callback(Object &&cb) { return m_set_lines.set_callback(std::forward(cb)); } + auto line() { return m_set_lines.bind(); } protected: // device-level overrides diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h index 0138ee18b79..bb52b0880dd 100644 --- a/src/devices/cpu/m6809/m6809.h +++ b/src/devices/cpu/m6809/m6809.h @@ -305,18 +305,13 @@ public: // ======================> mc6809e_device -// MC6809E has LIC line to indicate opcode/data fetch -#define MCFG_MC6809E_LIC_CB(_devcb) \ - downcast(*device).set_lic_cb(DEVCB_##_devcb); - - class mc6809e_device : public m6809_base_device { public: // construction/destruction mc6809e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // configuration helpers + // MC6809E has LIC line to indicate opcode/data fetch auto lic() { return m_lic_func.bind(); } }; diff --git a/src/devices/cpu/mb88xx/mb88xx.h b/src/devices/cpu/mb88xx/mb88xx.h index 8c071ad8cec..e4cceb45515 100644 --- a/src/devices/cpu/mb88xx/mb88xx.h +++ b/src/devices/cpu/mb88xx/mb88xx.h @@ -48,58 +48,6 @@ #pragma once -/*************************************************************************** - PORT CONFIGURATION -***************************************************************************/ - -// K (K3-K0): input-only port -#define MCFG_MB88XX_READ_K_CB(_devcb) \ - downcast(*device).set_read_k_callback(DEVCB_##_devcb); - -// O (O7-O4 = OH, O3-O0 = OL): output through PLA -#define MCFG_MB88XX_WRITE_O_CB(_devcb) \ - downcast(*device).set_write_o_callback(DEVCB_##_devcb); - -// P (P3-P0): output-only port -#define MCFG_MB88XX_WRITE_P_CB(_devcb) \ - downcast(*device).set_write_p_callback(DEVCB_##_devcb); - -// R0 (R3-R0): input/output port -#define MCFG_MB88XX_READ_R0_CB(_devcb) \ - downcast(*device).set_read_r_callback(0, DEVCB_##_devcb); -#define MCFG_MB88XX_WRITE_R0_CB(_devcb) \ - downcast(*device).set_write_r_callback(0, DEVCB_##_devcb); - -// R1 (R7-R4): input/output port -#define MCFG_MB88XX_READ_R1_CB(_devcb) \ - downcast(*device).set_read_r_callback(1, DEVCB_##_devcb); -#define MCFG_MB88XX_WRITE_R1_CB(_devcb) \ - downcast(*device).set_write_r_callback(1, DEVCB_##_devcb); - -// R2 (R11-R8): input/output port -#define MCFG_MB88XX_READ_R2_CB(_devcb) \ - downcast(*device).set_read_r_callback(2, DEVCB_##_devcb); -#define MCFG_MB88XX_WRITE_R2_CB(_devcb) \ - downcast(*device).set_write_r_callback(2, DEVCB_##_devcb); - -// R3 (R15-R12): input/output port -#define MCFG_MB88XX_READ_R3_CB(_devcb) \ - downcast(*device).set_read_r_callback(3, DEVCB_##_devcb); -#define MCFG_MB88XX_WRITE_R3_CB(_devcb) \ - downcast(*device).set_write_r_callback(3, DEVCB_##_devcb); - -// SI: serial input -#define MCFG_MB88XX_READ_SI_CB(_devcb) \ - downcast(*device).set_read_si_callback(DEVCB_##_devcb); - -// SO: serial output -#define MCFG_MB88XX_WRITE_SO_CB(_devcb) \ - downcast(*device).set_write_so_callback(DEVCB_##_devcb); - -// Configure 32 byte PLA; if nullptr (default) assume direct output -#define MCFG_MB88XX_OUTPUT_PLA(_pla) \ - downcast(*device).set_pla(_pla); - /*************************************************************************** REGISTER ENUMERATION ***************************************************************************/ @@ -126,13 +74,26 @@ class mb88_cpu_device : public cpu_device { public: // configuration helpers - template devcb_base &set_read_k_callback(Object &&cb) { return m_read_k.set_callback(std::forward(cb)); } - template devcb_base &set_write_o_callback(Object &&cb) { return m_write_o.set_callback(std::forward(cb)); } - template devcb_base &set_write_p_callback(Object &&cb) { return m_write_p.set_callback(std::forward(cb)); } - template devcb_base &set_read_r_callback(int n, Object &&cb) { assert(n >= 0 && n < 4); return m_read_r[n].set_callback(std::forward(cb)); } - template devcb_base &set_write_r_callback(int n, Object &&cb) { assert(n >= 0 && n < 4); return m_write_r[n].set_callback(std::forward(cb)); } - template devcb_base &set_read_si_callback(Object &&cb) { return m_read_si.set_callback(std::forward(cb)); } - template devcb_base &set_write_so_callback(Object &&cb) { return m_write_so.set_callback(std::forward(cb)); } + + // K (K3-K0): input-only port + auto read_k() { return m_read_k.bind(); } + + // O (O7-O4 = OH, O3-O0 = OL): output through PLA + auto write_o() { return m_write_o.bind(); } + + // P (P3-P0): output-only port + auto write_p() { return m_write_p.bind(); } + + // R0 (R3-R0): input/output port + template auto read_r() { return m_read_r[Port].bind(); } + template auto write_r() { return m_write_r[Port].bind(); } + + // SI: serial input + auto read_si() { return m_read_si.bind(); } + + // SO: serial output + auto write_so() { return m_write_so.bind(); } + void set_pla(uint8_t *pla) { m_PLA = pla; } DECLARE_WRITE_LINE_MEMBER( clock_w ); diff --git a/src/devices/sound/k007232.h b/src/devices/sound/k007232.h index 845379b55e5..f937641401c 100644 --- a/src/devices/sound/k007232.h +++ b/src/devices/sound/k007232.h @@ -19,6 +19,7 @@ public: k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template devcb_base &set_port_write_handler(Object &&cb) { return m_port_write_handler.set_callback(std::forward(cb)); } + auto port_write() { return m_port_write_handler.bind(); } DECLARE_WRITE8_MEMBER( write ); DECLARE_READ8_MEMBER( read ); diff --git a/src/mame/audio/namco52.cpp b/src/mame/audio/namco52.cpp index 287711d428c..70e53fe1131 100644 --- a/src/mame/audio/namco52.cpp +++ b/src/mame/audio/namco52.cpp @@ -176,17 +176,18 @@ void namco_52xx_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(namco_52xx_device::device_add_mconfig) - MCFG_DEVICE_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */ - MCFG_MB88XX_READ_K_CB(READ8(*this, namco_52xx_device, K_r)) - MCFG_MB88XX_WRITE_O_CB(WRITE8(*this, namco_52xx_device, O_w)) - MCFG_MB88XX_WRITE_P_CB(WRITE8(*this, namco_52xx_device, P_w)) - MCFG_MB88XX_READ_SI_CB(READLINE(*this, namco_52xx_device, SI_r)) - MCFG_MB88XX_READ_R0_CB(READ8(*this, namco_52xx_device, R0_r)) - MCFG_MB88XX_READ_R1_CB(READ8(*this, namco_52xx_device, R1_r)) - MCFG_MB88XX_WRITE_R2_CB(WRITE8(*this, namco_52xx_device, R2_w)) - MCFG_MB88XX_WRITE_R3_CB(WRITE8(*this, namco_52xx_device, R3_w)) -MACHINE_CONFIG_END +void namco_52xx_device::device_add_mconfig(machine_config &config) +{ + MB8843(config, m_cpu, DERIVED_CLOCK(1,1)); /* parent clock, internally divided by 6 */ + m_cpu->read_k().set(FUNC(namco_52xx_device::K_r)); + m_cpu->write_o().set(FUNC(namco_52xx_device::O_w)); + m_cpu->write_p().set(FUNC(namco_52xx_device::P_w)); + m_cpu->read_si().set(FUNC(namco_52xx_device::SI_r)); + m_cpu->read_r<0>().set(FUNC(namco_52xx_device::R0_r)); + m_cpu->read_r<1>().set(FUNC(namco_52xx_device::R1_r)); + m_cpu->write_r<2>().set(FUNC(namco_52xx_device::R2_w)); + m_cpu->write_r<3>().set(FUNC(namco_52xx_device::R3_w)); +} //------------------------------------------------- // device_rom_region - return a pointer to the diff --git a/src/mame/audio/namco54.cpp b/src/mame/audio/namco54.cpp index 2db6af5e8d3..b465d122145 100644 --- a/src/mame/audio/namco54.cpp +++ b/src/mame/audio/namco54.cpp @@ -135,13 +135,14 @@ void namco_54xx_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(namco_54xx_device::device_add_mconfig) - MCFG_DEVICE_ADD("mcu", MB8844, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */ - MCFG_MB88XX_READ_K_CB(READ8(*this, namco_54xx_device, K_r)) - MCFG_MB88XX_WRITE_O_CB(WRITE8(*this, namco_54xx_device, O_w)) - MCFG_MB88XX_READ_R0_CB(READ8(*this, namco_54xx_device, R0_r)) - MCFG_MB88XX_WRITE_R1_CB(WRITE8(*this, namco_54xx_device, R1_w)) -MACHINE_CONFIG_END +void namco_54xx_device::device_add_mconfig(machine_config &config) +{ + MB8844(config, m_cpu, DERIVED_CLOCK(1,1)); /* parent clock, internally divided by 6 */ + m_cpu->read_k().set(FUNC(namco_54xx_device::K_r)); + m_cpu->write_o().set(FUNC(namco_54xx_device::O_w)); + m_cpu->read_r<0>().set(FUNC(namco_54xx_device::R0_r)); + m_cpu->write_r<1>().set(FUNC(namco_54xx_device::R1_w)); +} //------------------------------------------------- // device_rom_region - return a pointer to the diff --git a/src/mame/drivers/88games.cpp b/src/mame/drivers/88games.cpp index eb432ef9e65..168b401d002 100644 --- a/src/mame/drivers/88games.cpp +++ b/src/mame/drivers/88games.cpp @@ -9,7 +9,6 @@ #include "emu.h" #include "includes/88games.h" -#include "cpu/m6809/konami.h" #include "cpu/z80/z80.h" #include "machine/gen_latch.h" #include "machine/nvram.h" @@ -302,33 +301,33 @@ void _88games_state::machine_reset() m_k88games_priority = 0; } -MACHINE_CONFIG_START(_88games_state::_88games) - +void _88games_state::_88games(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", KONAMI, 3000000) /* ? */ - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, _88games_state, banking_callback)) + KONAMI(config, m_maincpu, 3000000); /* ? */ + m_maincpu->set_addrmap(AS_PROGRAM, &_88games_state::main_map); + m_maincpu->line().set(FUNC(_88games_state::banking_callback)); - MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) - MCFG_DEVICE_PROGRAM_MAP(sound_map) + Z80(config, m_audiocpu, 3579545); + m_audiocpu->set_addrmap(AS_PROGRAM, &_88games_state::sound_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - 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 ) - MCFG_SCREEN_UPDATE_DRIVER(_88games_state, screen_update_88games) - MCFG_SCREEN_PALETTE("palette") - MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, _88games_state, vblank_irq)) - - MCFG_PALETTE_ADD("palette", 2048) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + 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(64*8, 32*8); + screen.set_visarea(12*8, (64-12)*8-1, 2*8, 30*8-1); + screen.set_screen_update(FUNC(_88games_state::screen_update_88games)); + screen.set_palette("palette"); + screen.screen_vblank().set(FUNC(_88games_state::vblank_irq)); + + palette_device &palette(PALETTE(config, "palette", 2048)); + palette.enable_shadows(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette("palette"); @@ -350,12 +349,10 @@ MACHINE_CONFIG_START(_88games_state::_88games) YM2151(config, "ymsnd", 3579545).add_route(0, "mono", 0.75).add_route(1, "mono", 0.75); - MCFG_DEVICE_ADD("upd1", UPD7759) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) + UPD7759(config, m_upd7759[0]).add_route(ALL_OUTPUTS, "mono", 0.30); - MCFG_DEVICE_ADD("upd2", UPD7759) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) -MACHINE_CONFIG_END + UPD7759(config, m_upd7759[1]).add_route(ALL_OUTPUTS, "mono", 0.30); +} diff --git a/src/mame/drivers/aliens.cpp b/src/mame/drivers/aliens.cpp index b58cfcbc358..803b69aa106 100644 --- a/src/mame/drivers/aliens.cpp +++ b/src/mame/drivers/aliens.cpp @@ -14,7 +14,6 @@ Preliminary driver by: #include "includes/konamipt.h" #include "cpu/z80/z80.h" -#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/watchdog.h" #include "sound/ym2151.h" #include "emupal.h" @@ -195,31 +194,31 @@ WRITE8_MEMBER( aliens_state::banking_callback ) m_rombank->set_entry(data & 0x1f); } -MACHINE_CONFIG_START(aliens_state::aliens) - +void aliens_state::aliens(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(aliens_map) - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, aliens_state, banking_callback)) + KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 052001 (verified on pcb) */ + m_maincpu->set_addrmap(AS_PROGRAM, &aliens_state::aliens_map); + m_maincpu->line().set(FUNC(aliens_state::banking_callback)); - MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */ - MCFG_DEVICE_PROGRAM_MAP(aliens_sound_map) + Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */ + m_audiocpu->set_addrmap(AS_PROGRAM, &aliens_state::aliens_sound_map); ADDRESS_MAP_BANK(config, "bank0000").set_map(&aliens_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 11, 0x400); WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 112, 400, 256, 16, 240) // measured 59.17 + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(XTAL(24'000'000)/3, 528, 112, 400, 256, 16, 240); // measured 59.17 // 6MHz dotclock is more realistic, however needs drawing updates. replace when ready -// MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240) - MCFG_SCREEN_UPDATE_DRIVER(aliens_state, screen_update_aliens) - MCFG_SCREEN_PALETTE("palette") +// screen.set_raw(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240); + screen.set_screen_update(FUNC(aliens_state::screen_update_aliens)); + screen.set_palette("palette"); - MCFG_PALETTE_ADD("palette", 512) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + palette_device &palette(PALETTE(config, "palette", 512)); + palette.enable_shadows(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette("palette"); @@ -241,11 +240,11 @@ MACHINE_CONFIG_START(aliens_state::aliens) ymsnd.add_route(0, "mono", 0.60); ymsnd.add_route(1, "mono", 0.60); - MCFG_DEVICE_ADD("k007232", K007232, XTAL(3'579'545)) /* verified on pcb */ - MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, aliens_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(aliens_state::volume_callback)); + m_k007232->add_route(0, "mono", 0.20); + m_k007232->add_route(1, "mono", 0.20); +} /*************************************************************************** diff --git a/src/mame/drivers/arabian.cpp b/src/mame/drivers/arabian.cpp index 2548abd02eb..fa4f494b14c 100644 --- a/src/mame/drivers/arabian.cpp +++ b/src/mame/drivers/arabian.cpp @@ -47,7 +47,6 @@ #include "emu.h" #include "includes/arabian.h" -#include "cpu/mb88xx/mb88xx.h" #include "cpu/z80/z80.h" #include "sound/ay8910.h" #include "screen.h" @@ -355,41 +354,39 @@ void arabian_state::machine_reset() m_video_control = 0; } -MACHINE_CONFIG_START(arabian_state::arabian) - +void arabian_state::arabian(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", Z80, MAIN_OSC/4) - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_IO_MAP(main_io_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", arabian_state, irq0_line_hold) - - MCFG_DEVICE_ADD("mcu", MB8841, MAIN_OSC/3/2) - MCFG_MB88XX_READ_K_CB(READ8(*this, arabian_state, mcu_portk_r)) - MCFG_MB88XX_WRITE_O_CB(WRITE8(*this, arabian_state, mcu_port_o_w)) - MCFG_MB88XX_WRITE_P_CB(WRITE8(*this, arabian_state, mcu_port_p_w)) - MCFG_MB88XX_READ_R0_CB(READ8(*this, arabian_state, mcu_port_r0_r)) - MCFG_MB88XX_WRITE_R0_CB(WRITE8(*this, arabian_state, mcu_port_r0_w)) - MCFG_MB88XX_READ_R1_CB(READ8(*this, arabian_state, mcu_port_r1_r)) - MCFG_MB88XX_WRITE_R1_CB(WRITE8(*this, arabian_state, mcu_port_r1_w)) - MCFG_MB88XX_READ_R2_CB(READ8(*this, arabian_state, mcu_port_r2_r)) - MCFG_MB88XX_WRITE_R2_CB(WRITE8(*this, arabian_state, mcu_port_r2_w)) - MCFG_MB88XX_READ_R3_CB(READ8(*this, arabian_state, mcu_port_r3_r)) - MCFG_MB88XX_WRITE_R3_CB(WRITE8(*this, arabian_state, mcu_port_r3_w)) - - MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - + Z80(config, m_maincpu, MAIN_OSC/4); + m_maincpu->set_addrmap(AS_PROGRAM, &arabian_state::main_map); + m_maincpu->set_addrmap(AS_IO, &arabian_state::main_io_map); + m_maincpu->set_vblank_int("screen", FUNC(arabian_state::irq0_line_hold)); + + MB8841(config, m_mcu, MAIN_OSC/3/2); + m_mcu->read_k().set(FUNC(arabian_state::mcu_portk_r)); + m_mcu->write_o().set(FUNC(arabian_state::mcu_port_o_w)); + m_mcu->write_p().set(FUNC(arabian_state::mcu_port_p_w)); + m_mcu->read_r<0>().set(FUNC(arabian_state::mcu_port_r0_r)); + m_mcu->write_r<0>().set(FUNC(arabian_state::mcu_port_r0_w)); + m_mcu->read_r<1>().set(FUNC(arabian_state::mcu_port_r1_r)); + m_mcu->write_r<1>().set(FUNC(arabian_state::mcu_port_r1_w)); + m_mcu->read_r<2>().set(FUNC(arabian_state::mcu_port_r2_r)); + m_mcu->write_r<2>().set(FUNC(arabian_state::mcu_port_r2_w)); + m_mcu->read_r<3>().set(FUNC(arabian_state::mcu_port_r3_r)); + m_mcu->write_r<3>().set(FUNC(arabian_state::mcu_port_r3_w)); + + config.m_minimum_quantum = attotime::from_hz(6000); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(256, 256) - MCFG_SCREEN_VISIBLE_AREA(0, 255, 11, 244) - MCFG_SCREEN_UPDATE_DRIVER(arabian_state, screen_update_arabian) - MCFG_SCREEN_PALETTE("palette") + 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(256, 256); + screen.set_visarea(0, 255, 11, 244); + screen.set_screen_update(FUNC(arabian_state::screen_update_arabian)); + screen.set_palette(m_palette); - MCFG_PALETTE_ADD("palette", 256*32) - MCFG_PALETTE_INIT_OWNER(arabian_state, arabian) + PALETTE(config, m_palette, 256*32).set_init(FUNC(arabian_state::palette_init_arabian)); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -398,7 +395,7 @@ MACHINE_CONFIG_START(arabian_state::arabian) aysnd.port_a_write_callback().set(FUNC(arabian_state::ay8910_porta_w)); aysnd.port_b_write_callback().set(FUNC(arabian_state::ay8910_portb_w)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); -MACHINE_CONFIG_END +} diff --git a/src/mame/drivers/blockhl.cpp b/src/mame/drivers/blockhl.cpp index 35f36b69c9b..274c3ab0e2e 100644 --- a/src/mame/drivers/blockhl.cpp +++ b/src/mame/drivers/blockhl.cpp @@ -67,7 +67,7 @@ protected: virtual void machine_start() override; private: - required_device m_maincpu; + required_device m_maincpu; required_device m_bank5800; required_device m_audiocpu; required_device m_k052109; @@ -278,30 +278,31 @@ INPUT_PORTS_END // MACHINE DEFINTIONS //************************************************************************** -MACHINE_CONFIG_START(blockhl_state::blockhl) +void blockhl_state::blockhl(machine_config &config) +{ // basic machine hardware - MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/8) // Konami 052526 - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, blockhl_state, banking_callback)) + KONAMI(config, m_maincpu, XTAL(24'000'000)/8); // Konami 052526 + m_maincpu->set_addrmap(AS_PROGRAM, &blockhl_state::main_map); + m_maincpu->line().set(FUNC(blockhl_state::banking_callback)); ADDRESS_MAP_BANK(config, "bank5800").set_map(&blockhl_state::bank5800_map).set_options(ENDIANNESS_BIG, 8, 12, 0x800); - MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) - MCFG_DEVICE_PROGRAM_MAP(audio_map) + Z80(config, m_audiocpu, XTAL(3'579'545)); + m_audiocpu->set_addrmap(AS_PROGRAM, &blockhl_state::audio_map); WATCHDOG_TIMER(config, "watchdog"); // video hardware - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 112, 400, 256, 16, 240) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(XTAL(24'000'000)/3, 528, 112, 400, 256, 16, 240); // 6MHz dotclock is more realistic, however needs drawing updates. replace when ready -// MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240) - MCFG_SCREEN_UPDATE_DRIVER(blockhl_state, screen_update_blockhl) - MCFG_SCREEN_PALETTE("palette") +// screen.set_raw(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240); + screen.set_screen_update(FUNC(blockhl_state::screen_update_blockhl)); + screen.set_palette("palette"); - MCFG_PALETTE_ADD("palette", 1024) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + palette_device &palette(PALETTE(config, "palette", 1024)); + palette.enable_shadows(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette("palette"); @@ -320,7 +321,7 @@ MACHINE_CONFIG_START(blockhl_state::blockhl) GENERIC_LATCH_8(config, "soundlatch"); YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "mono", 0.60).add_route(1, "mono", 0.60); -MACHINE_CONFIG_END +} //************************************************************************** diff --git a/src/mame/drivers/crimfght.cpp b/src/mame/drivers/crimfght.cpp index bd7283b902f..4537003ea74 100644 --- a/src/mame/drivers/crimfght.cpp +++ b/src/mame/drivers/crimfght.cpp @@ -18,7 +18,6 @@ #include "includes/crimfght.h" #include "cpu/z80/z80.h" -#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/watchdog.h" #include "sound/ym2151.h" #include "speaker.h" @@ -300,32 +299,32 @@ CUSTOM_INPUT_MEMBER( crimfght_state::system_r ) return data >> 4; } -MACHINE_CONFIG_START(crimfght_state::crimfght) - +void crimfght_state::crimfght(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/8) /* 052001 (verified on pcb) */ - MCFG_DEVICE_PROGRAM_MAP(crimfght_map) - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, crimfght_state, banking_callback)) + KONAMI(config, m_maincpu, XTAL(24'000'000)/8); /* 052001 (verified on pcb) */ + m_maincpu->set_addrmap(AS_PROGRAM, &crimfght_state::crimfght_map); + m_maincpu->line().set(FUNC(crimfght_state::banking_callback)); - MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */ - MCFG_DEVICE_PROGRAM_MAP(crimfght_sound_map) - MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE(DEVICE_SELF, crimfght_state, audiocpu_irq_ack) + Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */ + m_audiocpu->set_addrmap(AS_PROGRAM, &crimfght_state::crimfght_sound_map); + m_audiocpu->set_irq_acknowledge_callback(FUNC(crimfght_state::audiocpu_irq_ack)); ADDRESS_MAP_BANK(config, "bank0000").set_map(&crimfght_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 11, 0x400); WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 96, 416, 256, 16, 240) // measured 59.17 + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(XTAL(24'000'000)/3, 528, 96, 416, 256, 16, 240); // measured 59.17 // 6MHz dotclock is more realistic, however needs drawing updates. replace when ready -// MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240) - MCFG_SCREEN_UPDATE_DRIVER(crimfght_state, screen_update_crimfght) - MCFG_SCREEN_PALETTE("palette") +// screen.set_raw(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240); + screen.set_screen_update(FUNC(crimfght_state::screen_update_crimfght)); + screen.set_palette(m_palette); - MCFG_PALETTE_ADD("palette", 512) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + PALETTE(config, m_palette, 512); + m_palette->enable_shadows(); + m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette(m_palette); @@ -348,13 +347,13 @@ MACHINE_CONFIG_START(crimfght_state::crimfght) ymsnd.add_route(0, "lspeaker", 1.0); ymsnd.add_route(1, "rspeaker", 1.0); - MCFG_DEVICE_ADD("k007232", K007232, XTAL(3'579'545)) /* verified on pcb */ - MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, crimfght_state, volume_callback)) - MCFG_SOUND_ROUTE(0, "lspeaker", 0.20) - MCFG_SOUND_ROUTE(0, "rspeaker", 0.20) - MCFG_SOUND_ROUTE(1, "lspeaker", 0.20) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.20) -MACHINE_CONFIG_END + K007232(config, m_k007232, XTAL(3'579'545)); /* verified on pcb */ + m_k007232->port_write().set(FUNC(crimfght_state::volume_callback)); + m_k007232->add_route(0, "lspeaker", 0.20); + m_k007232->add_route(0, "rspeaker", 0.20); + m_k007232->add_route(1, "lspeaker", 0.20); + m_k007232->add_route(1, "rspeaker", 0.20); +} /*************************************************************************** diff --git a/src/mame/drivers/markham.cpp b/src/mame/drivers/markham.cpp index 2e67bd862ac..ef5c7c28986 100644 --- a/src/mame/drivers/markham.cpp +++ b/src/mame/drivers/markham.cpp @@ -608,19 +608,19 @@ MACHINE_CONFIG_START(markham_state::banbam) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(banbam_master_map) - MCFG_DEVICE_ADD("mcu", MB8841, CPU_CLOCK/2) /* 4.000MHz */ - // MCFG_MB88XX_READ_K_CB(READ8(*this, markham_state, mcu_portk_r)) - // MCFG_MB88XX_WRITE_O_CB(WRITE8(*this, markham_state, mcu_port_o_w)) - // MCFG_MB88XX_WRITE_P_CB(WRITE8(*this, markham_state, mcu_port_p_w)) - // MCFG_MB88XX_READ_R0_CB(READ8(*this, markham_state, mcu_port_r0_r)) - // MCFG_MB88XX_WRITE_R0_CB(WRITE8(*this, markham_state, mcu_port_r0_w)) - // MCFG_MB88XX_READ_R1_CB(READ8(*this, markham_state, mcu_port_r1_r)) - // MCFG_MB88XX_WRITE_R1_CB(WRITE8(*this, markham_state, mcu_port_r1_w)) - // MCFG_MB88XX_READ_R2_CB(READ8(*this, markham_state, mcu_port_r2_r)) - // MCFG_MB88XX_WRITE_R2_CB(WRITE8(*this, markham_state, mcu_port_r2_w)) - // MCFG_MB88XX_READ_R3_CB(READ8(*this, markham_state, mcu_port_r3_r)) - // MCFG_MB88XX_WRITE_R3_CB(WRITE8(*this, markham_state, mcu_port_r3_w)) - MCFG_DEVICE_DISABLE() + MB8841(config, m_mcu, CPU_CLOCK/2); /* 4.000MHz */ + // m_mcu->read_k().set(FUNC(markham_state::mcu_portk_r)); + // m_mcu->write_o().set(FUNC(markham_state::mcu_port_o_w)); + // m_mcu->write_p().set(FUNC(markham_state::mcu_port_p_w)); + // m_mcu->read_r<0>().set(FUNC(markham_state::mcu_port_r0_r)); + // m_mcu->write_r<0>().set(FUNC(markham_state::mcu_port_r0_w)); + // m_mcu->read_r<1>().set(FUNC(markham_state::mcu_port_r1_r)); + // m_mcu->write_r<1>().set(FUNC(markham_state::mcu_port_r1_w)); + // m_mcu->read_r<2>().set(FUNC(markham_state::mcu_port_r2_r)); + // m_mcu->write_r<2>().set(FUNC(markham_state::mcu_port_r2_w)); + // m_mcu->read_r<3>().set(FUNC(markham_state::mcu_port_r3_r)); + // m_mcu->write_r<3>().set(FUNC(markham_state::mcu_port_r3_w)); + m_mcu->set_disable(); MACHINE_CONFIG_END /****************************************************************************/ diff --git a/src/mame/drivers/parodius.cpp b/src/mame/drivers/parodius.cpp index 8eedbd0a4a8..ad3dce6d847 100644 --- a/src/mame/drivers/parodius.cpp +++ b/src/mame/drivers/parodius.cpp @@ -12,7 +12,6 @@ #include "includes/parodius.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/watchdog.h" #include "sound/ym2151.h" @@ -229,16 +228,16 @@ WRITE8_MEMBER( parodius_state::banking_callback ) membank("bank1")->set_entry((data & 0x0f) ^ 0x0f); } -MACHINE_CONFIG_START(parodius_state::parodius) - +void parodius_state::parodius(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", KONAMI, 3000000) /* 053248 */ - MCFG_DEVICE_PROGRAM_MAP(parodius_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", parodius_state, parodius_interrupt) - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, parodius_state, banking_callback)) + KONAMI(config, m_maincpu, 3000000); /* 053248 */ + m_maincpu->set_addrmap(AS_PROGRAM, &parodius_state::parodius_map); + m_maincpu->set_vblank_int("screen", FUNC(parodius_state::parodius_interrupt)); + m_maincpu->line().set(FUNC(parodius_state::banking_callback)); - MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) - MCFG_DEVICE_PROGRAM_MAP(parodius_sound_map) /* NMIs are triggered by the 053260 */ + Z80(config, m_audiocpu, 3579545); + m_audiocpu->set_addrmap(AS_PROGRAM, &parodius_state::parodius_sound_map); /* NMIs are triggered by the 053260 */ ADDRESS_MAP_BANK(config, "bank0000").set_map(&parodius_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x800); ADDRESS_MAP_BANK(config, "bank2000").set_map(&parodius_state::bank2000_map).set_options(ENDIANNESS_BIG, 8, 12, 0x800); @@ -246,17 +245,17 @@ MACHINE_CONFIG_START(parodius_state::parodius) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(64*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_UPDATE_DRIVER(parodius_state, screen_update_parodius) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD("palette", 2048) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + 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(64*8, 32*8); + screen.set_visarea(14*8, (64-14)*8-1, 2*8, 30*8-1); + screen.set_screen_update(FUNC(parodius_state::screen_update_parodius)); + screen.set_palette("palette"); + + palette_device &palette(PALETTE(config, "palette", 2048)); + palette.enable_shadows(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette("palette"); @@ -274,10 +273,10 @@ MACHINE_CONFIG_START(parodius_state::parodius) YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); - MCFG_K053260_ADD("k053260", 3579545) - MCFG_SOUND_ROUTE(0, "lspeaker", 0.70) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.70) -MACHINE_CONFIG_END + k053260_device &k053260(K053260(config, "k053260", 3579545)); + k053260.add_route(0, "lspeaker", 0.70); + k053260.add_route(1, "rspeaker", 0.70); +} /*************************************************************************** diff --git a/src/mame/drivers/rollerg.cpp b/src/mame/drivers/rollerg.cpp index 37c67bf497a..1b760d1781f 100644 --- a/src/mame/drivers/rollerg.cpp +++ b/src/mame/drivers/rollerg.cpp @@ -16,7 +16,6 @@ #include "includes/rollerg.h" #include "cpu/z80/z80.h" -#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/watchdog.h" #include "sound/3812intf.h" #include "sound/k053260.h" @@ -244,32 +243,31 @@ WRITE8_MEMBER( rollerg_state::banking_callback ) membank("bank1")->set_entry(data & 0x07); } - -MACHINE_CONFIG_START(rollerg_state::rollerg) - +void rollerg_state::rollerg(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", KONAMI, 3000000) /* ? */ - MCFG_DEVICE_PROGRAM_MAP(rollerg_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", rollerg_state, irq0_line_assert) - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, rollerg_state, banking_callback)) + KONAMI(config, m_maincpu, 3000000); /* ? */ + m_maincpu->set_addrmap(AS_PROGRAM, &rollerg_state::rollerg_map); + m_maincpu->set_vblank_int("screen", FUNC(rollerg_state::irq0_line_assert)); + m_maincpu->line().set(FUNC(rollerg_state::banking_callback)); - MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) - MCFG_DEVICE_PROGRAM_MAP(rollerg_sound_map) /* NMIs are generated by the 053260 */ + Z80(config, m_audiocpu, 3579545); + m_audiocpu->set_addrmap(AS_PROGRAM, &rollerg_state::rollerg_sound_map); /* NMIs are generated by the 053260 */ WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) - MCFG_SCREEN_SIZE(64*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_UPDATE_DRIVER(rollerg_state, screen_update_rollerg) - 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(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_size(64*8, 32*8); + screen.set_visarea(14*8, (64-14)*8-1, 2*8, 30*8-1); + screen.set_screen_update(FUNC(rollerg_state::screen_update_rollerg)); + screen.set_palette("palette"); + + palette_device &palette(PALETTE(config, "palette", 1024)); + palette.enable_shadows(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K053244(config, m_k053244, 0); m_k053244->set_palette("palette"); @@ -288,12 +286,9 @@ MACHINE_CONFIG_START(rollerg_state::rollerg) /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("ymsnd", YM3812, 3579545) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - - MCFG_K053260_ADD("k053260", 3579545) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70) -MACHINE_CONFIG_END + YM3812(config, "ymsnd", 3579545).add_route(ALL_OUTPUTS, "mono", 1.0); + K053260(config, "k053260", 3579545).add_route(ALL_OUTPUTS, "mono", 0.70); +} diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp index 83173077009..14f8c2656b8 100644 --- a/src/mame/drivers/simpsons.cpp +++ b/src/mame/drivers/simpsons.cpp @@ -100,7 +100,6 @@ Notes: #include "includes/simpsons.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/eepromser.h" #include "machine/watchdog.h" @@ -322,16 +321,16 @@ INTERRUPT_GEN_MEMBER(simpsons_state::simpsons_irq) device.execute().set_input_line(KONAMI_IRQ_LINE, HOLD_LINE); } -MACHINE_CONFIG_START(simpsons_state::simpsons) - +void simpsons_state::simpsons(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/2/4) /* 053248, the clock input is 12MHz, and internal CPU divider of 4 */ - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", simpsons_state, simpsons_irq) /* IRQ triggered by the 052109, FIRQ by the sprite hardware */ - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, simpsons_state, banking_callback)) + KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 053248, the clock input is 12MHz, and internal CPU divider of 4 */ + m_maincpu->set_addrmap(AS_PROGRAM, &simpsons_state::main_map); + m_maincpu->set_vblank_int("screen", FUNC(simpsons_state::simpsons_irq)); /* IRQ triggered by the 052109, FIRQ by the sprite hardware */ + m_maincpu->line().set(FUNC(simpsons_state::banking_callback)); - MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */ - MCFG_DEVICE_PROGRAM_MAP(z80_map) /* NMIs are generated by the 053260 */ + Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */ + m_audiocpu->set_addrmap(AS_PROGRAM, &simpsons_state::z80_map); /* NMIs are generated by the 053260 */ ADDRESS_MAP_BANK(config, "bank0000").set_map(&simpsons_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000); ADDRESS_MAP_BANK(config, "bank2000").set_map(&simpsons_state::bank2000_map).set_options(ENDIANNESS_BIG, 8, 14, 0x2000); @@ -341,18 +340,18 @@ MACHINE_CONFIG_START(simpsons_state::simpsons) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 112, 400, 256, 16, 240) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(XTAL(24'000'000)/3, 528, 112, 400, 256, 16, 240); // 6MHz dotclock is more realistic, however needs drawing updates. replace when ready -// MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240) - MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) - MCFG_SCREEN_UPDATE_DRIVER(simpsons_state, screen_update_simpsons) - MCFG_SCREEN_PALETTE("palette") +// screen.set_raw(XTAL(24'000'000)/4, 396, hbend, hbstart, 256, 16, 240); + screen.set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); + screen.set_screen_update(FUNC(simpsons_state::screen_update_simpsons)); + screen.set_palette("palette"); - MCFG_PALETTE_ADD("palette", 2048) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_ENABLE_HILIGHTS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + palette_device &palette(PALETTE(config, "palette", 2048)); + palette.enable_shadows(); + palette.enable_hilights(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette("palette"); @@ -375,10 +374,10 @@ MACHINE_CONFIG_START(simpsons_state::simpsons) ymsnd.add_route(1, "lspeaker", 0.0); ymsnd.add_route(1, "rspeaker", 0.0); - MCFG_DEVICE_ADD("k053260", K053260, XTAL(3'579'545)) /* verified on pcb */ - MCFG_SOUND_ROUTE(0, "lspeaker", 0.75) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.75) -MACHINE_CONFIG_END + k053260_device &k053260(K053260(config, "k053260", XTAL(3'579'545))); /* verified on pcb */ + k053260.add_route(0, "lspeaker", 0.75); + k053260.add_route(1, "rspeaker", 0.75); +} /*************************************************************************** diff --git a/src/mame/drivers/surpratk.cpp b/src/mame/drivers/surpratk.cpp index 832ac4d77b8..0ed23af3a40 100644 --- a/src/mame/drivers/surpratk.cpp +++ b/src/mame/drivers/surpratk.cpp @@ -14,7 +14,6 @@ #include "includes/surpratk.h" #include "includes/konamipt.h" -#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/watchdog.h" #include "sound/ym2151.h" #include "speaker.h" @@ -168,30 +167,30 @@ WRITE8_MEMBER( surpratk_state::banking_callback ) membank("bank1")->set_entry(data & 0x1f); } -MACHINE_CONFIG_START(surpratk_state::surpratk) - +void surpratk_state::surpratk(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/2/4) /* 053248, the clock input is 12MHz, and internal CPU divider of 4 */ - MCFG_DEVICE_PROGRAM_MAP(surpratk_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", surpratk_state, surpratk_interrupt) - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, surpratk_state, banking_callback)) + KONAMI(config, m_maincpu, XTAL(24'000'000)/2/4); /* 053248, the clock input is 12MHz, and internal CPU divider of 4 */ + m_maincpu->set_addrmap(AS_PROGRAM, &surpratk_state::surpratk_map); + m_maincpu->set_vblank_int("screen", FUNC(surpratk_state::surpratk_interrupt)); + m_maincpu->line().set(FUNC(surpratk_state::banking_callback)); ADDRESS_MAP_BANK(config, "bank0000").set_map(&surpratk_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x800); WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - 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 ) - MCFG_SCREEN_UPDATE_DRIVER(surpratk_state, screen_update_surpratk) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD("palette", 2048) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + 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(64*8, 32*8); + screen.set_visarea(12*8, (64-12)*8-1, 2*8, 30*8-1); + screen.set_screen_update(FUNC(surpratk_state::screen_update_surpratk)); + screen.set_palette(m_palette); + + PALETTE(config, m_palette, 2048); + m_palette->enable_shadows(); + m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette(m_palette); @@ -211,7 +210,9 @@ MACHINE_CONFIG_START(surpratk_state::surpratk) ymsnd.irq_handler().set_inputline(m_maincpu, KONAMI_FIRQ_LINE); ymsnd.add_route(0, "lspeaker", 1.0); ymsnd.add_route(1, "rspeaker", 1.0); -MACHINE_CONFIG_END +} + + /*************************************************************************** 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 +} /*************************************************************************** diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp index b7442976c55..558a86e23da 100644 --- a/src/mame/drivers/vendetta.cpp +++ b/src/mame/drivers/vendetta.cpp @@ -92,7 +92,6 @@ #include "includes/vendetta.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/eepromser.h" #include "machine/watchdog.h" @@ -427,37 +426,36 @@ WRITE8_MEMBER( vendetta_state::banking_callback ) membank("bank1")->set_entry(data); } -MACHINE_CONFIG_START(vendetta_state::vendetta) - +void vendetta_state::vendetta(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", KONAMI, XTAL(24'000'000)/8) /* 052001 (verified on pcb) */ - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", vendetta_state, irq) - MCFG_KONAMICPU_LINE_CB(WRITE8(*this, vendetta_state, banking_callback)) + KONAMI(config, m_maincpu, XTAL(24'000'000)/8); /* 052001 (verified on pcb) */ + m_maincpu->set_addrmap(AS_PROGRAM, &vendetta_state::main_map); + m_maincpu->set_vblank_int("screen", FUNC(vendetta_state::irq)); + m_maincpu->line().set(FUNC(vendetta_state::banking_callback)); ADDRESS_MAP_BANK(config, "videobank0").set_map(&vendetta_state::videobank0_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000); ADDRESS_MAP_BANK(config, "videobank1").set_map(&vendetta_state::videobank1_map).set_options(ENDIANNESS_BIG, 8, 13, 0x1000); - MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified with PCB */ - MCFG_DEVICE_PROGRAM_MAP(sound_map) - /* interrupts are triggered by the main CPU */ + Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified with PCB */ + m_audiocpu->set_addrmap(AS_PROGRAM, &vendetta_state::sound_map); /* interrupts are triggered by the main CPU */ EEPROM_ER5911_8BIT(config, "eeprom"); WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(59.17) /* measured on PCB */ - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) - MCFG_SCREEN_SIZE(64*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_UPDATE_DRIVER(vendetta_state, screen_update) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD("palette", 2048) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(59.17); /* measured on PCB */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_size(64*8, 32*8); + screen.set_visarea(13*8, (64-13)*8-1, 2*8, 30*8-1); + screen.set_screen_update(FUNC(vendetta_state::screen_update)); + screen.set_palette(m_palette); + + PALETTE(config, m_palette, 2048); + m_palette->enable_shadows(); + m_palette->set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 0); m_k052109->set_palette(m_palette); @@ -478,25 +476,23 @@ MACHINE_CONFIG_START(vendetta_state::vendetta) YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); /* verified with PCB */ - MCFG_K053260_ADD("k053260", XTAL(3'579'545)) /* verified with PCB */ - MCFG_SOUND_ROUTE(0, "lspeaker", 0.75) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.75) -MACHINE_CONFIG_END - + k053260_device &k053260(K053260(config, "k053260", XTAL(3'579'545))); /* verified with PCB */ + k053260.add_route(0, "lspeaker", 0.75); + k053260.add_route(1, "rspeaker", 0.75); +} -MACHINE_CONFIG_START(vendetta_state::esckids) +void vendetta_state::esckids(machine_config &config) +{ vendetta(config); /* basic machine hardware */ - MCFG_DEVICE_MODIFY("maincpu") - MCFG_DEVICE_PROGRAM_MAP(esckids_map) + m_maincpu->set_addrmap(AS_PROGRAM, &vendetta_state::esckids_map); - MCFG_SCREEN_MODIFY("screen") -//MCFG_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 2*8, 30*8-1 ) /* black areas on the edges */ - MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) + //subdevice("screen")->set_visarea(13*8, (64-13)*8-1, 2*8, 30*8-1); /* black areas on the edges */ + subdevice("screen")->set_visarea(14*8, (64-14)*8-1, 2*8, 30*8-1); - MCFG_DEVICE_REMOVE("k054000") - MCFG_DEVICE_REMOVE("k052109") + config.device_remove("k054000"); + config.device_remove("k052109"); K052109(config, m_k052109, 0); m_k052109->set_palette(m_palette); @@ -505,7 +501,7 @@ MACHINE_CONFIG_START(vendetta_state::esckids) m_k053246->set_config("gfx2", NORMAL_PLANE_ORDER, 101, 6); K053252(config, "k053252", 6000000).set_offsets(12*8, 1*8); -MACHINE_CONFIG_END +} diff --git a/src/mame/includes/88games.h b/src/mame/includes/88games.h index dedf1a44e46..6c66f536d11 100644 --- a/src/mame/includes/88games.h +++ b/src/mame/includes/88games.h @@ -10,10 +10,11 @@ #pragma once +#include "cpu/m6809/konami.h" #include "sound/upd7759.h" -#include "video/k052109.h" -#include "video/k051960.h" #include "video/k051316.h" +#include "video/k051960.h" +#include "video/k052109.h" #include "video/konami_helper.h" class _88games_state : public driver_device @@ -42,7 +43,7 @@ private: int m_speech_chip; /* devices */ - required_device m_maincpu; + required_device m_maincpu; required_device m_audiocpu; required_device m_k052109; required_device m_k051960; diff --git a/src/mame/includes/aliens.h b/src/mame/includes/aliens.h index 7fd4d0a3a4b..609b67f79b3 100644 --- a/src/mame/includes/aliens.h +++ b/src/mame/includes/aliens.h @@ -10,11 +10,12 @@ #pragma once +#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/bankdev.h" #include "machine/gen_latch.h" #include "sound/k007232.h" -#include "video/k052109.h" #include "video/k051960.h" +#include "video/k052109.h" class aliens_state : public driver_device { @@ -32,7 +33,7 @@ public: { } /* devices */ - required_device m_maincpu; + required_device m_maincpu; required_device m_audiocpu; required_device m_bank0000; required_device m_k007232; diff --git a/src/mame/includes/arabian.h b/src/mame/includes/arabian.h index 8caf579387b..7d0ea574aa9 100644 --- a/src/mame/includes/arabian.h +++ b/src/mame/includes/arabian.h @@ -12,6 +12,7 @@ #pragma once +#include "cpu/mb88xx/mb88xx.h" #include "emupal.h" class arabian_state : public driver_device @@ -73,7 +74,7 @@ private: uint8_t m_mcu_port_r[4]; required_device m_maincpu; - required_device m_mcu; + required_device m_mcu; required_device m_palette; }; diff --git a/src/mame/includes/crimfght.h b/src/mame/includes/crimfght.h index e77992fa5c1..8e0924e042c 100644 --- a/src/mame/includes/crimfght.h +++ b/src/mame/includes/crimfght.h @@ -10,6 +10,7 @@ #pragma once +#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/bankdev.h" #include "machine/gen_latch.h" #include "sound/k007232.h" @@ -34,7 +35,7 @@ public: { } /* devices */ - required_device m_maincpu; + required_device m_maincpu; required_device m_audiocpu; required_device m_bank0000; required_device m_k007232; diff --git a/src/mame/includes/markham.h b/src/mame/includes/markham.h index 6f64e752156..31311d1eb97 100644 --- a/src/mame/includes/markham.h +++ b/src/mame/includes/markham.h @@ -97,7 +97,7 @@ private: required_device m_maincpu; required_device m_subcpu; - optional_device m_mcu; + optional_device m_mcu; required_device_array m_sn; required_device m_screen; required_device m_gfxdecode; diff --git a/src/mame/includes/parodius.h b/src/mame/includes/parodius.h index 89338f8e4e5..681bf5db30b 100644 --- a/src/mame/includes/parodius.h +++ b/src/mame/includes/parodius.h @@ -10,9 +10,10 @@ #pragma once +#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/bankdev.h" -#include "video/k053244_k053245.h" #include "video/k052109.h" +#include "video/k053244_k053245.h" #include "video/k053251.h" #include "video/konami_helper.h" @@ -44,7 +45,7 @@ public: //int m_nmi_enabled; /* devices */ - required_device m_maincpu; + required_device m_maincpu; required_device m_audiocpu; required_device m_bank0000; required_device m_bank2000; diff --git a/src/mame/includes/rollerg.h b/src/mame/includes/rollerg.h index d95fe6526d0..46e2afd606a 100644 --- a/src/mame/includes/rollerg.h +++ b/src/mame/includes/rollerg.h @@ -10,10 +10,11 @@ #pragma once +#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/k053252.h" #include "video/k051316.h" -#include "video/konami_helper.h" #include "video/k053244_k053245.h" +#include "video/konami_helper.h" class rollerg_state : public driver_device { @@ -40,7 +41,7 @@ private: emu_timer *m_nmi_timer; /* devices */ - required_device m_maincpu; + required_device m_maincpu; required_device m_audiocpu; required_device m_k053244; required_device m_k051316; diff --git a/src/mame/includes/simpsons.h b/src/mame/includes/simpsons.h index ac613c9ce06..1210d9ea709 100644 --- a/src/mame/includes/simpsons.h +++ b/src/mame/includes/simpsons.h @@ -5,10 +5,11 @@ #pragma once +#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/bankdev.h" -#include "video/k053246_k053247_k055673.h" #include "video/k052109.h" #include "video/k053251.h" +#include "video/k053246_k053247_k055673.h" #include "video/konami_helper.h" class simpsons_state : public driver_device @@ -47,7 +48,7 @@ private: //int m_nmi_enabled; /* devices */ - required_device m_maincpu; + required_device m_maincpu; required_device m_audiocpu; required_device m_bank0000; required_device m_bank2000; diff --git a/src/mame/includes/surpratk.h b/src/mame/includes/surpratk.h index 8740812711e..5e7d8a8cd8e 100644 --- a/src/mame/includes/surpratk.h +++ b/src/mame/includes/surpratk.h @@ -10,9 +10,10 @@ #pragma once +#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/bankdev.h" -#include "video/k053244_k053245.h" #include "video/k052109.h" +#include "video/k053244_k053245.h" #include "video/k053251.h" #include "video/konami_helper.h" #include "emupal.h" @@ -39,7 +40,7 @@ private: int m_layerpri[3]; /* devices */ - required_device m_maincpu; + required_device m_maincpu; required_device m_bank0000; required_device m_k052109; required_device m_k053244; diff --git a/src/mame/includes/thunderx.h b/src/mame/includes/thunderx.h index 03e3ce40c96..67fb0e5f809 100644 --- a/src/mame/includes/thunderx.h +++ b/src/mame/includes/thunderx.h @@ -10,11 +10,11 @@ #pragma once -#include "cpu/m6809/konami.h" +#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/bankdev.h" #include "sound/k007232.h" -#include "video/k052109.h" #include "video/k051960.h" +#include "video/k052109.h" #include "video/konami_helper.h" #include "emupal.h" @@ -47,7 +47,7 @@ private: }; /* devices */ - required_device m_maincpu; + required_device m_maincpu; required_device m_audiocpu; required_device m_bank5800; optional_device m_k007232; diff --git a/src/mame/includes/vendetta.h b/src/mame/includes/vendetta.h index 4faa1a0d91c..9da277a1ed8 100644 --- a/src/mame/includes/vendetta.h +++ b/src/mame/includes/vendetta.h @@ -10,12 +10,13 @@ #pragma once +#include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "machine/bankdev.h" #include "machine/k053252.h" -#include "video/k053246_k053247_k055673.h" -#include "video/k054000.h" #include "video/k052109.h" +#include "video/k053246_k053247_k055673.h" #include "video/k053251.h" +#include "video/k054000.h" #include "video/konami_helper.h" #include "emupal.h" @@ -54,7 +55,7 @@ private: int m_irq_enabled; // devices - required_device m_maincpu; + required_device m_maincpu; required_device m_audiocpu; required_device m_k052109; required_device m_k053246; diff --git a/src/mame/machine/namco50.cpp b/src/mame/machine/namco50.cpp index 795a9eeab56..c4b58143c32 100644 --- a/src/mame/machine/namco50.cpp +++ b/src/mame/machine/namco50.cpp @@ -252,13 +252,14 @@ void namco_50xx_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(namco_50xx_device::device_add_mconfig) - MCFG_DEVICE_ADD("mcu", MB8842, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */ - MCFG_MB88XX_READ_K_CB(READ8(*this, namco_50xx_device, K_r)) - MCFG_MB88XX_WRITE_O_CB(WRITE8(*this, namco_50xx_device, O_w)) - MCFG_MB88XX_READ_R0_CB(READ8(*this, namco_50xx_device, R0_r)) - MCFG_MB88XX_READ_R2_CB(READ8(*this, namco_50xx_device, R2_r)) -MACHINE_CONFIG_END +void namco_50xx_device::device_add_mconfig(machine_config &config) +{ + MB8842(config, m_cpu, DERIVED_CLOCK(1,1)); /* parent clock, internally divided by 6 */ + m_cpu->read_k().set(FUNC(namco_50xx_device::K_r)); + m_cpu->write_o().set(FUNC(namco_50xx_device::O_w)); + m_cpu->read_r<0>().set(FUNC(namco_50xx_device::R0_r)); + m_cpu->read_r<2>().set(FUNC(namco_50xx_device::R2_r)); +} //------------------------------------------------- // device_rom_region - return a pointer to the diff --git a/src/mame/machine/namco51.cpp b/src/mame/machine/namco51.cpp index c69cf47e0e6..34156df3c7a 100644 --- a/src/mame/machine/namco51.cpp +++ b/src/mame/machine/namco51.cpp @@ -390,14 +390,15 @@ void namco_51xx_device::device_reset() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(namco_51xx_device::device_add_mconfig) - MCFG_DEVICE_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */ -// MCFG_MB88XX_READ_K_CB(READ8(*this, namco_51xx_device, namco_51xx_K_r)) -// MCFG_MB88XX_WRITE_O_CB(WRITE8(*this, namco_51xx_device, namco_51xx_O_w)) -// MCFG_MB88XX_READ_R0_CB(READ8(*this, namco_51xx_device, namco_51xx_R0_r)) -// MCFG_MB88XX_READ_R2_CB(READ8(*this, namco_51xx_device, namco_51xx_R2_r)) - MCFG_DEVICE_DISABLE() -MACHINE_CONFIG_END +void namco_51xx_device::device_add_mconfig(machine_config &config) +{ + MB8843(config, m_cpu, DERIVED_CLOCK(1,1)); /* parent clock, internally divided by 6 */ +// m_cpu->read_k().set(FUNC(namco_51xx_device::namco_51xx_K_r)); +// m_cpu->write_o().set(FUNC(namco_51xx_device::namco_51xx_O_w)); +// m_cpu->read_r<0>().set(FUNC(namco_51xx_device::namco_51xx_R0_r)); +// m_cpu->read_r<2>().set(FUNC(namco_51xx_device::namco_51xx_R2_r)); + m_cpu->set_disable(); +} //------------------------------------------------- // device_rom_region - return a pointer to the diff --git a/src/mame/machine/namco53.cpp b/src/mame/machine/namco53.cpp index e6db0a241ab..dee127b14ba 100644 --- a/src/mame/machine/namco53.cpp +++ b/src/mame/machine/namco53.cpp @@ -170,16 +170,17 @@ void namco_53xx_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(namco_53xx_device::device_add_mconfig) - MCFG_DEVICE_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 */ - MCFG_MB88XX_READ_K_CB(READ8(*this, namco_53xx_device, K_r)) - MCFG_MB88XX_WRITE_O_CB(WRITE8(*this, namco_53xx_device, O_w)) - MCFG_MB88XX_WRITE_P_CB(WRITE8(*this, namco_53xx_device, P_w)) - MCFG_MB88XX_READ_R0_CB(READ8(*this, namco_53xx_device, R0_r)) - MCFG_MB88XX_READ_R1_CB(READ8(*this, namco_53xx_device, R1_r)) - MCFG_MB88XX_READ_R2_CB(READ8(*this, namco_53xx_device, R2_r)) - MCFG_MB88XX_READ_R3_CB(READ8(*this, namco_53xx_device, R3_r)) -MACHINE_CONFIG_END +void namco_53xx_device::device_add_mconfig(machine_config &config) +{ + MB8843(config, m_cpu, DERIVED_CLOCK(1,1)); /* parent clock, internally divided by 6 */ + m_cpu->read_k().set(FUNC(namco_53xx_device::K_r)); + m_cpu->write_o().set(FUNC(namco_53xx_device::O_w)); + m_cpu->write_p().set(FUNC(namco_53xx_device::P_w)); + m_cpu->read_r<0>().set(FUNC(namco_53xx_device::R0_r)); + m_cpu->read_r<1>().set(FUNC(namco_53xx_device::R1_r)); + m_cpu->read_r<2>().set(FUNC(namco_53xx_device::R2_r)); + m_cpu->read_r<3>().set(FUNC(namco_53xx_device::R3_r)); +} //------------------------------------------------- // device_rom_region - return a pointer to the diff --git a/src/mame/machine/namco62.cpp b/src/mame/machine/namco62.cpp index f64e4fedcce..13f3585c259 100644 --- a/src/mame/machine/namco62.cpp +++ b/src/mame/machine/namco62.cpp @@ -57,14 +57,15 @@ void namco_62xx_device::device_start() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(namco_62xx_device::device_add_mconfig) - MCFG_DEVICE_ADD("mcu", MB8843, DERIVED_CLOCK(1,1)) /* parent clock, internally divided by 6 (TODO: Correct?) */ -// MCFG_MB88XX_READ_K_CB(READ8(*this, namco_62xx_device, namco_62xx_K_r)) -// MCFG_MB88XX_WRITE_O_CB(WRITE8(*this, namco_62xx_device, namco_62xx_O_w)) -// MCFG_MB88XX_READ_R0_CB(READ8(*this, namco_62xx_device, namco_62xx_R0_r)) -// MCFG_MB88XX_READ_R2_CB(READ8(*this, namco_62xx_device, namco_62xx_R2_r)) - MCFG_DEVICE_DISABLE() -MACHINE_CONFIG_END +void namco_62xx_device::device_add_mconfig(machine_config &config) +{ + MB8843(config, m_cpu, DERIVED_CLOCK(1,1)); /* parent clock, internally divided by 6 (TODO: Correct?) */ +// m_cpu->read_k().set(FUNC(namco_62xx_device::namco_62xx_K_r)); +// m_cpu->write_o().set(FUNC(namco_62xx_device::namco_62xx_O_w)); +// m_cpu->read_r<0>().set(FUNC(namco_62xx_device::namco_62xx_R0_r)); +// m_cpu->read_r<2>().set(FUNC(namco_62xx_device::namco_62xx_R2_r)); + m_cpu->set_disable(); +} //------------------------------------------------- // device_rom_region - return a pointer to the -- cgit v1.2.3