diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 80d554c7129..c01766fe4f7 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -2832,6 +2832,10 @@ files { MAME_DIR .. "src/mame/machine/namco53.h", MAME_DIR .. "src/mame/machine/namco62.cpp", MAME_DIR .. "src/mame/machine/namco62.h", + MAME_DIR .. "src/mame/machine/namco65.cpp", + MAME_DIR .. "src/mame/machine/namco65.h", + MAME_DIR .. "src/mame/machine/namco68.cpp", + MAME_DIR .. "src/mame/machine/namco68.h", MAME_DIR .. "src/mame/machine/namcomcu.cpp", MAME_DIR .. "src/mame/machine/namcomcu.h", MAME_DIR .. "src/mame/machine/namcoio_gearbox.cpp", diff --git a/src/devices/bus/a2bus/a2bus.h b/src/devices/bus/a2bus/a2bus.h index 1e1d2b832ee..862aeca3803 100644 --- a/src/devices/bus/a2bus/a2bus.h +++ b/src/devices/bus/a2bus/a2bus.h @@ -104,6 +104,11 @@ public: template devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward(cb)); } template devcb_base &set_out_inh_callback(Object &&cb) { return m_out_inh_cb.set_callback(std::forward(cb)); } + // devcb3 + auto irq_w() { return m_out_irq_cb.bind(); } + auto nmi_w() { return m_out_nmi_cb.bind(); } + auto inh_w() { return m_out_inh_cb.bind(); } + void add_a2bus_card(int slot, device_a2bus_card_interface *card); device_a2bus_card_interface *get_a2bus_card(int slot); uint8_t get_a2bus_irq_mask(); diff --git a/src/devices/bus/abckb/abc77.cpp b/src/devices/bus/abckb/abc77.cpp index 09ad0628e2e..666491c2b32 100644 --- a/src/devices/bus/abckb/abc77.cpp +++ b/src/devices/bus/abckb/abc77.cpp @@ -140,8 +140,7 @@ MACHINE_CONFIG_START(abc77_device::device_add_mconfig) MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(*this, abc77_device, prog_w)) // watchdog - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(XTAL(4'608'000)/3/5/4096)) + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_hz(XTAL(4'608'000)/3/5/4096)); // discrete sound SPEAKER(config, "mono").front_center(); diff --git a/src/devices/bus/bbc/fdc/opus.cpp b/src/devices/bus/bbc/fdc/opus.cpp index 710b8ebfbb5..c336cd71a24 100644 --- a/src/devices/bus/bbc/fdc/opus.cpp +++ b/src/devices/bus/bbc/fdc/opus.cpp @@ -118,7 +118,7 @@ void bbc_opus2793_device::device_add_mconfig(machine_config &config) void bbc_opus1770_device::device_add_mconfig(machine_config &config) { - WD1770(config, m_fdc, 16_MHz_XTAL / 16); + WD1770(config, m_fdc, 16_MHz_XTAL / 2); m_fdc->drq_wr_callback().set(FUNC(bbc_opusfdc_device::fdc_drq_w)); FLOPPY_CONNECTOR(config, m_floppy0, bbc_floppies_525, "525qd", bbc_opusfdc_device::floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, m_floppy1, bbc_floppies_525, "525qd", bbc_opusfdc_device::floppy_formats).enable_sound(true); diff --git a/src/devices/bus/coco/coco_t4426.cpp b/src/devices/bus/coco/coco_t4426.cpp index fa34a31c31c..eaa6f651ef2 100644 --- a/src/devices/bus/coco/coco_t4426.cpp +++ b/src/devices/bus/coco/coco_t4426.cpp @@ -148,7 +148,8 @@ namespace IMPLEMENTATION ***************************************************************************/ -MACHINE_CONFIG_START(coco_t4426_device::device_add_mconfig) +void coco_t4426_device::device_add_mconfig(machine_config &config) +{ PIA6821(config, m_pia, 0); m_pia->writepa_handler().set(FUNC(coco_t4426_device::pia_A_w)); @@ -156,22 +157,22 @@ MACHINE_CONFIG_START(coco_t4426_device::device_add_mconfig) m_uart->txd_handler().set(SERIAL_TAG, FUNC(rs232_port_device::write_txd)); m_uart->rts_handler().set(SERIAL_TAG, FUNC(rs232_port_device::write_rts)); - MCFG_DEVICE_ADD(SERIAL_TAG, RS232_PORT, default_rs232_devices, nullptr) - MCFG_RS232_RXD_HANDLER(WRITELINE(UART_TAG, acia6850_device, write_rxd)) - MCFG_RS232_CTS_HANDLER(WRITELINE(UART_TAG, acia6850_device, write_cts)) + rs232_port_device &rs232(RS232_PORT(config, SERIAL_TAG, default_rs232_devices, nullptr)); + rs232.rxd_handler().set(UART_TAG, FUNC(acia6850_device::write_rxd)); + rs232.cts_handler().set(UART_TAG, FUNC(acia6850_device::write_cts)); /* Bit Rate Generator */ - MCFG_DEVICE_ADD(BRG_TAG, MC14411, 1.8432_MHz_XTAL) - MCFG_MC14411_F1_CB(WRITELINE(*this, coco_t4426_device, write_f1_clock)) - MCFG_MC14411_F3_CB(WRITELINE(*this, coco_t4426_device, write_f3_clock)) - MCFG_MC14411_F5_CB(WRITELINE(*this, coco_t4426_device, write_f5_clock)) - MCFG_MC14411_F7_CB(WRITELINE(*this, coco_t4426_device, write_f7_clock)) - MCFG_MC14411_F8_CB(WRITELINE(*this, coco_t4426_device, write_f8_clock)) - MCFG_MC14411_F9_CB(WRITELINE(*this, coco_t4426_device, write_f9_clock)) - MCFG_MC14411_F11_CB(WRITELINE(*this, coco_t4426_device, write_f11_clock)) - MCFG_MC14411_F13_CB(WRITELINE(*this, coco_t4426_device, write_f13_clock)) - MCFG_MC14411_F15_CB(WRITELINE(*this, coco_t4426_device, write_f15_clock)) -MACHINE_CONFIG_END + MC14411(config, m_brg, 1.8432_MHz_XTAL); + m_brg->out_f<1>().set(FUNC(coco_t4426_device::write_f1_clock)); + m_brg->out_f<3>().set(FUNC(coco_t4426_device::write_f3_clock)); + m_brg->out_f<5>().set(FUNC(coco_t4426_device::write_f5_clock)); + m_brg->out_f<7>().set(FUNC(coco_t4426_device::write_f7_clock)); + m_brg->out_f<8>().set(FUNC(coco_t4426_device::write_f8_clock)); + m_brg->out_f<9>().set(FUNC(coco_t4426_device::write_f9_clock)); + m_brg->out_f<11>().set(FUNC(coco_t4426_device::write_f11_clock)); + m_brg->out_f<13>().set(FUNC(coco_t4426_device::write_f13_clock)); + m_brg->out_f<15>().set(FUNC(coco_t4426_device::write_f15_clock)); +} ROM_START( coco_t4426 ) // Part of this region is filled by set_bank diff --git a/src/devices/machine/m6m80011ap.h b/src/devices/machine/m6m80011ap.h index 2f1d0e9102a..01ccfe2f31a 100644 --- a/src/devices/machine/m6m80011ap.h +++ b/src/devices/machine/m6m80011ap.h @@ -5,28 +5,12 @@ #pragma once - - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -/* TODO: frequency */ -#define MCFG_M6M80011AP_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, M6M80011AP, XTAL(32'768)) - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> m6m80011ap_device - class m6m80011ap_device : public device_t, public device_nvram_interface { public: // construction/destruction - m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); /* TODO: frequency */ // I/O operations DECLARE_READ_LINE_MEMBER( read_bit ); @@ -68,8 +52,6 @@ private: uint16_t m_eeprom_data[0x80]; }; - -// device type definition DECLARE_DEVICE_TYPE(M6M80011AP, m6m80011ap_device) #endif // MAME_MACHINE_M6M80011AP_H diff --git a/src/devices/machine/mb14241.h b/src/devices/machine/mb14241.h index 30ffce71424..378c3c75b7d 100644 --- a/src/devices/machine/mb14241.h +++ b/src/devices/machine/mb14241.h @@ -11,11 +11,10 @@ #pragma once - class mb14241_device : public device_t { public: - mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); DECLARE_WRITE8_MEMBER( shift_count_w ); DECLARE_WRITE8_MEMBER( shift_data_w ); @@ -35,12 +34,4 @@ private: DECLARE_DEVICE_TYPE(MB14241, mb14241_device) - -/*************************************************************************** - DEVICE CONFIGURATION MACROS -***************************************************************************/ - -#define MCFG_MB14241_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, MB14241, 0) - #endif // MAME_MACHINE_MB14241_H diff --git a/src/devices/machine/mb3773.h b/src/devices/machine/mb3773.h index 21dbb8fa548..e6f8bf4c955 100644 --- a/src/devices/machine/mb3773.h +++ b/src/devices/machine/mb3773.h @@ -13,22 +13,11 @@ #pragma once - -//************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_MB3773_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, MB3773, 0) - - -// ======================> mb3773_device - class mb3773_device : public device_t { public: // construction/destruction - mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ); + mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); // I/O operations WRITE_LINE_MEMBER( write_line_ck ); @@ -48,8 +37,6 @@ private: int m_ck; }; - -// device type definition DECLARE_DEVICE_TYPE(MB3773, mb3773_device) #endif // MAME_MACHINE_MB3773_H diff --git a/src/devices/machine/mb87078.h b/src/devices/machine/mb87078.h index 61ef9aac8ea..ba58bdfb089 100644 --- a/src/devices/machine/mb87078.h +++ b/src/devices/machine/mb87078.h @@ -12,24 +12,12 @@ #pragma once - -/*************************************************************************** - DEVICE CONFIGURATION MACROS -***************************************************************************/ - -#define MCFG_MB87078_GAIN_CHANGED_CB(_devcb) \ - downcast(*device).set_gain_changed_callback(DEVCB_##_devcb); - -/*************************************************************************** - TYPE DEFINITIONS -***************************************************************************/ - class mb87078_device : public device_t { public: - mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - template devcb_base &set_gain_changed_callback(Object &&cb) { return m_gain_changed_cb.set_callback(std::forward(cb)); } + auto gain_changed() { return m_gain_changed_cb.bind(); } void data_w(int data, int dsel); void reset_comp_w(int level); diff --git a/src/devices/machine/mb8795.h b/src/devices/machine/mb8795.h index a3b6e6244cc..6662cd96ebc 100644 --- a/src/devices/machine/mb8795.h +++ b/src/devices/machine/mb8795.h @@ -3,33 +3,16 @@ #ifndef MAME_MACHINE_MB8795_H #define MAME_MACHINE_MB8795_H -#define MCFG_MB8795_ADD(_tag, _tx_irq, _rx_irq, _tx_drq, _rx_drq) \ - MCFG_DEVICE_ADD(_tag, MB8795, 0) \ - downcast(device)->set_irq_cb(_tx_irq, _rx_irq); \ - downcast(device)->set_drq_cb(_tx_drq, _rx_drq); - -#define MCFG_MB8795_TX_IRQ_CALLBACK(_write) \ - downcast(*device).set_tx_irq_wr_callback(DEVCB_##_write); - -#define MCFG_MB8795_RX_IRQ_CALLBACK(_write) \ - downcast(*device).set_rx_irq_wr_callback(DEVCB_##_write); - -#define MCFG_MB8795_TX_DRQ_CALLBACK(_write) \ - downcast(*device).set_tx_drq_wr_callback(DEVCB_##_write); - -#define MCFG_MB8795_RX_DRQ_CALLBACK(_write) \ - downcast(*device).set_rx_drq_wr_callback(DEVCB_##_write); - class mb8795_device : public device_t, public device_network_interface { public: mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template devcb_base &set_tx_irq_wr_callback(Object &&cb) { return irq_tx_cb.set_callback(std::forward(cb)); } - template devcb_base &set_rx_irq_wr_callback(Object &&cb) { return irq_rx_cb.set_callback(std::forward(cb)); } - template devcb_base &set_tx_drq_wr_callback(Object &&cb) { return drq_tx_cb.set_callback(std::forward(cb)); } - template devcb_base &set_rx_drq_wr_callback(Object &&cb) { return drq_rx_cb.set_callback(std::forward(cb)); } + auto tx_irq() { return irq_tx_cb.bind(); } + auto rx_irq() { return irq_rx_cb.bind(); } + auto tx_drq() { return drq_tx_cb.bind(); } + auto rx_drq() { return drq_rx_cb.bind(); } void tx_dma_w(uint8_t data, bool eof); void rx_dma_r(uint8_t &data, bool &eof); diff --git a/src/devices/machine/mb89363b.h b/src/devices/machine/mb89363b.h index 755730d05aa..da8198288c0 100644 --- a/src/devices/machine/mb89363b.h +++ b/src/devices/machine/mb89363b.h @@ -12,78 +12,33 @@ #pragma once - #include "machine/i8255.h" DECLARE_DEVICE_TYPE(MB89363B, mb89363b_device) -#define MCFG_MB89363B_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, MB89363B, 0) - - - -#define MCFG_MB89363B_IN_PORTA_CB(_devcb) \ - downcast(*device).set_in_a_pa_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_IN_PORTB_CB(_devcb) \ - downcast(*device).set_in_a_pb_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_IN_PORTC_CB(_devcb) \ - downcast(*device).set_in_a_pc_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_OUT_PORTA_CB(_devcb) \ - downcast(*device).set_out_a_pa_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_OUT_PORTB_CB(_devcb) \ - downcast(*device).set_out_a_pb_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_OUT_PORTC_CB(_devcb) \ - downcast(*device).set_out_a_pc_callback(DEVCB_##_devcb); - - -#define MCFG_MB89363B_IN_PORTD_CB(_devcb) \ - downcast(*device).set_in_b_pa_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_IN_PORTE_CB(_devcb) \ - downcast(*device).set_in_b_pb_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_IN_PORTF_CB(_devcb) \ - downcast(*device).set_in_b_pc_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_OUT_PORTD_CB(_devcb) \ - downcast(*device).set_out_b_pa_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_OUT_PORTE_CB(_devcb) \ - downcast(*device).set_out_b_pb_callback(DEVCB_##_devcb); - -#define MCFG_MB89363B_OUT_PORTF_CB(_devcb) \ - downcast(*device).set_out_b_pc_callback(DEVCB_##_devcb); - - - class mb89363b_device : public device_t { public: // construction/destruction - mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); - template devcb_base &set_in_a_pa_callback(Object &&cb) { return m_in_a_pa_cb.set_callback(std::forward(cb)); } - template devcb_base &set_in_a_pb_callback(Object &&cb) { return m_in_a_pb_cb.set_callback(std::forward(cb)); } - template devcb_base &set_in_a_pc_callback(Object &&cb) { return m_in_a_pc_cb.set_callback(std::forward(cb)); } - template devcb_base &set_out_a_pa_callback(Object &&cb) { return m_out_a_pa_cb.set_callback(std::forward(cb)); } - template devcb_base &set_out_a_pb_callback(Object &&cb) { return m_out_a_pb_cb.set_callback(std::forward(cb)); } - template devcb_base &set_out_a_pc_callback(Object &&cb) { return m_out_a_pc_cb.set_callback(std::forward(cb)); } + auto in_pa() { return m_in_a_pa_cb.bind(); } + auto in_pb() { return m_in_a_pb_cb.bind(); } + auto in_pc() { return m_in_a_pc_cb.bind(); } + auto out_pa() { return m_out_a_pa_cb.bind(); } + auto out_pb() { return m_out_a_pb_cb.bind(); } + auto out_pc() { return m_out_a_pc_cb.bind(); } - template devcb_base &set_in_b_pa_callback(Object &&cb) { return m_in_b_pa_cb.set_callback(std::forward(cb)); } - template devcb_base &set_in_b_pb_callback(Object &&cb) { return m_in_b_pb_cb.set_callback(std::forward(cb)); } - template devcb_base &set_in_b_pc_callback(Object &&cb) { return m_in_b_pc_cb.set_callback(std::forward(cb)); } - template devcb_base &set_out_b_pa_callback(Object &&cb) { return m_out_b_pa_cb.set_callback(std::forward(cb)); } - template devcb_base &set_out_b_pb_callback(Object &&cb) { return m_out_b_pb_cb.set_callback(std::forward(cb)); } - template devcb_base &set_out_b_pc_callback(Object &&cb) { return m_out_b_pc_cb.set_callback(std::forward(cb)); } + auto in_pd() { return m_in_b_pa_cb.bind(); } + auto in_pe() { return m_in_b_pb_cb.bind(); } + auto in_pf() { return m_in_b_pc_cb.bind(); } + auto out_pd() { return m_out_b_pa_cb.bind(); } + auto out_pe() { return m_out_b_pb_cb.bind(); } + auto out_pf() { return m_out_b_pc_cb.bind(); } protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/machine/mc14411.h b/src/devices/machine/mc14411.h index ef5196ef363..6012e679d03 100644 --- a/src/devices/machine/mc14411.h +++ b/src/devices/machine/mc14411.h @@ -26,31 +26,6 @@ #pragma once - -//************************************************************************** -// DEVICE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_MC14411_F1_CB(_devcb) downcast(*device).set_out_fx_cb( 0, DEVCB_##_devcb); -#define MCFG_MC14411_F2_CB(_devcb) downcast(*device).set_out_fx_cb( 1, DEVCB_##_devcb); -#define MCFG_MC14411_F3_CB(_devcb) downcast(*device).set_out_fx_cb( 2, DEVCB_##_devcb); -#define MCFG_MC14411_F4_CB(_devcb) downcast(*device).set_out_fx_cb( 3, DEVCB_##_devcb); -#define MCFG_MC14411_F5_CB(_devcb) downcast(*device).set_out_fx_cb( 4, DEVCB_##_devcb); -#define MCFG_MC14411_F6_CB(_devcb) downcast(*device).set_out_fx_cb( 5, DEVCB_##_devcb); -#define MCFG_MC14411_F7_CB(_devcb) downcast(*device).set_out_fx_cb( 6, DEVCB_##_devcb); -#define MCFG_MC14411_F8_CB(_devcb) downcast(*device).set_out_fx_cb( 7, DEVCB_##_devcb); -#define MCFG_MC14411_F9_CB(_devcb) downcast(*device).set_out_fx_cb( 8, DEVCB_##_devcb); -#define MCFG_MC14411_F10_CB(_devcb) downcast(*device).set_out_fx_cb( 9, DEVCB_##_devcb); -#define MCFG_MC14411_F11_CB(_devcb) downcast(*device).set_out_fx_cb(10, DEVCB_##_devcb); -#define MCFG_MC14411_F12_CB(_devcb) downcast(*device).set_out_fx_cb(11, DEVCB_##_devcb); -#define MCFG_MC14411_F13_CB(_devcb) downcast(*device).set_out_fx_cb(12, DEVCB_##_devcb); -#define MCFG_MC14411_F14_CB(_devcb) downcast(*device).set_out_fx_cb(13, DEVCB_##_devcb); -#define MCFG_MC14411_F15_CB(_devcb) downcast(*device).set_out_fx_cb(14, DEVCB_##_devcb); -#define MCFG_MC14411_F16_CB(_devcb) downcast(*device).set_out_fx_cb(15, DEVCB_##_devcb); - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** class mc14411_device : public device_t { public: @@ -86,23 +61,7 @@ public: // construction/destruction mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template devcb_base &set_out_fx_cb(int index, Object &&cb) { return m_out_fx_cbs[index].set_callback(std::forward(cb)); } - auto out_f1_cb() { return m_out_fx_cbs[0].bind(); } - auto out_f2_cb() { return m_out_fx_cbs[1].bind(); } - auto out_f3_cb() { return m_out_fx_cbs[2].bind(); } - auto out_f4_cb() { return m_out_fx_cbs[3].bind(); } - auto out_f5_cb() { return m_out_fx_cbs[4].bind(); } - auto out_f6_cb() { return m_out_fx_cbs[5].bind(); } - auto out_f7_cb() { return m_out_fx_cbs[6].bind(); } - auto out_f8_cb() { return m_out_fx_cbs[7].bind(); } - auto out_f9_cb() { return m_out_fx_cbs[8].bind(); } - auto out_f10_cb() { return m_out_fx_cbs[9].bind(); } - auto out_f11_cb() { return m_out_fx_cbs[10].bind(); } - auto out_f12_cb() { return m_out_fx_cbs[11].bind(); } - auto out_f13_cb() { return m_out_fx_cbs[12].bind(); } - auto out_f14_cb() { return m_out_fx_cbs[13].bind(); } - auto out_f15_cb() { return m_out_fx_cbs[14].bind(); } - auto out_f16_cb() { return m_out_fx_cbs[15].bind(); } + template auto out_f() { return m_out_fx_cbs[Line-1].bind(); } DECLARE_WRITE_LINE_MEMBER(reset_w); DECLARE_WRITE8_MEMBER(rate_select_w); @@ -141,7 +100,6 @@ private: bool m_timer_enabled[16]; }; -// device type definition DECLARE_DEVICE_TYPE(MC14411, mc14411_device) #endif // MAME_MACHINE_MC14411_H diff --git a/src/devices/machine/watchdog.h b/src/devices/machine/watchdog.h index d7cb3d25db7..d1107835d1d 100644 --- a/src/devices/machine/watchdog.h +++ b/src/devices/machine/watchdog.h @@ -7,20 +7,6 @@ #pragma once -//************************************************************************** -// DEVICE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_WATCHDOG_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, WATCHDOG_TIMER, 0) -#define MCFG_WATCHDOG_MODIFY(_tag) \ - MCFG_DEVICE_MODIFY(_tag) -#define MCFG_WATCHDOG_VBLANK_INIT(_screen, _count) \ - downcast(*device).set_vblank_count(_screen, _count); -#define MCFG_WATCHDOG_TIME_INIT(_time) \ - downcast(*device).set_time(_time); - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/mame/audio/taito_en.cpp b/src/mame/audio/taito_en.cpp index a9c77698cc4..a12c3bef195 100644 --- a/src/mame/audio/taito_en.cpp +++ b/src/mame/audio/taito_en.cpp @@ -210,8 +210,8 @@ MACHINE_CONFIG_START(taito_en_device::device_add_mconfig) MCFG_MC68681_IRQ_CALLBACK(WRITELINE(*this, taito_en_device, duart_irq_handler)) MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(*this, taito_en_device, duart_output)) - MCFG_DEVICE_ADD("mb87078", MB87078, 0) - MCFG_MB87078_GAIN_CHANGED_CB(WRITE8(*this, taito_en_device, mb87078_gain_changed)) + MB87078(config, m_mb87078); + m_mb87078->gain_changed().set(FUNC(taito_en_device::mb87078_gain_changed)); MCFG_DEVICE_ADD("dpram", MB8421, 0) // host accesses this from the other side diff --git a/src/mame/drivers/1943.cpp b/src/mame/drivers/1943.cpp index eab57f8b6c5..cd9da57c2c0 100644 --- a/src/mame/drivers/1943.cpp +++ b/src/mame/drivers/1943.cpp @@ -322,7 +322,7 @@ MACHINE_CONFIG_START(_1943_state::_1943) MCFG_DEVICE_PROGRAM_MAP(sound_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(_1943_state, irq0_line_hold, 4*60) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // video hardware MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/20pacgal.cpp b/src/mame/drivers/20pacgal.cpp index c4768b8b300..ef5f729c28c 100644 --- a/src/mame/drivers/20pacgal.cpp +++ b/src/mame/drivers/20pacgal.cpp @@ -406,7 +406,7 @@ MACHINE_CONFIG_START(_20pacgal_state::_20pacgal) EEPROM_93C46_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ _20pacgal_video(config); diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp index 1327878733c..03b75eda25c 100644 --- a/src/mame/drivers/8080bw.cpp +++ b/src/mame/drivers/8080bw.cpp @@ -416,11 +416,10 @@ MACHINE_CONFIG_START(_8080bw_state::invadpt2) /* 60 Hz signal clocks two LS161. Ripple carry will */ /* reset circuit, if LS161 not cleared before. */ - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 255) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 255); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -503,7 +502,7 @@ MACHINE_CONFIG_START(_8080bw_state::spcewars) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* sound hardware */ invaders_samples_audio(config); @@ -543,8 +542,7 @@ MACHINE_CONFIG_START(_8080bw_state::spcewarla) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(spcewarla_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 255) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 255); MCFG_PALETTE_ADD_3BIT_RBG("palette") MCFG_SCREEN_MODIFY("screen") @@ -667,7 +665,7 @@ MACHINE_CONFIG_START(_8080bw_state::cosmo) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(cosmo_map) MCFG_DEVICE_IO_MAP(cosmo_io_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) /* video hardware */ @@ -941,13 +939,13 @@ MACHINE_CONFIG_START(_8080bw_state::invrvnge) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(invrvnge_io_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MCFG_DEVICE_ADD("audiocpu", M6808, XTAL(4'000'000)/2) // MC6808P MCFG_DEVICE_PROGRAM_MAP(invrvnge_sound_map) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) @@ -1125,7 +1123,7 @@ MACHINE_CONFIG_START(_8080bw_state::lrescue) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -1157,7 +1155,7 @@ MACHINE_CONFIG_START(_8080bw_state::escmars) MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state, mw8080bw) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1255,11 +1253,10 @@ MACHINE_CONFIG_START(_8080bw_state::cosmicmo) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 255) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 255); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* sound hardware */ invaders_audio(config); @@ -1407,7 +1404,7 @@ MACHINE_CONFIG_START(_8080bw_state::rollingc) MCFG_DEVICE_IO_MAP(rollingc_io_map) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -1549,15 +1546,14 @@ MACHINE_CONFIG_START(_8080bw_state::schaser) MCFG_DEVICE_PROGRAM_MAP(schaser_map) MCFG_DEVICE_IO_MAP(schaser_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 255) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 255); MCFG_MACHINE_START_OVERRIDE(_8080bw_state,schaser) MCFG_MACHINE_RESET_OVERRIDE(_8080bw_state,schaser) MCFG_TIMER_DRIVER_ADD("schaser_sh_555", _8080bw_state, schaser_effect_555_cb) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -1687,7 +1683,7 @@ MACHINE_CONFIG_START(_8080bw_state::schasercv) MCFG_MACHINE_START_OVERRIDE(_8080bw_state, schasercv) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -1786,7 +1782,7 @@ MACHINE_CONFIG_START(_8080bw_state::sflush) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,sflush) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -1887,11 +1883,11 @@ MACHINE_CONFIG_START(_8080bw_state::lupin3) /* basic machine hardware */ MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(lupin3_io_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2056,13 +2052,12 @@ MACHINE_CONFIG_START(_8080bw_state::polaris) MCFG_DEVICE_IO_MAP(polaris_io_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", _8080bw_state, polaris_interrupt) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 255) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 255); MCFG_MACHINE_START_OVERRIDE(_8080bw_state,polaris) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2189,7 +2184,7 @@ MACHINE_CONFIG_START(_8080bw_state::ballbomb) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2434,11 +2429,11 @@ MACHINE_CONFIG_START(_8080bw_state::indianbt) /* basic machine hardware */ MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(indianbt_io_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2460,11 +2455,11 @@ MACHINE_CONFIG_START(_8080bw_state::indianbtbr) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(schaser_map) MCFG_DEVICE_IO_MAP(indianbtbr_io_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2539,7 +2534,7 @@ MACHINE_CONFIG_START(_8080bw_state::steelwkr) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2959,8 +2954,7 @@ MACHINE_CONFIG_START(_8080bw_state::vortex) MCFG_DEVICE_IO_MAP(vortex_io_map) MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL))) + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL))); /* video hardware */ // TODO: replace with modified invaders color renderer code allowing midscanline color writes @@ -2968,7 +2962,7 @@ MACHINE_CONFIG_START(_8080bw_state::vortex) MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invaders) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ invaders_audio(config); @@ -3385,7 +3379,7 @@ MACHINE_CONFIG_START(_8080bw_state::attackfc) MCFG_DEVICE_IO_MAP(attackfc_io_map) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* sound hardware */ // TODO: custom discrete diff --git a/src/mame/drivers/88games.cpp b/src/mame/drivers/88games.cpp index c5e3139aa7f..49ca9d2580a 100644 --- a/src/mame/drivers/88games.cpp +++ b/src/mame/drivers/88games.cpp @@ -314,7 +314,7 @@ MACHINE_CONFIG_START(_88games_state::_88games) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/a7800.cpp b/src/mame/drivers/a7800.cpp index 16673069c22..1fcf3609db3 100644 --- a/src/mame/drivers/a7800.cpp +++ b/src/mame/drivers/a7800.cpp @@ -553,7 +553,7 @@ upon display type. rgb_t(0xA1,0x8F,0x1A), rgb_t(0xB2,0xA0,0x2B), rgb_t(0xC3,0xB1,0x3C), rgb_t(0xD4,0xC2,0x4D), \ rgb_t(0xE5,0xD3,0x5E), rgb_t(0xF6,0xE4,0x6F), rgb_t(0xFF,0xF5,0x82), rgb_t(0xFF,0xFF,0x96 ) -static const rgb_t a7800_palette[256*3] = +static const rgb_t a7800_palette[256] = { NTSC_GREY, NTSC_GOLD, @@ -573,7 +573,7 @@ static const rgb_t a7800_palette[256*3] = NTSC_LIGHT_ORANGE }; -static const rgb_t a7800p_palette[256*3] = +static const rgb_t a7800p_palette[256] = { NTSC_GREY, NTSC_ORANGE_GREEN, @@ -1387,7 +1387,7 @@ MACHINE_CONFIG_START(a7800_state::a7800_ntsc) MCFG_SCREEN_UPDATE_DEVICE("maria", atari_maria_device, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(a7800_palette) / 3) + MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(a7800_palette)) MCFG_PALETTE_INIT_OWNER(a7800_state, a7800) MCFG_DEVICE_ADD("maria", ATARI_MARIA, 0) diff --git a/src/mame/drivers/acefruit.cpp b/src/mame/drivers/acefruit.cpp index 0ccd187950a..d412c7c76a2 100644 --- a/src/mame/drivers/acefruit.cpp +++ b/src/mame/drivers/acefruit.cpp @@ -633,7 +633,7 @@ MACHINE_CONFIG_START(acefruit_state::acefruit) MCFG_DEVICE_IO_MAP(acefruit_io) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", acefruit_state, acefruit_vblank) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_acefruit) diff --git a/src/mame/drivers/airbustr.cpp b/src/mame/drivers/airbustr.cpp index ed5851891fc..232eed66775 100644 --- a/src/mame/drivers/airbustr.cpp +++ b/src/mame/drivers/airbustr.cpp @@ -583,8 +583,7 @@ MACHINE_CONFIG_START(airbustr_state::airbustr) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // Palette RAM is filled by sub cpu with data supplied by main cpu // Maybe a high value is safer in order to avoid glitches - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -624,11 +623,11 @@ MACHINE_CONFIG_START(airbustr_state::airbustr) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) MACHINE_CONFIG_END -MACHINE_CONFIG_START(airbustr_state::airbustrb) +void airbustr_state::airbustrb(machine_config &config) +{ airbustr(config); - MCFG_WATCHDOG_MODIFY("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(0)) // no protection device or watchdog -MACHINE_CONFIG_END + m_watchdog->set_time(attotime::from_seconds(0)); // no protection device or watchdog +} /* ROMs */ diff --git a/src/mame/drivers/ajax.cpp b/src/mame/drivers/ajax.cpp index 2933d1c2b84..ba700056cf7 100644 --- a/src/mame/drivers/ajax.cpp +++ b/src/mame/drivers/ajax.cpp @@ -184,7 +184,7 @@ MACHINE_CONFIG_START(ajax_state::ajax) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/albazg.cpp b/src/mame/drivers/albazg.cpp index 09f007269b4..c3aed14f95a 100644 --- a/src/mame/drivers/albazg.cpp +++ b/src/mame/drivers/albazg.cpp @@ -369,8 +369,7 @@ MACHINE_CONFIG_START(albazg_state::yumefuda) EEPROM_93C46_16BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) // timing is unknown + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); // timing is unknown i8255_device &ppi(I8255A(config, "ppi8255_0")); ppi.out_pa_callback().set(FUNC(albazg_state::mux_w)); diff --git a/src/mame/drivers/aliens.cpp b/src/mame/drivers/aliens.cpp index 2e29899ad9b..881c032b002 100644 --- a/src/mame/drivers/aliens.cpp +++ b/src/mame/drivers/aliens.cpp @@ -207,7 +207,7 @@ MACHINE_CONFIG_START(aliens_state::aliens) ADDRESS_MAP_BANK(config, "bank0000").set_map(&aliens_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 11, 0x400); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/ambush.cpp b/src/mame/drivers/ambush.cpp index 1ef64c55042..19fb50f3056 100644 --- a/src/mame/drivers/ambush.cpp +++ b/src/mame/drivers/ambush.cpp @@ -730,7 +730,7 @@ MACHINE_CONFIG_START(ambush_state::ambush_base) MCFG_DEVICE_IO_MAP(main_portmap) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", ambush_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_MACHINE_START_OVERRIDE(ambush_state, ambush) diff --git a/src/mame/drivers/ampoker2.cpp b/src/mame/drivers/ampoker2.cpp index 93de5af13e7..54310efb5f9 100644 --- a/src/mame/drivers/ampoker2.cpp +++ b/src/mame/drivers/ampoker2.cpp @@ -1154,8 +1154,7 @@ MACHINE_CONFIG_START(ampoker2_state::ampoker2) MCFG_DEVICE_IO_MAP(ampoker2_io_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(ampoker2_state, nmi_line_pulse, 1536) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(200)) /* 200 ms, measured */ + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(200)); /* 200 ms, measured */ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp index 3531205d7b2..55bcc079600 100644 --- a/src/mame/drivers/apple2.cpp +++ b/src/mame/drivers/apple2.cpp @@ -108,6 +108,7 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, A2_CPU_TAG), m_screen(*this, "screen"), + m_scantimer(*this, "scantimer"), m_ram(*this, RAM_TAG), m_ay3600(*this, A2_KBDC_TAG), m_video(*this, A2_VIDEO_TAG), @@ -129,6 +130,7 @@ public: required_device m_maincpu; required_device m_screen; + required_device m_scantimer; required_device m_ram; required_device m_ay3600; required_device m_video; @@ -1375,25 +1377,25 @@ static void apple2_cards(device_slot_interface &device) MACHINE_CONFIG_START(apple2_state::apple2_common) /* basic machine hardware */ - MCFG_DEVICE_ADD(A2_CPU_TAG, M6502, 1021800) /* close to actual CPU frequency of 1.020484 MHz */ - MCFG_DEVICE_PROGRAM_MAP(apple2_map) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", apple2_state, apple2_interrupt, "screen", 0, 1) - MCFG_QUANTUM_TIME(attotime::from_hz(60)) + M6502(config, m_maincpu, 1021800); + m_maincpu->set_addrmap(AS_PROGRAM, &apple2_state::apple2_map); + TIMER(config, m_scantimer, 0); + m_scantimer->configure_scanline(FUNC(apple2_state::apple2_interrupt), "screen", 0, 1); + config.m_minimum_quantum = attotime::from_hz(60); - MCFG_DEVICE_ADD(A2_VIDEO_TAG, APPLE2_VIDEO, XTAL(14'318'181)) + APPLE2_VIDEO(config, m_video, XTAL(14'318'181)); - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192) - MCFG_SCREEN_UPDATE_DRIVER(apple2_state, screen_update) - MCFG_SCREEN_PALETTE("palette") + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_raw(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192); + m_screen->set_screen_update(FUNC(apple2_state::screen_update)); + m_screen->set_palette("palette"); - MCFG_PALETTE_ADD("palette", 16) - MCFG_PALETTE_INIT_OWNER(apple2_state, apple2) + palette_device &palette(PALETTE(config, "palette", 16)); + palette.set_init(DEVICE_SELF, FUNC(apple2_state::palette_init_apple2)); /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD(A2_SPEAKER_TAG, SPEAKER_SOUND) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) + SPEAKER_SOUND(config, A2_SPEAKER_TAG).add_route(ALL_OUTPUTS, "mono", 1.00); /* /INH banking */ ADDRESS_MAP_BANK(config, A2_UPPERBANK_TAG).set_map(&apple2_state::inhbank_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x3000); @@ -1430,11 +1432,11 @@ MACHINE_CONFIG_START(apple2_state::apple2_common) timer.configure_periodic(timer_device::expired_delegate(FUNC(apple2_state::ay3600_repeat), this), attotime::from_hz(15)); /* slot devices */ - MCFG_DEVICE_ADD(m_a2bus, A2BUS, 0) - MCFG_A2BUS_CPU(A2_CPU_TAG) - MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(*this, apple2_state, a2bus_irq_w)) - MCFG_A2BUS_OUT_NMI_CB(WRITELINE(*this, apple2_state, a2bus_nmi_w)) - MCFG_A2BUS_OUT_INH_CB(WRITELINE(*this, apple2_state, a2bus_inh_w)) + A2BUS(config, m_a2bus, 0); + m_a2bus->set_cputag("maincpu"); + m_a2bus->irq_w().set(FUNC(apple2_state::a2bus_irq_w)); + m_a2bus->nmi_w().set(FUNC(apple2_state::a2bus_nmi_w)); + m_a2bus->inh_w().set(FUNC(apple2_state::a2bus_inh_w)); A2BUS_SLOT(config, "sl0", m_a2bus, apple2_slot0_cards, "lang"); A2BUS_SLOT(config, "sl1", m_a2bus, apple2_cards, nullptr); A2BUS_SLOT(config, "sl2", m_a2bus, apple2_cards, nullptr); diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp index 7ef36277f9d..a916db2b3ec 100644 --- a/src/mame/drivers/apple2e.cpp +++ b/src/mame/drivers/apple2e.cpp @@ -4048,11 +4048,11 @@ MACHINE_CONFIG_START(apple2e_state::apple2e) timer.configure_periodic(timer_device::expired_delegate(FUNC(apple2e_state::ay3600_repeat), this), attotime::from_hz(15)); /* slot devices */ - MCFG_DEVICE_ADD(m_a2bus, A2BUS, 0) - MCFG_A2BUS_CPU("maincpu") - MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(*this, apple2e_state, a2bus_irq_w)) - MCFG_A2BUS_OUT_NMI_CB(WRITELINE(*this, apple2e_state, a2bus_nmi_w)) - MCFG_A2BUS_OUT_INH_CB(WRITELINE(*this, apple2e_state, a2bus_inh_w)) + A2BUS(config, m_a2bus, 0); + m_a2bus->set_cputag("maincpu"); + m_a2bus->irq_w().set(FUNC(apple2e_state::a2bus_irq_w)); + m_a2bus->nmi_w().set(FUNC(apple2e_state::a2bus_nmi_w)); + m_a2bus->inh_w().set(FUNC(apple2e_state::a2bus_inh_w)); A2BUS_SLOT(config, "sl1", m_a2bus, apple2_cards, nullptr); A2BUS_SLOT(config, "sl2", m_a2bus, apple2_cards, nullptr); A2BUS_SLOT(config, "sl3", m_a2bus, apple2_cards, nullptr); @@ -4150,7 +4150,7 @@ MACHINE_CONFIG_START(apple2e_state::apple2c) A2BUS_MOCKINGBOARD(config, "sl4", A2BUS_7M_CLOCK).set_onboard(m_a2bus); // Mockingboard 4C A2BUS_DISKIING(config, "sl6", A2BUS_7M_CLOCK).set_onboard(m_a2bus); - MCFG_A2EAUXSLOT_SLOT_REMOVE("aux") + config.device_remove("aux"); config.device_remove(A2_AUXSLOT_TAG); m_ram->set_default_size("128K").set_extra_options("128K"); @@ -4357,7 +4357,7 @@ MACHINE_CONFIG_START(apple2e_state::ceci) A2BUS_DISKIING(config, "sl6", A2BUS_7M_CLOCK).set_onboard(m_a2bus); // there is no aux slot, the "aux" side of the //e is used for additional ROM - MCFG_A2EAUXSLOT_SLOT_REMOVE("aux") + config.device_remove("aux"); config.device_remove(A2_AUXSLOT_TAG); m_ram->set_default_size("64K"); diff --git a/src/mame/drivers/apple2gs.cpp b/src/mame/drivers/apple2gs.cpp index 39dd0e8f967..237e5b74ebc 100644 --- a/src/mame/drivers/apple2gs.cpp +++ b/src/mame/drivers/apple2gs.cpp @@ -149,6 +149,7 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, A2GS_CPU_TAG), m_screen(*this, "screen"), + m_scantimer(*this, "scantimer"), m_adbmicro(*this, A2GS_ADBMCU_TAG), m_ram(*this, RAM_TAG), m_rom(*this, "maincpu"), @@ -205,6 +206,7 @@ public: required_device m_maincpu; required_device m_screen; + required_device m_scantimer; required_device m_adbmicro; required_device m_ram; required_region_ptr m_rom; @@ -4532,11 +4534,12 @@ static void apple2_cards(device_slot_interface &device) MACHINE_CONFIG_START( apple2gs_state::apple2gs ) /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", G65816, A2GS_MASTER_CLOCK/10) - MCFG_DEVICE_PROGRAM_MAP(apple2gs_map) - MCFG_DEVICE_ADDRESS_MAP(g65816_device::AS_VECTORS, vectors_map) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", apple2gs_state, apple2_interrupt, "screen", 0, 1) - MCFG_QUANTUM_TIME(attotime::from_hz(60)) + G65816(config, m_maincpu, A2GS_MASTER_CLOCK/10); + m_maincpu->set_addrmap(AS_PROGRAM, &apple2gs_state::apple2gs_map); + m_maincpu->set_addrmap(g65816_device::AS_VECTORS, &apple2gs_state::vectors_map); + TIMER(config, m_scantimer, 0); + m_scantimer->configure_scanline(FUNC(apple2gs_state::apple2_interrupt), "screen", 0, 1); + config.m_minimum_quantum = attotime::from_hz(60); MCFG_DEVICE_ADD(A2GS_ADBMCU_TAG, M50741, A2GS_MASTER_CLOCK/8) MCFG_M5074X_PORT0_READ_CALLBACK(READ8(*this, apple2gs_state, adbmicro_p0_in)) @@ -4571,7 +4574,7 @@ MACHINE_CONFIG_START( apple2gs_state::apple2gs ) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_DEVICE_ADD(A2GS_VIDEO_TAG, APPLE2_VIDEO, A2GS_14M) + APPLE2_VIDEO(config, m_video, A2GS_14M); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) @@ -4579,13 +4582,12 @@ MACHINE_CONFIG_START( apple2gs_state::apple2gs ) MCFG_SCREEN_VISIBLE_AREA(0,703,0,230) MCFG_SCREEN_UPDATE_DRIVER(apple2gs_state, screen_update) - MCFG_PALETTE_ADD("palette", 256) - MCFG_PALETTE_INIT_OWNER(apple2gs_state, apple2gs) + palette_device &palette(PALETTE(config, "palette", 256)); + palette.set_init(DEVICE_SELF, FUNC(apple2gs_state::palette_init_apple2gs)); /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD(A2GS_SPEAKER_TAG, SPEAKER_SOUND, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) + SPEAKER_SOUND(config, A2GS_SPEAKER_TAG).add_route(ALL_OUTPUTS, "mono", 1.00); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -4681,11 +4683,11 @@ MACHINE_CONFIG_START( apple2gs_state::apple2gs ) MCFG_RS232_CTS_HANDLER(WRITELINE(m_scc, z80scc_device, ctsb_w)) /* slot devices */ - MCFG_DEVICE_ADD("a2bus", A2BUS, 0) - MCFG_A2BUS_CPU("maincpu") - MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(*this, apple2gs_state, a2bus_irq_w)) - MCFG_A2BUS_OUT_NMI_CB(WRITELINE(*this, apple2gs_state, a2bus_nmi_w)) - MCFG_A2BUS_OUT_INH_CB(WRITELINE(*this, apple2gs_state, a2bus_inh_w)) + A2BUS(config, m_a2bus, 0); + m_a2bus->set_cputag("maincpu"); + m_a2bus->irq_w().set(FUNC(apple2gs_state::a2bus_irq_w)); + m_a2bus->nmi_w().set(FUNC(apple2gs_state::a2bus_nmi_w)); + m_a2bus->inh_w().set(FUNC(apple2gs_state::a2bus_inh_w)); A2BUS_SLOT(config, "sl1", m_a2bus, apple2_cards, nullptr); A2BUS_SLOT(config, "sl2", m_a2bus, apple2_cards, nullptr); A2BUS_SLOT(config, "sl3", m_a2bus, apple2_cards, nullptr); diff --git a/src/mame/drivers/arcadecl.cpp b/src/mame/drivers/arcadecl.cpp index 6a444c6711b..9602ded6763 100644 --- a/src/mame/drivers/arcadecl.cpp +++ b/src/mame/drivers/arcadecl.cpp @@ -327,7 +327,7 @@ MACHINE_CONFIG_START(sparkz_state::sparkz) EEPROM_2804(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_arcadecl) diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp index c0f2bd4695c..213dbc4e19f 100644 --- a/src/mame/drivers/aristmk5.cpp +++ b/src/mame/drivers/aristmk5.cpp @@ -2039,8 +2039,7 @@ MACHINE_CONFIG_START(aristmk5_state::aristmk5) MCFG_DEVICE_ADD("maincpu", ARM, MASTER_CLOCK/6) // 12000000 MCFG_DEVICE_PROGRAM_MAP(aristmk5_drame_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2)) /* 1.6 - 2 seconds */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(2)); /* 1.6 - 2 seconds */ /* TODO: this isn't supposed to access a keyboard ... */ MCFG_DEVICE_ADD("kart", AAKART, 12000000/128) // TODO: frequency diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp index 7976ae71e27..873aa65aa15 100644 --- a/src/mame/drivers/arkanoid.cpp +++ b/src/mame/drivers/arkanoid.cpp @@ -1351,8 +1351,7 @@ MACHINE_CONFIG_START(arkanoid_state::arkanoid) MCFG_DEVICE_PROGRAM_MAP(arkanoid_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", arkanoid_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 128); // 74LS393 at ic21, counts 128 vblanks before firing watchdog; z80 /RESET ls08 ic19 pin 9 input comes from ls04 ic20 pin 8, ls04 ic20 pin 9 input comes from ic21 ls393 pin 8, and ls393 is set to chain both 4 bit counters together + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // 74LS393 at ic21, counts 128 vblanks before firing watchdog; z80 /RESET ls08 ic19 pin 9 input comes from ls04 ic20 pin 8, ls04 ic20 pin 9 input comes from ic21 ls393 pin 8, and ls393 is set to chain both 4 bit counters together ARKANOID_68705P5(config, m_mcuintf, 12_MHz_XTAL / 4); // verified on PCB m_mcuintf->portb_r_cb().set_ioport("MUX"); @@ -1429,7 +1428,7 @@ MACHINE_CONFIG_START(arkanoid_state::hexa) MCFG_DEVICE_PROGRAM_MAP(hexa_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", arkanoid_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp index ab4a93993f8..73d435ec944 100644 --- a/src/mame/drivers/asteroid.cpp +++ b/src/mame/drivers/asteroid.cpp @@ -738,7 +738,7 @@ MACHINE_CONFIG_START(asteroid_state::asteroid_base) MCFG_DEVICE_PROGRAM_MAP(asteroid_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(asteroid_state, asteroid_interrupt, CLOCK_3KHZ/12) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); TTL153(config, m_dsw_sel); diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp index ecae79593b5..798d67e35b1 100644 --- a/src/mame/drivers/astrocde.cpp +++ b/src/mame/drivers/astrocde.cpp @@ -1240,8 +1240,7 @@ MACHINE_CONFIG_START(astrocde_state::astrocade_stereo_sound) MCFG_DEVICE_ADD("astrocade2", ASTROCADE_IO, ASTROCADE_CLOCK/4) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) - MCFG_WATCHDOG_ADD("watchdog") // MC14024B on CPU board at U18 - MCFG_WATCHDOG_VBLANK_INIT("screen", 128) // CLK = VERTDR, Q7 used for RESET + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // MC14024B on CPU board at U18, CLK = VERTDR, Q7 used for RESET MACHINE_CONFIG_END @@ -1310,8 +1309,7 @@ MACHINE_CONFIG_START(ebases_state::ebases) MCFG_DEVICE_MODIFY("astrocade1") MCFG_ASTROCADE_IO_SO1_STROBE_CB(WRITE8("watchdog", watchdog_timer_device, reset_w)) - MCFG_WATCHDOG_ADD("watchdog") // MC14024 on CPU board at U18 - MCFG_WATCHDOG_VBLANK_INIT("screen", 128) // CLK = VERTDR, Q7 used for RESET + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // MC14024 on CPU board at U18, CLK = VERTDR, Q7 used for RESET MACHINE_CONFIG_END @@ -1332,8 +1330,7 @@ MACHINE_CONFIG_START(astrocde_state::spacezap) MCFG_OUTPUT_LATCH_BIT0_HANDLER(WRITELINE(*this, astrocde_state, coin_counter_w<0>)) MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE(*this, astrocde_state, coin_counter_w<1>)) - MCFG_WATCHDOG_ADD("watchdog") // MC14024 on CPU board at U18 - MCFG_WATCHDOG_VBLANK_INIT("screen", 128) // CLK = VERTDR, Q7 used for RESET + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // MC14024 on CPU board at U18, CLK = VERTDR, Q7 used for RESET MACHINE_CONFIG_END MACHINE_CONFIG_START(astrocde_state::wow) @@ -1399,8 +1396,7 @@ MACHINE_CONFIG_START(astrocde_state::gorf) lamplatch.q_out_cb<6>().set_nop(); // n/c lamplatch.q_out_cb<7>().set_output("lamp7"); - MCFG_WATCHDOG_ADD("watchdog") // MC14024 on CPU board at U18 - MCFG_WATCHDOG_VBLANK_INIT("screen", 128) // CLK = VERTDR, Q7 used for RESET + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // MC14024 on CPU board at U18, CLK = VERTDR, Q7 used for RESET /* video hardware */ MCFG_SCREEN_MODIFY("screen") diff --git a/src/mame/drivers/asuka.cpp b/src/mame/drivers/asuka.cpp index 5bcc7e3f095..323ff465456 100644 --- a/src/mame/drivers/asuka.cpp +++ b/src/mame/drivers/asuka.cpp @@ -858,7 +858,7 @@ MACHINE_CONFIG_START(asuka_state::bonzeadv) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/atari_s1.cpp b/src/mame/drivers/atari_s1.cpp index 24bee5c3c49..f8d785178b0 100644 --- a/src/mame/drivers/atari_s1.cpp +++ b/src/mame/drivers/atari_s1.cpp @@ -455,7 +455,7 @@ MACHINE_CONFIG_START(atari_s1_state::atari_s1) MCFG_DEVICE_ADD("maincpu", M6800, MASTER_CLK) MCFG_DEVICE_PROGRAM_MAP(atari_s1_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* Sound */ genpin_audio(config); diff --git a/src/mame/drivers/atari_s2.cpp b/src/mame/drivers/atari_s2.cpp index 0b5eccf4db1..ff198642ed3 100644 --- a/src/mame/drivers/atari_s2.cpp +++ b/src/mame/drivers/atari_s2.cpp @@ -484,7 +484,7 @@ MACHINE_CONFIG_START(atari_s2_state::atari_s2) MCFG_DEVICE_ADD("maincpu", M6800, XTAL(4'000'000) / 4) MCFG_DEVICE_PROGRAM_MAP(atari_s2_map) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* Sound */ genpin_audio(config); diff --git a/src/mame/drivers/atarifb.cpp b/src/mame/drivers/atarifb.cpp index c96eda96ed4..633d3f2322a 100644 --- a/src/mame/drivers/atarifb.cpp +++ b/src/mame/drivers/atarifb.cpp @@ -563,7 +563,7 @@ MACHINE_CONFIG_START(atarifb_state::atarifb) MCFG_DEVICE_PROGRAM_MAP(atarifb_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(atarifb_state, irq0_line_hold, 4*60) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp index 57893e61545..7e01387b401 100644 --- a/src/mame/drivers/atarig1.cpp +++ b/src/mame/drivers/atarig1.cpp @@ -406,7 +406,7 @@ MACHINE_CONFIG_START(atarig1_state::atarig1) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarig1) diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp index 740bf904e30..766021b7f13 100644 --- a/src/mame/drivers/atarig42.cpp +++ b/src/mame/drivers/atarig42.cpp @@ -521,7 +521,7 @@ MACHINE_CONFIG_START(atarig42_state::atarig42) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarig42) diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp index 11d68ff2fcd..57f73f7fcce 100644 --- a/src/mame/drivers/atarisy1.cpp +++ b/src/mame/drivers/atarisy1.cpp @@ -745,7 +745,7 @@ MACHINE_CONFIG_START(atarisy1_state::atarisy1) m_outlatch->q_out_cb<6>().set(FUNC(atarisy1_state::coin_counter_right_w)); m_outlatch->q_out_cb<7>().set(FUNC(atarisy1_state::coin_counter_left_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_TIMER_DRIVER_ADD("scan_timer", atarisy1_state, atarisy1_int3_callback) MCFG_TIMER_DRIVER_ADD("int3off_timer", atarisy1_state, atarisy1_int3off_callback) diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp index 61d06c0e105..ccb86bc6e60 100644 --- a/src/mame/drivers/atarisy2.cpp +++ b/src/mame/drivers/atarisy2.cpp @@ -1208,7 +1208,7 @@ MACHINE_CONFIG_START(atarisy2_state::atarisy2) EEPROM_2804(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_atarisy2) diff --git a/src/mame/drivers/avalnche.cpp b/src/mame/drivers/avalnche.cpp index c1b0f87d5dc..2789147e5b1 100644 --- a/src/mame/drivers/avalnche.cpp +++ b/src/mame/drivers/avalnche.cpp @@ -229,7 +229,7 @@ MACHINE_CONFIG_START(avalnche_state::avalnche_base) m_latch->q_out_cb<7>().set_output("led2"); // START LAMP // Q1, Q4, Q5, Q6 are configured in audio/avalnche.cpp - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/aztarac.cpp b/src/mame/drivers/aztarac.cpp index 3c6e288487a..c4bdc4cbae3 100644 --- a/src/mame/drivers/aztarac.cpp +++ b/src/mame/drivers/aztarac.cpp @@ -163,7 +163,7 @@ MACHINE_CONFIG_START(aztarac_state::aztarac) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_VECTOR_ADD("vector") diff --git a/src/mame/drivers/badlands.cpp b/src/mame/drivers/badlands.cpp index 2b3a80fd2cb..4228d334fa2 100644 --- a/src/mame/drivers/badlands.cpp +++ b/src/mame/drivers/badlands.cpp @@ -456,7 +456,7 @@ MACHINE_CONFIG_START(badlands_state::badlands) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_badlands) diff --git a/src/mame/drivers/balsente.cpp b/src/mame/drivers/balsente.cpp index c48967b4989..b21aad77268 100644 --- a/src/mame/drivers/balsente.cpp +++ b/src/mame/drivers/balsente.cpp @@ -1333,7 +1333,7 @@ MACHINE_CONFIG_START(balsente_state::balsente) X2212(config, "nov0").set_auto_save(true); // system NOVRAM X2212(config, "nov1").set_auto_save(true); // cart NOVRAM - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_TIMER_DRIVER_ADD("scan_timer", balsente_state, interrupt_timer) MCFG_TIMER_DRIVER_ADD("8253_0_timer", balsente_state, clock_counter_0_ff) diff --git a/src/mame/drivers/baraduke.cpp b/src/mame/drivers/baraduke.cpp index b066a7d95ff..12abda841b0 100644 --- a/src/mame/drivers/baraduke.cpp +++ b/src/mame/drivers/baraduke.cpp @@ -390,7 +390,7 @@ MACHINE_CONFIG_START(baraduke_state::baraduke) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/batman.cpp b/src/mame/drivers/batman.cpp index 784462e4b4f..82cdc98ac19 100644 --- a/src/mame/drivers/batman.cpp +++ b/src/mame/drivers/batman.cpp @@ -191,7 +191,7 @@ MACHINE_CONFIG_START(batman_state::batman) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_batman) diff --git a/src/mame/drivers/battlnts.cpp b/src/mame/drivers/battlnts.cpp index 2feac7bec2d..41938ad3e68 100644 --- a/src/mame/drivers/battlnts.cpp +++ b/src/mame/drivers/battlnts.cpp @@ -240,7 +240,7 @@ MACHINE_CONFIG_START(battlnts_state::battlnts) MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(24'000'000) / 6 /* 3579545? */) MCFG_DEVICE_PROGRAM_MAP(battlnts_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/beathead.cpp b/src/mame/drivers/beathead.cpp index 7b8b8b86db0..ae8374eafbb 100644 --- a/src/mame/drivers/beathead.cpp +++ b/src/mame/drivers/beathead.cpp @@ -344,7 +344,7 @@ MACHINE_CONFIG_START(beathead_state::beathead) EEPROM_2804(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_TIMER_DRIVER_ADD(m_scan_timer, beathead_state, scanline_callback) diff --git a/src/mame/drivers/bfm_sc1.cpp b/src/mame/drivers/bfm_sc1.cpp index 968b7c55627..59a8df53daa 100644 --- a/src/mame/drivers/bfm_sc1.cpp +++ b/src/mame/drivers/bfm_sc1.cpp @@ -1078,8 +1078,7 @@ MACHINE_CONFIG_START(bfm_sc1_state::scorpion1) MCFG_DEVICE_PROGRAM_MAP(sc1_base) // setup read and write memorymap MCFG_DEVICE_PERIODIC_INT_DRIVER(bfm_sc1_state, timer_irq, 1000) // generate 1000 IRQ's per second - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) + WATCHDOG_TIMER(config, "watchdog").set_time(PERIOD_OF_555_MONOSTABLE(120000,100e-9)); MCFG_BFMBD1_ADD("vfd0",0) diff --git a/src/mame/drivers/bfm_sc2.cpp b/src/mame/drivers/bfm_sc2.cpp index 9f34389a0f2..804698c183b 100644 --- a/src/mame/drivers/bfm_sc2.cpp +++ b/src/mame/drivers/bfm_sc2.cpp @@ -2284,8 +2284,7 @@ MACHINE_CONFIG_START(bfm_sc2_vid_state::scorpion2_vid) MCFG_DEVICE_PERIODIC_INT_DRIVER(bfm_sc2_vid_state, timer_irq, 1000) // generate 1000 IRQ's per second MCFG_QUANTUM_TIME(attotime::from_hz(960)) // needed for serial communication !! - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) + WATCHDOG_TIMER(config, "watchdog").set_time(PERIOD_OF_555_MONOSTABLE(120000,100e-9)); MCFG_BFMBD1_ADD("vfd0",0) MCFG_BFMBD1_ADD("vfd1",1) @@ -3754,8 +3753,7 @@ MACHINE_CONFIG_START(bfm_sc2_awp_state::scorpion2) MCFG_DEVICE_PROGRAM_MAP(memmap_no_vid) MCFG_DEVICE_PERIODIC_INT_DRIVER(bfm_sc2_awp_state, timer_irq, 1000) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) + WATCHDOG_TIMER(config, "watchdog").set_time(PERIOD_OF_555_MONOSTABLE(120000,100e-9)); MCFG_BFMBD1_ADD("vfd0",0) MCFG_BFMBD1_ADD("vfd1",1) @@ -3814,8 +3812,7 @@ MACHINE_CONFIG_START(bfm_sc2_dmd_state::scorpion2_dm01) MCFG_DEVICE_PROGRAM_MAP(memmap_no_vid) MCFG_DEVICE_PERIODIC_INT_DRIVER(bfm_sc2_dmd_state, timer_irq, 1000) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(120000,100e-9)) + WATCHDOG_TIMER(config, "watchdog").set_time(PERIOD_OF_555_MONOSTABLE(120000,100e-9)); SPEAKER(config, "mono").front_center(); MCFG_DEVICE_ADD("ymsnd",YM2413, XTAL(3'579'545)) diff --git a/src/mame/drivers/bking.cpp b/src/mame/drivers/bking.cpp index 62eadae7e3c..bf5105b9e51 100644 --- a/src/mame/drivers/bking.cpp +++ b/src/mame/drivers/bking.cpp @@ -405,7 +405,7 @@ MACHINE_CONFIG_START(bking_state::bking) /* - periodic IRQ, with frequency 6000000/(4*16*16*10*16) = 36.621 Hz, */ MCFG_DEVICE_PERIODIC_INT_DRIVER(bking_state, irq0_line_hold, (double)6000000/(4*16*16*10*16)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/bladestl.cpp b/src/mame/drivers/bladestl.cpp index e110ca5bc45..2b8fd9e3f2b 100644 --- a/src/mame/drivers/bladestl.cpp +++ b/src/mame/drivers/bladestl.cpp @@ -315,7 +315,7 @@ MACHINE_CONFIG_START(bladestl_state::bladestl) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/blktiger.cpp b/src/mame/drivers/blktiger.cpp index a59cf5edd13..bab2301d104 100644 --- a/src/mame/drivers/blktiger.cpp +++ b/src/mame/drivers/blktiger.cpp @@ -307,7 +307,7 @@ MACHINE_CONFIG_START(blktiger_state::blktiger) // other ports unknown //MCFG_DEVICE_VBLANK_INT_DRIVER("screen", blktiger_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/blockhl.cpp b/src/mame/drivers/blockhl.cpp index d0387d25bda..520d2296d27 100644 --- a/src/mame/drivers/blockhl.cpp +++ b/src/mame/drivers/blockhl.cpp @@ -289,7 +289,7 @@ MACHINE_CONFIG_START(blockhl_state::blockhl) MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) MCFG_DEVICE_PROGRAM_MAP(audio_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // video hardware MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/blstroid.cpp b/src/mame/drivers/blstroid.cpp index 3871338fe03..b67ddbf7e53 100644 --- a/src/mame/drivers/blstroid.cpp +++ b/src/mame/drivers/blstroid.cpp @@ -182,7 +182,7 @@ MACHINE_CONFIG_START(blstroid_state::blstroid) EEPROM_2804(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_blstroid) diff --git a/src/mame/drivers/blueprnt.cpp b/src/mame/drivers/blueprnt.cpp index 8a478fa7f37..cdd7514cbf9 100644 --- a/src/mame/drivers/blueprnt.cpp +++ b/src/mame/drivers/blueprnt.cpp @@ -361,7 +361,7 @@ MACHINE_CONFIG_START(blueprnt_state::blueprnt) MCFG_QUANTUM_PERFECT_CPU("maincpu") - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/bottom9.cpp b/src/mame/drivers/bottom9.cpp index c7207e743b7..67c584734e7 100644 --- a/src/mame/drivers/bottom9.cpp +++ b/src/mame/drivers/bottom9.cpp @@ -310,7 +310,7 @@ MACHINE_CONFIG_START(bottom9_state::bottom9) MCFG_DEVICE_PROGRAM_MAP(audio_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(bottom9_state, bottom9_sound_interrupt, 8*60) /* irq is triggered by the main CPU */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/boxer.cpp b/src/mame/drivers/boxer.cpp index eb3d71d70d1..210abfdd6e3 100644 --- a/src/mame/drivers/boxer.cpp +++ b/src/mame/drivers/boxer.cpp @@ -497,7 +497,7 @@ MACHINE_CONFIG_START(boxer_state::boxer) MCFG_DEVICE_ADD("maincpu", M6502, MASTER_CLOCK / 16) MCFG_DEVICE_PROGRAM_MAP(boxer_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/bublbobl.cpp b/src/mame/drivers/bublbobl.cpp index 912182aa9c9..20afcc12f84 100644 --- a/src/mame/drivers/bublbobl.cpp +++ b/src/mame/drivers/bublbobl.cpp @@ -865,8 +865,7 @@ MACHINE_CONFIG_START(bublbobl_state::tokio) MCFG_QUANTUM_PERFECT_CPU("maincpu") // is this necessary? - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 128); // 74LS393, counts 128 vblanks before firing watchdog; same circuit as taitosj uses + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // 74LS393, counts 128 vblanks before firing watchdog; same circuit as taitosj uses MCFG_MACHINE_START_OVERRIDE(bublbobl_state, tokio) MCFG_MACHINE_RESET_OVERRIDE(bublbobl_state, tokio) @@ -909,7 +908,7 @@ MACHINE_CONFIG_START(bublbobl_state::bublboblp) // hooked up wrong in MAME for tokio in general, or is disabled with a wire // jumper under the epoxy MCFG_DEVICE_REMOVE("watchdog") - MCFG_WATCHDOG_ADD("watchdog") // this adds back a watchdog, but due to the way MAME handles watchdogs, it will never fire unless it first gets at least one pulse, which it never will. + WATCHDOG_TIMER(config, "watchdog"); // this adds back a watchdog, but due to the way MAME handles watchdogs, it will never fire unless it first gets at least one pulse, which it never will. MCFG_DEVICE_REPLACE("maincpu", Z80, MAIN_XTAL/4) // 6 MHz MCFG_DEVICE_PROGRAM_MAP(tokio_map) // no mcu or resistors at all @@ -978,8 +977,7 @@ MACHINE_CONFIG_START(bublbobl_state::bublbobl_nomcu) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 128); // 74LS393, counts 128 vblanks before firing watchdog; same circuit as taitosj uses + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // 74LS393, counts 128 vblanks before firing watchdog; same circuit as taitosj uses MCFG_MACHINE_START_OVERRIDE(bublbobl_state, bublbobl) MCFG_MACHINE_RESET_OVERRIDE(bublbobl_state, bublbobl) diff --git a/src/mame/drivers/buggychl.cpp b/src/mame/drivers/buggychl.cpp index ab4809c8a88..3d589eb5c13 100644 --- a/src/mame/drivers/buggychl.cpp +++ b/src/mame/drivers/buggychl.cpp @@ -533,8 +533,7 @@ MACHINE_CONFIG_START(buggychl_state::buggychl) MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, 48_MHz_XTAL/8/2) /* CPUspeed/2 MHz according to schematics, so 3MHz if cpu is jumpered for 6MHz */ - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 128); // typical Taito 74ls392 + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // typical Taito 74ls392 /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/bwidow.cpp b/src/mame/drivers/bwidow.cpp index c71167bfae6..3d3c6eeac0f 100644 --- a/src/mame/drivers/bwidow.cpp +++ b/src/mame/drivers/bwidow.cpp @@ -793,7 +793,7 @@ MACHINE_CONFIG_START(bwidow_state::bwidowp) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(bwidowp_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MACHINE_CONFIG_END MACHINE_CONFIG_START(bwidow_state::gravitar) diff --git a/src/mame/drivers/bzone.cpp b/src/mame/drivers/bzone.cpp index 84e8bb1d58c..f35d0a23888 100644 --- a/src/mame/drivers/bzone.cpp +++ b/src/mame/drivers/bzone.cpp @@ -576,7 +576,7 @@ MACHINE_CONFIG_START(bzone_state::bzone_base) MCFG_DEVICE_PROGRAM_MAP(bzone_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(bzone_state, bzone_interrupt, BZONE_CLOCK_3KHZ / 12) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_VECTOR_ADD("vector") diff --git a/src/mame/drivers/canyon.cpp b/src/mame/drivers/canyon.cpp index b1de3875d12..f6e17338242 100644 --- a/src/mame/drivers/canyon.cpp +++ b/src/mame/drivers/canyon.cpp @@ -252,8 +252,7 @@ MACHINE_CONFIG_START(canyon_state::canyon) m_outlatch->q_out_cb<4>().set("discrete", FUNC(discrete_device::write_line)); m_outlatch->q_out_cb<5>().set("discrete", FUNC(discrete_device::write_line)); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/capbowl.cpp b/src/mame/drivers/capbowl.cpp index b831a8df3ea..fec21ecd991 100644 --- a/src/mame/drivers/capbowl.cpp +++ b/src/mame/drivers/capbowl.cpp @@ -323,12 +323,10 @@ MACHINE_CONFIG_START(capbowl_state::capbowl) MCFG_DEVICE_PROGRAM_MAP(capbowl_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", capbowl_state, interrupt) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_ASTABLE(100000.0, 100000.0, 0.1e-6) * 15.5) // ~0.3s + WATCHDOG_TIMER(config, m_watchdog).set_time(PERIOD_OF_555_ASTABLE(100000.0, 100000.0, 0.1e-6) * 15.5); // ~0.3s MCFG_DEVICE_ADD("audiocpu", MC6809E, MASTER_CLOCK / 4) // MC68B09EP MCFG_DEVICE_PROGRAM_MAP(sound_map) -// MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_ASTABLE(100000.0, 100000.0, 0.1e-6) * 15.5) // TODO NVRAM(config, "nvram", nvram_device::DEFAULT_RANDOM); diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp index 6483c0ebc4c..01567df1cf5 100644 --- a/src/mame/drivers/cave.cpp +++ b/src/mame/drivers/cave.cpp @@ -2270,7 +2270,7 @@ MACHINE_CONFIG_START(cave_state::gaia) MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2446,8 +2446,7 @@ MACHINE_CONFIG_START(cave_state::mazinger) MCFG_DEVICE_PROGRAM_MAP(mazinger_sound_map) MCFG_DEVICE_IO_MAP(mazinger_sound_portmap) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) EEPROM_93C46_16BIT(config, "eeprom"); @@ -2502,8 +2501,7 @@ MACHINE_CONFIG_START(cave_state::metmqstr) MCFG_DEVICE_PROGRAM_MAP(metmqstr_sound_map) MCFG_DEVICE_IO_MAP(metmqstr_sound_portmap) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) /* start with the watchdog armed */ EEPROM_93C46_16BIT(config, "eeprom"); @@ -2557,8 +2555,7 @@ MACHINE_CONFIG_START(cave_state::pacslot) MCFG_DEVICE_PROGRAM_MAP(pacslot_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -2615,8 +2612,7 @@ MACHINE_CONFIG_START(cave_state::ppsatan) MCFG_DEVICE_PROGRAM_MAP(ppsatan_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt_ppsatan) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(1)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(1)); /* a guess, and certainly wrong */ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) EEPROM_93C46_16BIT(config, "eeprom"); @@ -2811,8 +2807,7 @@ MACHINE_CONFIG_START(cave_state::tekkencw) MCFG_DEVICE_PROGRAM_MAP(tekkencw_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) @@ -2865,8 +2860,7 @@ MACHINE_CONFIG_START(cave_state::tjumpman) MCFG_DEVICE_PROGRAM_MAP(tjumpman_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) diff --git a/src/mame/drivers/ccastles.cpp b/src/mame/drivers/ccastles.cpp index a2cc1c37fed..99390bc6390 100644 --- a/src/mame/drivers/ccastles.cpp +++ b/src/mame/drivers/ccastles.cpp @@ -448,8 +448,7 @@ MACHINE_CONFIG_START(ccastles_state::ccastles) LS259(config, m_outlatch[1]); // 6P - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); X2212(config, "nvram_4b").set_auto_save(true); X2212(config, "nvram_4a").set_auto_save(true); diff --git a/src/mame/drivers/cchasm.cpp b/src/mame/drivers/cchasm.cpp index 332f943e7a1..7f3de547f0e 100644 --- a/src/mame/drivers/cchasm.cpp +++ b/src/mame/drivers/cchasm.cpp @@ -162,7 +162,7 @@ MACHINE_CONFIG_START(cchasm_state::cchasm) m_ctc->zc_callback<1>().set(FUNC(cchasm_state::ctc_timer_1_w)); m_ctc->zc_callback<2>().set(FUNC(cchasm_state::ctc_timer_2_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_VECTOR_ADD("vector") diff --git a/src/mame/drivers/centiped.cpp b/src/mame/drivers/centiped.cpp index 161d67fa83f..51c9ffc5196 100644 --- a/src/mame/drivers/centiped.cpp +++ b/src/mame/drivers/centiped.cpp @@ -1755,7 +1755,7 @@ MACHINE_CONFIG_START(centiped_state::centiped_base) m_outlatch->q_out_cb<3>().set_output("led0").invert(); // LED 1 m_outlatch->q_out_cb<4>().set_output("led1").invert(); // LED 2 - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* timer */ MCFG_TIMER_DRIVER_ADD_SCANLINE("32v", centiped_state, generate_interrupt, "screen", 0, 16) @@ -1968,7 +1968,7 @@ MACHINE_CONFIG_START(centiped_state::bullsdrt) m_outlatch->q_out_cb<4>().set_output("led1").invert(); m_outlatch->q_out_cb<7>().set(FUNC(centiped_state::flip_screen_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp index 6c532d607a4..09bbfed8995 100644 --- a/src/mame/drivers/champbas.cpp +++ b/src/mame/drivers/champbas.cpp @@ -546,8 +546,7 @@ MACHINE_CONFIG_START(champbas_state::talbot) MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(18'432'000)/6/8) MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 0x10) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 0x10); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -592,8 +591,7 @@ MACHINE_CONFIG_START(champbas_state::champbas) MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(18'432'000)/6) MCFG_DEVICE_PROGRAM_MAP(champbas_sound_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 0x10) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 0x10); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -705,8 +703,7 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccr) MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(18'432'000)/6/8) // note: 8302 rom, or 8303 on exctscc2 (same device!) MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 0x10) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 0x10); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -770,8 +767,7 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccrb) MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(18'432'000)/6/8) // champbasj 8201 on pcb, though unused MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 0x10) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 0x10); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/changela.cpp b/src/mame/drivers/changela.cpp index f17f16e01ad..ad26de9d95d 100644 --- a/src/mame/drivers/changela.cpp +++ b/src/mame/drivers/changela.cpp @@ -435,7 +435,7 @@ MACHINE_CONFIG_START(changela_state::changela) outlatch.q_out_cb<4>().set(FUNC(changela_state::mcu_pc_0_w)); outlatch.q_out_cb<5>().set(FUNC(changela_state::collision_reset_1_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/chqflag.cpp b/src/mame/drivers/chqflag.cpp index aeac869b725..419f391818a 100644 --- a/src/mame/drivers/chqflag.cpp +++ b/src/mame/drivers/chqflag.cpp @@ -329,7 +329,7 @@ MACHINE_CONFIG_START(chqflag_state::chqflag) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/circusc.cpp b/src/mame/drivers/circusc.cpp index 1c993de2ddc..beeb0637448 100644 --- a/src/mame/drivers/circusc.cpp +++ b/src/mame/drivers/circusc.cpp @@ -358,8 +358,7 @@ MACHINE_CONFIG_START(circusc_state::circusc) mainlatch.q_out_cb<4>().set(FUNC(circusc_state::coin_counter_2_w)); // COIN2 mainlatch.q_out_cb<5>().set(FUNC(circusc_state::spritebank_w)); // OBJ CHENG - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(14'318'181)/4) MCFG_DEVICE_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp index 4e3595d3e32..6586557d435 100644 --- a/src/mame/drivers/cischeat.cpp +++ b/src/mame/drivers/cischeat.cpp @@ -2142,7 +2142,7 @@ MACHINE_CONFIG_START(cischeat_state::scudhamm) MCFG_DEVICE_PROGRAM_MAP(scudhamm_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", cischeat_state, scudhamm_scanline, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2233,7 +2233,7 @@ MACHINE_CONFIG_START(cischeat_state::captflag) MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(2000), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH ) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* video hardware */ diff --git a/src/mame/drivers/clayshoo.cpp b/src/mame/drivers/clayshoo.cpp index 2aa90a41087..bddff8b1082 100644 --- a/src/mame/drivers/clayshoo.cpp +++ b/src/mame/drivers/clayshoo.cpp @@ -330,7 +330,7 @@ MACHINE_CONFIG_START(clayshoo_state::clayshoo) MCFG_DEVICE_IO_MAP(main_io_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", clayshoo_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/cloak.cpp b/src/mame/drivers/cloak.cpp index 08a58d805a7..0bee1fb795c 100644 --- a/src/mame/drivers/cloak.cpp +++ b/src/mame/drivers/cloak.cpp @@ -336,7 +336,7 @@ MACHINE_CONFIG_START(cloak_state::cloak) outlatch.q_out_cb<6>().set_output("led1").invert(); // START LED 2 outlatch.q_out_cb<7>().set_output("led0").invert(); // START LED 1 - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/cloud9.cpp b/src/mame/drivers/cloud9.cpp index 7192503b8a9..b6f3e80085c 100644 --- a/src/mame/drivers/cloud9.cpp +++ b/src/mame/drivers/cloud9.cpp @@ -404,8 +404,7 @@ MACHINE_CONFIG_START(cloud9_state::cloud9) outlatch.q_out_cb<2>().set_output("led0").invert(); outlatch.q_out_cb<3>().set_output("led1").invert(); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); X2212(config, "nvram").set_auto_save(true); diff --git a/src/mame/drivers/combatsc.cpp b/src/mame/drivers/combatsc.cpp index a2eda5e116a..4a32f1b3f69 100644 --- a/src/mame/drivers/combatsc.cpp +++ b/src/mame/drivers/combatsc.cpp @@ -710,7 +710,7 @@ MACHINE_CONFIG_START(combatsc_state::combatsc) MCFG_MACHINE_START_OVERRIDE(combatsc_state,combatsc) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/crimfght.cpp b/src/mame/drivers/crimfght.cpp index fceb9c2186f..19491d387a6 100644 --- a/src/mame/drivers/crimfght.cpp +++ b/src/mame/drivers/crimfght.cpp @@ -313,7 +313,7 @@ MACHINE_CONFIG_START(crimfght_state::crimfght) ADDRESS_MAP_BANK(config, "bank0000").set_map(&crimfght_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 11, 0x400); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp index 6944d51d177..50668f0de90 100644 --- a/src/mame/drivers/cyberbal.cpp +++ b/src/mame/drivers/cyberbal.cpp @@ -497,7 +497,7 @@ MACHINE_CONFIG_START(cyberbal2p_state::cyberbal2p) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_cyberbal) diff --git a/src/mame/drivers/cybstorm.cpp b/src/mame/drivers/cybstorm.cpp index 9e3b7b2b903..4734db056e6 100644 --- a/src/mame/drivers/cybstorm.cpp +++ b/src/mame/drivers/cybstorm.cpp @@ -229,7 +229,7 @@ MACHINE_CONFIG_START(cybstorm_state::round2) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_ATARI_VAD_ADD("vad", "screen", INPUTLINE("maincpu", M68K_IRQ_4)) diff --git a/src/mame/drivers/dambustr.cpp b/src/mame/drivers/dambustr.cpp index 1fca6c0d20b..72a5bdf3566 100644 --- a/src/mame/drivers/dambustr.cpp +++ b/src/mame/drivers/dambustr.cpp @@ -272,7 +272,7 @@ MACHINE_CONFIG_START(dambustr_state::dambustr) MCFG_TIMER_DRIVER_ADD("int_timer", dambustr_state, galaxold_interrupt_timer) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/darius.cpp b/src/mame/drivers/darius.cpp index f45f1ad48b9..8991bb41ee3 100644 --- a/src/mame/drivers/darius.cpp +++ b/src/mame/drivers/darius.cpp @@ -724,7 +724,7 @@ MACHINE_CONFIG_START(darius_state::darius) MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame ? */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_darius) diff --git a/src/mame/drivers/dblcrown.cpp b/src/mame/drivers/dblcrown.cpp index b931af1c121..0344ddcc062 100644 --- a/src/mame/drivers/dblcrown.cpp +++ b/src/mame/drivers/dblcrown.cpp @@ -607,8 +607,7 @@ MACHINE_CONFIG_START(dblcrown_state::dblcrown) MCFG_DEVICE_IO_MAP(dblcrown_io) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", dblcrown_state, dblcrown_irq_scanline, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1000)) /* 1000 ms. (minimal of MAX693A watchdog long timeout period with internal oscillator) */ + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(1000)); /* 1000 ms. (minimal of MAX693A watchdog long timeout period with internal oscillator) */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/dcheese.cpp b/src/mame/drivers/dcheese.cpp index b9a2487b3f7..66e8a334037 100644 --- a/src/mame/drivers/dcheese.cpp +++ b/src/mame/drivers/dcheese.cpp @@ -388,7 +388,7 @@ MACHINE_CONFIG_START(dcheese_state::dcheese) MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/ddragon.cpp b/src/mame/drivers/ddragon.cpp index 47dee4db4dd..b3ee1b13082 100644 --- a/src/mame/drivers/ddragon.cpp +++ b/src/mame/drivers/ddragon.cpp @@ -966,7 +966,7 @@ MACHINE_CONFIG_START(ddragon_state::ddragon) /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ddragon) - MCFG_PALETTE_ADD("palette", 384) + MCFG_PALETTE_ADD("palette", 512) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) MCFG_SCREEN_ADD("screen", RASTER) @@ -1038,7 +1038,7 @@ MACHINE_CONFIG_START(ddragon_state::ddragon6809) /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ddragon) - MCFG_PALETTE_ADD("palette", 384) + MCFG_PALETTE_ADD("palette", 512) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) MCFG_SCREEN_ADD("screen", RASTER) @@ -1091,7 +1091,7 @@ MACHINE_CONFIG_START(ddragon_state::ddragon2) /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ddragon) - MCFG_PALETTE_ADD("palette", 384) + MCFG_PALETTE_ADD("palette", 512) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/ddribble.cpp b/src/mame/drivers/ddribble.cpp index 40c70327afa..fff43be4849 100644 --- a/src/mame/drivers/ddribble.cpp +++ b/src/mame/drivers/ddribble.cpp @@ -271,7 +271,7 @@ MACHINE_CONFIG_START(ddribble_state::ddribble) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/deadang.cpp b/src/mame/drivers/deadang.cpp index c102d158302..8c3b1905332 100644 --- a/src/mame/drivers/deadang.cpp +++ b/src/mame/drivers/deadang.cpp @@ -365,7 +365,7 @@ MACHINE_CONFIG_START(deadang_state::deadang) MCFG_QUANTUM_TIME(attotime::from_hz(60)) // the game stops working with higher interleave rates.. - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/decocass.cpp b/src/mame/drivers/decocass.cpp index 01e5868e5ad..bf2a5560492 100644 --- a/src/mame/drivers/decocass.cpp +++ b/src/mame/drivers/decocass.cpp @@ -970,7 +970,7 @@ MACHINE_CONFIG_START(decocass_state::decocass) MCFG_QUANTUM_TIME(attotime::from_hz(4200)) /* interleave CPUs */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MCFG_DECOCASS_TAPE_ADD("cassette") diff --git a/src/mame/drivers/destroyr.cpp b/src/mame/drivers/destroyr.cpp index da185a09194..d9268fc9436 100644 --- a/src/mame/drivers/destroyr.cpp +++ b/src/mame/drivers/destroyr.cpp @@ -482,7 +482,7 @@ MACHINE_CONFIG_START(destroyr_state::destroyr) // Q6 => high explosion // Q7 => low explosion - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/dkong.cpp b/src/mame/drivers/dkong.cpp index 4d06a7e8074..2bf8190d7d3 100644 --- a/src/mame/drivers/dkong.cpp +++ b/src/mame/drivers/dkong.cpp @@ -1761,7 +1761,7 @@ MACHINE_CONFIG_START(dkong_state::dkong2b) /* sound hardware */ dkong2b_audio(config); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MACHINE_CONFIG_END void dkong_state::dk_braze(machine_config &config) @@ -1834,7 +1834,7 @@ MACHINE_CONFIG_START(dkong_state::dkongjr) /* sound hardware */ dkongjr_audio(config); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MACHINE_CONFIG_END MACHINE_CONFIG_START(dkong_state::pestplce) diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp index d65fc7e71b0..c9d94ee9cd6 100644 --- a/src/mame/drivers/dlair.cpp +++ b/src/mame/drivers/dlair.cpp @@ -781,8 +781,7 @@ MACHINE_CONFIG_START(dlair_state::dleuro) sio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); // TODO: hook up tx and rx callbacks - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(MASTER_CLOCK_EURO/(16*16*16*16*16*8))) + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_hz(MASTER_CLOCK_EURO/(16*16*16*16*16*8))); MCFG_LASERDISC_22VP932_ADD("ld_22vp932") MCFG_LASERDISC_OVERLAY_DRIVER(256, 256, dlair_state, screen_update_dleuro) diff --git a/src/mame/drivers/docastle.cpp b/src/mame/drivers/docastle.cpp index 25075d579bd..47d3c705703 100644 --- a/src/mame/drivers/docastle.cpp +++ b/src/mame/drivers/docastle.cpp @@ -623,7 +623,7 @@ MACHINE_CONFIG_START(docastle_state::docastle) m_inp[1]->read_port5_callback().set_ioport("BUTTONS").rshift(4); m_inp[1]->read_port7_callback().set_ioport("SYSTEM").rshift(4); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_MC6845_ADD("crtc", H46505, "screen", XTAL(9'828'000) / 16) diff --git a/src/mame/drivers/dragrace.cpp b/src/mame/drivers/dragrace.cpp index add002df6fc..4ee8a707460 100644 --- a/src/mame/drivers/dragrace.cpp +++ b/src/mame/drivers/dragrace.cpp @@ -278,8 +278,7 @@ MACHINE_CONFIG_START(dragrace_state::dragrace) MCFG_DEVICE_PROGRAM_MAP(dragrace_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(dragrace_state, irq0_line_hold, 4*60) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); MCFG_TIMER_DRIVER_ADD_PERIODIC("frame_timer", dragrace_state, dragrace_frame_callback, attotime::from_hz(60)) diff --git a/src/mame/drivers/dribling.cpp b/src/mame/drivers/dribling.cpp index dfe6aab3ace..01351167c26 100644 --- a/src/mame/drivers/dribling.cpp +++ b/src/mame/drivers/dribling.cpp @@ -287,7 +287,7 @@ MACHINE_CONFIG_START(dribling_state::dribling) m_ppi8255_1->in_pc_callback().set_ioport("IN0"); m_ppi8255_1->out_pc_callback().set(FUNC(dribling_state::shr_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/dunhuang.cpp b/src/mame/drivers/dunhuang.cpp index d576dfe2f78..85d0608546a 100644 --- a/src/mame/drivers/dunhuang.cpp +++ b/src/mame/drivers/dunhuang.cpp @@ -812,8 +812,7 @@ MACHINE_CONFIG_START(dunhuang_state::dunhuang) MCFG_DEVICE_IO_MAP(dunhuang_io_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", dunhuang_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(5)) + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(5)); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/epos.cpp b/src/mame/drivers/epos.cpp index c480cd19feb..4b60990ed01 100644 --- a/src/mame/drivers/epos.cpp +++ b/src/mame/drivers/epos.cpp @@ -465,7 +465,7 @@ MACHINE_CONFIG_START(epos_state::epos) /* EPOS TRISTAR 8000 PCB */ MCFG_DEVICE_IO_MAP(epos_io_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", epos_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -505,7 +505,7 @@ MACHINE_CONFIG_START(epos_state::dealer) /* EPOS TRISTAR 9000 PCB */ MCFG_PALETTE_ADD_INIT_BLACK("palette", 32) // MCFG_PALETTE_INIT_OWNER(epos_state, epos) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp index 969d14c8f2e..f8d8ea48bc9 100644 --- a/src/mame/drivers/eprom.cpp +++ b/src/mame/drivers/eprom.cpp @@ -399,7 +399,7 @@ MACHINE_CONFIG_START(eprom_state::eprom) EEPROM_2804(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_eprom) @@ -441,7 +441,7 @@ MACHINE_CONFIG_START(eprom_state::klaxp) EEPROM_2804(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_eprom) @@ -488,7 +488,7 @@ MACHINE_CONFIG_START(eprom_state::guts) EEPROM_2804(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_guts) diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp index 748a57bd5e7..5b675dfdcd2 100644 --- a/src/mame/drivers/equites.cpp +++ b/src/mame/drivers/equites.cpp @@ -1170,7 +1170,7 @@ MACHINE_CONFIG_START(equites_state::equites) MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, 4000000/8) // 8303 or 8304 (same device!) MCFG_QUANTUM_PERFECT_CPU("alpha_8201:mcu") - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/espial.cpp b/src/mame/drivers/espial.cpp index 76fa8493f45..70c3c9e79a4 100644 --- a/src/mame/drivers/espial.cpp +++ b/src/mame/drivers/espial.cpp @@ -331,7 +331,7 @@ MACHINE_CONFIG_START(espial_state::espial) MCFG_DEVICE_IO_MAP(espial_sound_io_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(espial_state, espial_sound_nmi_gen, 4*60) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/expro02.cpp b/src/mame/drivers/expro02.cpp index 8248bba7e71..de18d1ef64d 100644 --- a/src/mame/drivers/expro02.cpp +++ b/src/mame/drivers/expro02.cpp @@ -950,8 +950,7 @@ MACHINE_CONFIG_START(expro02_state::expro02) /* arm watchdog */ - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -976,8 +975,7 @@ MACHINE_CONFIG_START(expro02_state::comad) MCFG_KANEKO_TMAP_INVERT_FLIP(1) MCFG_KANEKO_TMAP_OFFSET(-256, -216, 256, 224) - MCFG_WATCHDOG_MODIFY("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(0)) /* a guess, and certainly wrong */ + subdevice("watchdog")->set_time(attotime::from_seconds(0)); /* a guess, and certainly wrong */ MACHINE_CONFIG_END MACHINE_CONFIG_START(expro02_state::comad_noview2) diff --git a/src/mame/drivers/exterm.cpp b/src/mame/drivers/exterm.cpp index ec9d2b3a3cb..68e16e60229 100644 --- a/src/mame/drivers/exterm.cpp +++ b/src/mame/drivers/exterm.cpp @@ -403,7 +403,7 @@ MACHINE_CONFIG_START(exterm_state::exterm) MCFG_TIMER_DRIVER_ADD(m_nmi_timer, exterm_state, master_sound_nmi_callback) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_PALETTE_ADD("palette", 2048+32768) diff --git a/src/mame/drivers/fastfred.cpp b/src/mame/drivers/fastfred.cpp index d7b21c9a7f9..c6a6024d647 100644 --- a/src/mame/drivers/fastfred.cpp +++ b/src/mame/drivers/fastfred.cpp @@ -651,7 +651,7 @@ MACHINE_CONFIG_START(fastfred_state::fastfred) m_outlatch->q_out_cb<6>().set(FUNC(fastfred_state::flip_screen_x_w)); m_outlatch->q_out_cb<7>().set(FUNC(fastfred_state::flip_screen_y_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/fastlane.cpp b/src/mame/drivers/fastlane.cpp index 0773eb0d4c6..ef623cc877c 100644 --- a/src/mame/drivers/fastlane.cpp +++ b/src/mame/drivers/fastlane.cpp @@ -206,7 +206,7 @@ MACHINE_CONFIG_START(fastlane_state::fastlane) MCFG_DEVICE_PROGRAM_MAP(fastlane_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", fastlane_state, fastlane_scanline, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/fgoal.cpp b/src/mame/drivers/fgoal.cpp index 134efc3cd08..3c2d146469d 100644 --- a/src/mame/drivers/fgoal.cpp +++ b/src/mame/drivers/fgoal.cpp @@ -373,7 +373,7 @@ MACHINE_CONFIG_START(fgoal_state::fgoal) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/finalizr.cpp b/src/mame/drivers/finalizr.cpp index bc509bfa3d3..d19c5210829 100644 --- a/src/mame/drivers/finalizr.cpp +++ b/src/mame/drivers/finalizr.cpp @@ -278,7 +278,7 @@ MACHINE_CONFIG_START(finalizr_state::finalizr) //MCFG_MCS48_PORT_T0_CLK_CUSTOM(finalizr_state, i8039_T0_w) MCFG_MCS48_PORT_T1_IN_CB(READLINE(*this, finalizr_state, i8039_T1_r)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp index ba14b41892b..54d91479561 100644 --- a/src/mame/drivers/firefox.cpp +++ b/src/mame/drivers/firefox.cpp @@ -684,8 +684,7 @@ MACHINE_CONFIG_START(firefox_state::firefox) latch1.q_out_cb<6>().set_output("led2").invert(); latch1.q_out_cb<7>().set_output("led3").invert(); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(MASTER_XTAL/8/16/16/16/16)) + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_hz(MASTER_XTAL/8/16/16/16/16)); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_firefox) diff --git a/src/mame/drivers/firetrk.cpp b/src/mame/drivers/firetrk.cpp index 9aafa181af9..3c735dd3446 100644 --- a/src/mame/drivers/firetrk.cpp +++ b/src/mame/drivers/firetrk.cpp @@ -860,8 +860,7 @@ MACHINE_CONFIG_START(firetrk_state::firetrk) MCFG_DEVICE_PROGRAM_MAP(firetrk_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", firetrk_state, firetrk_scanline, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 5) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 5); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/flkatck.cpp b/src/mame/drivers/flkatck.cpp index 6c6a9629756..c967926f624 100644 --- a/src/mame/drivers/flkatck.cpp +++ b/src/mame/drivers/flkatck.cpp @@ -222,7 +222,7 @@ MACHINE_CONFIG_START(flkatck_state::flkatck) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/foodf.cpp b/src/mame/drivers/foodf.cpp index d0a1e3f4dae..f271fca9ad2 100644 --- a/src/mame/drivers/foodf.cpp +++ b/src/mame/drivers/foodf.cpp @@ -330,8 +330,7 @@ MACHINE_CONFIG_START(foodf_state::foodf) X2212(config, "nvram").set_auto_save(true); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_TIMER_DRIVER_ADD(m_scan_timer, foodf_state, scanline_update_timer) diff --git a/src/mame/drivers/force68k.cpp b/src/mame/drivers/force68k.cpp index 9f23d7d5172..4c2f72b8933 100644 --- a/src/mame/drivers/force68k.cpp +++ b/src/mame/drivers/force68k.cpp @@ -575,19 +575,19 @@ MACHINE_CONFIG_START(force68k_state::fccpu1) ACIA6850(config, m_aciaremt, 0); /* Bit Rate Generator */ - MCFG_DEVICE_ADD("brg", MC14411, XTAL(1'843'200)) - MCFG_MC14411_F1_CB(WRITELINE (*this, force68k_state, write_f1_clock)) - MCFG_MC14411_F3_CB(WRITELINE (*this, force68k_state, write_f3_clock)) - MCFG_MC14411_F5_CB(WRITELINE (*this, force68k_state, write_f5_clock)) - MCFG_MC14411_F7_CB(WRITELINE (*this, force68k_state, write_f7_clock)) - MCFG_MC14411_F8_CB(WRITELINE (*this, force68k_state, write_f8_clock)) - MCFG_MC14411_F9_CB(WRITELINE (*this, force68k_state, write_f9_clock)) - MCFG_MC14411_F11_CB(WRITELINE (*this, force68k_state, write_f11_clock)) - MCFG_MC14411_F13_CB(WRITELINE (*this, force68k_state, write_f13_clock)) - MCFG_MC14411_F15_CB(WRITELINE (*this, force68k_state, write_f15_clock)) + MC14411(config, m_brg, XTAL(1'843'200)); + m_brg->out_f<1>().set(FUNC(force68k_state::write_f1_clock)); + m_brg->out_f<3>().set(FUNC(force68k_state::write_f3_clock)); + m_brg->out_f<5>().set(FUNC(force68k_state::write_f5_clock)); + m_brg->out_f<7>().set(FUNC(force68k_state::write_f7_clock)); + m_brg->out_f<8>().set(FUNC(force68k_state::write_f8_clock)); + m_brg->out_f<9>().set(FUNC(force68k_state::write_f9_clock)); + m_brg->out_f<11>().set(FUNC(force68k_state::write_f11_clock)); + m_brg->out_f<13>().set(FUNC(force68k_state::write_f13_clock)); + m_brg->out_f<15>().set(FUNC(force68k_state::write_f15_clock)); /* RTC Real Time Clock device */ - MCFG_DEVICE_ADD("rtc", MM58167, XTAL(32'768)) + MM58167(config, m_rtc, XTAL(32'768)); /* PIT Parallel Interface and Timer device, assuming strapped for on board clock */ PIT68230(config, m_pit, XTAL(16'000'000) / 2); diff --git a/src/mame/drivers/fortecar.cpp b/src/mame/drivers/fortecar.cpp index 8f34f86ffa2..64e21f8c950 100644 --- a/src/mame/drivers/fortecar.cpp +++ b/src/mame/drivers/fortecar.cpp @@ -687,8 +687,7 @@ MACHINE_CONFIG_START(fortecar_state::fortecar) MCFG_DEVICE_PROGRAM_MAP(fortecar_map) MCFG_DEVICE_IO_MAP(fortecar_ports) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(200)) /* guess */ + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(200)); /* guess */ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/drivers/funkybee.cpp b/src/mame/drivers/funkybee.cpp index 085ca67dc09..c10a49a58b1 100644 --- a/src/mame/drivers/funkybee.cpp +++ b/src/mame/drivers/funkybee.cpp @@ -299,7 +299,7 @@ MACHINE_CONFIG_START(funkybee_state::funkybee) mainlatch.q_out_cb<3>().set(FUNC(funkybee_state::coin_counter_2_w)); mainlatch.q_out_cb<5>().set(FUNC(funkybee_state::gfx_bank_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/gaiden.cpp b/src/mame/drivers/gaiden.cpp index ca384d9c6ab..4b2e81c13e8 100644 --- a/src/mame/drivers/gaiden.cpp +++ b/src/mame/drivers/gaiden.cpp @@ -770,7 +770,7 @@ MACHINE_CONFIG_START(gaiden_state::shadoww) MCFG_DEVICE_PROGRAM_MAP(sound_map) /* IRQs are triggered by the YM2203 */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1009,7 +1009,7 @@ MACHINE_CONFIG_START(gaiden_state::mastninj) MCFG_MACHINE_START_OVERRIDE(gaiden_state,mastninj) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/galaga.cpp b/src/mame/drivers/galaga.cpp index 1498c1b385f..8b6c0f814da 100644 --- a/src/mame/drivers/galaga.cpp +++ b/src/mame/drivers/galaga.cpp @@ -1650,8 +1650,7 @@ MACHINE_CONFIG_START(bosco_state::bosco) //m_videolatch->q_out_cb<7>().set("50xx_2", FUNC(namco_50xx_device::reset_w)); //m_videolatch->q_out_cb<7>().append("52xx", FUNC(namco_52xx_device, reset_w)); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ @@ -1723,8 +1722,7 @@ MACHINE_CONFIG_START(galaga_state::galaga) // Q0-Q5 to 05XX for starfield control m_videolatch->q_out_cb<7>().set(FUNC(galaga_state::flip_screen_w)); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ @@ -1827,8 +1825,7 @@ MACHINE_CONFIG_START(xevious_state::xevious) MCFG_NAMCO_06XX_WRITE_2_CB(WRITE8("50xx", namco_50xx_device, write)) MCFG_NAMCO_06XX_WRITE_3_CB(WRITE8("54xx", namco_54xx_device, write)) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_QUANTUM_TIME(attotime::from_hz(60000)) /* 1000 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ @@ -1944,7 +1941,7 @@ MACHINE_CONFIG_START(digdug_state::digdug) MCFG_DEVICE_ADD("earom", ER2055) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD(m_screen, RASTER) diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index ae94d827a53..3f1307ce6db 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -1762,6 +1762,12 @@ void galaxian_state::theend_map(address_map &map) map(0x8000, 0xffff).rw(FUNC(galaxian_state::theend_ppi8255_r), FUNC(galaxian_state::theend_ppi8255_w)); } +void galaxian_state::froggervd_map(address_map &map) +{ + theend_map(map); + map(0x7800, 0x7800).mirror(0x07ff).r("watchdog", FUNC(watchdog_timer_device::reset_r)); +} + /* map not derived from schematics. Used by explorer and takeoff */ void galaxian_state::explorer_map(address_map &map) { @@ -5935,8 +5941,7 @@ MACHINE_CONFIG_START(galaxian_state::galaxian_base) MCFG_DEVICE_ADD("maincpu", Z80, GALAXIAN_PIXEL_CLOCK/3/2) MCFG_DEVICE_PROGRAM_MAP(galaxian_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_galaxian) @@ -6334,6 +6339,16 @@ MACHINE_CONFIG_START(galaxian_state::froggers) MACHINE_CONFIG_END +MACHINE_CONFIG_START(galaxian_state::froggervd) + konami_base(config); + konami_sound_1x_ay8910(config); + + /* alternate memory map */ + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(froggervd_map) +MACHINE_CONFIG_END + + MACHINE_CONFIG_START(galaxian_state::frogf) konami_base(config); konami_sound_1x_ay8910(config); @@ -10725,6 +10740,36 @@ ROM_START( froggrs ) ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) ) ROM_END +/* Video Dens Frogger */ +ROM_START( froggervd ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "frogvd_r1-libro-s1.ac9", 0x0000, 0x0800, CRC(81c2020e) SHA1(8c9292b399a408795e78b7dc5c706d3b526d3751) ) // 2716 + ROM_LOAD( "frogvd_r2-libro-s2.ae9", 0x0800, 0x0800, CRC(a892ab61) SHA1(828cc04d73738ea17055c152098d592b776f4fb1) BAD_DUMP ) // 2716 (hand-patched at XX0) + ROM_LOAD( "frogvd_r3-libro-s3.af9", 0x1000, 0x0800, CRC(637a2ff8) SHA1(e9b9fc692ca5d8deb9cd30d9d73ad25c8d8bafe1) ) // 2716 + ROM_LOAD( "frogvd_r4-libro-s4.ah9", 0x1800, 0x0800, CRC(1dc9ab15) SHA1(94b327dd2eaf0ffb19fee86a2a890a0012d52849) ) // 2716 + ROM_LOAD( "frogvd_r5-libro-s5.aj9", 0x2000, 0x0800, CRC(35e11cd2) SHA1(c2d01324c052d79ad9de00d13ddc4322f9c44292) ) // 2716 + ROM_LOAD( "frogvd_r6-libro-s6.al9", 0x2800, 0x0800, CRC(5db899ed) SHA1(e8d75daba8dfdb89078068a29a0ccf040dfca4da) ) // 2716 + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "frogvd_r11-ot1.bc5", 0x0000, 0x0800, CRC(79326efe) SHA1(087cd61ba9c09be6ff71be8f89933a4a0f620650) ) // 2716 + ROM_LOAD( "frogvd_r12-ot2.bd5", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) BAD_DUMP ) // 2716 (hand-patched at XXe) + ROM_LOAD( "frogvd_r13-ot3.be5", 0x1000, 0x0800, CRC(31d7eb27) SHA1(2e1d34ae4da385fd7cac94707d25eeddf4604e1a) ) // 2716 + + ROM_REGION( 0x1000, "gfx1", 0 ) + ROM_LOAD( "frogvd_r9-libro-c1.af9", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) ) // 2716 + ROM_LOAD( "frogvd_r10-libro-c2.ah9", 0x0800, 0x0800, CRC(658745f8) SHA1(e4e5c3e011c8a7233a36d29e10e08905873500aa) ) // 2716 + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "frogvd.5e", 0x0000, 0x0004, CRC(c5f12bc3) SHA1(b746ba06b596d4227fdc730a23bdf495f84e6a72) ) // 74s288n dumped as 82s123 + ROM_CONTINUE( 0x0010, 0x0004 ) + ROM_CONTINUE( 0x0004, 0x0004 ) + ROM_CONTINUE( 0x0014, 0x0004 ) + ROM_CONTINUE( 0x0008, 0x0004 ) + ROM_CONTINUE( 0x0018, 0x0004 ) + ROM_CONTINUE( 0x000c, 0x0004 ) + ROM_CONTINUE( 0x001c, 0x0004 ) +ROM_END + ROM_START( quaak ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1f.bin", 0x0000, 0x0800, CRC(5d0e2716) SHA1(c484ae162bfe5ef9d5d2a6930c9c476394e70bbd) ) @@ -12536,7 +12581,8 @@ GAME( 1981, froggermc, frogger, froggermc, froggermc, galaxian_state, init_ GAME( 1981, froggers, frogger, froggers, frogger, galaxian_state, init_froggers, ROT90, "bootleg", "Frog", MACHINE_SUPPORTS_SAVE ) GAME( 1981, frogf, frogger, frogf, frogger, galaxian_state, init_froggers, ROT90, "bootleg (Falcon)", "Frog (Falcon bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, frogg, frogger, frogg, frogg, galaxian_state, init_frogg, ROT90, "bootleg", "Frog (Galaxian hardware)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, froggrs, frogger, froggers, frogger, galaxian_state, init_froggrs, ROT90, "bootleg (Coin Music)", "Frogger (Scramble hardware)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, froggrs, frogger, froggers, frogger, galaxian_state, init_froggrs, ROT90, "bootleg (Coin Music)", "Frogger (Coin Music, bootleg on Scramble hardware)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, froggervd, frogger, froggervd, frogger, galaxian_state, init_quaak, ROT90, "bootleg (Video Dens)", "Frogger (Video Dens, bootleg on Scramble hardware)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, quaak, frogger, quaak, frogger, galaxian_state, init_quaak, ROT90, "bootleg", "Quaak (bootleg of Frogger)", MACHINE_SUPPORTS_SAVE ) // closest to Super Cobra hardware, presumably a bootleg from Germany (Quaak is the German frog sound) GAME( 1981, froggeram, frogger, froggeram, froggeram, galaxian_state, init_quaak, ROT90, "bootleg", "Frogger (bootleg on Amigo? hardware)", MACHINE_SUPPORTS_SAVE ) // meant to be Amigo hardware, but maybe a different bootleg than the one we have? diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp index 4d161777268..78834a5444e 100644 --- a/src/mame/drivers/galaxold.cpp +++ b/src/mame/drivers/galaxold.cpp @@ -2269,7 +2269,7 @@ MACHINE_CONFIG_START(galaxold_state::galaxold_base) MCFG_TIMER_DRIVER_ADD("int_timer", galaxold_state, galaxold_interrupt_timer) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_galaxian) diff --git a/src/mame/drivers/galgames.cpp b/src/mame/drivers/galgames.cpp index a831ffb081c..1bbb2afb549 100644 --- a/src/mame/drivers/galgames.cpp +++ b/src/mame/drivers/galgames.cpp @@ -983,7 +983,7 @@ MACHINE_CONFIG_START(galgames_state::galgames_base) MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2) MCFG_DEVICE_PROGRAM_MAP(galgames_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galgames_state, scanline_interrupt, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_GALGAMES_SLOT_ADD("slot") MCFG_GALGAMES_BIOS_CART_ADD( "cart0", 0) diff --git a/src/mame/drivers/galpani3.cpp b/src/mame/drivers/galpani3.cpp index d37c32598af..e3ca63100a7 100644 --- a/src/mame/drivers/galpani3.cpp +++ b/src/mame/drivers/galpani3.cpp @@ -465,7 +465,7 @@ MACHINE_CONFIG_START(galpani3_state::galpani3) EEPROM_93C46_16BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("toybox", KANEKO_TOYBOX, "eeprom", "DSW1", "mcuram", "mcudata") diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp index 8267d41d8fa..7cbd9cbfac9 100644 --- a/src/mame/drivers/galpanic.cpp +++ b/src/mame/drivers/galpanic.cpp @@ -239,7 +239,7 @@ MACHINE_CONFIG_START(galpanic_state::galpanic) MCFG_DEVICE_PROGRAM_MAP(galpanic_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, scanline, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -279,8 +279,7 @@ MACHINE_CONFIG_START(galpanic_state::galpanica) MCFG_KANEKO_HIT_TYPE(0) /* arm watchdog */ - MCFG_WATCHDOG_MODIFY("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + subdevice("watchdog")->set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ MACHINE_CONFIG_END diff --git a/src/mame/drivers/gaplus.cpp b/src/mame/drivers/gaplus.cpp index af559f86c70..db9c7435619 100644 --- a/src/mame/drivers/gaplus.cpp +++ b/src/mame/drivers/gaplus.cpp @@ -527,7 +527,7 @@ MACHINE_CONFIG_START(gaplus_base_state::gaplus_base) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* a high value to ensure proper synchronization of the CPUs */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_NAMCO_62XX_ADD("62xx", 24576000 / 6 / 2) /* totally made up - TODO: fix */ //MCFG_NAMCO_62XX_INPUT_0_CB(IOPORT("IN0L")) diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp index 5b07a3cb922..70b6e528c96 100644 --- a/src/mame/drivers/gauntlet.cpp +++ b/src/mame/drivers/gauntlet.cpp @@ -498,7 +498,7 @@ MACHINE_CONFIG_START(gauntlet_state::gauntlet_base) EEPROM_2804(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gauntlet) diff --git a/src/mame/drivers/gberet.cpp b/src/mame/drivers/gberet.cpp index 0518e4b64e5..b0e931cac93 100644 --- a/src/mame/drivers/gberet.cpp +++ b/src/mame/drivers/gberet.cpp @@ -414,7 +414,7 @@ MACHINE_CONFIG_START(gberet_state::gberet) MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6) // X1S (generated by a custom IC) MCFG_DEVICE_PROGRAM_MAP(gberet_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gberet_state, gberet_interrupt_tick, "screen", 0, 16) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_MACHINE_START_OVERRIDE(gberet_state,gberet) MCFG_MACHINE_RESET_OVERRIDE(gberet_state,gberet) diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp index 49c1e0c2219..71ed01d774f 100644 --- a/src/mame/drivers/gottlieb.cpp +++ b/src/mame/drivers/gottlieb.cpp @@ -1776,8 +1776,7 @@ MACHINE_CONFIG_START(gottlieb_state::gottlieb_core) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 16) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 16); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/gotya.cpp b/src/mame/drivers/gotya.cpp index e2780b5863b..63e3c256c8a 100644 --- a/src/mame/drivers/gotya.cpp +++ b/src/mame/drivers/gotya.cpp @@ -216,7 +216,7 @@ MACHINE_CONFIG_START(gotya_state::gotya) MCFG_DEVICE_PROGRAM_MAP(gotya_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", gotya_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/goupil.cpp b/src/mame/drivers/goupil.cpp index 8b092ed4124..5a62a95acc2 100644 --- a/src/mame/drivers/goupil.cpp +++ b/src/mame/drivers/goupil.cpp @@ -597,7 +597,7 @@ void goupil_g2_state::goupil_g2(machine_config &config) m_screen->set_size((80*8), (24*(8+4))); m_screen->set_visarea(0, (80*8)-1, 0, (24*(8+4))-1); - PALETTE(config, m_palette, 2); + PALETTE(config, m_palette, 3); m_palette->set_init("palette", FUNC(palette_device::palette_init_monochrome_highlight)); mc6845_device &crtc(MC6845(config, "crtc", 14.318181_MHz_XTAL / 8)); diff --git a/src/mame/drivers/gradius3.cpp b/src/mame/drivers/gradius3.cpp index a1f1a52c43e..1cea45f628e 100644 --- a/src/mame/drivers/gradius3.cpp +++ b/src/mame/drivers/gradius3.cpp @@ -296,7 +296,7 @@ MACHINE_CONFIG_START(gradius3_state::gradius3) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/grchamp.cpp b/src/mame/drivers/grchamp.cpp index c550d7b5c2a..a4571ab7738 100644 --- a/src/mame/drivers/grchamp.cpp +++ b/src/mame/drivers/grchamp.cpp @@ -755,8 +755,7 @@ MACHINE_CONFIG_START(grchamp_state::grchamp) MCFG_DEVICE_PROGRAM_MAP(sound_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(grchamp_state, irq0_line_hold, (double)SOUND_CLOCK/4/16/16/10/16) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* video hardware */ diff --git a/src/mame/drivers/gridlee.cpp b/src/mame/drivers/gridlee.cpp index 67459d57a22..a796146039f 100644 --- a/src/mame/drivers/gridlee.cpp +++ b/src/mame/drivers/gridlee.cpp @@ -404,7 +404,7 @@ MACHINE_CONFIG_START(gridlee_state::gridlee) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); LS259(config, m_latch); // type can only be guessed m_latch->q_out_cb<0>().set_output("led0"); diff --git a/src/mame/drivers/gunsmoke.cpp b/src/mame/drivers/gunsmoke.cpp index d9611c70493..68156d4f9c9 100644 --- a/src/mame/drivers/gunsmoke.cpp +++ b/src/mame/drivers/gunsmoke.cpp @@ -312,7 +312,7 @@ MACHINE_CONFIG_START(gunsmoke_state::gunsmoke) MCFG_DEVICE_PROGRAM_MAP(sound_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(gunsmoke_state, irq0_line_hold, 4*60) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp index 024a6c59118..86e98898c75 100644 --- a/src/mame/drivers/harddriv.cpp +++ b/src/mame/drivers/harddriv.cpp @@ -1463,7 +1463,7 @@ MACHINE_CONFIG_START(harddriv_state::driver_nomsp) MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 117, true) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); ADC0809(config, m_adc8, 1000000); // unknown clock m_adc8->in_callback<0>().set_ioport("8BADC.0"); diff --git a/src/mame/drivers/hcastle.cpp b/src/mame/drivers/hcastle.cpp index ec4c8b0004d..34672ff0a32 100644 --- a/src/mame/drivers/hcastle.cpp +++ b/src/mame/drivers/hcastle.cpp @@ -196,7 +196,7 @@ MACHINE_CONFIG_START(hcastle_state::hcastle) MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) MCFG_DEVICE_PROGRAM_MAP(sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM8) diff --git a/src/mame/drivers/hexion.cpp b/src/mame/drivers/hexion.cpp index 468e13b7c6e..872262039bf 100644 --- a/src/mame/drivers/hexion.cpp +++ b/src/mame/drivers/hexion.cpp @@ -259,7 +259,7 @@ MACHINE_CONFIG_START(hexion_state::hexion) MCFG_DEVICE_ADD("maincpu", Z80, XTAL(24'000'000)/4) /* Z80B 6 MHz @ 17F, xtal verified, divider not verified */ MCFG_DEVICE_PROGRAM_MAP(hexion_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", hexion_state, scanline, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); K053252(config, m_k053252, XTAL(24'000'000)/2); /* K053252, X0-010(?) @8D, xtal verified, divider not verified */ m_k053252->int1_ack().set(FUNC(hexion_state::irq_ack_w)); diff --git a/src/mame/drivers/holeland.cpp b/src/mame/drivers/holeland.cpp index f071f8c37b0..a627865c8c2 100644 --- a/src/mame/drivers/holeland.cpp +++ b/src/mame/drivers/holeland.cpp @@ -288,7 +288,7 @@ MACHINE_CONFIG_START(holeland_state::holeland) m_latch->q_out_cb<6>().set(FUNC(holeland_state::flipscreen_x_w)); m_latch->q_out_cb<7>().set(FUNC(holeland_state::flipscreen_y_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -369,7 +369,7 @@ MACHINE_CONFIG_START(holeland_state::crzrally) m_latch->parallel_out_cb().set(FUNC(holeland_state::pal_offs_w)).mask(0x03); m_latch->q_out_cb<5>().set(FUNC(holeland_state::coin_counter_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp index 1821febea98..1c48d2258d0 100644 --- a/src/mame/drivers/hornet.cpp +++ b/src/mame/drivers/hornet.cpp @@ -1079,7 +1079,7 @@ MACHINE_CONFIG_START(hornet_state::hornet) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); // PCB description at top doesn't mention any EEPROM on the base board... // EEPROM_93C46_16BIT(config, "eeprom"); diff --git a/src/mame/drivers/hyperspt.cpp b/src/mame/drivers/hyperspt.cpp index 7a571b2025d..2d2b5aa13a2 100644 --- a/src/mame/drivers/hyperspt.cpp +++ b/src/mame/drivers/hyperspt.cpp @@ -312,7 +312,7 @@ MACHINE_CONFIG_START(hyperspt_state::hyperspt) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD(m_screen, RASTER) diff --git a/src/mame/drivers/jackal.cpp b/src/mame/drivers/jackal.cpp index 0154c98fa45..f1d37d55095 100644 --- a/src/mame/drivers/jackal.cpp +++ b/src/mame/drivers/jackal.cpp @@ -368,7 +368,7 @@ MACHINE_CONFIG_START(jackal_state::jackal) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp index 62e62fa6dda..4613b2ce55d 100644 --- a/src/mame/drivers/jaguar.cpp +++ b/src/mame/drivers/jaguar.cpp @@ -1855,7 +1855,7 @@ MACHINE_CONFIG_START(jaguar_state::cojagr3k) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); VT83C461(config, m_ide).options(cojag_devices, "hdd", nullptr, true); m_ide->irq_handler().set(FUNC(jaguar_state::external_int)); diff --git a/src/mame/drivers/jailbrek.cpp b/src/mame/drivers/jailbrek.cpp index 98073e12096..38d93ac6bce 100644 --- a/src/mame/drivers/jailbrek.cpp +++ b/src/mame/drivers/jailbrek.cpp @@ -268,7 +268,7 @@ MACHINE_CONFIG_START(jailbrek_state::jailbrek) MCFG_DEVICE_PROGRAM_MAP(jailbrek_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(jailbrek_state, interrupt_nmi, 500) /* ? */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_jailbrek) diff --git a/src/mame/drivers/jchan.cpp b/src/mame/drivers/jchan.cpp index dc089330f62..f595198d3b1 100644 --- a/src/mame/drivers/jchan.cpp +++ b/src/mame/drivers/jchan.cpp @@ -612,7 +612,7 @@ MACHINE_CONFIG_START(jchan_state::jchan) MCFG_DEVICE_ADD("sub", M68000, 16000000) MCFG_DEVICE_PROGRAM_MAP(jchan_sub) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_jchan) diff --git a/src/mame/drivers/jclub2.cpp b/src/mame/drivers/jclub2.cpp index 730b515ab69..a37893cb845 100644 --- a/src/mame/drivers/jclub2.cpp +++ b/src/mame/drivers/jclub2.cpp @@ -1143,7 +1143,7 @@ MACHINE_CONFIG_START(jclub2o_state::jclub2o) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); EEPROM_S29290_16BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_TICKET_DISPENSER_ADD("hopper1", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) MCFG_TICKET_DISPENSER_ADD("hopper2", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) @@ -1177,7 +1177,7 @@ MACHINE_CONFIG_START(jclub2_state::jclub2) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); EEPROM_93C46_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_TICKET_DISPENSER_ADD("hopper1", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) MCFG_TICKET_DISPENSER_ADD("hopper2", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) @@ -1212,7 +1212,7 @@ MACHINE_CONFIG_START(darkhors_state::darkhors) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); EEPROM_93C46_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_TICKET_DISPENSER_ADD("hopper1", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) MCFG_TICKET_DISPENSER_ADD("hopper2", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) diff --git a/src/mame/drivers/jedi.cpp b/src/mame/drivers/jedi.cpp index 839afa84440..1d3d4875afe 100644 --- a/src/mame/drivers/jedi.cpp +++ b/src/mame/drivers/jedi.cpp @@ -354,7 +354,7 @@ MACHINE_CONFIG_START(jedi_state::jedi) outlatch.q_out_cb<6>().set(FUNC(jedi_state::audio_reset_w)); outlatch.q_out_cb<7>().set(FUNC(jedi_state::video_off_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ jedi_video(config); diff --git a/src/mame/drivers/jrpacman.cpp b/src/mame/drivers/jrpacman.cpp index 0407b0b9ff2..fcd54cef2ef 100644 --- a/src/mame/drivers/jrpacman.cpp +++ b/src/mame/drivers/jrpacman.cpp @@ -299,7 +299,7 @@ MACHINE_CONFIG_START(jrpacman_state::jrpacman) latch2.q_out_cb<4>().set(FUNC(jrpacman_state::jrpacman_charbank_w)); latch2.q_out_cb<5>().set(FUNC(jrpacman_state::jrpacman_spritebank_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/junofrst.cpp b/src/mame/drivers/junofrst.cpp index 790f08138a4..66e2bcabe65 100644 --- a/src/mame/drivers/junofrst.cpp +++ b/src/mame/drivers/junofrst.cpp @@ -426,7 +426,7 @@ MACHINE_CONFIG_START(junofrst_state::junofrst) mainlatch.q_out_cb<4>().set(FUNC(junofrst_state::flip_screen_x_w)); // HFF mainlatch.q_out_cb<5>().set(FUNC(junofrst_state::flip_screen_y_w)); // VFLIP - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_PALETTE_ADD("palette", 16) MCFG_PALETTE_FORMAT(BBGGGRRR) diff --git a/src/mame/drivers/kenseim.cpp b/src/mame/drivers/kenseim.cpp index aec34d7a567..ad985da6393 100644 --- a/src/mame/drivers/kenseim.cpp +++ b/src/mame/drivers/kenseim.cpp @@ -477,7 +477,8 @@ static const z80_daisy_config daisy_chain_gamecpu[] = { nullptr } }; -MACHINE_CONFIG_START(kenseim_state::kenseim) +void kenseim_state::kenseim(machine_config &config) +{ cps1_12MHz(config); /* basic machine hardware */ @@ -493,18 +494,18 @@ MACHINE_CONFIG_START(kenseim_state::kenseim) gamecpu.in_pc_callback().set_ioport("CAB-IN"); gamecpu.in_pd_callback().set(FUNC(kenseim_state::cpu_portd_r)); - MCFG_MB89363B_ADD("mb89363b") + mb89363b_device &ppi_x2(MB89363B(config, "mb89363b")); // a,b,c always $80: all ports set as output // d,e,f always $92: port D and E as input, port F as output - MCFG_MB89363B_OUT_PORTA_CB(WRITE8(*this, kenseim_state, mb8936_porta_w)) - MCFG_MB89363B_OUT_PORTB_CB(WRITE8(*this, kenseim_state, mb8936_portb_w)) - MCFG_MB89363B_OUT_PORTC_CB(WRITE8(*this, kenseim_state, mb8936_portc_w)) - MCFG_MB89363B_IN_PORTD_CB(IOPORT("MOLEA")) - MCFG_MB89363B_IN_PORTE_CB(IOPORT("MOLEB")) - MCFG_MB89363B_OUT_PORTF_CB(WRITE8(*this, kenseim_state, mb8936_portf_w)) + ppi_x2.out_pa().set(FUNC(kenseim_state::mb8936_porta_w)); + ppi_x2.out_pb().set(FUNC(kenseim_state::mb8936_portb_w)); + ppi_x2.out_pc().set(FUNC(kenseim_state::mb8936_portc_w)); + ppi_x2.in_pd().set_ioport("MOLEA"); + ppi_x2.in_pe().set_ioport("MOLEB"); + ppi_x2.out_pf().set(FUNC(kenseim_state::mb8936_portf_w)); - MCFG_QUANTUM_PERFECT_CPU("maincpu") -MACHINE_CONFIG_END + config.m_perfect_cpu_quantum = subtag("maincpu"); +} static INPUT_PORTS_START( kenseim ) // the regular CPS1 input ports are used for comms with the extra board diff --git a/src/mame/drivers/klax.cpp b/src/mame/drivers/klax.cpp index fa504b03876..4e085feb436 100644 --- a/src/mame/drivers/klax.cpp +++ b/src/mame/drivers/klax.cpp @@ -201,7 +201,7 @@ MACHINE_CONFIG_START(klax_state::klax) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_klax) diff --git a/src/mame/drivers/kyugo.cpp b/src/mame/drivers/kyugo.cpp index 49f42ac102e..bbb47a078fc 100644 --- a/src/mame/drivers/kyugo.cpp +++ b/src/mame/drivers/kyugo.cpp @@ -566,7 +566,7 @@ MACHINE_CONFIG_END MACHINE_CONFIG_START(kyugo_state::gyrodine) kyugo_base(config); /* add watchdog */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(gyrodine_main_map) MACHINE_CONFIG_END diff --git a/src/mame/drivers/labyrunr.cpp b/src/mame/drivers/labyrunr.cpp index f9ce1c52720..350aba889fe 100644 --- a/src/mame/drivers/labyrunr.cpp +++ b/src/mame/drivers/labyrunr.cpp @@ -171,7 +171,7 @@ MACHINE_CONFIG_START(labyrunr_state::labyrunr) MCFG_DEVICE_PROGRAM_MAP(labyrunr_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(labyrunr_state, labyrunr_timer_interrupt, 4*60) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/liberatr.cpp b/src/mame/drivers/liberatr.cpp index 9ed5915adc9..f021a5a9fdb 100644 --- a/src/mame/drivers/liberatr.cpp +++ b/src/mame/drivers/liberatr.cpp @@ -439,7 +439,7 @@ MACHINE_CONFIG_START(liberatr_state::liberatr) m_outlatch->q_out_cb<6>().set(FUNC(liberatr_state::coin_counter_left_w)); m_outlatch->q_out_cb<7>().set([this] (int state) { m_planet_select = state; }); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/lockon.cpp b/src/mame/drivers/lockon.cpp index 4472cc36aea..ec7b9e45b32 100644 --- a/src/mame/drivers/lockon.cpp +++ b/src/mame/drivers/lockon.cpp @@ -485,8 +485,7 @@ MACHINE_CONFIG_START(lockon_state::lockon) MCFG_DEVICE_PROGRAM_MAP(sound_prg) MCFG_DEVICE_IO_MAP(sound_io) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_ASTABLE(10000, 4700, 10000e-12) * 4096) + WATCHDOG_TIMER(config, m_watchdog).set_time(PERIOD_OF_555_ASTABLE(10000, 4700, 10000e-12) * 4096); MCFG_QUANTUM_TIME(attotime::from_hz(600)) m58990_device &adc(M58990(config, "adc", 16_MHz_XTAL / 16)); diff --git a/src/mame/drivers/looping.cpp b/src/mame/drivers/looping.cpp index e6492b5fca8..ac1db512b37 100644 --- a/src/mame/drivers/looping.cpp +++ b/src/mame/drivers/looping.cpp @@ -652,7 +652,7 @@ MACHINE_CONFIG_START(looping_state::looping) mainlatch.q_out_cb<6>().set(FUNC(looping_state::main_irq_ack_w)); mainlatch.q_out_cb<7>().set(FUNC(looping_state::watchdog_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/lwings.cpp b/src/mame/drivers/lwings.cpp index 9bed8a568b0..82ae08e5430 100644 --- a/src/mame/drivers/lwings.cpp +++ b/src/mame/drivers/lwings.cpp @@ -942,7 +942,7 @@ MACHINE_CONFIG_START(lwings_state::lwings) MCFG_DEVICE_PROGRAM_MAP(lwings_sound_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(lwings_state, irq0_line_hold, 222) // approximation from pcb music recording - where is the frequency actually derived from?? - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM8) @@ -992,7 +992,7 @@ MACHINE_CONFIG_START(lwings_state::fball) MCFG_DEVICE_PROGRAM_MAP(fball_sound_map) // MCFG_DEVICE_PERIODIC_INT_DRIVER(lwings_state, irq0_line_hold, 222) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM8) diff --git a/src/mame/drivers/m79152pc.cpp b/src/mame/drivers/m79152pc.cpp index 2c37227a46e..1ae87cbb669 100644 --- a/src/mame/drivers/m79152pc.cpp +++ b/src/mame/drivers/m79152pc.cpp @@ -2,11 +2,21 @@ // copyright-holders:Miodrag Milanovic,AJR /*************************************************************************** - Mera-Elzab 79152pc + Mera-Elzab 79152pc - This is terminal + This system provides a half-featured emulation of the ADM-3A or similar + terminals by TeleVideo and Wyse. The “half-featured” part is that some + commands are not recognized at all and others are merely filtered out. - 29/12/2011 Skeleton driver. + The 8035 here serves as a soft CRTC, counting horizontal scans and + outputting row addresses (dependent on scrolling) and vertical sync + pulses. The present emulation produces incorrect video output at the + vertical margins and is extremely prone to desyncing. + + “PC Shadow” is the name of the software this terminal either runs or + interfaces with. The actual keyboard is unknown, but is almost + certainly PC-XT compatible. The character set is a nonstandard variant + of CP 437 that incorporates a few Polish letters. ****************************************************************************/ @@ -31,36 +41,59 @@ class m79152pc_state : public driver_device public: m79152pc_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) - , m_p_videoram(*this, "videoram") - , m_p_attributes(*this, "attributes") + , m_videoram(*this, "videoram") + , m_attributes(*this, "attributes") + , m_chargen(*this, "chargen") , m_maincpu(*this, "maincpu") - , m_p_chargen(*this, "chargen") + , m_mcu(*this, "mcu") , m_uart(*this, "uart") + , m_screen(*this, "screen") , m_beep(*this, "beep") { } void m79152pc(machine_config &config); +protected: + virtual void machine_start() override; + private: DECLARE_WRITE8_MEMBER(beep_w); DECLARE_WRITE_LINE_MEMBER(latch_full_w); DECLARE_READ_LINE_MEMBER(mcu_t0_r); + DECLARE_READ_LINE_MEMBER(mcu_t1_r); + void mcu_p1_w(u8 data); + void mcu_p2_w(u8 data); + void lc_reset_w(u8 data); - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + TIMER_CALLBACK_MEMBER(hsync_on); + TIMER_CALLBACK_MEMBER(hsync_off); + + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void screen_draw_line(bitmap_ind16 &bitmap, unsigned y); void mem_map(address_map &map); void io_map(address_map &map); void mcu_map(address_map &map); void mcu_io_map(address_map &map); - required_shared_ptr m_p_videoram; - required_shared_ptr m_p_attributes; + required_shared_ptr m_videoram; + required_shared_ptr m_attributes; + required_region_ptr m_chargen; + required_device m_maincpu; - required_region_ptr m_p_chargen; + required_device m_mcu; required_device m_uart; + required_device m_screen; required_device m_beep; + u8 m_line_base; + u8 m_line_count; bool m_latch_full; + u8 m_mcu_p2; + bool m_hsync; + + emu_timer *m_hsync_on_timer; + emu_timer *m_hsync_off_timer; }; WRITE8_MEMBER(m79152pc_state::beep_w) @@ -78,6 +111,26 @@ READ_LINE_MEMBER(m79152pc_state::mcu_t0_r) return m_latch_full ? 0 : 1; } +READ_LINE_MEMBER(m79152pc_state::mcu_t1_r) +{ + return m_hsync ? 0 : 1; +} + +void m79152pc_state::mcu_p1_w(u8 data) +{ + m_line_base = data; +} + +void m79152pc_state::mcu_p2_w(u8 data) +{ + m_mcu_p2 = data; +} + +void m79152pc_state::lc_reset_w(u8 data) +{ + m_line_count = (data >> 4) & 0xf; +} + void m79152pc_state::mem_map(address_map &map) { map.unmap_value_high(); @@ -106,7 +159,7 @@ void m79152pc_state::mcu_map(address_map &map) void m79152pc_state::mcu_io_map(address_map &map) { - map(0x00, 0x00).mirror(0xff).r("mculatch", FUNC(i8212_device::read)); + map(0x00, 0x00).mirror(0xff).r("mculatch", FUNC(i8212_device::read)).w(FUNC(m79152pc_state::lc_reset_w)); } /* Input ports */ @@ -114,37 +167,55 @@ static INPUT_PORTS_START( m79152pc ) INPUT_PORTS_END -uint32_t m79152pc_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +TIMER_CALLBACK_MEMBER(m79152pc_state::hsync_on) { -// Attributes are unknown so are not implemented - uint8_t y,ra,chr,gfx; //,attr; - uint16_t sy=0,ma=0,x; + m_screen->update_now(); + m_mcu->set_input_line(MCS48_INPUT_IRQ, ASSERT_LINE); + m_hsync = true; + m_line_count = (m_line_count + 1) & 0xf; +} - for (y = 0; y < 25; y++) +TIMER_CALLBACK_MEMBER(m79152pc_state::hsync_off) +{ + unsigned vpos = m_screen->vpos(); + m_mcu->set_input_line(MCS48_INPUT_IRQ, CLEAR_LINE); + m_hsync_on_timer->adjust(m_screen->time_until_pos(vpos, 640)); + m_hsync = false; +} + +void m79152pc_state::screen_draw_line(bitmap_ind16 &bitmap, unsigned y) +{ + u16 ma = u16(m_line_base) << 4; + u8 ra = m_line_count & 0xf; + + u16 *p = &bitmap.pix16(y++); + + for (u16 x = ma; x < ma + 80; x++) { - for (ra = 0; ra < 12; ra++) - { - uint16_t *p = &bitmap.pix16(sy++); + // BIT(attr, 3) should probably be blinking + // BIT(attr, 1) may be used for high-intensity text ( + u8 chr = m_videoram[x]; + u8 attr = m_attributes[x]; + u8 gfx = m_chargen[(chr << 4) | (BIT(attr, 2) && ra == 15 ? 3 : ra)]; + if (BIT(attr, 0)) + gfx ^= 0xff; - for (x = ma; x < ma + 80; x++) - { - chr = m_p_videoram[x]; - //attr = m_p_attributes[x]; - gfx = m_p_chargen[((chr<<4) | ra) + 4 ]; - - /* Display a scanline of a character */ - *p++ = BIT(gfx, 7); - *p++ = BIT(gfx, 6); - *p++ = BIT(gfx, 5); - *p++ = BIT(gfx, 4); - *p++ = BIT(gfx, 3); - *p++ = BIT(gfx, 2); - *p++ = BIT(gfx, 1); - *p++ = BIT(gfx, 0); - } - } - ma+=80; + *p++ = BIT(gfx, 7); + *p++ = BIT(gfx, 6); + *p++ = BIT(gfx, 5); + *p++ = BIT(gfx, 4); + *p++ = BIT(gfx, 3); + *p++ = BIT(gfx, 2); + *p++ = BIT(gfx, 1); + *p++ = BIT(gfx, 0); } +} + +u32 m79152pc_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + for (unsigned y = cliprect.top(); y <= cliprect.bottom(); y++) + screen_draw_line(bitmap, y); + return 0; } @@ -166,6 +237,26 @@ static GFXDECODE_START( gfx_m79152pc ) GFXDECODE_ENTRY( "chargen", 0x0000, m79152pc_charlayout, 0, 1 ) GFXDECODE_END + +void m79152pc_state::machine_start() +{ + m_latch_full = false; + m_mcu_p2 = 0xff; + m_line_base = 0; + m_line_count = 0; + m_hsync = false; + + m_hsync_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(m79152pc_state::hsync_on), this)); + m_hsync_off_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(m79152pc_state::hsync_off), this)); + m_hsync_off_timer->adjust(m_screen->time_until_pos(9, 0), 0, m_screen->scan_period()); + + save_item(NAME(m_latch_full)); + save_item(NAME(m_mcu_p2)); + save_item(NAME(m_line_base)); + save_item(NAME(m_line_count)); + save_item(NAME(m_hsync)); +} + static const z80_daisy_config daisy_chain[] = { { "ctc" }, @@ -180,20 +271,21 @@ MACHINE_CONFIG_START(m79152pc_state::m79152pc) m_maincpu->set_addrmap(AS_IO, &m79152pc_state::io_map); m_maincpu->set_daisy_config(daisy_chain); - mcs48_cpu_device &mcu(I8035(config, "mcu", 6'000'000)); // NEC D8035HLC - mcu.set_addrmap(AS_PROGRAM, &m79152pc_state::mcu_map); - mcu.set_addrmap(AS_IO, &m79152pc_state::mcu_io_map); - mcu.t0_in_cb().set(FUNC(m79152pc_state::mcu_t0_r)); + I8035(config, m_mcu, 6'000'000); // NEC D8035HLC + m_mcu->set_addrmap(AS_PROGRAM, &m79152pc_state::mcu_map); + m_mcu->set_addrmap(AS_IO, &m79152pc_state::mcu_io_map); + m_mcu->t0_in_cb().set(FUNC(m79152pc_state::mcu_t0_r)); + m_mcu->t1_in_cb().set(FUNC(m79152pc_state::mcu_t1_r)); + m_mcu->p1_out_cb().set(FUNC(m79152pc_state::mcu_p1_w)); + m_mcu->p2_out_cb().set(FUNC(m79152pc_state::mcu_p2_w)); + m_mcu->p2_out_cb().append("ctc", FUNC(z80ctc_device::trg0)).bit(6); // determines beep duration + m_mcu->p2_out_cb().append("ctc", FUNC(z80ctc_device::trg3)).bit(6); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(50) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ - MCFG_SCREEN_SIZE(640, 300) - MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 300-1) - MCFG_SCREEN_UPDATE_DRIVER(m79152pc_state, screen_update) - MCFG_SCREEN_PALETTE("palette") - MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("ctc", z80ctc_device, trg0)) // determines beep duration (probably too slow) + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_raw(50 * 720 * 324, 720, 0, 640, 324, 0, 250); + m_screen->set_screen_update(FUNC(m79152pc_state::screen_update)); + m_screen->set_palette("palette"); MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_m79152pc) MCFG_PALETTE_ADD_MONOCHROME("palette") @@ -219,6 +311,8 @@ MACHINE_CONFIG_START(m79152pc_state::m79152pc) ctc.zc_callback<2>().set(m_uart, FUNC(z80sio_device::txca_w)); ctc.zc_callback<2>().append(m_uart, FUNC(z80sio_device::rxca_w)); + // FIXME: Channel A should be the modem channel. Channel B should be a PC keyboard + // that outputs XT scancodes, which are then rebroadcast through channel A! Z80SIO(config, m_uart, 4'000'000); // UB8560D m_uart->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_uart->out_txda_callback().set("keyboard", FUNC(rs232_port_device::write_txd)); @@ -250,6 +344,9 @@ ROM_START( m79152pc ) ROM_REGION( 0x0800, "mcu", 0 ) ROM_LOAD( "char.bin", 0x0000, 0x0800, CRC(da3792a5) SHA1(b4a4f0d61d8082b7909a346a5b01494c53cf8d05)) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD( "7641apc.bin", 0x0000, 0x0200, NO_DUMP) ROM_END /* Driver */ diff --git a/src/mame/drivers/mappy.cpp b/src/mame/drivers/mappy.cpp index 45f47e9ca20..0c08524c23e 100644 --- a/src/mame/drivers/mappy.cpp +++ b/src/mame/drivers/mappy.cpp @@ -1332,8 +1332,7 @@ MACHINE_CONFIG_START(mappy_state::superpac_common) mainlatch.q_out_cb<4>().append(m_namcoio[1], FUNC(namcoio_device::set_reset_line)).invert(); mainlatch.q_out_cb<5>().set_inputline(m_subcpu, INPUT_LINE_RESET).invert(); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs ls157_device &dipmux(LS157(config, "dipmux")); @@ -1447,8 +1446,7 @@ MACHINE_CONFIG_START(mappy_state::phozon) mainlatch.q_out_cb<5>().set_inputline(m_subcpu, INPUT_LINE_RESET).invert(); mainlatch.q_out_cb<6>().set_inputline(m_subcpu2, INPUT_LINE_RESET).invert(); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs NAMCO_58XX(config, m_namcoio[0], 0); @@ -1509,8 +1507,7 @@ MACHINE_CONFIG_START(mappy_state::mappy_common) mainlatch.q_out_cb<4>().append(m_namcoio[1], FUNC(namcoio_device::set_reset_line)).invert(); mainlatch.q_out_cb<5>().set_inputline(m_subcpu, INPUT_LINE_RESET).invert(); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - an high value to ensure proper synchronization of the CPUs ls157_device &dipmux(LS157(config, "dipmux")); @@ -1557,12 +1554,11 @@ void mappy_state::mappy(machine_config &config) m_namcoio[1]->out_callback<0>().set("dipmux", FUNC(ls157_device::select_w)).bit(0); } -MACHINE_CONFIG_START(mappy_state::digdug2) - +void mappy_state::digdug2(machine_config &config) +{ mappy_common(config); - MCFG_WATCHDOG_MODIFY("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 0) + subdevice("watchdog")->set_vblank_count("screen", 0); NAMCO_58XX(config, m_namcoio[0], 0); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); @@ -1576,7 +1572,7 @@ MACHINE_CONFIG_START(mappy_state::digdug2) m_namcoio[1]->in_callback<2>().set_ioport("DSW1").rshift(4); m_namcoio[1]->in_callback<3>().set_ioport("DSW0"); m_namcoio[1]->out_callback<0>().set("dipmux", FUNC(ls157_device::select_w)).bit(0); -MACHINE_CONFIG_END +} MACHINE_CONFIG_START(mappy_state::todruaga) digdug2(config); diff --git a/src/mame/drivers/mcatadv.cpp b/src/mame/drivers/mcatadv.cpp index 91cf0fece12..44c1f30e5e2 100644 --- a/src/mame/drivers/mcatadv.cpp +++ b/src/mame/drivers/mcatadv.cpp @@ -460,8 +460,7 @@ MACHINE_CONFIG_START(mcatadv_state::mcatadv) MCFG_PALETTE_ADD("palette", 0x2000/2) MCFG_PALETTE_FORMAT(xGGGGGRRRRRBBBBB) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ /* sound hardware */ diff --git a/src/mame/drivers/mcr.cpp b/src/mame/drivers/mcr.cpp index 614c211a93f..d2631c3c10f 100644 --- a/src/mame/drivers/mcr.cpp +++ b/src/mame/drivers/mcr.cpp @@ -1763,8 +1763,7 @@ MACHINE_CONFIG_START(mcr_state::mcr_90009) m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_ctc->zc_callback<0>().set(m_ctc, FUNC(z80ctc_device::trg1)); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 16) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 16); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp index d6a2862828e..ece9d7e0ebb 100644 --- a/src/mame/drivers/mcr3.cpp +++ b/src/mame/drivers/mcr3.cpp @@ -1092,8 +1092,7 @@ MACHINE_CONFIG_START(mcr3_state::mcrmono) m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_ctc->zc_callback<0>().set(m_ctc, FUNC(z80ctc_device::trg1)); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 16) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 16); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/drivers/mcr68.cpp b/src/mame/drivers/mcr68.cpp index f38b6a6ded4..b8c4a83b335 100644 --- a/src/mame/drivers/mcr68.cpp +++ b/src/mame/drivers/mcr68.cpp @@ -902,8 +902,7 @@ MACHINE_CONFIG_START(mcr68_state::mcr68) MCFG_DEVICE_ADD("maincpu", M68000, 7723800) MCFG_DEVICE_PROGRAM_MAP(mcr68_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); MCFG_MACHINE_START_OVERRIDE(mcr68_state,mcr68) MCFG_MACHINE_RESET_OVERRIDE(mcr68_state,mcr68) @@ -932,31 +931,30 @@ MACHINE_CONFIG_START(mcr68_state::mcr68) MACHINE_CONFIG_END -MACHINE_CONFIG_START(mcr68_state::xenophob) +void mcr68_state::xenophob(machine_config &config) +{ mcr68(config); /* basic machine hardware */ - MCFG_DEVICE_ADD("sg", MIDWAY_SOUNDS_GOOD) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) -MACHINE_CONFIG_END + MIDWAY_SOUNDS_GOOD(config, m_sounds_good).add_route(ALL_OUTPUTS, "speaker", 1.0); +} -MACHINE_CONFIG_START(mcr68_state::intlaser) +void mcr68_state::intlaser(machine_config &config) +{ mcr68(config); /* basic machine hardware */ - MCFG_DEVICE_ADD("sg", MIDWAY_SOUNDS_GOOD) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) + MIDWAY_SOUNDS_GOOD(config, m_sounds_good).add_route(ALL_OUTPUTS, "speaker", 1.0); - MCFG_WATCHDOG_MODIFY("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 800) -MACHINE_CONFIG_END + subdevice("watchdog")->set_vblank_count("screen", 800); +} MACHINE_CONFIG_START(mcr68_state::spyhunt2) mcr68(config); /* basic machine hardware */ - MCFG_DEVICE_ADD("sg", MIDWAY_SOUNDS_GOOD) + MCFG_DEVICE_ADD(m_sounds_good, MIDWAY_SOUNDS_GOOD) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) MCFG_DEVICE_ADD("tcs", MIDWAY_TURBO_CHEAP_SQUEAK) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) diff --git a/src/mame/drivers/megazone.cpp b/src/mame/drivers/megazone.cpp index d08b46c7549..5536e6be4a0 100644 --- a/src/mame/drivers/megazone.cpp +++ b/src/mame/drivers/megazone.cpp @@ -318,7 +318,7 @@ MACHINE_CONFIG_START(megazone_state::megazone) mainlatch.q_out_cb<5>().set(FUNC(megazone_state::flipscreen_w)); mainlatch.q_out_cb<7>().set(FUNC(megazone_state::irq_mask_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/meritm.cpp b/src/mame/drivers/meritm.cpp index e0698e81570..36d9d259c9b 100644 --- a/src/mame/drivers/meritm.cpp +++ b/src/mame/drivers/meritm.cpp @@ -1180,8 +1180,7 @@ MACHINE_CONFIG_START(meritm_state::crt260) m_ppi->out_pb_callback().set_nop(); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1200)) // DS1232, TD connected to VCC + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_msec(1200)); // DS1232, TD connected to VCC MCFG_MACHINE_START_OVERRIDE(meritm_state, crt260) NS16550(config, m_uart, UART_CLK); diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp index db553296ae9..0ae0ebbea43 100644 --- a/src/mame/drivers/metro.cpp +++ b/src/mame/drivers/metro.cpp @@ -3448,7 +3448,7 @@ MACHINE_CONFIG_START(metro_state::dokyusp) EEPROM_93C46_16BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ i4300_config_384x224(config); @@ -3476,7 +3476,7 @@ MACHINE_CONFIG_START(metro_state::gakusai) EEPROM_93C46_16BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ i4300_config_320x240(config); @@ -3505,7 +3505,7 @@ MACHINE_CONFIG_START(metro_state::gakusai2) EEPROM_93C46_16BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ i4300_config_320x240(config); @@ -3671,7 +3671,7 @@ MACHINE_CONFIG_START(metro_state::mouja) MCFG_DEVICE_PROGRAM_MAP(mouja_map) MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(metro_state,metro_irq_callback) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ i4300_config(config); diff --git a/src/mame/drivers/mhavoc.cpp b/src/mame/drivers/mhavoc.cpp index d6e952a1619..3d74e3f4f44 100644 --- a/src/mame/drivers/mhavoc.cpp +++ b/src/mame/drivers/mhavoc.cpp @@ -8,7 +8,7 @@ Modified 10/08/2006 by Jess M. Askey to include support for Speech which was not stuffed on production Major Havoc PCB's. However, the hardware if stuffed is functional. Speech is used in Major Havoc Return - to Vaxx. + to Vax. Games supported: * Alpha One @@ -529,7 +529,7 @@ MACHINE_CONFIG_START(mhavoc_state::mhavoc) MCFG_TIMER_DRIVER_ADD_PERIODIC("5k_timer", mhavoc_state, mhavoc_cpu_irq_clock, attotime::from_hz(MHAVOC_CLOCK_5K)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_VECTOR_ADD("vector") @@ -799,7 +799,7 @@ ROM_END GAME( 1983, mhavoc, 0, mhavoc, mhavoc, mhavoc_state, empty_init, ROT0, "Atari", "Major Havoc (rev 3)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, mhavoc2, mhavoc, mhavoc, mhavoc, mhavoc_state, empty_init, ROT0, "Atari", "Major Havoc (rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 2006, mhavocrv, mhavoc, mhavocrv, mhavocrv, mhavoc_state, init_mhavocrv, ROT0, "Atari / JMA (hack/homebrew)", "Major Havoc (Return to Vax)", MACHINE_SUPPORTS_SAVE ) +GAME( 2006, mhavocrv, mhavoc, mhavocrv, mhavocrv, mhavoc_state, init_mhavocrv, ROT0, "hack (JMA)", "Major Havoc - Return to Vax", MACHINE_SUPPORTS_SAVE ) GAME( 1983, mhavocp, mhavoc, mhavoc, mhavocp, mhavoc_state, empty_init, ROT0, "Atari", "Major Havoc (prototype)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, alphaone, mhavoc, alphaone, alphaone, mhavoc_state, empty_init, ROT0, "Atari", "Alpha One (prototype, 3 lives)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, alphaonea,mhavoc, alphaone, alphaone, mhavoc_state, empty_init, ROT0, "Atari", "Alpha One (prototype, 5 lives)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/midtunit.cpp b/src/mame/drivers/midtunit.cpp index 0605d4a1861..0dd4230e667 100644 --- a/src/mame/drivers/midtunit.cpp +++ b/src/mame/drivers/midtunit.cpp @@ -606,7 +606,7 @@ MACHINE_CONFIG_START(midtunit_state::tunit_core) MCFG_MACHINE_RESET_OVERRIDE(midtunit_state,midtunit) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_PALETTE_ADD("palette", 32768) diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp index e3e7252cad7..a528b21680f 100644 --- a/src/mame/drivers/midvunit.cpp +++ b/src/mame/drivers/midvunit.cpp @@ -1074,7 +1074,7 @@ MACHINE_CONFIG_START(midvunit_state::midvcommon) MCFG_TIMER_ADD_NONE("timer0") MCFG_TIMER_ADD_NONE("timer1") - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_PALETTE_ADD("palette", 32768) diff --git a/src/mame/drivers/mikie.cpp b/src/mame/drivers/mikie.cpp index e92f653f235..86612a0e223 100644 --- a/src/mame/drivers/mikie.cpp +++ b/src/mame/drivers/mikie.cpp @@ -275,7 +275,7 @@ MACHINE_CONFIG_START(mikie_state::mikie) mainlatch.q_out_cb<6>().set(FUNC(mikie_state::flipscreen_w)); // FLIP mainlatch.q_out_cb<7>().set(FUNC(mikie_state::irq_mask_w)); // INT - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/missb2.cpp b/src/mame/drivers/missb2.cpp index 029d2ca1be9..94f7686f133 100644 --- a/src/mame/drivers/missb2.cpp +++ b/src/mame/drivers/missb2.cpp @@ -482,8 +482,7 @@ MACHINE_CONFIG_START(missb2_state::missb2) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 128); + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); MCFG_MACHINE_START_OVERRIDE(missb2_state,missb2) MCFG_MACHINE_RESET_OVERRIDE(missb2_state,missb2) diff --git a/src/mame/drivers/missile.cpp b/src/mame/drivers/missile.cpp index ceb7416cab1..6eacbe30c95 100644 --- a/src/mame/drivers/missile.cpp +++ b/src/mame/drivers/missile.cpp @@ -1157,8 +1157,7 @@ MACHINE_CONFIG_START(missile_state::missile) MCFG_DEVICE_ADD("maincpu", M6502, MASTER_CLOCK/8) MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); /* video hardware */ MCFG_PALETTE_ADD("palette", 8) diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp index 8ff5fd1b7e5..aa84d4c004a 100644 --- a/src/mame/drivers/model2.cpp +++ b/src/mame/drivers/model2.cpp @@ -4687,8 +4687,8 @@ ROM_START( hotdp ) ROM_REGION( 0x800000, "copro_data", 0 ) // TGPx4 program - ROM_LOAD32_WORD("cop0.29", 0x000000, 0x200000, CRC(fc2380f5) SHA1(02a2f8bfc3915787f3aa9645de8a0af4450cea33) ) - ROM_LOAD32_WORD("cop1.30", 0x000002, 0x200000, CRC(e6ae8f3c) SHA1(9a2c3d3b305e4707f7691d6242ff1bf47d1ced10) ) + ROM_LOAD32_WORD("copro0.29", 0x000000, 0x200000, CRC(fc2380f5) SHA1(02a2f8bfc3915787f3aa9645de8a0af4450cea33) ) + ROM_LOAD32_WORD("copro1.30", 0x000002, 0x200000, CRC(e6ae8f3c) SHA1(9a2c3d3b305e4707f7691d6242ff1bf47d1ced10) ) ROM_REGION( 0x2000000, "polygons", 0 ) // Models, Flash ROM modules instead if DIP ROMs ROM_LOAD32_WORD("tgp0.17", 0x0000000, 0x400000, CRC(b458ec9b) SHA1(8d51443d5d0e790dc9f0060d8cedc50f177fee04) ) @@ -4699,19 +4699,19 @@ ROM_START( hotdp ) ROM_LOAD32_WORD("tgp5.23", 0x1000002, 0x400000, CRC(29f311f3) SHA1(2f89767aaefeb2650091b37c4d505701681bb375) ) ROM_REGION( 0x1000000, "textures", 0 ) // Textures, Flash ROM modules instead if DIP ROMs - ROM_LOAD32_WORD("tex1.27", 0x0000000, 0x400000, BAD_DUMP CRC(86ef3ee4) SHA1(8ad2aa98d94e9a4f1abb61a02aba95064e533a61) ) // ROM gives stable reads with sum D82C, while label have handwriten byte sum 28DA + ROM_LOAD32_WORD("tex1.27", 0x0000000, 0x400000, BAD_DUMP CRC(86ef3ee4) SHA1(8ad2aa98d94e9a4f1abb61a02aba95064e533a61) ) // one of flash ROMs had broken most significant address pin, dump contains only half of even-bytes data mirrored 2x, correct sum should be 28DA ROM_LOAD32_WORD("tex0.25", 0x0000002, 0x400000, CRC(fb10366a) SHA1(189389f84fa5f04c586953c54254f7bd09dd8d92) ) ROM_LOAD32_WORD("tex3.28", 0x0800000, 0x400000, CRC(9a61d7e8) SHA1(d9a563f74e485df5bdf149afaed69811b5536712) ) ROM_LOAD32_WORD("tex2.26", 0x0800002, 0x400000, CRC(84ec2923) SHA1(daea23864fbc48c14177e77cd783f73621472708) ) ROM_REGION( 0x080000, "audiocpu", 0 ) // Sound program - ROM_LOAD16_WORD_SWAP("sprg.31", 0x000000, 0x080000, CRC(30accd2e) SHA1(098f07feaa007647f86ea02ef5e1102859c5890a) ) + ROM_LOAD16_WORD_SWAP("sndpgm0.31", 0x000000, 0x080000, CRC(30accd2e) SHA1(098f07feaa007647f86ea02ef5e1102859c5890a) ) ROM_REGION16_BE( 0x800000, "samples", 0 ) // Samples - ROM_LOAD16_WORD_SWAP("snd0.32", 0x000000, 0x200000, CRC(e0a8dd56) SHA1(c80abe8e7541946b7dd615da98aeb04170ebf91d) ) - ROM_LOAD16_WORD_SWAP("snd1.33", 0x200000, 0x200000, CRC(a517834f) SHA1(232ec02fedf259a6112dd04e8a6b3a7a1ba17786) ) - ROM_LOAD16_WORD_SWAP("snd2.34", 0x400000, 0x200000, CRC(f0c529bb) SHA1(3c8f3843e9719079d993206feb083305aa85b0fb) ) - ROM_LOAD16_WORD_SWAP("snd3.35", 0x600000, 0x200000, CRC(3ad48d53) SHA1(b17f513705217966bc224721b444957de66d74b4) ) + ROM_LOAD16_WORD_SWAP("sound1.32", 0x000000, 0x200000, CRC(e0a8dd56) SHA1(c80abe8e7541946b7dd615da98aeb04170ebf91d) ) + ROM_LOAD16_WORD_SWAP("sound2.33", 0x200000, 0x200000, CRC(a517834f) SHA1(232ec02fedf259a6112dd04e8a6b3a7a1ba17786) ) + ROM_LOAD16_WORD_SWAP("sound3.34", 0x400000, 0x200000, CRC(f0c529bb) SHA1(3c8f3843e9719079d993206feb083305aa85b0fb) ) + ROM_LOAD16_WORD_SWAP("sound4.35", 0x600000, 0x200000, CRC(3ad48d53) SHA1(b17f513705217966bc224721b444957de66d74b4) ) ROM_END ROM_START( lastbrnx ) /* Last Bronx Revision A (Export), Model 2B */ diff --git a/src/mame/drivers/momoko.cpp b/src/mame/drivers/momoko.cpp index 075dbc517a4..8a7d744c88b 100644 --- a/src/mame/drivers/momoko.cpp +++ b/src/mame/drivers/momoko.cpp @@ -265,7 +265,7 @@ MACHINE_CONFIG_START(momoko_state::momoko) MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(10'000'000)/4) /* 2.5MHz */ MCFG_DEVICE_PROGRAM_MAP(momoko_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/multfish.cpp b/src/mame/drivers/multfish.cpp index f9f91b212a1..8f9c29b7dfb 100644 --- a/src/mame/drivers/multfish.cpp +++ b/src/mame/drivers/multfish.cpp @@ -1032,7 +1032,7 @@ MACHINE_CONFIG_START(igrosoft_gamble_state::igrosoft_gamble) MCFG_DEVICE_IO_MAP(igrosoft_gamble_portmap) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igrosoft_gamble_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/mw18w.cpp b/src/mame/drivers/mw18w.cpp index f56106b479e..b502c17ef1d 100644 --- a/src/mame/drivers/mw18w.cpp +++ b/src/mame/drivers/mw18w.cpp @@ -287,7 +287,7 @@ MACHINE_CONFIG_START(mw18w_state::mw18w) MCFG_DEVICE_PROGRAM_MAP(mw18w_map) MCFG_DEVICE_IO_MAP(mw18w_portmap) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* no video! */ diff --git a/src/mame/drivers/mw8080bw.cpp b/src/mame/drivers/mw8080bw.cpp index d49f3643ff8..972dedb478e 100644 --- a/src/mame/drivers/mw8080bw.cpp +++ b/src/mame/drivers/mw8080bw.cpp @@ -416,7 +416,7 @@ MACHINE_CONFIG_START(mw8080bw_state::seawolf) /* there is no watchdog */ /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ seawolf_audio(config); @@ -518,7 +518,7 @@ MACHINE_CONFIG_START(mw8080bw_state::gunfight) /* there is no watchdog */ /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ gunfight_audio(config); @@ -748,7 +748,7 @@ MACHINE_CONFIG_START(mw8080bw_state::tornbase) /* there is no watchdog */ /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ tornbase_audio(config); @@ -855,11 +855,10 @@ MACHINE_CONFIG_START(mw8080bw_state::zzzap) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(zzzap_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(RES_M(1), CAP_U(1))) /* 1.1s */ + WATCHDOG_TIMER(config, m_watchdog).set_time(PERIOD_OF_555_MONOSTABLE(RES_M(1), CAP_U(1))); /* 1.1s */ /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ /* zzzap_audio(config); */ @@ -970,8 +969,7 @@ MACHINE_CONFIG_START(mw8080bw_state::maze) MCFG_DEVICE_IO_MAP(maze_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,maze) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(RES_K(270), CAP_U(10))) /* 2.97s */ + WATCHDOG_TIMER(config, m_watchdog).set_time(PERIOD_OF_555_MONOSTABLE(RES_K(270), CAP_U(10))); /* 2.97s */ /* audio hardware */ maze_audio(config); @@ -1064,11 +1062,10 @@ MACHINE_CONFIG_START(mw8080bw_state::boothill) MCFG_DEVICE_IO_MAP(boothill_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,boothill) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(RES_K(270), CAP_U(10))) /* 2.97s */ + WATCHDOG_TIMER(config, m_watchdog).set_time(PERIOD_OF_555_MONOSTABLE(RES_K(270), CAP_U(10))); /* 2.97s */ /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ boothill_audio(config); @@ -1172,8 +1169,7 @@ MACHINE_CONFIG_START(mw8080bw_state::checkmat) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(checkmat_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(RES_K(270), CAP_U(10))) /* 2.97s */ + WATCHDOG_TIMER(config, m_watchdog).set_time(PERIOD_OF_555_MONOSTABLE(RES_K(270), CAP_U(10))); /* 2.97s */ /* audio hardware */ checkmat_audio(config); @@ -1302,11 +1298,10 @@ MACHINE_CONFIG_START(mw8080bw_state::desertgu) MCFG_DEVICE_IO_MAP(desertgu_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,desertgu) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ desertgu_audio(config); @@ -1505,11 +1500,10 @@ MACHINE_CONFIG_START(mw8080bw_state::dplay) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(dplay_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ dplay_audio(config); @@ -1603,11 +1597,10 @@ MACHINE_CONFIG_START(mw8080bw_state::gmissile) MCFG_DEVICE_IO_MAP(gmissile_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,gmissile) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ gmissile_audio(config); @@ -1699,11 +1692,10 @@ MACHINE_CONFIG_START(mw8080bw_state::m4) MCFG_DEVICE_IO_MAP(m4_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,m4) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ m4_audio(config); @@ -1870,11 +1862,10 @@ MACHINE_CONFIG_START(mw8080bw_state::clowns) MCFG_DEVICE_IO_MAP(clowns_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,clowns) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ clowns_audio(config); @@ -1968,11 +1959,10 @@ MACHINE_CONFIG_START(mw8080bw_state::spacwalk) MCFG_DEVICE_IO_MAP(spacwalk_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,clowns) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ spacwalk_audio(config); @@ -2052,11 +2042,10 @@ MACHINE_CONFIG_START(mw8080bw_state::shuffle) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(shuffle_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ shuffle_audio(config); @@ -2141,11 +2130,10 @@ MACHINE_CONFIG_START(mw8080bw_state::dogpatch) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(dogpatch_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ dogpatch_audio(config); @@ -2294,8 +2282,7 @@ MACHINE_CONFIG_START(mw8080bw_state::spcenctr) MCFG_DEVICE_IO_MAP(spcenctr_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,spcenctr) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* timers */ MCFG_TIMER_DRIVER_ADD_PERIODIC("strobeon", mw8080bw_state, spcenctr_strobe_timer_callback, attotime::from_hz(SPCENCTR_STROBE_FREQ)) @@ -2392,8 +2379,7 @@ MACHINE_CONFIG_START(mw8080bw_state::phantom2) MCFG_DEVICE_IO_MAP(phantom2_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,phantom2) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2401,7 +2387,7 @@ MACHINE_CONFIG_START(mw8080bw_state::phantom2) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mw8080bw_state, screen_vblank_phantom2)) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ phantom2_audio(config); @@ -2534,11 +2520,10 @@ MACHINE_CONFIG_START(mw8080bw_state::bowler) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(bowler_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ bowler_audio(config); @@ -2748,15 +2733,14 @@ MACHINE_CONFIG_START(mw8080bw_state::invaders) MCFG_DEVICE_IO_MAP(invaders_io_map) MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,invaders) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* video hardware */ MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_UPDATE_DRIVER(mw8080bw_state, screen_update_invaders) /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ invaders_audio(config); @@ -2834,11 +2818,10 @@ MACHINE_CONFIG_START(mw8080bw_state::blueshrk) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(blueshrk_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ blueshrk_audio(config); @@ -2938,11 +2921,10 @@ MACHINE_CONFIG_START(mw8080bw_state::invad2ct) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_IO_MAP(invad2ct_io_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) + WATCHDOG_TIMER(config, m_watchdog).set_time(255 * attotime::from_hz(MW8080BW_60HZ)); /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* audio hardware */ invad2ct_audio(config); diff --git a/src/mame/drivers/mwsub.cpp b/src/mame/drivers/mwsub.cpp index e41b666e84a..9e204f5c64d 100644 --- a/src/mame/drivers/mwsub.cpp +++ b/src/mame/drivers/mwsub.cpp @@ -230,7 +230,7 @@ MACHINE_CONFIG_START(submar_state::submar) MCFG_DEVICE_PROGRAM_MAP(submar_map) MCFG_DEVICE_IO_MAP(submar_portmap) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* no video! */ diff --git a/src/mame/drivers/namcos2.cpp b/src/mame/drivers/namcos2.cpp index 15542204f90..79f101200bf 100644 --- a/src/mame/drivers/namcos2.cpp +++ b/src/mame/drivers/namcos2.cpp @@ -575,12 +575,6 @@ WRITE8_MEMBER(namcos2_state::dpram_byte_w) m_dpram[offset] = data; } -READ8_MEMBER(namcos2_state::ack_mcu_vbl_r) -{ - m_c68->set_input_line(m37450_device::M3745X_INT1_LINE, CLEAR_LINE); - return 0; -} - /*************************************************************/ /* SHARED 68000 CPU Memory declarations */ /*************************************************************/ @@ -774,61 +768,6 @@ void namcos2_state::sound_default_am(address_map &map) map(0xd000, 0xffff).rom(); } - -/*************************************************************/ -/* 68705 IO CPU Memory declarations */ -/*************************************************************/ - -void namcos2_state::mcu_default_am(address_map &map) -{ - /* input ports and dips are mapped here */ - map(0x0000, 0x003f).ram(); /* Fill in register to stop logging */ - map(0x0000, 0x0000).nopr(); /* Keep logging quiet */ - map(0x0001, 0x0001).portr("MCUB"); - map(0x0002, 0x0002).portr("MCUC"); - map(0x0003, 0x0003).rw(FUNC(namcos2_state::namcos2_mcu_port_d_r), FUNC(namcos2_state::namcos2_mcu_port_d_w)); - map(0x0007, 0x0007).portr("MCUH"); - map(0x0010, 0x0010).rw(FUNC(namcos2_state::namcos2_mcu_analog_ctrl_r), FUNC(namcos2_state::namcos2_mcu_analog_ctrl_w)); - map(0x0011, 0x0011).rw(FUNC(namcos2_state::namcos2_mcu_analog_port_r), FUNC(namcos2_state::namcos2_mcu_analog_port_w)); - map(0x0040, 0x01bf).ram(); - map(0x01c0, 0x1fff).rom(); - map(0x2000, 0x2000).portr("DSW"); - map(0x3000, 0x3000).portr("MCUDI0"); - map(0x3001, 0x3001).portr("MCUDI1"); - map(0x3002, 0x3002).portr("MCUDI2"); - map(0x3003, 0x3003).portr("MCUDI3"); - map(0x5000, 0x57ff).rw(FUNC(namcos2_state::dpram_byte_r), FUNC(namcos2_state::dpram_byte_w)).share("dpram"); - map(0x6000, 0x6fff).nopr(); /* watchdog */ - map(0x8000, 0xffff).rom(); -} - - -/*************************************************************/ -/* 37450 (C68) IO CPU Memory declarations */ -/*************************************************************/ -READ8_MEMBER(namcos2_state::c68_p5_r) -{ - return (m_player_mux) ? ioport("MCUB2")->read() : ioport("MCUB")->read(); -} - -WRITE8_MEMBER(namcos2_state::c68_p3_w) -{ - m_player_mux = (data & 0x80) ? 1 : 0; -} - -void namcos2_state::c68_default_am(address_map &map) -{ - /* input ports and dips are mapped here */ - map(0x2000, 0x2000).portr("DSW"); - map(0x3000, 0x3000).portr("MCUDI0"); - map(0x3001, 0x3001).portr("MCUDI1"); - map(0x3002, 0x3002).portr("MCUDI2"); - map(0x3003, 0x3003).portr("MCUDI3"); - map(0x5000, 0x57ff).rw(FUNC(namcos2_state::dpram_byte_r), FUNC(namcos2_state::dpram_byte_w)).share("dpram"); - map(0x6000, 0x6fff).r(FUNC(namcos2_state::ack_mcu_vbl_r)); // VBL ack - map(0x8000, 0xffff).rom().region("c68", 0); -} - /*************************************************************/ /* */ /* NAMCO SYSTEM 2 PORT MACROS */ @@ -1724,6 +1663,53 @@ void namcos2_state::configure_c148_standard(machine_config &config) m_slave_intc->link_c148_device(m_master_intc); } +void namcos2_state::configure_c65_standard(machine_config &config) +{ + NAMCOC65(config, m_c65, C65_CPU_CLOCK); + m_c65->in_pb_callback().set_ioport("MCUB"); + m_c65->in_pc_callback().set_ioport("MCUC"); + m_c65->in_ph_callback().set_ioport("MCUH"); + m_c65->in_pdsw_callback().set_ioport("DSW"); + m_c65->di0_in_cb().set_ioport("MCUDI0"); + m_c65->di1_in_cb().set_ioport("MCUDI1"); + m_c65->di2_in_cb().set_ioport("MCUDI2"); + m_c65->di3_in_cb().set_ioport("MCUDI3"); + m_c65->an0_in_cb().set_ioport("AN0"); + m_c65->an1_in_cb().set_ioport("AN1"); + m_c65->an2_in_cb().set_ioport("AN2"); + m_c65->an3_in_cb().set_ioport("AN3"); + m_c65->an4_in_cb().set_ioport("AN4"); + m_c65->an5_in_cb().set_ioport("AN5"); + m_c65->an6_in_cb().set_ioport("AN6"); + m_c65->an7_in_cb().set_ioport("AN7"); + m_c65->dp_in_callback().set(FUNC(namcos2_state::dpram_byte_r)); + m_c65->dp_out_callback().set(FUNC(namcos2_state::dpram_byte_w)); +} + +void namcos2_state::configure_c68_standard(machine_config &config) +{ + NAMCOC68(config, m_c68new, C68_CPU_CLOCK); + m_c68new->in_pb_callback().set_ioport("MCUB"); + m_c68new->in_pb2_callback().set_ioport("MCUB2"); + m_c68new->in_pc_callback().set_ioport("MCUC"); + m_c68new->in_ph_callback().set_ioport("MCUH"); + m_c68new->in_pdsw_callback().set_ioport("DSW"); + m_c68new->di0_in_cb().set_ioport("MCUDI0"); + m_c68new->di1_in_cb().set_ioport("MCUDI1"); + m_c68new->di2_in_cb().set_ioport("MCUDI2"); + m_c68new->di3_in_cb().set_ioport("MCUDI3"); + m_c68new->an0_in_cb().set_ioport("AN0"); + m_c68new->an1_in_cb().set_ioport("AN1"); + m_c68new->an2_in_cb().set_ioport("AN2"); + m_c68new->an3_in_cb().set_ioport("AN3"); + m_c68new->an4_in_cb().set_ioport("AN4"); + m_c68new->an5_in_cb().set_ioport("AN5"); + m_c68new->an6_in_cb().set_ioport("AN6"); + m_c68new->an7_in_cb().set_ioport("AN7"); + m_c68new->dp_in_callback().set(FUNC(namcos2_state::dpram_byte_r)); + m_c68new->dp_out_callback().set(FUNC(namcos2_state::dpram_byte_w)); +} + // TODO: temp TIMER_DEVICE_CALLBACK_MEMBER(namcos2_state::screen_scanline) { @@ -1734,6 +1720,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos2_state::screen_scanline) { m_master_intc->vblank_irq_trigger(); m_slave_intc->vblank_irq_trigger(); + + if (m_c65) + m_c65->ext_interrupt(HOLD_LINE); + + if (m_c68new) + m_c68new->ext_interrupt(ASSERT_LINE); } if(scanline == cur_posirq) @@ -1758,9 +1750,7 @@ MACHINE_CONFIG_START(namcos2_state::base) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ - MCFG_DEVICE_PROGRAM_MAP(mcu_default_am) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) + configure_c65_standard(config); MCFG_QUANTUM_TIME(attotime::from_hz(12000)) /* CPU slices per frame */ @@ -1836,9 +1826,7 @@ MACHINE_CONFIG_START(namcos2_state::gollygho) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ - MCFG_DEVICE_PROGRAM_MAP(mcu_default_am) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) + configure_c65_standard(config); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -1873,6 +1861,8 @@ MACHINE_CONFIG_START(namcos2_state::gollygho) MCFG_SOUND_ROUTE(1, "rspeaker", 0.80) MACHINE_CONFIG_END + + MACHINE_CONFIG_START(namcos2_state::finallap) MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */ MCFG_DEVICE_PROGRAM_MAP(master_finallap_am) @@ -1886,9 +1876,7 @@ MACHINE_CONFIG_START(namcos2_state::finallap) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ - MCFG_DEVICE_PROGRAM_MAP(mcu_default_am) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) + configure_c65_standard(config); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -1948,9 +1936,7 @@ MACHINE_CONFIG_START(namcos2_state::sgunner) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ - MCFG_DEVICE_PROGRAM_MAP(mcu_default_am) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) + configure_c65_standard(config); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -2000,14 +1986,7 @@ MACHINE_CONFIG_START(namcos2_state::sgunner2) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("c68", M37450, C68_CPU_CLOCK) /* C68 @ 8.192MHz (49.152MHz OSC/6) - I/O handling */ - MCFG_M3745X_ADC14_CALLBACKS(IOPORT("AN0"), IOPORT("AN1"), IOPORT("AN2"), IOPORT("AN3")) - MCFG_M3745X_ADC58_CALLBACKS(IOPORT("AN4"), IOPORT("AN5"), IOPORT("AN6"), IOPORT("AN7")) - MCFG_M3745X_PORT3_CALLBACKS(IOPORT("MCUH"), WRITE8(*this, namcos2_state, c68_p3_w)) // coins/test/service - MCFG_M3745X_PORT5_CALLBACKS(READ8(*this, namcos2_state, c68_p5_r), NOOP) // muxed player 1/2 - MCFG_M3745X_PORT6_CALLBACKS(IOPORT("MCUC"), NOOP) // unused in sgunner2 - MCFG_DEVICE_PROGRAM_MAP(c68_default_am) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_assert) // 37450 maps INT1 to irq0 as it's the first external interrupt on that chip + configure_c68_standard(config); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -2057,9 +2036,7 @@ MACHINE_CONFIG_START(namcos2_state::luckywld) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ - MCFG_DEVICE_PROGRAM_MAP(mcu_default_am) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) + configure_c65_standard(config); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -2112,9 +2089,7 @@ MACHINE_CONFIG_START(namcos2_state::metlhawk) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705, C65_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - I/O handling */ - MCFG_DEVICE_PROGRAM_MAP(mcu_default_am) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos2_shared_state, irq0_line_hold) + configure_c65_standard(config); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */ @@ -2209,9 +2184,8 @@ ROM_START( assault ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65b.bin", 0x000000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, CRC(22240076) SHA1(916fc0e6b338a6dda84399df910c3c9463e6b915) ) @@ -2263,9 +2237,8 @@ ROM_START( assaultj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65b.bin", 0x000000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, CRC(22240076) SHA1(916fc0e6b338a6dda84399df910c3c9463e6b915) ) @@ -2317,9 +2290,8 @@ ROM_START( assaultp ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65b.bin", 0x000000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_128K( "atobj0.bin", 0x000000, CRC(22240076) SHA1(916fc0e6b338a6dda84399df910c3c9463e6b915) ) @@ -2371,9 +2343,8 @@ ROM_START( burnforc ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "bu_obj-0.bin", 0x000000, 0x80000, CRC(24c919a1) SHA1(ddf5bfbf1bbe2a10d6708b618b77f1d6d7862372) ) @@ -2423,9 +2394,8 @@ ROM_START( burnforco ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "bu_obj-0.bin", 0x000000, 0x80000, CRC(24c919a1) SHA1(ddf5bfbf1bbe2a10d6708b618b77f1d6d7862372) ) @@ -2476,9 +2446,8 @@ ROM_START( cosmogng ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "co1obj0.bin", 0x000000, 0x80000, CRC(5df8ce0c) SHA1(afb9fb6e048af5aed8976192b847c0674c5e5ce1) ) @@ -2522,9 +2491,8 @@ ROM_START( cosmogngj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "co1obj0.bin", 0x000000, 0x80000, CRC(5df8ce0c) SHA1(afb9fb6e048af5aed8976192b847c0674c5e5ce1) ) @@ -2568,9 +2536,8 @@ ROM_START( dirtfoxj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "df1_obj0.bin", 0x000000, 0x80000, CRC(b6bd1a68) SHA1(38677b54cd257411db499ba03b9176422797bf64) ) @@ -2621,9 +2588,8 @@ ROM_START( dsaber ) ROM_RELOAD( 0x010000, 0x020000 ) ROM_LOAD( "do1 snd1.snd1", 0x030000, 0x020000, CRC(c4ca6f3f) SHA1(829a053451be07b296fb4d97818d59eb1e68c807) ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "do obj-0a.obj0", 0x000000, 0x80000, CRC(f08c6648) SHA1(ac5221ba159f2390060cbbb7d9cd8148c7bb4a02) ) @@ -2672,9 +2638,8 @@ ROM_START( dsabera ) ROM_RELOAD( 0x010000, 0x020000 ) ROM_LOAD( "do1 snd1.snd1", 0x030000, 0x020000, CRC(c4ca6f3f) SHA1(829a053451be07b296fb4d97818d59eb1e68c807) ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "do obj-0a.obj0", 0x000000, 0x80000, CRC(f08c6648) SHA1(ac5221ba159f2390060cbbb7d9cd8148c7bb4a02) ) @@ -2722,9 +2687,8 @@ ROM_START( dsaberj ) ROM_RELOAD( 0x010000, 0x020000 ) ROM_LOAD( "do1 snd1.snd1", 0x030000, 0x020000, CRC(c4ca6f3f) SHA1(829a053451be07b296fb4d97818d59eb1e68c807) ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "do obj-0a.obj0", 0x000000, 0x80000, CRC(f08c6648) SHA1(ac5221ba159f2390060cbbb7d9cd8148c7bb4a02) ) @@ -2771,9 +2735,8 @@ ROM_START( finallap ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* no external MCU ROM? previously loaded type C, but the game predates it */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_FILL( 0, 0x200000, 0xff ) @@ -2826,9 +2789,8 @@ ROM_START( finallapd ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* no external MCU ROM? previously loaded type C, but the game predates it */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_FILL( 0, 0x200000, 0xff ) @@ -2881,9 +2843,8 @@ ROM_START( finallapc ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* no external MCU ROM? previously loaded type C, but the game predates it */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_FILL( 0, 0x200000, 0xff ) @@ -2936,9 +2897,8 @@ ROM_START( finallapjc ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* no external MCU ROM? previously loaded type C, but the game predates it */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_FILL( 0, 0x200000, 0xff ) @@ -2991,9 +2951,8 @@ ROM_START( finallapjb ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* no external MCU ROM? previously loaded type C, but the game predates it */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_FILL( 0, 0x200000, 0xff ) @@ -3045,9 +3004,8 @@ ROM_START( finalap2 ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "fl2obj0", 0x000000, 0x80000, CRC(3657dd7a) SHA1(8f286ec0642b09ff42bf0dbd784ae257d4ab278a) ) @@ -3102,9 +3060,8 @@ ROM_START( finalap2j ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "fl2obj0", 0x000000, 0x80000, CRC(3657dd7a) SHA1(8f286ec0642b09ff42bf0dbd784ae257d4ab278a) ) @@ -3160,9 +3117,8 @@ ROM_START( finalap3 ) // this set displays MOTION (Ver. 3) in the test mode menu ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "flt_obj-0.4c", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) ) @@ -3221,9 +3177,8 @@ ROM_START( finalap3a ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "flt_obj-0.4c", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) ) @@ -3285,9 +3240,8 @@ ROM_START( finalap3j ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "flt_obj-0.4c", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) ) @@ -3345,11 +3299,8 @@ ROM_START( finalap3jc ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* M37450S2FP I/O MCU */ - /* The M37450 is unemulated so we're using the C65/6805 program instead. - This particular M37450 variant has no internal ROM. */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c68.3f", 0x008000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "flt_obj-0.4c", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) ) @@ -3406,9 +3357,8 @@ ROM_START( finalap3bl ) // bootleg set ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "fltobj0", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) ) @@ -3466,9 +3416,8 @@ ROM_START( finehour ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "fh1_ob0.bin", 0x000000, 0x80000, CRC(b1fd86f1) SHA1(5504ca1a83c329a19d5632b9ac40cfa7e8ced304) ) @@ -3680,9 +3629,8 @@ ROM_START( fourtrax ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "fx_obj-0.4c", 0x000000, 0x040000, CRC(1aa60ffa) SHA1(1fa625a52c763b8db718af14e9f3cc3e076ff83b) ) @@ -3745,9 +3693,8 @@ ROM_START( fourtraxa ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "fx_obj-0.4c", 0x000000, 0x040000, CRC(1aa60ffa) SHA1(1fa625a52c763b8db718af14e9f3cc3e076ff83b) ) @@ -3812,9 +3759,8 @@ ROM_START( marvland ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_256K( "mv1-obj0.bin", 0x000000, CRC(73a29361) SHA1(fc8ac9a063c1f18ae619ddca3062491774c86040) ) @@ -3863,9 +3809,8 @@ ROM_START( marvlandj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_256K( "mv1-obj0.bin", 0x000000, CRC(73a29361) SHA1(fc8ac9a063c1f18ae619ddca3062491774c86040) ) @@ -3912,9 +3857,8 @@ ROM_START( metlhawk ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x200000, "gfx1", 0 ) /* Sprites */ ROM_LOAD32_BYTE( "mhobj-4.5c", 0x000000, 0x40000, CRC(e3590e1a) SHA1(9afffa54a63e676f5d78a01c76ca50cd795dd6e9) ) @@ -3983,9 +3927,8 @@ ROM_START( metlhawkj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x200000, "gfx1", 0 ) /* Sprites */ ROM_LOAD32_BYTE( "mhobj-4.5c", 0x000000, 0x40000, CRC(e3590e1a) SHA1(9afffa54a63e676f5d78a01c76ca50cd795dd6e9) ) @@ -4054,9 +3997,8 @@ ROM_START( mirninja ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65b.bin", 0x008000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65b.bin", 0x000000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_128K( "mn_obj0.bin", 0x000000, CRC(6bd1e290) SHA1(11e5f7adef0d7a519246c6d88f9371e49a6b49e9) ) @@ -4109,9 +4051,8 @@ ROM_START( ordyne ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2_c65b.3f", 0x008000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2_c65b.3f", 0x000000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_128K( "or_obj-0.obj0", 0x000000, CRC(67b2b9e4) SHA1(4e589c28ed23224e40d3c68055ada0136cbf94cb) ) @@ -4168,9 +4109,8 @@ ROM_START( ordyneje ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2_c65b.3f", 0x008000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2_c65b.3f", 0x000000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_128K( "or_obj-0.obj0", 0x000000, CRC(67b2b9e4) SHA1(4e589c28ed23224e40d3c68055ada0136cbf94cb) ) @@ -4227,9 +4167,8 @@ ROM_START( ordynej ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2_c65b.3f", 0x008000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2_c65b.3f", 0x000000, 0x008000, CRC(e9f2922a) SHA1(5767d2f85e1eb3de19192e73b02221f28b1fbb83) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_128K( "or_obj-0.obj0", 0x000000, CRC(67b2b9e4) SHA1(4e589c28ed23224e40d3c68055ada0136cbf94cb) ) @@ -4286,9 +4225,8 @@ ROM_START( phelios ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2_c65c.3f", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2_c65c.3f", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_256K( "ps_obj-0.obj0", 0x000000, CRC(f323db2b) SHA1(fa3c42c618da06af161ad3f8aa1283e9c4bd63c0) ) @@ -4344,9 +4282,8 @@ ROM_START( pheliosj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2_c65c.3f", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2_c65c.3f", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_256K( "ps_obj-0.obj0", 0x000000, CRC(f323db2b) SHA1(fa3c42c618da06af161ad3f8aa1283e9c4bd63c0) ) @@ -4403,9 +4340,8 @@ ROM_START( rthun2 ) ROM_RELOAD( 0x010000, 0x020000 ) ROM_LOAD( "rst1_snd1.bin", 0x030000, 0x020000, CRC(00445a4f) SHA1(2e136e3c38e4a1b69f80a19e07555f3269b7beb1) ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "rst1_obj0.bin", 0x000000, 0x80000, CRC(e5cb82c1) SHA1(2dc1922ecfd9e52af8c4a1edac1df343be64b499) ) @@ -4449,9 +4385,8 @@ ROM_START( rthun2j ) ROM_RELOAD( 0x010000, 0x020000 ) ROM_LOAD( "rst1_snd1.bin", 0x030000, 0x020000, CRC(00445a4f) SHA1(2e136e3c38e4a1b69f80a19e07555f3269b7beb1) ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "rst1_obj0.bin", 0x000000, 0x80000, CRC(e5cb82c1) SHA1(2dc1922ecfd9e52af8c4a1edac1df343be64b499) ) @@ -4502,9 +4437,8 @@ ROM_START( sgunner ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c68.3f", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c68.3f", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "sn_obj0.8c", 0x000000, 0x80000, CRC(bbae38f7) SHA1(7a40ade13307791f5c5d300882f9a38e18c411d6) ) @@ -4553,9 +4487,8 @@ ROM_START( sgunnerj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c68.3f", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c68.3f", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "sn_obj0.8c", 0x000000, 0x80000, CRC(bbae38f7) SHA1(7a40ade13307791f5c5d300882f9a38e18c411d6) ) @@ -4604,8 +4537,8 @@ ROM_START( sgunner2 ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x8000, "c68", 0 ) /* C68 (M37450) I/O MCU program */ - ROM_LOAD( "sys2_c68.3f", 0x000000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) ) + ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */ + /* external ROM not populated, unclear how it would map */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "sns_obj0.bin", 0x000000, 0x80000, CRC(c762445c) SHA1(108170c9a5c82c23c1ac09f91195137ca05989f4) ) @@ -4658,12 +4591,8 @@ ROM_START( sgunner2j ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) - - ROM_REGION( 0x8000, "c68", 0 ) /* C68 (M37450) I/O MCU program */ - ROM_LOAD( "sys2_c68.3f", 0x000000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) ) + ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */ + /* external ROM not populated, unclear how it would map */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "sns_obj0.bin", 0x000000, 0x80000, CRC(c762445c) SHA1(108170c9a5c82c23c1ac09f91195137ca05989f4) ) @@ -4716,9 +4645,8 @@ ROM_START( sws ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c68.3f", 0x008000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "ss1_obj0.5b", 0x000000, 0x80000, CRC(9bd6add1) SHA1(34595987670d7f64ba18a840e98667b96ae5e4bf) ) @@ -4760,9 +4688,8 @@ ROM_START( sws92 ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c68.3f", 0x008000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "sss_obj0.bin", 0x000000, 0x80000, CRC(375e8f1f) SHA1(b737bcceb498a66593d06ef102958bea90032106) ) @@ -4806,9 +4733,8 @@ ROM_START( sws92g ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c68.3f", 0x008000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "sss_obj0.bin", 0x000000, 0x80000, CRC(375e8f1f) SHA1(b737bcceb498a66593d06ef102958bea90032106) ) @@ -4854,9 +4780,8 @@ ROM_START( sws93 ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "sst_obj0.bin", 0x000000, 0x80000, CRC(4089dfd7) SHA1(d37fb08d03a4d3f87b10a8e73bbb1817543396ff) ) @@ -4900,9 +4825,8 @@ ROM_START( suzuka8h ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "eh1-obj0.bin", 0x000000, 0x80000, CRC(864b6816) SHA1(72d831b631afb2848578bd49cd7d3e12a78644b4) ) @@ -4952,9 +4876,8 @@ ROM_START( suzuka8hj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "eh1-obj0.bin", 0x000000, 0x80000, CRC(864b6816) SHA1(72d831b631afb2848578bd49cd7d3e12a78644b4) ) @@ -5004,10 +4927,8 @@ ROM_START( suzuk8h2 ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c68.3f", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) - /*There is no C65 on the board. There is C68 instead */ + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c68.3f", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "ehs1-obj0.3p", 0x000000, 0x80000, CRC(a0acf307) SHA1(6d79d2dd00da4f8f0462245f42a9d88b6ad632b1) ) @@ -5064,10 +4985,8 @@ ROM_START( suzuk8h2j ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c68.3f", 0x008000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) - /*There is no C65 on the board. There is C68 instead */ + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c68.3f", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "ehs1-obj0.3p", 0x000000, 0x80000, CRC(a0acf307) SHA1(6d79d2dd00da4f8f0462245f42a9d88b6ad632b1) ) @@ -5124,9 +5043,8 @@ ROM_START( valkyrie ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ NAMCOS2_GFXROM_LOAD_256K( "wdobj0.bin", 0x000000, CRC(e8089451) SHA1(f4d05df0015de01ec570f5f89ea11592204e4fe2) ) @@ -5183,9 +5101,8 @@ ROM_START( kyukaidk ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "ky1_o0.bin", 0x000000, 0x80000, CRC(ebec5132) SHA1(8d2dec3f1cd27c203899bb715a9983fff7ab820d) ) @@ -5233,9 +5150,8 @@ ROM_START( kyukaidko ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "ky1_o0.bin", 0x000000, 0x80000, CRC(ebec5132) SHA1(8d2dec3f1cd27c203899bb715a9983fff7ab820d) ) @@ -5283,9 +5199,8 @@ ROM_START( gollygho ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x0000, 0x2000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "gl1edr0c.ic7", 0x8000, 0x8000, CRC(db60886f) SHA1(a1183c058c0470a4ef8b0f69a3637b1640c5b5a4) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "gl1edr0c.ic7", 0x0000, 0x8000, CRC(db60886f) SHA1(a1183c058c0470a4ef8b0f69a3637b1640c5b5a4) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "gl1obj0.5b", 0x000000, 0x40000, CRC(6809d267) SHA1(8a0f636067974e51659bd05a3c17819c630d70e3) ) @@ -5332,9 +5247,8 @@ ROM_START( bubbletr ) /* All labels were hand written and included the rom size, ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x0000, 0x2000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "bt1edr0a.ic7", 0x8000, 0x8000, CRC(155b02fc) SHA1(191683c19f756ac150b8e037f46a6daca1a082fa) ) /* dated 4/24 */ + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "bt1edr0a.ic7", 0x0000, 0x8000, CRC(155b02fc) SHA1(191683c19f756ac150b8e037f46a6daca1a082fa) ) /* dated 4/24 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "bt1-obj0.5b", 0x000000, 0x80000, CRC(16b5dc04) SHA1(57cc4b7907442f922102fbd61e470c149f0379ac) ) /* dated 4/24 */ @@ -5381,9 +5295,8 @@ ROM_START( bubbletrj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x0000, 0x2000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "bt1edr0a.ic7", 0x8000, 0x8000, CRC(155b02fc) SHA1(191683c19f756ac150b8e037f46a6daca1a082fa) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "bt1edr0a.ic7", 0x0000, 0x8000, CRC(155b02fc) SHA1(191683c19f756ac150b8e037f46a6daca1a082fa) ) ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "bt1-obj0.5b", 0x000000, 0x80000, CRC(16b5dc04) SHA1(57cc4b7907442f922102fbd61e470c149f0379ac) ) @@ -5538,9 +5451,8 @@ ROM_START( luckywld ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - /* MCU code only, C68PRG socket is unpopulated on real Lucky & Wild PCB */ + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "lw1obj0.3p", 0x000000, 0x80000, CRC(21485830) SHA1(e55a1f6df90c17b9c49e2b08c423b9be86996659) ) @@ -5604,9 +5516,8 @@ ROM_START( luckywldj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "c68.3d", 0x000000, 0x002000, BAD_DUMP CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - /* MCU code only, C68PRG socket is unpopulated on real Lucky & Wild PCB */ + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + /* should be c68 */ ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "lw1obj0.3p", 0x000000, 0x80000, CRC(21485830) SHA1(e55a1f6df90c17b9c49e2b08c423b9be86996659) ) diff --git a/src/mame/drivers/namcos21.cpp b/src/mame/drivers/namcos21.cpp index 6a2dd35d16b..d7a135d46bc 100644 --- a/src/mame/drivers/namcos21.cpp +++ b/src/mame/drivers/namcos21.cpp @@ -1552,26 +1552,27 @@ void namcos21_state::sound_map(address_map &map) /* I/O HD63705 MCU Memory declarations */ /*************************************************************/ -void namcos21_state::mcu_map(address_map &map) +void namcos21_state::configure_c65_namcos21(machine_config &config) { - map(0x0000, 0x003f).ram(); - map(0x0000, 0x0000).nopr(); - map(0x0001, 0x0001).portr("PORTB"); /* p1,p2 start */ - map(0x0002, 0x0002).portr("PORTC"); /* coins */ - map(0x0003, 0x0003).rw(FUNC(namcos21_state::namcos2_mcu_port_d_r), FUNC(namcos21_state::namcos2_mcu_port_d_w)); - map(0x0007, 0x0007).portr("PORTH"); /* fire buttons */ - map(0x0010, 0x0010).rw(FUNC(namcos21_state::namcos2_mcu_analog_ctrl_r), FUNC(namcos21_state::namcos2_mcu_analog_ctrl_w)); - map(0x0011, 0x0011).rw(FUNC(namcos21_state::namcos2_mcu_analog_port_r), FUNC(namcos21_state::namcos2_mcu_analog_port_w)); - map(0x0040, 0x01bf).ram(); - map(0x01c0, 0x1fff).rom(); - map(0x2000, 0x2000).portr("DSW"); - map(0x3000, 0x3000).portr("DIAL0"); - map(0x3001, 0x3001).portr("DIAL1"); - map(0x3002, 0x3002).portr("DIAL2"); - map(0x3003, 0x3003).portr("DIAL3"); - map(0x5000, 0x57ff).rw(FUNC(namcos21_state::namcos2_dualportram_byte_r), FUNC(namcos21_state::namcos2_dualportram_byte_w)).share("mpdualportram"); - map(0x6000, 0x6fff).nopr(); /* watchdog */ - map(0x8000, 0xffff).rom(); + NAMCOC65(config, m_c65, 2048000); + m_c65->in_pb_callback().set_ioport("PORTB"); + m_c65->in_pc_callback().set_ioport("PORTC"); + m_c65->in_ph_callback().set_ioport("PORTH"); + m_c65->in_pdsw_callback().set_ioport("DSW"); + m_c65->di0_in_cb().set_ioport("DIAL0"); + m_c65->di1_in_cb().set_ioport("DIAL1"); + m_c65->di2_in_cb().set_ioport("DIAL2"); + m_c65->di3_in_cb().set_ioport("DIAL3"); + m_c65->an0_in_cb().set_ioport("AN0"); + m_c65->an1_in_cb().set_ioport("AN1"); + m_c65->an2_in_cb().set_ioport("AN2"); + m_c65->an3_in_cb().set_ioport("AN3"); + m_c65->an4_in_cb().set_ioport("AN4"); + m_c65->an5_in_cb().set_ioport("AN5"); + m_c65->an6_in_cb().set_ioport("AN6"); + m_c65->an7_in_cb().set_ioport("AN7"); + m_c65->dp_in_callback().set(FUNC(namcos21_state::namcos2_dualportram_byte_r)); + m_c65->dp_out_callback().set(FUNC(namcos21_state::namcos2_dualportram_byte_w)); } @@ -1891,6 +1892,9 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos21_state::screen_scanline) m_slave_intc->vblank_irq_trigger(); if(m_gpu_intc) m_gpu_intc->vblank_irq_trigger(); + + if (m_c65) + m_c65->ext_interrupt(HOLD_LINE); } if(m_gpu_intc != nullptr) @@ -1924,9 +1928,7 @@ MACHINE_CONFIG_START(namcos21_state::namcos21) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705,2048000) /* IO */ - MCFG_DEVICE_PROGRAM_MAP(mcu_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos21_state, irq0_line_hold) + configure_c65_namcos21(config); MCFG_DEVICE_ADD("dspmaster", TMS32025,24000000) /* 24 MHz? overclocked */ MCFG_DEVICE_PROGRAM_MAP(master_dsp_program) @@ -1991,9 +1993,7 @@ MACHINE_CONFIG_START(namcos21_state::driveyes) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705,2048000) /* IO */ - MCFG_DEVICE_PROGRAM_MAP(mcu_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos21_state, irq0_line_hold) + configure_c65_namcos21(config); MCFG_DEVICE_ADD("dsp", TMS32025,24000000*2) /* 24 MHz? overclocked */ MCFG_DEVICE_PROGRAM_MAP(winrun_dsp_program) @@ -2052,9 +2052,7 @@ MACHINE_CONFIG_START(namcos21_state::winrun) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_state, irq0_line_hold, 2*60) MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_state, irq1_line_hold, 120) - MCFG_DEVICE_ADD("mcu", HD63705,2048000) /* IO */ - MCFG_DEVICE_PROGRAM_MAP(mcu_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos21_state, irq0_line_hold) + configure_c65_namcos21(config); MCFG_DEVICE_ADD("dsp", TMS32025,24000000) /* 24 MHz? overclocked */ MCFG_DEVICE_PROGRAM_MAP(winrun_dsp_program) @@ -2116,9 +2114,8 @@ ROM_START( aircomb ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dspmaster", 0 ) /* Master DSP */ ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) @@ -2177,9 +2174,8 @@ ROM_START( aircombj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dspmaster", 0 ) /* Master DSP */ ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) @@ -2238,9 +2234,8 @@ ROM_START( cybsled ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dspmaster", 0 ) /* Master DSP */ ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) @@ -2297,9 +2292,8 @@ ROM_START( cybsledj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dspmaster", 0 ) /* Master DSP */ ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) @@ -2365,9 +2359,8 @@ We load the "r" set, then load set2's sound CPU code over it to keep the "r" rom ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x10000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dsp", ROMREGION_ERASEFF ) /* C67 - DSP */ @@ -2414,9 +2407,8 @@ ROM_START( starblad ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dspmaster", 0 ) /* Master DSP */ ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) @@ -2467,9 +2459,8 @@ ROM_START( starbladj ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dspmaster", 0 ) /* Master DSP */ ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) @@ -2520,9 +2511,8 @@ ROM_START( solvalou ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x010000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dspmaster", 0 ) /* Master DSP */ ROM_LOAD( "c67.bin", 0, 0x2000, CRC(6bd8988e) SHA1(c9ec18d5f88d53976b94444eedc64d5568155958) ) @@ -2571,9 +2561,8 @@ ROM_START( winrun ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x10000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dsp", ROMREGION_ERASEFF ) /* DSP */ @@ -2637,9 +2626,8 @@ ROM_START( winrungp ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x10000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dsp", ROMREGION_ERASEFF ) /* DSP */ @@ -2686,9 +2674,8 @@ ROM_START( winrun91 ) ROM_CONTINUE( 0x010000, 0x01c000 ) ROM_RELOAD( 0x010000, 0x020000 ) - ROM_REGION( 0x10000, "mcu", 0 ) /* I/O MCU */ - ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) - ROM_LOAD( "sys2c65c.bin", 0x008000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) + ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */ + ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) ROM_REGION( 0x20000, "dsp", ROMREGION_ERASEFF ) /* DSP */ diff --git a/src/mame/drivers/namcos86.cpp b/src/mame/drivers/namcos86.cpp index 9c86075904b..e3ea2b0d6f9 100644 --- a/src/mame/drivers/namcos86.cpp +++ b/src/mame/drivers/namcos86.cpp @@ -1079,7 +1079,7 @@ MACHINE_CONFIG_START(namcos86_state::hopmappy) MCFG_QUANTUM_TIME(attotime::from_hz(48000)) /* heavy interleaving needed to avoid hangs in rthunder */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp index 7f44a89101f..cde3018c4ea 100644 --- a/src/mame/drivers/nemesis.cpp +++ b/src/mame/drivers/nemesis.cpp @@ -1547,7 +1547,7 @@ MACHINE_CONFIG_START(nemesis_state::gx400) intlatch.q_out_cb<2>().set(FUNC(nemesis_state::gfx_flipx_w)); intlatch.q_out_cb<3>().set(FUNC(nemesis_state::gfx_flipy_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1619,7 +1619,7 @@ MACHINE_CONFIG_START(nemesis_state::konamigt) intlatch.q_out_cb<2>().set(FUNC(nemesis_state::gfx_flipx_w)); intlatch.q_out_cb<3>().set(FUNC(nemesis_state::gfx_flipy_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1687,7 +1687,7 @@ MACHINE_CONFIG_START(nemesis_state::rf2_gx400) intlatch.q_out_cb<2>().set(FUNC(nemesis_state::gfx_flipx_w)); intlatch.q_out_cb<3>().set(FUNC(nemesis_state::gfx_flipy_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1747,7 +1747,7 @@ MACHINE_CONFIG_START(nemesis_state::salamand) MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_DEVICE_PROGRAM_MAP(sal_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1799,7 +1799,7 @@ MACHINE_CONFIG_START(nemesis_state::blkpnthr) MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_DEVICE_PROGRAM_MAP(blkpnthr_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1846,7 +1846,7 @@ MACHINE_CONFIG_START(nemesis_state::citybomb) MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_DEVICE_PROGRAM_MAP(city_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1897,7 +1897,7 @@ MACHINE_CONFIG_START(nemesis_state::nyanpani) MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) /* 3.579545 MHz */ MCFG_DEVICE_PROGRAM_MAP(city_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1954,7 +1954,7 @@ MACHINE_CONFIG_START(nemesis_state::hcrash) intlatch.q_out_cb<1>().set(FUNC(nemesis_state::irq2_enable_w)); // or at 0x0c2804 ? intlatch.q_out_cb<2>().set_nop(); // ? - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2716,7 +2716,7 @@ MACHINE_CONFIG_START(nemesis_state::bubsys) intlatch.q_out_cb<2>().set(FUNC(nemesis_state::gfx_flipx_w)); intlatch.q_out_cb<3>().set(FUNC(nemesis_state::gfx_flipy_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/neogeo.cpp b/src/mame/drivers/neogeo.cpp index 3d3c9a9ca89..bec0233cf24 100644 --- a/src/mame/drivers/neogeo.cpp +++ b/src/mame/drivers/neogeo.cpp @@ -1997,8 +1997,7 @@ MACHINE_CONFIG_START(ngarcade_base_state::neogeo_arcade) m_systemlatch->q_out_cb<5>().set(FUNC(ngarcade_base_state::set_use_cart_audio)); m_systemlatch->q_out_cb<6>().set(FUNC(ngarcade_base_state::set_save_ram_unlock)); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_ticks(3244030, NEOGEO_MASTER_CLOCK)) + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_ticks(3244030, NEOGEO_MASTER_CLOCK)); MCFG_UPD4990A_ADD("upd4990a", XTAL(32'768), NOOP, NOOP) diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp index 8dc4435f557..d4c134c9f3a 100644 --- a/src/mame/drivers/next.cpp +++ b/src/mame/drivers/next.cpp @@ -1036,11 +1036,11 @@ MACHINE_CONFIG_START(next_state::next_base) MCFG_NSCSI_ADD("scsibus:7", next_scsi_devices, "ncr5390", true) MCFG_SLOT_OPTION_MACHINE_CONFIG("ncr5390", [this] (device_t *device) { ncr5390(device); }) - MCFG_DEVICE_ADD("net", MB8795, 0) - MCFG_MB8795_TX_IRQ_CALLBACK(WRITELINE(*this, next_state, net_tx_irq)) - MCFG_MB8795_RX_IRQ_CALLBACK(WRITELINE(*this, next_state, net_rx_irq)) - MCFG_MB8795_TX_DRQ_CALLBACK(WRITELINE(*this, next_state, net_tx_drq)) - MCFG_MB8795_RX_DRQ_CALLBACK(WRITELINE(*this, next_state, net_rx_drq)) + MB8795(config, net, 0); + net->tx_irq().set(FUNC(next_state::net_tx_irq)); + net->rx_irq().set(FUNC(next_state::net_rx_irq)); + net->tx_drq().set(FUNC(next_state::net_tx_drq)); + net->rx_drq().set(FUNC(next_state::net_rx_drq)); MCFG_DEVICE_ADD("mo", NEXTMO, 0) MCFG_NEXTMO_IRQ_CALLBACK(WRITELINE(*this, next_state, mo_irq)) diff --git a/src/mame/drivers/nitedrvr.cpp b/src/mame/drivers/nitedrvr.cpp index 62485722bf4..a65d3ac2cbc 100644 --- a/src/mame/drivers/nitedrvr.cpp +++ b/src/mame/drivers/nitedrvr.cpp @@ -147,8 +147,7 @@ MACHINE_CONFIG_START(nitedrvr_state::nitedrvr) MCFG_DEVICE_PROGRAM_MAP(nitedrvr_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nitedrvr_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 3) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 3); MCFG_TIMER_DRIVER_ADD_PERIODIC("crash_timer", nitedrvr_state, nitedrvr_crash_toggle_callback, PERIOD_OF_555_ASTABLE(RES_K(180), 330, CAP_U(1))) diff --git a/src/mame/drivers/nova2001.cpp b/src/mame/drivers/nova2001.cpp index 3f7e6b269df..94205102e99 100644 --- a/src/mame/drivers/nova2001.cpp +++ b/src/mame/drivers/nova2001.cpp @@ -653,7 +653,7 @@ MACHINE_CONFIG_START(nova2001_state::nova2001) MCFG_DEVICE_PROGRAM_MAP(nova2001_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nova2001_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/nss.cpp b/src/mame/drivers/nss.cpp index 5bbcbc0e13b..a4e8893d5b6 100644 --- a/src/mame/drivers/nss.cpp +++ b/src/mame/drivers/nss.cpp @@ -852,7 +852,7 @@ MACHINE_CONFIG_START(nss_state::nss) MCFG_M50458_ADD("m50458", 4000000, "osd") /* TODO: correct clock */ MCFG_S3520CF_ADD("s3520cf") /* RTC */ MCFG_RP5H01_ADD("rp5h01") - MCFG_M6M80011AP_ADD("m6m80011ap") + M6M80011AP(config, "m6m80011ap"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp index 42dc51800a2..3e368aa11fc 100644 --- a/src/mame/drivers/offtwall.cpp +++ b/src/mame/drivers/offtwall.cpp @@ -343,7 +343,7 @@ MACHINE_CONFIG_START(offtwall_state::offtwall) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_offtwall) diff --git a/src/mame/drivers/ohmygod.cpp b/src/mame/drivers/ohmygod.cpp index f04509dd9d5..30bc747b09b 100644 --- a/src/mame/drivers/ohmygod.cpp +++ b/src/mame/drivers/ohmygod.cpp @@ -327,8 +327,7 @@ MACHINE_CONFIG_START(ohmygod_state::ohmygod) MCFG_DEVICE_PROGRAM_MAP(ohmygod_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", ohmygod_state, irq1_line_hold) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ /* video hardware */ diff --git a/src/mame/drivers/omegrace.cpp b/src/mame/drivers/omegrace.cpp index d10bcd799b8..52df225c8fc 100644 --- a/src/mame/drivers/omegrace.cpp +++ b/src/mame/drivers/omegrace.cpp @@ -536,7 +536,7 @@ MACHINE_CONFIG_START(omegrace_state::omegrace) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_VECTOR_ADD("vector") diff --git a/src/mame/drivers/onetwo.cpp b/src/mame/drivers/onetwo.cpp index b6042a73c5a..79395415e2f 100644 --- a/src/mame/drivers/onetwo.cpp +++ b/src/mame/drivers/onetwo.cpp @@ -372,7 +372,7 @@ MACHINE_CONFIG_START(onetwo_state::onetwo) MCFG_DEVICE_PROGRAM_MAP(sound_cpu) MCFG_DEVICE_IO_MAP(sound_cpu_io) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/orbit.cpp b/src/mame/drivers/orbit.cpp index 50ec7133996..5ea517896e1 100644 --- a/src/mame/drivers/orbit.cpp +++ b/src/mame/drivers/orbit.cpp @@ -288,7 +288,7 @@ MACHINE_CONFIG_START(orbit_state::orbit) m_latch->q_out_cb<6>().set_output("led1"); m_latch->q_out_cb<7>().set(m_discrete, FUNC(discrete_device::write_line)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD(m_screen, RASTER) diff --git a/src/mame/drivers/pacland.cpp b/src/mame/drivers/pacland.cpp index 4f372e05388..dae2cf7b411 100644 --- a/src/mame/drivers/pacland.cpp +++ b/src/mame/drivers/pacland.cpp @@ -439,7 +439,7 @@ MACHINE_CONFIG_START(pacland_state::pacland) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synching between the MCU and the CPU */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/pandoras.cpp b/src/mame/drivers/pandoras.cpp index dff8388cdc9..b9e96478f2b 100644 --- a/src/mame/drivers/pandoras.cpp +++ b/src/mame/drivers/pandoras.cpp @@ -335,7 +335,7 @@ MACHINE_CONFIG_START(pandoras_state::pandoras) mainlatch.q_out_cb<6>().set(FUNC(pandoras_state::cpub_irq_enable_w)); // ENB mainlatch.q_out_cb<7>().set_inputline(m_subcpu, INPUT_LINE_RESET).invert(); // RESETB - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/parodius.cpp b/src/mame/drivers/parodius.cpp index b84573c42b1..70273a3d104 100644 --- a/src/mame/drivers/parodius.cpp +++ b/src/mame/drivers/parodius.cpp @@ -243,7 +243,7 @@ MACHINE_CONFIG_START(parodius_state::parodius) 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); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/pengo.cpp b/src/mame/drivers/pengo.cpp index a86a08ffc6b..7ef72f6978c 100644 --- a/src/mame/drivers/pengo.cpp +++ b/src/mame/drivers/pengo.cpp @@ -401,7 +401,7 @@ MACHINE_CONFIG_START(pengo_state::pengo) m_latch->q_out_cb<6>().set(FUNC(pengo_state::pengo_colortablebank_w)); m_latch->q_out_cb<7>().set(FUNC(pengo_state::pengo_gfxbank_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pengo) diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp index 769ccd0ffb8..167bd15f6e0 100644 --- a/src/mame/drivers/peplus.cpp +++ b/src/mame/drivers/peplus.cpp @@ -380,7 +380,7 @@ void peplus_state::load_superdata(const char *bank_name) WRITE8_MEMBER(peplus_state::bgcolor_w) { - for (int i = 0; i < m_palette->entries(); i++) + for (int i = 0; i < m_palette->entries() / 16; i++) { /* red component */ int bit0 = (~data >> 0) & 0x01; diff --git a/src/mame/drivers/pingpong.cpp b/src/mame/drivers/pingpong.cpp index e8c85a9e61b..edb55a309ca 100644 --- a/src/mame/drivers/pingpong.cpp +++ b/src/mame/drivers/pingpong.cpp @@ -454,7 +454,7 @@ MACHINE_CONFIG_START(pingpong_state::pingpong) MCFG_DEVICE_ADD("maincpu",Z80,18432000/6) /* 3.072 MHz (probably) */ MCFG_DEVICE_PROGRAM_MAP(pingpong_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pingpong_state, pingpong_interrupt, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/pitnrun.cpp b/src/mame/drivers/pitnrun.cpp index 14444025bb9..4635cff525e 100644 --- a/src/mame/drivers/pitnrun.cpp +++ b/src/mame/drivers/pitnrun.cpp @@ -296,7 +296,7 @@ MACHINE_CONFIG_START(pitnrun_state::pitnrun) MCFG_DEVICE_IO_MAP(pitnrun_sound_io_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", pitnrun_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) diff --git a/src/mame/drivers/plygonet.cpp b/src/mame/drivers/plygonet.cpp index 61b18389a5b..75c7a6dd25f 100644 --- a/src/mame/drivers/plygonet.cpp +++ b/src/mame/drivers/plygonet.cpp @@ -569,7 +569,7 @@ MACHINE_CONFIG_START(polygonet_state::plygonet) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_plygonet) diff --git a/src/mame/drivers/polepos.cpp b/src/mame/drivers/polepos.cpp index 0d339ed6c81..99b0b98623e 100644 --- a/src/mame/drivers/polepos.cpp +++ b/src/mame/drivers/polepos.cpp @@ -897,8 +897,7 @@ MACHINE_CONFIG_START(polepos_state::polepos) MCFG_NAMCO_06XX_WRITE_2_CB(WRITE8("52xx", namco_52xx_device, write)) MCFG_NAMCO_06XX_WRITE_3_CB(WRITE8("54xx", namco_54xx_device, write)) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 16) // 128V clocks the same as VBLANK + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 16); // 128V clocks the same as VBLANK MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* some interleaving */ @@ -1007,8 +1006,7 @@ MACHINE_CONFIG_START(polepos_state::topracern) MCFG_NAMCO_06XX_READ_0_CB(READ8("51xx", namco_51xx_device, read)) MCFG_NAMCO_06XX_WRITE_0_CB(WRITE8("51xx", namco_51xx_device, write)) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 16) // 128V clocks the same as VBLANK + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 16); // 128V clocks the same as VBLANK MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* some interleaving */ diff --git a/src/mame/drivers/poolshrk.cpp b/src/mame/drivers/poolshrk.cpp index fbfe8af431a..2f74274948c 100644 --- a/src/mame/drivers/poolshrk.cpp +++ b/src/mame/drivers/poolshrk.cpp @@ -223,7 +223,7 @@ MACHINE_CONFIG_START(poolshrk_state::poolshrk) MCFG_DEVICE_PROGRAM_MAP(poolshrk_cpu_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", poolshrk_state, irq0_line_assert) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/pooyan.cpp b/src/mame/drivers/pooyan.cpp index 628e849647a..a3d1809e391 100644 --- a/src/mame/drivers/pooyan.cpp +++ b/src/mame/drivers/pooyan.cpp @@ -208,7 +208,7 @@ MACHINE_CONFIG_START(pooyan_state::pooyan) mainlatch.q_out_cb<5>().set_nop(); // PAY OUT - not used mainlatch.q_out_cb<7>().set(FUNC(pooyan_state::flipscreen_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/proteus3.cpp b/src/mame/drivers/proteus3.cpp index 3543bce7fc4..1b193e970b8 100644 --- a/src/mame/drivers/proteus3.cpp +++ b/src/mame/drivers/proteus3.cpp @@ -426,22 +426,22 @@ MACHINE_CONFIG_START(proteus3_state::proteus3) MCFG_RS232_CTS_HANDLER(WRITELINE("acia2", acia6850_device, write_cts)) /* Bit Rate Generator */ - MCFG_DEVICE_ADD ("brg", MC14411, XTAL(1'843'200)) // crystal needs verification but is the likely one - MCFG_MC14411_F1_CB(WRITELINE (*this, proteus3_state, write_f1_clock)) - MCFG_MC14411_F2_CB(WRITELINE (*this, proteus3_state, write_f2_clock)) - MCFG_MC14411_F3_CB(WRITELINE (*this, proteus3_state, write_f3_clock)) - MCFG_MC14411_F4_CB(WRITELINE (*this, proteus3_state, write_f4_clock)) - MCFG_MC14411_F5_CB(WRITELINE (*this, proteus3_state, write_f5_clock)) - MCFG_MC14411_F6_CB(WRITELINE (*this, proteus3_state, write_f6_clock)) - MCFG_MC14411_F7_CB(WRITELINE (*this, proteus3_state, write_f7_clock)) - MCFG_MC14411_F8_CB(WRITELINE (*this, proteus3_state, write_f8_clock)) - MCFG_MC14411_F9_CB(WRITELINE (*this, proteus3_state, write_f9_clock)) - MCFG_MC14411_F10_CB(WRITELINE (*this, proteus3_state, write_f10_clock)) - MCFG_MC14411_F11_CB(WRITELINE (*this, proteus3_state, write_f11_clock)) - MCFG_MC14411_F12_CB(WRITELINE (*this, proteus3_state, write_f12_clock)) - MCFG_MC14411_F13_CB(WRITELINE (*this, proteus3_state, write_f13_clock)) - MCFG_MC14411_F14_CB(WRITELINE (*this, proteus3_state, write_f14_clock)) - MCFG_MC14411_F15_CB(WRITELINE (*this, proteus3_state, write_f15_clock)) + MC14411(config, m_brg, XTAL(1'843'200)); // crystal needs verification but is the likely one + m_brg->out_f<1>().set(FUNC(proteus3_state::write_f1_clock)); + m_brg->out_f<2>().set(FUNC(proteus3_state::write_f2_clock)); + m_brg->out_f<3>().set(FUNC(proteus3_state::write_f3_clock)); + m_brg->out_f<4>().set(FUNC(proteus3_state::write_f4_clock)); + m_brg->out_f<5>().set(FUNC(proteus3_state::write_f5_clock)); + m_brg->out_f<6>().set(FUNC(proteus3_state::write_f6_clock)); + m_brg->out_f<7>().set(FUNC(proteus3_state::write_f7_clock)); + m_brg->out_f<8>().set(FUNC(proteus3_state::write_f8_clock)); + m_brg->out_f<9>().set(FUNC(proteus3_state::write_f9_clock)); + m_brg->out_f<10>().set(FUNC(proteus3_state::write_f10_clock)); + m_brg->out_f<11>().set(FUNC(proteus3_state::write_f11_clock)); + m_brg->out_f<12>().set(FUNC(proteus3_state::write_f12_clock)); + m_brg->out_f<13>().set(FUNC(proteus3_state::write_f13_clock)); + m_brg->out_f<14>().set(FUNC(proteus3_state::write_f14_clock)); + m_brg->out_f<15>().set(FUNC(proteus3_state::write_f15_clock)); MACHINE_CONFIG_END diff --git a/src/mame/drivers/psikyosh.cpp b/src/mame/drivers/psikyosh.cpp index b358c0ae0a1..bb26dbe5b5c 100644 --- a/src/mame/drivers/psikyosh.cpp +++ b/src/mame/drivers/psikyosh.cpp @@ -784,7 +784,7 @@ MACHINE_CONFIG_START(psikyosh_state::psikyo3v1) MCFG_DEVICE_PROGRAM_MAP(ps3v1_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", psikyosh_state, psikyosh_interrupt) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); EEPROM_93C56_8BIT(config, "eeprom").default_value(0); diff --git a/src/mame/drivers/quantum.cpp b/src/mame/drivers/quantum.cpp index 89e99db432d..0ea10275b60 100644 --- a/src/mame/drivers/quantum.cpp +++ b/src/mame/drivers/quantum.cpp @@ -294,7 +294,7 @@ MACHINE_CONFIG_START(quantum_state::quantum) X2212(config, "nvram"); // "137288-001" in parts list and schematic diagram - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_VECTOR_ADD("vector") diff --git a/src/mame/drivers/rallyx.cpp b/src/mame/drivers/rallyx.cpp index 8a40bc601b1..69bf07efec6 100644 --- a/src/mame/drivers/rallyx.cpp +++ b/src/mame/drivers/rallyx.cpp @@ -831,7 +831,7 @@ MACHINE_CONFIG_START(rallyx_state::rallyx) mainlatch.q_out_cb<6>().set(FUNC(rallyx_state::coin_lockout_w)); mainlatch.q_out_cb<7>().set(FUNC(rallyx_state::coin_counter_1_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_MACHINE_START_OVERRIDE(rallyx_state,rallyx) @@ -883,7 +883,7 @@ MACHINE_CONFIG_START(rallyx_state::jungler) mainlatch.q_out_cb<6>().set(FUNC(rallyx_state::coin_counter_2_w)); // OUT3 mainlatch.q_out_cb<7>().set(FUNC(rallyx_state::stars_enable_w)); // STARSON - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_MACHINE_START_OVERRIDE(rallyx_state,rallyx) diff --git a/src/mame/drivers/rampart.cpp b/src/mame/drivers/rampart.cpp index 396afcc951f..f5351f2c4d9 100644 --- a/src/mame/drivers/rampart.cpp +++ b/src/mame/drivers/rampart.cpp @@ -347,8 +347,7 @@ MACHINE_CONFIG_START(rampart_state::rampart) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rampart) diff --git a/src/mame/drivers/rastan.cpp b/src/mame/drivers/rastan.cpp index 67857457cfa..46bb1fc138a 100644 --- a/src/mame/drivers/rastan.cpp +++ b/src/mame/drivers/rastan.cpp @@ -377,7 +377,7 @@ MACHINE_CONFIG_START(rastan_state::rastan) MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - enough for the sound CPU to read all commands */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/relief.cpp b/src/mame/drivers/relief.cpp index d671d581be0..06c19a40ccc 100644 --- a/src/mame/drivers/relief.cpp +++ b/src/mame/drivers/relief.cpp @@ -277,7 +277,7 @@ MACHINE_CONFIG_START(relief_state::relief) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_relief) diff --git a/src/mame/drivers/retofinv.cpp b/src/mame/drivers/retofinv.cpp index 49d87797cb6..ffaad1659bc 100644 --- a/src/mame/drivers/retofinv.cpp +++ b/src/mame/drivers/retofinv.cpp @@ -439,7 +439,7 @@ MACHINE_CONFIG_START(retofinv_state::retofinv) m_mainlatch->q_out_cb<4>().set(FUNC(retofinv_state::irq1_ack_w)); m_mainlatch->q_out_cb<5>().set_inputline(m_subcpu, INPUT_LINE_RESET).invert(); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/rockrage.cpp b/src/mame/drivers/rockrage.cpp index 366bf17e94a..742e95c5934 100644 --- a/src/mame/drivers/rockrage.cpp +++ b/src/mame/drivers/rockrage.cpp @@ -257,7 +257,7 @@ MACHINE_CONFIG_START(rockrage_state::rockrage) MCFG_DEVICE_ADD("audiocpu", MC6809E, XTAL(24'000'000) / 16) MCFG_DEVICE_PROGRAM_MAP(rockrage_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/rocnrope.cpp b/src/mame/drivers/rocnrope.cpp index 43374fcf357..6a86ff017a5 100644 --- a/src/mame/drivers/rocnrope.cpp +++ b/src/mame/drivers/rocnrope.cpp @@ -220,7 +220,7 @@ MACHINE_CONFIG_START(rocnrope_state::rocnrope) mainlatch.q_out_cb<4>().set(FUNC(rocnrope_state::coin_counter_2_w)); mainlatch.q_out_cb<7>().set(FUNC(rocnrope_state::irq_mask_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/rollerg.cpp b/src/mame/drivers/rollerg.cpp index 3acb0a132b6..494c5462dd8 100644 --- a/src/mame/drivers/rollerg.cpp +++ b/src/mame/drivers/rollerg.cpp @@ -256,7 +256,7 @@ MACHINE_CONFIG_START(rollerg_state::rollerg) MCFG_DEVICE_ADD("audiocpu", Z80, 3579545) MCFG_DEVICE_PROGRAM_MAP(rollerg_sound_map) /* NMIs are generated by the 053260 */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/royalmah.cpp b/src/mame/drivers/royalmah.cpp index 6c8e6349bbc..ea8342151da 100644 --- a/src/mame/drivers/royalmah.cpp +++ b/src/mame/drivers/royalmah.cpp @@ -3484,7 +3484,7 @@ MACHINE_CONFIG_START(royalmah_state::royalmah) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* video hardware */ - MCFG_PALETTE_ADD("palette", 16*2) + MCFG_PALETTE_ADD("palette", 16*4) MCFG_PALETTE_INIT_OWNER(royalmah_state,royalmah) MCFG_SCREEN_ADD("screen", RASTER) @@ -4885,7 +4885,7 @@ ROM_START( mjsiyoub ) ROM_LOAD( "1.1k", 0x00000, 0x8000, CRC(a1083321) SHA1(b36772e90be60270234df16cf92d87f8d950190d) ) ROM_LOAD( "2.1g", 0x08000, 0x4000, CRC(cfe5de1d) SHA1(4acf9a752aa3c02b0889b0b49d3744359fa24460) ) - ROM_REGION( 0x40000, "proms", 0 ) + ROM_REGION( 0x20, "proms", 0 ) ROM_LOAD( "color.bpr", 0x00, 0x20, CRC(d21367e5) SHA1(b28321ac8f99abfebe2ef4da0c751cefe9f3f3b6) ) ROM_END diff --git a/src/mame/drivers/sandscrp.cpp b/src/mame/drivers/sandscrp.cpp index fc5aa8c6633..6b950213719 100644 --- a/src/mame/drivers/sandscrp.cpp +++ b/src/mame/drivers/sandscrp.cpp @@ -478,8 +478,7 @@ MACHINE_CONFIG_START(sandscrp_state::sandscrp) MCFG_DEVICE_PROGRAM_MAP(sandscrp_soundmem) MCFG_DEVICE_IO_MAP(sandscrp_soundport) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sauro.cpp b/src/mame/drivers/sauro.cpp index 524098826c9..1e6c0934694 100644 --- a/src/mame/drivers/sauro.cpp +++ b/src/mame/drivers/sauro.cpp @@ -456,7 +456,7 @@ MACHINE_CONFIG_START(sauro_state::tecfri) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sbasketb.cpp b/src/mame/drivers/sbasketb.cpp index 580f37e47ee..0ea1be8e625 100644 --- a/src/mame/drivers/sbasketb.cpp +++ b/src/mame/drivers/sbasketb.cpp @@ -210,7 +210,7 @@ MACHINE_CONFIG_START(sbasketb_state::sbasketb) mainlatch.q_out_cb<5>().set(FUNC(sbasketb_state::spriteram_select_w)); // OBJ CHE mainlatch.q_out_cb<6>().set_nop(); // END - not used - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD(m_screen, RASTER) diff --git a/src/mame/drivers/sbowling.cpp b/src/mame/drivers/sbowling.cpp index f489da0d004..1ce7e61a90d 100644 --- a/src/mame/drivers/sbowling.cpp +++ b/src/mame/drivers/sbowling.cpp @@ -417,7 +417,7 @@ MACHINE_CONFIG_START(sbowling_state::sbowling) MCFG_DEVICE_IO_MAP(port_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sbowling_state, interrupt, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sbrkout.cpp b/src/mame/drivers/sbrkout.cpp index 3ad241a169a..d6602f26e8b 100644 --- a/src/mame/drivers/sbrkout.cpp +++ b/src/mame/drivers/sbrkout.cpp @@ -573,8 +573,7 @@ MACHINE_CONFIG_START(sbrkout_state::sbrkout) // coin counter activity as stated in Atari bulletin B-0054 (which recommends tying it to the // CPU reset line instead). - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sbrkout) diff --git a/src/mame/drivers/scobra.cpp b/src/mame/drivers/scobra.cpp index c575cd684a9..7091f8bb6d2 100644 --- a/src/mame/drivers/scobra.cpp +++ b/src/mame/drivers/scobra.cpp @@ -898,7 +898,7 @@ MACHINE_CONFIG_START(scobra_state::type1) MCFG_TIMER_DRIVER_ADD("int_timer", scobra_state, galaxold_interrupt_timer) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1067,7 +1067,7 @@ MACHINE_CONFIG_START(scobra_state::hustler) MCFG_TIMER_DRIVER_ADD("int_timer", scobra_state, galaxold_interrupt_timer) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); I8255A(config, m_ppi8255_0); m_ppi8255_0->in_pa_callback().set_ioport("IN0"); diff --git a/src/mame/drivers/scotrsht.cpp b/src/mame/drivers/scotrsht.cpp index 9db1b13ec30..c8e19beaee3 100644 --- a/src/mame/drivers/scotrsht.cpp +++ b/src/mame/drivers/scotrsht.cpp @@ -197,7 +197,7 @@ MACHINE_CONFIG_START(scotrsht_state::scotrsht) MCFG_DEVICE_PROGRAM_MAP(scotrsht_sound_map) MCFG_DEVICE_IO_MAP(scotrsht_sound_port) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/scramble.cpp b/src/mame/drivers/scramble.cpp index b941e690536..b71a4a7de38 100644 --- a/src/mame/drivers/scramble.cpp +++ b/src/mame/drivers/scramble.cpp @@ -1324,7 +1324,7 @@ MACHINE_CONFIG_START(scramble_state::scramble) MCFG_TIMER_DRIVER_ADD("int_timer", scramble_state, galaxold_interrupt_timer) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_MACHINE_RESET_OVERRIDE(scramble_state,scramble) @@ -1595,7 +1595,7 @@ MACHINE_CONFIG_START(scramble_state::ad2083) MCFG_TIMER_DRIVER_ADD("int_timer", scramble_state, galaxold_interrupt_timer) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_MACHINE_RESET_OVERRIDE(scramble_state,galaxold) @@ -1748,7 +1748,6 @@ ROM_START( knockoutc ) ROM_LOAD( "ta.6e", 0x0000, 0x0020, CRC(624f75df) SHA1(0e9a7c48dd976af1dca1d5351236d4d5bf7a9dc8) ) ROM_END - ROM_START( mariner ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "tp1.2h", 0x0000, 0x1000, CRC(dac1dfd0) SHA1(57b9106bb7452640544ba0ab2d2ba290cccb45f0) ) @@ -1795,6 +1794,29 @@ ROM_START( 800fath ) ROM_LOAD( "t5.7p", 0x0000, 0x0020, CRC(1bd88cff) SHA1(8d1620386ef654d99c51e489c822eeb2e8a4fe76) ) /* char banking and star placement */ ROM_END +ROM_START( 800fatha ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "tq1.2h", 0x0000, 0x1000, CRC(d858c242) SHA1(3f236ae6ac60067eec4f5df0746435e6dfde0401) ) /* older based on letter revision, Q vs U */ + ROM_LOAD( "tm2.2k", 0x1000, 0x1000, CRC(efe7ca28) SHA1(496f8eb2ebc9edeed5b19d87f437f23bbeb2a007) ) + ROM_LOAD( "tm3.2l", 0x2000, 0x1000, CRC(027881a6) SHA1(47953aa5140a157ade484341609d477510e8342b) ) + ROM_LOAD( "tm4.2m", 0x3000, 0x1000, CRC(a0fde7dc) SHA1(ea6700520b1bd31e6c6bfac6f067bbf652676eef) ) + ROM_LOAD( "tm5.2p", 0x6000, 0x0800, CRC(d7ebcb8e) SHA1(bddefdc5f04c2f940e08a6968fbd6f930d16b8e4) ) + ROM_CONTINUE( 0x5800, 0x0800 ) + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "tm8.5f", 0x0000, 0x1000, CRC(70ae611f) SHA1(2686dc6d3910bd58b290d6296f30c552686709f5) ) + ROM_LOAD( "tm9.5h", 0x1000, 0x1000, CRC(8e4e999e) SHA1(195e6896ca2f3175137d8c92777ba32c41e835d3) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "t4.6e", 0x0000, 0x0020, CRC(ca42b6dd) SHA1(d1e224e788e3dcf57249e72f03f9fe3fd71e6c12) ) + + ROM_REGION( 0x0100, "user1", 0 ) + ROM_LOAD( "t6.6p", 0x0000, 0x0100, CRC(ad208ccc) SHA1(66a4122e46467344a7f3ddcc953a5f7f451411fa) ) /* background color prom */ + + ROM_REGION( 0x0020, "user2", 0 ) + ROM_LOAD( "t5.7p", 0x0000, 0x0020, CRC(1bd88cff) SHA1(8d1620386ef654d99c51e489c822eeb2e8a4fe76) ) /* char banking and star placement */ +ROM_END + ROM_START( ckongs ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "vid_2c.bin", 0x0000, 0x1000, CRC(49a8c234) SHA1(91d8da03a76094b6fed4bf1d9a3943dee72bf039) ) @@ -2261,45 +2283,46 @@ ROM_START( harem ) /* Main PCB version similar to Scorpion (also developed by I. ROM_END -GAME( 1982, triplep, 0, triplep, triplep, scramble_state, init_scramble_ppi, ROT90, "K.K. International", "Triple Punch (set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, triplepa, triplep, triplep, triplep, scramble_state, init_scramble_ppi, ROT90, "K.K. International", "Triple Punch (set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, knockout, triplep, triplep, triplep, scramble_state, init_scramble_ppi, ROT90, "bootleg? (KKK)", "Knock Out!! (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, knockoutb,triplep, triplep, knockoutb,scramble_state, init_scramble_ppi, ROT90, "bootleg", "Knock Out!! (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, knockoutc,triplep, triplep, knockoutb,scramble_state, init_scramble_ppi, ROT90, "bootleg (ESG)", "Knock Out!! (bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) // ESG = Elektronik Spiel Gerate +GAME( 1982, triplep, 0, triplep, triplep, scramble_state, init_scramble_ppi, ROT90, "K.K. International", "Triple Punch (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, triplepa, triplep, triplep, triplep, scramble_state, init_scramble_ppi, ROT90, "K.K. International", "Triple Punch (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, knockout, triplep, triplep, triplep, scramble_state, init_scramble_ppi, ROT90, "bootleg? (KKK)", "Knock Out!! (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, knockoutb,triplep, triplep, knockoutb,scramble_state, init_scramble_ppi, ROT90, "bootleg", "Knock Out!! (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, knockoutc,triplep, triplep, knockoutb,scramble_state, init_scramble_ppi, ROT90, "bootleg (ESG)", "Knock Out!! (bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) // ESG = Elektronik Spiel Gerate -GAME( 1981, mariner, 0, mariner, scramble, scramble_state, init_mariner, ROT90, "Amenip", "Mariner", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -GAME( 1981, 800fath, mariner, mariner, 800fath, scramble_state, init_mariner, ROT90, "Amenip (US Billiards Inc. license)", "800 Fathoms", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +GAME( 1981, mariner, 0, mariner, scramble, scramble_state, init_mariner, ROT90, "Amenip", "Mariner", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +GAME( 1981, 800fath, mariner, mariner, 800fath, scramble_state, init_mariner, ROT90, "Amenip (US Billiards Inc. license)", "800 Fathoms", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +GAME( 1981, 800fatha, mariner, mariner, 800fath, scramble_state, init_mariner, ROT90, "Amenip (US Billiards Inc. license)", "800 Fathoms (older)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -GAME( 1981, ckongs, ckong, ckongs, ckongs, scramble_state, init_ckongs, ROT90, "bootleg", "Crazy Kong (Scramble hardware)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, ckongs, ckong, ckongs, ckongs, scramble_state, init_ckongs, ROT90, "bootleg", "Crazy Kong (Scramble hardware)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, mars, 0, mars, mars, scramble_state, init_mars, ROT90, "Artic", "Mars", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, mars, 0, mars, mars, scramble_state, init_mars, ROT90, "Artic", "Mars", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, devilfsh, 0, devilfsh, devilfsh, scramble_state, init_devilfsh, ROT90, "Artic", "Devil Fish", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, devilfsh, 0, devilfsh, devilfsh, scramble_state, init_devilfsh, ROT90, "Artic", "Devil Fish", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, newsin7, 0, newsin7, newsin7, scramble_state, init_mars, ROT90, "ATW USA, Inc.", "New Sinbad 7 (set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, newsin7a, newsin7, newsin7, newsin7, scramble_state, init_newsin7a, ROT90, "ATW USA, Inc", "New Sinbad 7 (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, newsin7, 0, newsin7, newsin7, scramble_state, init_mars, ROT90, "ATW USA, Inc.", "New Sinbad 7 (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, newsin7a, newsin7, newsin7, newsin7, scramble_state, init_newsin7a, ROT90, "ATW USA, Inc", "New Sinbad 7 (set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, mrkougar, 0, mrkougar, mrkougar, scramble_state, init_mrkougar, ROT90, "ATW", "Mr. Kougar", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, mrkougar2,mrkougar, mrkougar, mrkougar, scramble_state, init_mrkougar, ROT90, "ATW", "Mr. Kougar (earlier)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, mrkougb, mrkougar, mrkougb, mrkougar, scramble_state, empty_init, ROT90, "bootleg (Gross)", "Mr. Kougar (German bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, mrkougb2, mrkougar, mrkougb, mrkougar, scramble_state, empty_init, ROT90, "bootleg", "Mr. Kougar (bootleg)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, troopy, mrkougar, mrkougb, mrkougar, scramble_state, init_mrkougar, ROT90, "bootleg", "Troopy (bootleg of Mr. Kougar)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // wrong loading / decoding or bad GFX ROMs? +GAME( 1984, mrkougar, 0, mrkougar, mrkougar, scramble_state, init_mrkougar, ROT90, "ATW", "Mr. Kougar", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, mrkougar2,mrkougar, mrkougar, mrkougar, scramble_state, init_mrkougar, ROT90, "ATW", "Mr. Kougar (earlier)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, mrkougb, mrkougar, mrkougb, mrkougar, scramble_state, empty_init, ROT90, "bootleg (Gross)", "Mr. Kougar (German bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, mrkougb2, mrkougar, mrkougb, mrkougar, scramble_state, empty_init, ROT90, "bootleg", "Mr. Kougar (bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, troopy, mrkougar, mrkougb, mrkougar, scramble_state, init_mrkougar, ROT90, "bootleg", "Troopy (bootleg of Mr. Kougar)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // wrong loading / decoding or bad GFX ROMs? -GAME( 1982, hotshock, 0, hotshock, hotshock, scramble_state, init_hotshock, ROT90, "E.G. Felaco (Domino license)", "Hot Shocker", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, hotshockb,hotshock, hotshock, hotshock, scramble_state, init_hotshock, ROT90, "E.G. Felaco", "Hot Shocker (early revision?)", MACHINE_SUPPORTS_SAVE ) // has "Dudley presents" (protagonist of the game), instead of Domino +GAME( 1982, hotshock, 0, hotshock, hotshock, scramble_state, init_hotshock, ROT90, "E.G. Felaco (Domino license)", "Hot Shocker", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, hotshockb,hotshock, hotshock, hotshock, scramble_state, init_hotshock, ROT90, "E.G. Felaco", "Hot Shocker (early revision?)", MACHINE_SUPPORTS_SAVE ) // has "Dudley presents" (protagonist of the game), instead of Domino -GAME( 198?, conquer, 0, hotshock, hotshock, scramble_state, empty_init, ROT90, "", "Conqueror", MACHINE_NOT_WORKING ) +GAME( 198?, conquer, 0, hotshock, hotshock, scramble_state, empty_init, ROT90, "", "Conqueror", MACHINE_NOT_WORKING ) -GAME( 1983, hunchbks, hunchbak, hunchbks, hunchbks, scramble_state, init_scramble_ppi, ROT90, "Century Electronics", "Hunchback (Scramble hardware)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, hunchbks, hunchbak, hunchbks, hunchbks, scramble_state, init_scramble_ppi, ROT90, "Century Electronics", "Hunchback (Scramble hardware)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, hunchbks2,hunchbak, hunchbks, hunchbks, scramble_state, init_scramble_ppi, ROT90, "bootleg (Sig)", "Hunchback (Scramble hardware, bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, hncholms, huncholy, hncholms, hncholms, scramble_state, init_scramble_ppi, ROT90, "Century Electronics / Seatongrove Ltd", "Hunchback Olympic (Scramble hardware)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, cavelon, 0, cavelon, cavelon, scramble_state, init_cavelon, ROT90, "Jetsoft", "Cavelon", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, cavelon, 0, cavelon, cavelon, scramble_state, init_cavelon, ROT90, "Jetsoft", "Cavelon", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, mimonscr, mimonkey, mimonscr, mimonscr, scramble_state, init_mimonscr, ROT90, "bootleg", "Mighty Monkey (bootleg on Scramble hardware)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, mimonscr, mimonkey, mimonscr, mimonscr, scramble_state, init_mimonscr, ROT90, "bootleg", "Mighty Monkey (bootleg on Scramble hardware)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, mimonscra,mimonkey, mimonscr, mimonscr, scramble_state, init_mimonscr, ROT90, "bootleg (Kaina Games)","Mighty Monkey (Kaina Games, bootleg on Scramble hardware)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, ad2083, 0, ad2083, ad2083, scramble_state, init_ad2083, ROT90, "Midcoin", "A. D. 2083", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +GAME( 1983, ad2083, 0, ad2083, ad2083, scramble_state, init_ad2083, ROT90, "Midcoin", "A. D. 2083", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -GAME( 1983, harem, 0, harem, harem, scramble_state, init_harem, ROT90, "I.G.R.", "Harem", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, harem, 0, harem, harem, scramble_state, init_harem, ROT90, "I.G.R.", "Harem", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/scyclone.cpp b/src/mame/drivers/scyclone.cpp index 3266b40f400..cd6488158ea 100644 --- a/src/mame/drivers/scyclone.cpp +++ b/src/mame/drivers/scyclone.cpp @@ -625,7 +625,7 @@ MACHINE_CONFIG_START(scyclone_state::scyclone) MCFG_GENERIC_LATCH_8_ADD("soundlatch") /* add shifter */ - MCFG_MB14241_ADD("mb14241") + MB14241(config, "mb14241"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/segaorun.cpp b/src/mame/drivers/segaorun.cpp index f447a3be27d..11e30d91cfd 100644 --- a/src/mame/drivers/segaorun.cpp +++ b/src/mame/drivers/segaorun.cpp @@ -1159,7 +1159,7 @@ MACHINE_CONFIG_START(segaorun_state::outrun_base) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); I8255(config, m_i8255); m_i8255->in_pa_callback().set(FUNC(segaorun_state::bankmotor_limit_r)); diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp index 42e8b3daf86..1f64ffd81e9 100644 --- a/src/mame/drivers/segas16a.cpp +++ b/src/mame/drivers/segas16a.cpp @@ -1987,7 +1987,7 @@ MACHINE_CONFIG_START(segas16a_state::system16a) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); I8255(config, m_i8255); m_i8255->out_pa_callback().set("soundlatch", FUNC(generic_latch_8_device::write)); diff --git a/src/mame/drivers/segaxbd.cpp b/src/mame/drivers/segaxbd.cpp index a03e3ed5b57..9ee3e36f26d 100644 --- a/src/mame/drivers/segaxbd.cpp +++ b/src/mame/drivers/segaxbd.cpp @@ -1678,7 +1678,7 @@ MACHINE_CONFIG_START(segaxbd_state::xboard_base_mconfig ) NVRAM(config, "backup2", nvram_device::DEFAULT_ALL_0); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_MB3773_ADD("watchdog") + MB3773(config, "watchdog"); MCFG_SEGA_315_5248_MULTIPLIER_ADD("multiplier_main") MCFG_SEGA_315_5248_MULTIPLIER_ADD("multiplier_subx") diff --git a/src/mame/drivers/segaybd.cpp b/src/mame/drivers/segaybd.cpp index 10a00750d66..dc3baf601a6 100644 --- a/src/mame/drivers/segaybd.cpp +++ b/src/mame/drivers/segaybd.cpp @@ -1290,7 +1290,7 @@ MACHINE_CONFIG_START(segaybd_state::yboard) NVRAM(config, "backupram", nvram_device::DEFAULT_ALL_0); MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_MB3773_ADD("watchdog") // IC95 + MB3773(config, "watchdog"); // IC95 sega_315_5296_device &io(SEGA_315_5296(config, "io", MASTER_CLOCK/8)); io.in_pa_callback().set_ioport("P1"); diff --git a/src/mame/drivers/seicross.cpp b/src/mame/drivers/seicross.cpp index 58d52bd2085..c6a57466f5f 100644 --- a/src/mame/drivers/seicross.cpp +++ b/src/mame/drivers/seicross.cpp @@ -409,7 +409,7 @@ MACHINE_CONFIG_START(seicross_state::no_nvram) MCFG_QUANTUM_TIME(attotime::from_hz(1200)) /* 20 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp index 2ac44271546..aa9467e87c1 100644 --- a/src/mame/drivers/seta.cpp +++ b/src/mame/drivers/seta.cpp @@ -8034,7 +8034,7 @@ MACHINE_CONFIG_START(seta_state::usclssic) MCFG_DEVICE_PROGRAM_MAP(usclssic_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, calibr50_interrupt, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("sub", M65C02, 16000000/8) /* 2 MHz */ MCFG_DEVICE_PROGRAM_MAP(calibr50_sub_map) @@ -8101,7 +8101,7 @@ MACHINE_CONFIG_START(seta_state::calibr50) MCFG_DEVICE_PROGRAM_MAP(calibr50_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, calibr50_interrupt, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -8568,7 +8568,7 @@ MACHINE_CONFIG_START(setaroul_state::setaroul) MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)/2) /* 8 MHz */ MCFG_DEVICE_PROGRAM_MAP(setaroul_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", setaroul_state, interrupt, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_MACHINE_START_OVERRIDE(setaroul_state, setaroul) MCFG_MACHINE_RESET_OVERRIDE(setaroul_state, setaroul) @@ -8623,7 +8623,7 @@ MACHINE_CONFIG_START(seta_state::eightfrc) MCFG_DEVICE_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_DEVICE_PROGRAM_MAP(wrofaero_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") @@ -8667,7 +8667,7 @@ MACHINE_CONFIG_START(seta_state::extdwnhl) MCFG_DEVICE_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_DEVICE_PROGRAM_MAP(extdwnhl_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") @@ -8731,7 +8731,7 @@ MACHINE_CONFIG_START(seta_state::gundhara) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) #endif // __uPD71054_TIMER - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); #if __uPD71054_TIMER MCFG_MACHINE_START_OVERRIDE(seta_state, wrofaero ) @@ -8803,7 +8803,7 @@ MACHINE_CONFIG_START(seta_state::jjsquawk) MCFG_DEVICE_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_DEVICE_PROGRAM_MAP(wrofaero_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") @@ -8879,7 +8879,7 @@ MACHINE_CONFIG_START(seta_state::kamenrid) MCFG_DEVICE_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_DEVICE_PROGRAM_MAP(kamenrid_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_assert) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("pit", PIT8254, 0) // uPD71054C MCFG_PIT8253_CLK0(16000000/2/8) @@ -9063,7 +9063,7 @@ MACHINE_CONFIG_START(seta_state::madshark) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9103,7 +9103,7 @@ MACHINE_CONFIG_START(seta_state::magspeed) MCFG_DEVICE_PROGRAM_MAP(magspeed_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta_state, irq2_line_assert) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_MACHINE_START_OVERRIDE(seta_state, magspeed) @@ -9318,7 +9318,7 @@ MACHINE_CONFIG_START(seta_state::rezon) MCFG_DEVICE_ADD("maincpu", M68000, 16000000) /* 16 MHz */ MCFG_DEVICE_PROGRAM_MAP(wrofaero_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_1_and_2, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") @@ -9607,7 +9607,7 @@ MACHINE_CONFIG_START(seta_state::wrofaero) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", seta_state, seta_interrupt_2_and_4, "screen", 0, 1) #endif // __uPD71054_TIMER - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); #if __uPD71054_TIMER MCFG_MACHINE_START_OVERRIDE(seta_state, wrofaero ) @@ -9661,7 +9661,7 @@ MACHINE_CONFIG_START(seta_state::zingzip) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") MCFG_SETA001_SPRITE_GFXBANK_CB(seta_state, setac_gfxbank_callback) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -9831,8 +9831,7 @@ MACHINE_CONFIG_START(jockeyc_state::jockeyc) MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)/2) // TMP68000N-8 MCFG_DEVICE_PROGRAM_MAP(jockeyc_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", jockeyc_state, interrupt, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(2.0)) // jockeyc: watchdog test error if over 2.5s + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(2.0)); // jockeyc: watchdog test error if over 2.5s MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp index 85a79c951e9..464c01a6c37 100644 --- a/src/mame/drivers/seta2.cpp +++ b/src/mame/drivers/seta2.cpp @@ -2583,7 +2583,7 @@ MACHINE_CONFIG_START(seta2_state::seta2) MCFG_DEVICE_ADD("tmp68301", TMP68301, 0) MCFG_TMP68301_CPU("maincpu") - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // video hardware MCFG_SCREEN_ADD("screen", RASTER) @@ -2810,7 +2810,7 @@ MACHINE_CONFIG_START(funcube_state::funcube) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // video hardware MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/shadfrce.cpp b/src/mame/drivers/shadfrce.cpp index 14ca2204ceb..5c937c16bd2 100644 --- a/src/mame/drivers/shadfrce.cpp +++ b/src/mame/drivers/shadfrce.cpp @@ -544,7 +544,7 @@ MACHINE_CONFIG_START(shadfrce_state::shadfrce) MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */ MCFG_DEVICE_PROGRAM_MAP(shadfrce_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(XTAL(28'000'000) / 4, 448, 0, 320, 272, 8, 248) /* HTOTAL and VTOTAL are guessed */ diff --git a/src/mame/drivers/shaolins.cpp b/src/mame/drivers/shaolins.cpp index 401e02a0e9d..a7852f669cb 100644 --- a/src/mame/drivers/shaolins.cpp +++ b/src/mame/drivers/shaolins.cpp @@ -199,7 +199,7 @@ MACHINE_CONFIG_START(shaolins_state::shaolins) 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) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/shougi.cpp b/src/mame/drivers/shougi.cpp index ae4f0db2e5e..1b91a739420 100644 --- a/src/mame/drivers/shougi.cpp +++ b/src/mame/drivers/shougi.cpp @@ -393,8 +393,7 @@ MACHINE_CONFIG_START(shougi_state::shougi) MCFG_QUANTUM_PERFECT_CPU("maincpu") - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 0x10) // assuming it's the same as champbas + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 0x10); // assuming it's the same as champbas /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/shuuz.cpp b/src/mame/drivers/shuuz.cpp index 19c1e1a9acf..f54ee95b2c8 100644 --- a/src/mame/drivers/shuuz.cpp +++ b/src/mame/drivers/shuuz.cpp @@ -240,7 +240,7 @@ MACHINE_CONFIG_START(shuuz_state::shuuz) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_shuuz) diff --git a/src/mame/drivers/sidearms.cpp b/src/mame/drivers/sidearms.cpp index f7c3726ae66..acb3a5dc0a0 100644 --- a/src/mame/drivers/sidearms.cpp +++ b/src/mame/drivers/sidearms.cpp @@ -609,7 +609,7 @@ MACHINE_CONFIG_START(sidearms_state::sidearms) MCFG_DEVICE_ADD("audiocpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_DEVICE_PROGRAM_MAP(sidearms_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM8) @@ -658,7 +658,7 @@ MACHINE_CONFIG_START(sidearms_state::turtship) MCFG_DEVICE_ADD("audiocpu", Z80, 4000000) /* 4 MHz (?) */ MCFG_DEVICE_PROGRAM_MAP(sidearms_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM8) @@ -710,7 +710,7 @@ MACHINE_CONFIG_START(sidearms_state::whizz) MCFG_QUANTUM_TIME(attotime::from_hz(60000)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM8) diff --git a/src/mame/drivers/sigmab98.cpp b/src/mame/drivers/sigmab98.cpp index a9c436325e5..c0239ce68f9 100644 --- a/src/mame/drivers/sigmab98.cpp +++ b/src/mame/drivers/sigmab98.cpp @@ -3009,7 +3009,7 @@ MACHINE_CONFIG_START(sigmab98_state::sammymdl) MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW ) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // video hardware MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp index f89eb556255..68ac2aba230 100644 --- a/src/mame/drivers/simpsons.cpp +++ b/src/mame/drivers/simpsons.cpp @@ -338,7 +338,7 @@ MACHINE_CONFIG_START(simpsons_state::simpsons) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/skullxbo.cpp b/src/mame/drivers/skullxbo.cpp index 37bcb7aa9b4..cbe3436ccad 100644 --- a/src/mame/drivers/skullxbo.cpp +++ b/src/mame/drivers/skullxbo.cpp @@ -235,7 +235,7 @@ MACHINE_CONFIG_START(skullxbo_state::skullxbo) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_skullxbo) diff --git a/src/mame/drivers/skydiver.cpp b/src/mame/drivers/skydiver.cpp index 9fe01be50cd..e4ee45b584a 100644 --- a/src/mame/drivers/skydiver.cpp +++ b/src/mame/drivers/skydiver.cpp @@ -352,8 +352,7 @@ MACHINE_CONFIG_START(skydiver_state::skydiver) MCFG_DEVICE_PROGRAM_MAP(skydiver_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(skydiver_state, interrupt, 5*60) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) // 128V clocks the same as VBLANK + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); // 128V clocks the same as VBLANK f9334_device &latch1(F9334(config, "latch1")); // F12 latch1.q_out_cb<0>().set(FUNC(skydiver_state::lamp_s_w)); diff --git a/src/mame/drivers/skykid.cpp b/src/mame/drivers/skykid.cpp index 4eeede35f26..67e12ff741d 100644 --- a/src/mame/drivers/skykid.cpp +++ b/src/mame/drivers/skykid.cpp @@ -447,7 +447,7 @@ MACHINE_CONFIG_START(skykid_state::skykid) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/skyraid.cpp b/src/mame/drivers/skyraid.cpp index 64137991f2b..4d9fccefcaf 100644 --- a/src/mame/drivers/skyraid.cpp +++ b/src/mame/drivers/skyraid.cpp @@ -229,8 +229,7 @@ MACHINE_CONFIG_START(skyraid_state::skyraid) MCFG_DEVICE_PROGRAM_MAP(skyraid_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", skyraid_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 4) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 4); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/snowbros.cpp b/src/mame/drivers/snowbros.cpp index 04adc464a03..65657beac03 100644 --- a/src/mame/drivers/snowbros.cpp +++ b/src/mame/drivers/snowbros.cpp @@ -1730,7 +1730,7 @@ MACHINE_CONFIG_START(snowbros_state::snowbros) MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)/2) /* 8 Mhz - confirmed */ MCFG_DEVICE_PROGRAM_MAP(snowbros_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", snowbros_state, snowbros_irq, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("soundcpu", Z80, XTAL(12'000'000)/2) /* 6 MHz - confirmed */ MCFG_DEVICE_PROGRAM_MAP(sound_map) @@ -1879,7 +1879,7 @@ MACHINE_CONFIG_START(snowbros_state::twinadv) MCFG_DEVICE_ADD("maincpu", M68000, XTAL(12'000'000)) /* 12MHz like Honey Dolls ? */ MCFG_DEVICE_PROGRAM_MAP(twinadv_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", snowbros_state, snowbros_irq, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("soundcpu", Z80, XTAL(16'000'000)/4) /* 4Mhz (16MHz/4) like SemiCom or 6MHz (12MHz/2) like snowbros??? */ MCFG_DEVICE_PROGRAM_MAP(sound_map) @@ -1966,7 +1966,7 @@ MACHINE_CONFIG_START(snowbros_state::snowbro3) /* PCB has 16MHz & 12MHz OSCs */ MCFG_DEVICE_ADD("maincpu", M68000, XTAL(12'000'000)) /* MC68000P10 CPU @ 12mhz or 8MHz (16MHz/2) ? */ MCFG_DEVICE_PROGRAM_MAP(snowbros3_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", snowbros_state, snowbros3_irq, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1997,7 +1997,7 @@ MACHINE_CONFIG_START(snowbros_state::yutnori) MCFG_DEVICE_PROGRAM_MAP(yutnori_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", snowbros_state, snowbros_irq, "screen", 0, 1) -// MCFG_WATCHDOG_ADD("watchdog") // maybe +// WATCHDOG_TIMER(config, "watchdog"); // maybe /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/speedatk.cpp b/src/mame/drivers/speedatk.cpp index 5dda53b5564..eeaf8ceed4b 100644 --- a/src/mame/drivers/speedatk.cpp +++ b/src/mame/drivers/speedatk.cpp @@ -313,8 +313,7 @@ MACHINE_CONFIG_START(speedatk_state::speedatk) MCFG_DEVICE_IO_MAP(speedatk_io) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", speedatk_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) // timing is unknown + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); // timing is unknown /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sprint2.cpp b/src/mame/drivers/sprint2.cpp index cec24af87c2..8142f76e509 100644 --- a/src/mame/drivers/sprint2.cpp +++ b/src/mame/drivers/sprint2.cpp @@ -497,8 +497,7 @@ MACHINE_CONFIG_START(sprint2_state::sprint2) MCFG_DEVICE_PROGRAM_MAP(sprint2_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sprint2_state, sprint2) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sprint4.cpp b/src/mame/drivers/sprint4.cpp index 5efaa9cfd26..41e6ed78b80 100644 --- a/src/mame/drivers/sprint4.cpp +++ b/src/mame/drivers/sprint4.cpp @@ -385,8 +385,7 @@ MACHINE_CONFIG_START(sprint4_state::sprint4) MCFG_DEVICE_ADD("maincpu", M6502, PIXEL_CLOCK / 8) MCFG_DEVICE_PROGRAM_MAP(sprint4_cpu_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/spy.cpp b/src/mame/drivers/spy.cpp index c7a6aa51e75..32e69d9eb5e 100644 --- a/src/mame/drivers/spy.cpp +++ b/src/mame/drivers/spy.cpp @@ -504,7 +504,7 @@ MACHINE_CONFIG_START(spy_state::spy) MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) MCFG_DEVICE_PROGRAM_MAP(spy_sound_map) /* nmi by the sound chip */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sspeedr.cpp b/src/mame/drivers/sspeedr.cpp index cd9f2366b8a..77519edc5d4 100644 --- a/src/mame/drivers/sspeedr.cpp +++ b/src/mame/drivers/sspeedr.cpp @@ -198,7 +198,7 @@ MACHINE_CONFIG_START(sspeedr_state::sspeedr) MCFG_DEVICE_IO_MAP(sspeedr_io_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sspeedr_state, irq0_line_assert) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/ssv.cpp b/src/mame/drivers/ssv.cpp index ff1bd10e7a1..4e9d328931b 100644 --- a/src/mame/drivers/ssv.cpp +++ b/src/mame/drivers/ssv.cpp @@ -2635,7 +2635,7 @@ MACHINE_CONFIG_START(ssv_state::hypreact) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(hypreact_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2650,7 +2650,7 @@ MACHINE_CONFIG_START(ssv_state::hypreac2) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(hypreac2_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2693,7 +2693,7 @@ MACHINE_CONFIG_START(ssv_state::meosism) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2721,7 +2721,7 @@ MACHINE_CONFIG_START(ssv_state::ryorioh) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(ryorioh_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2735,7 +2735,7 @@ MACHINE_CONFIG_START(ssv_state::vasara) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(ryorioh_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2749,7 +2749,7 @@ MACHINE_CONFIG_START(ssv_state::srmp4) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(srmp4_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2764,7 +2764,7 @@ MACHINE_CONFIG_START(ssv_state::srmp7) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(srmp7_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2800,7 +2800,7 @@ MACHINE_CONFIG_START(ssv_state::survarts) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(survarts_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2831,7 +2831,7 @@ MACHINE_CONFIG_START(ssv_state::eaglshot) MCFG_UPD4701_PORTX("TRACKX") MCFG_UPD4701_PORTY("TRACKY") - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2852,7 +2852,7 @@ MACHINE_CONFIG_START(ssv_state::sxyreact) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2868,7 +2868,7 @@ MACHINE_CONFIG_START(ssv_state::sxyreac2) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2884,7 +2884,7 @@ MACHINE_CONFIG_START(ssv_state::cairblad) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2904,7 +2904,7 @@ MACHINE_CONFIG_START(ssv_state::twineag2) MCFG_QUANTUM_PERFECT_CPU("maincpu") - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2919,7 +2919,7 @@ MACHINE_CONFIG_START(ssv_state::ultrax) MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(ultrax_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2936,7 +2936,7 @@ MACHINE_CONFIG_START(ssv_state::jsk) MCFG_DEVICE_ADD("sub", V810,25000000) MCFG_DEVICE_PROGRAM_MAP(jsk_v810_mem) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") diff --git a/src/mame/drivers/stargame.cpp b/src/mame/drivers/stargame.cpp index 3556438e508..813470bf2a7 100644 --- a/src/mame/drivers/stargame.cpp +++ b/src/mame/drivers/stargame.cpp @@ -144,7 +144,7 @@ MACHINE_CONFIG_START(stargame_state::stargame) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MACHINE_CONFIG_END ROM_START(spcship) diff --git a/src/mame/drivers/starwars.cpp b/src/mame/drivers/starwars.cpp index c720c9eb115..cb0f381a092 100644 --- a/src/mame/drivers/starwars.cpp +++ b/src/mame/drivers/starwars.cpp @@ -305,8 +305,7 @@ MACHINE_CONFIG_START(starwars_state::starwars) MCFG_DEVICE_PROGRAM_MAP(main_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(starwars_state, irq0_line_assert, CLOCK_3KHZ / 12) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(CLOCK_3KHZ / 128)) + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_hz(CLOCK_3KHZ / 128)); MCFG_DEVICE_ADD("audiocpu", MC6809E, MASTER_CLOCK / 8) MCFG_DEVICE_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/stuntair.cpp b/src/mame/drivers/stuntair.cpp index 136ef6972f0..e054617b546 100644 --- a/src/mame/drivers/stuntair.cpp +++ b/src/mame/drivers/stuntair.cpp @@ -539,7 +539,7 @@ MACHINE_CONFIG_START(stuntair_state::stuntair) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/sub.cpp b/src/mame/drivers/sub.cpp index 5c8ccc2ce26..1fd35c94682 100644 --- a/src/mame/drivers/sub.cpp +++ b/src/mame/drivers/sub.cpp @@ -322,7 +322,7 @@ MACHINE_CONFIG_START(sub_state::sub) mainlatch.q_out_cb<3>().set_nop(); // same as Q0? mainlatch.q_out_cb<5>().set_nop(); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/suna8.cpp b/src/mame/drivers/suna8.cpp index 4418c8a76db..68318db6b4e 100644 --- a/src/mame/drivers/suna8.cpp +++ b/src/mame/drivers/suna8.cpp @@ -1947,7 +1947,7 @@ MACHINE_CONFIG_START(suna8_state::rranger) MCFG_DEVICE_PROGRAM_MAP(rranger_sound_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(suna8_state, irq0_line_hold, 4*60) /* NMI = retn */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2836,7 +2836,7 @@ ROM_START( hardhea2 ) ROM_LOAD( "hrd-hd13", 0x40000, 0x10000, CRC(3225e7d7) SHA1(2da9d1ce182dab8d9e09772e6899676b84c7458c) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* Music Z80 Code */ - ROM_LOAD( "hrd-hd14", 0x00000, 0x08000, CRC(79a3be51) SHA1(30bc67cd3a936615c6931f8e15953425dff59611) ) + ROM_LOAD( "hrd-hd14", 0x00000, 0x08000, CRC(79a3be51) SHA1(30bc67cd3a936615c6931f8e15953425dff59611) ) // NO PROGRAM + MUSIC PROGRAM V 2.4 ROM_REGION( 0x10000, "pcm", 0 ) /* PCM Z80 Code */ ROM_LOAD( "hrd-hd15", 0x00000, 0x10000, CRC(bcbd88c3) SHA1(79782d598d9d764de70c54fc07ff9bf0f7d13d62) ) @@ -2852,6 +2852,31 @@ ROM_START( hardhea2 ) ROM_LOAD( "hrd-hd8", 0x70000, 0x10000, CRC(359597a4) SHA1(ae024dd61c5d12813a661abe8ea63ae6112ddc9c) ) ROM_END +ROM_START( hardhea2a ) + ROM_REGION( 0x50000, "maincpu", 0 ) /* Main Z80 Code */ + ROM_LOAD( "p9.f6", 0x00000, 0x08000, CRC(69c4c307) SHA1(0dfde1dcda51b5b1740aff9e96cb877a428a3e04) ) // V 2.0 1991,2,12 + ROM_LOAD( "10.h6", 0x10000, 0x10000, CRC(77ec5b0a) SHA1(2d3e24c208904a7884e585e08e5818fd9f8b5391) ) + ROM_LOAD( "11.i6", 0x20000, 0x10000, CRC(12af8f8e) SHA1(1b33a060b70900042fdae00f7dec325228d566f5) ) + ROM_LOAD( "12.f7", 0x30000, 0x10000, CRC(35d13212) SHA1(2fd03077b89ec9e55d2758b7f9cada970f0bdd91) ) + ROM_LOAD( "13.h7", 0x40000, 0x10000, CRC(3225e7d7) SHA1(2da9d1ce182dab8d9e09772e6899676b84c7458c) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) /* Music Z80 Code */ + ROM_LOAD( "14.c9", 0x00000, 0x08000, CRC(92e1ae81) SHA1(002125d152e84baf347245952b3f4d8637753b13) ) // 1991,2,10 ALL O.K V3.0 HARD HEAD2 MUSIC + MUSIC PROGRAM V 2,0 1990.12.14 SUNA ELECTRONICS KHT + + ROM_REGION( 0x10000, "pcm", 0 ) /* PCM Z80 Code */ + ROM_LOAD( "15.m10", 0x00000, 0x10000, CRC(bcbd88c3) SHA1(79782d598d9d764de70c54fc07ff9bf0f7d13d62) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) /* Sprites */ + ROM_LOAD( "p1.n1", 0x00000, 0x10000, CRC(7e7b7a58) SHA1(1a74260dda64aafcb046c8add92a54655bbc74e4) ) + ROM_LOAD( "p2.o1", 0x10000, 0x10000, CRC(303ec802) SHA1(533c29d9bb54415410c5d3c5af234b8b040190de) ) + ROM_LOAD( "p3.q1", 0x20000, 0x10000, CRC(3353b2c7) SHA1(a3ec0fc2a97e7e0bc72fafd5897cb1dd4cd32197) ) + ROM_LOAD( "p4.n3", 0x30000, 0x10000, CRC(dbc1f9c1) SHA1(720c729d7825635584632d033b4b46eea2fb1291) ) + ROM_LOAD( "p5.n4", 0x40000, 0x10000, CRC(f738c0af) SHA1(7dda657acd1d6fb7064e8dbd5ce386e9eae3d36a) ) + ROM_LOAD( "p6.04", 0x50000, 0x10000, CRC(bf90d3ca) SHA1(2d0533d93fc5155fe879c1890bc7bc4581308e16) ) + ROM_LOAD( "p7.q4", 0x60000, 0x10000, CRC(992ce8cb) SHA1(21c0dd227138ec64003c7cb090855ec27d41719e) ) + ROM_LOAD( "p8.n6", 0x70000, 0x10000, CRC(359597a4) SHA1(ae024dd61c5d12813a661abe8ea63ae6112ddc9c) ) +ROM_END + ROM_START( hardhea2b ) ROM_REGION( 0x50000, "maincpu", 0 ) /* Main Z80 Code */ ROM_LOAD( "9.f5", 0x00000, 0x10000, CRC(3f31ece3) SHA1(224e9bc60a71ede9d194e9c696c2259a55f16e7d) ) @@ -3076,8 +3101,9 @@ GAME( 1989, sparkmana, sparkman, sparkman, sparkman, suna8_state, init_sparkman, GAME( 1990, starfigh, 0, starfigh, starfigh, suna8_state, init_starfigh, ROT90, "SunA", "Star Fighter (v1)", MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1991, hardhea2, 0, hardhea2, hardhea2, suna8_state, init_hardhea2, ROT0, "SunA", "Hard Head 2 (v2.0)", 0 ) -GAME( 1991, hardhea2b, hardhea2, hardhea2b,hardhea2, suna8_state, init_hardhea2b, ROT0, "bootleg", "Hard Head 2 (v2.0, bootleg)", MACHINE_NOT_WORKING ) +GAME( 1991, hardhea2, 0, hardhea2, hardhea2, suna8_state, init_hardhea2, ROT0, "SunA", "Hard Head 2 (v2.0, Music Program v2.4)", 0 ) +GAME( 1991, hardhea2a, hardhea2, hardhea2, hardhea2, suna8_state, init_hardhea2, ROT0, "SunA", "Hard Head 2 (v2.0, Music Program v2.0)", 0 ) +GAME( 1991, hardhea2b, hardhea2, hardhea2b,hardhea2, suna8_state, init_hardhea2b, ROT0, "bootleg", "Hard Head 2 (v2.0, bootleg)", MACHINE_NOT_WORKING ) GAME( 1992, brickzn, 0, brickzn, brickznv6,suna8_state, init_brickzn, ROT90, "SunA", "Brick Zone (v6.0, Joystick)", 0 ) GAME( 1992, brickznv5, brickzn, brickzn, brickzn, suna8_state, init_brickznv5, ROT90, "SunA", "Brick Zone (v5.0, Joystick)", 0 ) diff --git a/src/mame/drivers/supdrapo.cpp b/src/mame/drivers/supdrapo.cpp index b30755755f2..37002314b77 100644 --- a/src/mame/drivers/supdrapo.cpp +++ b/src/mame/drivers/supdrapo.cpp @@ -461,7 +461,7 @@ MACHINE_CONFIG_START(supdrapo_state::supdrapo) MCFG_DEVICE_PROGRAM_MAP(sdpoker_mem) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", supdrapo_state, irq0_line_hold) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/drivers/supertnk.cpp b/src/mame/drivers/supertnk.cpp index e2c7a3603d2..bf4d63f2767 100644 --- a/src/mame/drivers/supertnk.cpp +++ b/src/mame/drivers/supertnk.cpp @@ -441,7 +441,7 @@ MACHINE_CONFIG_START(supertnk_state::supertnk) m_maincpu->set_addrmap(AS_IO, &supertnk_state::supertnk_io_map); m_maincpu->set_vblank_int("screen", FUNC(supertnk_state::supertnk_interrupt)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ diff --git a/src/mame/drivers/suprridr.cpp b/src/mame/drivers/suprridr.cpp index dea41e8bc42..df711feca94 100644 --- a/src/mame/drivers/suprridr.cpp +++ b/src/mame/drivers/suprridr.cpp @@ -333,7 +333,7 @@ MACHINE_CONFIG_START(suprridr_state::suprridr) MCFG_DEVICE_PROGRAM_MAP(sound_map) MCFG_DEVICE_IO_MAP(sound_portmap) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/surpratk.cpp b/src/mame/drivers/surpratk.cpp index 26f251c8f0f..dfb920ea624 100644 --- a/src/mame/drivers/surpratk.cpp +++ b/src/mame/drivers/surpratk.cpp @@ -178,7 +178,7 @@ MACHINE_CONFIG_START(surpratk_state::surpratk) ADDRESS_MAP_BANK(config, "bank0000").set_map(&surpratk_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x800); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/svision.cpp b/src/mame/drivers/svision.cpp index cb1ef29b908..bc61757ba84 100644 --- a/src/mame/drivers/svision.cpp +++ b/src/mame/drivers/svision.cpp @@ -150,12 +150,13 @@ WRITE8_MEMBER(svision_state::svision_w) } case 0x23: /* delta hero irq routine write */ + { + int delay = (data == 0) ? 0x100 : data; + delay *= (BIT(m_reg[BANK], 4)) ? 0x4000 : 0x100; m_svision.timer1->enable(true); - if (BIT(m_reg[BANK], 4)) - m_svision.timer1->reset(m_maincpu->cycles_to_attotime(0x100 * 0x4000)); - else - m_svision.timer1->reset(m_maincpu->cycles_to_attotime(0x100 * 0x100)); + m_svision.timer1->reset(m_maincpu->cycles_to_attotime(delay)); break; + } case 0x10: case 0x11: case 0x12: case 0x13: m_sound->soundport_w(0, offset & 3, data); diff --git a/src/mame/drivers/swtpc.cpp b/src/mame/drivers/swtpc.cpp index b69fc7c68a5..5f2343136f7 100644 --- a/src/mame/drivers/swtpc.cpp +++ b/src/mame/drivers/swtpc.cpp @@ -103,46 +103,46 @@ MACHINE_CONFIG_START(swtpc_state::swtpc) MCFG_DEVICE_PROGRAM_MAP(mem_map) MC14411(config, m_brg, XTAL(1'843'200)); - m_brg->out_f7_cb().set("io0", FUNC(ss50_interface_port_device::f600_1200_w)); // 1200b - m_brg->out_f7_cb().append("io1", FUNC(ss50_interface_port_device::f600_1200_w)); - m_brg->out_f7_cb().append("io2", FUNC(ss50_interface_port_device::f600_1200_w)); - m_brg->out_f7_cb().append("io3", FUNC(ss50_interface_port_device::f600_1200_w)); - m_brg->out_f7_cb().append("io4", FUNC(ss50_interface_port_device::f600_1200_w)); - m_brg->out_f7_cb().append("io5", FUNC(ss50_interface_port_device::f600_1200_w)); - m_brg->out_f7_cb().append("io6", FUNC(ss50_interface_port_device::f600_1200_w)); - m_brg->out_f7_cb().append("io7", FUNC(ss50_interface_port_device::f600_1200_w)); - m_brg->out_f8_cb().set("io0", FUNC(ss50_interface_port_device::f600_4800_w)); // 600b - m_brg->out_f8_cb().append("io1", FUNC(ss50_interface_port_device::f600_4800_w)); - m_brg->out_f8_cb().append("io2", FUNC(ss50_interface_port_device::f600_4800_w)); - m_brg->out_f8_cb().append("io3", FUNC(ss50_interface_port_device::f600_4800_w)); - m_brg->out_f8_cb().append("io4", FUNC(ss50_interface_port_device::f600_4800_w)); - m_brg->out_f8_cb().append("io5", FUNC(ss50_interface_port_device::f600_4800_w)); - m_brg->out_f8_cb().append("io6", FUNC(ss50_interface_port_device::f600_4800_w)); - m_brg->out_f8_cb().append("io7", FUNC(ss50_interface_port_device::f600_4800_w)); - m_brg->out_f9_cb().set("io0", FUNC(ss50_interface_port_device::f300_w)); // 300b - m_brg->out_f9_cb().append("io1", FUNC(ss50_interface_port_device::f300_w)); - m_brg->out_f9_cb().append("io2", FUNC(ss50_interface_port_device::f300_w)); - m_brg->out_f9_cb().append("io3", FUNC(ss50_interface_port_device::f300_w)); - m_brg->out_f9_cb().append("io4", FUNC(ss50_interface_port_device::f300_w)); - m_brg->out_f9_cb().append("io5", FUNC(ss50_interface_port_device::f300_w)); - m_brg->out_f9_cb().append("io6", FUNC(ss50_interface_port_device::f300_w)); - m_brg->out_f9_cb().append("io7", FUNC(ss50_interface_port_device::f300_w)); - m_brg->out_f11_cb().set("io0", FUNC(ss50_interface_port_device::f150_9600_w)); // 150b - m_brg->out_f11_cb().append("io1", FUNC(ss50_interface_port_device::f150_9600_w)); - m_brg->out_f11_cb().append("io2", FUNC(ss50_interface_port_device::f150_9600_w)); - m_brg->out_f11_cb().append("io3", FUNC(ss50_interface_port_device::f150_9600_w)); - m_brg->out_f11_cb().append("io4", FUNC(ss50_interface_port_device::f150_9600_w)); - m_brg->out_f11_cb().append("io5", FUNC(ss50_interface_port_device::f150_9600_w)); - m_brg->out_f11_cb().append("io6", FUNC(ss50_interface_port_device::f150_9600_w)); - m_brg->out_f11_cb().append("io7", FUNC(ss50_interface_port_device::f150_9600_w)); - m_brg->out_f13_cb().set("io0", FUNC(ss50_interface_port_device::f110_w)); // 110b - m_brg->out_f13_cb().append("io1", FUNC(ss50_interface_port_device::f110_w)); - m_brg->out_f13_cb().append("io2", FUNC(ss50_interface_port_device::f110_w)); - m_brg->out_f13_cb().append("io3", FUNC(ss50_interface_port_device::f110_w)); - m_brg->out_f13_cb().append("io4", FUNC(ss50_interface_port_device::f110_w)); - m_brg->out_f13_cb().append("io5", FUNC(ss50_interface_port_device::f110_w)); - m_brg->out_f13_cb().append("io6", FUNC(ss50_interface_port_device::f110_w)); - m_brg->out_f13_cb().append("io7", FUNC(ss50_interface_port_device::f110_w)); + m_brg->out_f<7>().set("io0", FUNC(ss50_interface_port_device::f600_1200_w)); // 1200b + m_brg->out_f<7>().append("io1", FUNC(ss50_interface_port_device::f600_1200_w)); + m_brg->out_f<7>().append("io2", FUNC(ss50_interface_port_device::f600_1200_w)); + m_brg->out_f<7>().append("io3", FUNC(ss50_interface_port_device::f600_1200_w)); + m_brg->out_f<7>().append("io4", FUNC(ss50_interface_port_device::f600_1200_w)); + m_brg->out_f<7>().append("io5", FUNC(ss50_interface_port_device::f600_1200_w)); + m_brg->out_f<7>().append("io6", FUNC(ss50_interface_port_device::f600_1200_w)); + m_brg->out_f<7>().append("io7", FUNC(ss50_interface_port_device::f600_1200_w)); + m_brg->out_f<8>().set("io0", FUNC(ss50_interface_port_device::f600_4800_w)); // 600b + m_brg->out_f<8>().append("io1", FUNC(ss50_interface_port_device::f600_4800_w)); + m_brg->out_f<8>().append("io2", FUNC(ss50_interface_port_device::f600_4800_w)); + m_brg->out_f<8>().append("io3", FUNC(ss50_interface_port_device::f600_4800_w)); + m_brg->out_f<8>().append("io4", FUNC(ss50_interface_port_device::f600_4800_w)); + m_brg->out_f<8>().append("io5", FUNC(ss50_interface_port_device::f600_4800_w)); + m_brg->out_f<8>().append("io6", FUNC(ss50_interface_port_device::f600_4800_w)); + m_brg->out_f<8>().append("io7", FUNC(ss50_interface_port_device::f600_4800_w)); + m_brg->out_f<9>().set("io0", FUNC(ss50_interface_port_device::f300_w)); // 300b + m_brg->out_f<9>().append("io1", FUNC(ss50_interface_port_device::f300_w)); + m_brg->out_f<9>().append("io2", FUNC(ss50_interface_port_device::f300_w)); + m_brg->out_f<9>().append("io3", FUNC(ss50_interface_port_device::f300_w)); + m_brg->out_f<9>().append("io4", FUNC(ss50_interface_port_device::f300_w)); + m_brg->out_f<9>().append("io5", FUNC(ss50_interface_port_device::f300_w)); + m_brg->out_f<9>().append("io6", FUNC(ss50_interface_port_device::f300_w)); + m_brg->out_f<9>().append("io7", FUNC(ss50_interface_port_device::f300_w)); + m_brg->out_f<11>().set("io0", FUNC(ss50_interface_port_device::f150_9600_w)); // 150b + m_brg->out_f<11>().append("io1", FUNC(ss50_interface_port_device::f150_9600_w)); + m_brg->out_f<11>().append("io2", FUNC(ss50_interface_port_device::f150_9600_w)); + m_brg->out_f<11>().append("io3", FUNC(ss50_interface_port_device::f150_9600_w)); + m_brg->out_f<11>().append("io4", FUNC(ss50_interface_port_device::f150_9600_w)); + m_brg->out_f<11>().append("io5", FUNC(ss50_interface_port_device::f150_9600_w)); + m_brg->out_f<11>().append("io6", FUNC(ss50_interface_port_device::f150_9600_w)); + m_brg->out_f<11>().append("io7", FUNC(ss50_interface_port_device::f150_9600_w)); + m_brg->out_f<13>().set("io0", FUNC(ss50_interface_port_device::f110_w)); // 110b + m_brg->out_f<13>().append("io1", FUNC(ss50_interface_port_device::f110_w)); + m_brg->out_f<13>().append("io2", FUNC(ss50_interface_port_device::f110_w)); + m_brg->out_f<13>().append("io3", FUNC(ss50_interface_port_device::f110_w)); + m_brg->out_f<13>().append("io4", FUNC(ss50_interface_port_device::f110_w)); + m_brg->out_f<13>().append("io5", FUNC(ss50_interface_port_device::f110_w)); + m_brg->out_f<13>().append("io6", FUNC(ss50_interface_port_device::f110_w)); + m_brg->out_f<13>().append("io7", FUNC(ss50_interface_port_device::f110_w)); MCFG_SS50_INTERFACE_PORT_ADD("io0", default_2rs_devices, nullptr) MCFG_SS50_INTERFACE_IRQ_CALLBACK(WRITELINE("mainirq", input_merger_device, in_w<0>)) diff --git a/src/mame/drivers/swtpc09.cpp b/src/mame/drivers/swtpc09.cpp index 82404f1f10c..638d3a2d23a 100644 --- a/src/mame/drivers/swtpc09.cpp +++ b/src/mame/drivers/swtpc09.cpp @@ -198,8 +198,8 @@ void swtpc09_state::swtpc09_base(machine_config &config) m_acia->irq_handler().set(FUNC(swtpc09_state::acia_interrupt)); MC14411(config, m_brg, 1.8432_MHz_XTAL); - m_brg->out_f1_cb().set(m_acia, FUNC(acia6850_device::write_txc)); - m_brg->out_f1_cb().append(m_acia, FUNC(acia6850_device::write_rxc)); + m_brg->out_f<1>().set(m_acia, FUNC(acia6850_device::write_txc)); + m_brg->out_f<1>().append(m_acia, FUNC(acia6850_device::write_rxc)); FD1793(config, m_fdc, 1_MHz_XTAL); FLOPPY_CONNECTOR(config, "fdc:0", swtpc09_floppies, "dd", swtpc09_state::floppy_formats); diff --git a/src/mame/drivers/taito_b.cpp b/src/mame/drivers/taito_b.cpp index 7b957615713..81cb0a183e1 100644 --- a/src/mame/drivers/taito_b.cpp +++ b/src/mame/drivers/taito_b.cpp @@ -2203,8 +2203,8 @@ MACHINE_CONFIG_START(taitob_state::pbobble) m_tc0640fio->write_4_callback().set(FUNC(taitob_state::player_12_coin_ctrl_w)); m_tc0640fio->read_7_callback().set_ioport("P1_P2_B"); - MCFG_DEVICE_ADD("mb87078", MB87078, 0) - MCFG_MB87078_GAIN_CHANGED_CB(WRITE8(*this, taitob_state, mb87078_gain_changed)) + MB87078(config, m_mb87078); + m_mb87078->gain_changed().set(FUNC(taitob_state::mb87078_gain_changed)); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2267,8 +2267,8 @@ MACHINE_CONFIG_START(taitob_state::spacedx) m_tc0640fio->write_4_callback().set(FUNC(taitob_state::player_12_coin_ctrl_w)); m_tc0640fio->read_7_callback().set_ioport("P1_P2_B"); - MCFG_DEVICE_ADD("mb87078", MB87078, 0) - MCFG_MB87078_GAIN_CHANGED_CB(WRITE8(*this, taitob_state, mb87078_gain_changed)) + MB87078(config, m_mb87078); + m_mb87078->gain_changed().set(FUNC(taitob_state::mb87078_gain_changed)); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2389,8 +2389,8 @@ MACHINE_CONFIG_START(taitob_state::qzshowby) m_tc0640fio->write_4_callback().set(FUNC(taitob_state::player_12_coin_ctrl_w)); m_tc0640fio->read_7_callback().set_ioport("P1_P2_B"); - MCFG_DEVICE_ADD("mb87078", MB87078, 0) - MCFG_MB87078_GAIN_CHANGED_CB(WRITE8(*this, taitob_state, mb87078_gain_changed)) + MB87078(config, m_mb87078); + m_mb87078->gain_changed().set(FUNC(taitob_state::mb87078_gain_changed)); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp index f9a18c99929..151fee9c879 100644 --- a/src/mame/drivers/taito_f2.cpp +++ b/src/mame/drivers/taito_f2.cpp @@ -2860,7 +2860,7 @@ MACHINE_CONFIG_START(taitof2_state::taito_f2) MCFG_MACHINE_START_OVERRIDE(taitof2_state,f2) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/taito_h.cpp b/src/mame/drivers/taito_h.cpp index d85e7cd93fa..74af09f8b44 100644 --- a/src/mame/drivers/taito_h.cpp +++ b/src/mame/drivers/taito_h.cpp @@ -674,8 +674,8 @@ MACHINE_CONFIG_START(taitoh_state::syvalion) MCFG_SCREEN_UPDATE_DRIVER(taitoh_state, screen_update_syvalion) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_syvalion) - MCFG_PALETTE_ADD("palette", 33*16) + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_syvalion) + MCFG_PALETTE_ADD(m_palette, 33*16) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) MCFG_DEVICE_ADD("tc0080vco", TC0080VCO, 0) @@ -730,8 +730,8 @@ MACHINE_CONFIG_START(taitoh_state::recordbr) MCFG_SCREEN_UPDATE_DRIVER(taitoh_state, screen_update_recordbr) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_recordbr) - MCFG_PALETTE_ADD("palette", 32*16) + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_recordbr) + MCFG_PALETTE_ADD(m_palette, 32*16) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) MCFG_DEVICE_ADD("tc0080vco", TC0080VCO, 0) @@ -762,6 +762,8 @@ MACHINE_CONFIG_START(taitoh_state::tetristh) /* basic machine hardware */ MCFG_DEVICE_MODIFY("maincpu") MCFG_DEVICE_PROGRAM_MAP(tetristh_map) + + m_palette->set_entries(0x800/2); MACHINE_CONFIG_END @@ -795,8 +797,8 @@ MACHINE_CONFIG_START(taitoh_state::dleague) MCFG_SCREEN_UPDATE_DRIVER(taitoh_state, screen_update_dleague) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dleague) - MCFG_PALETTE_ADD("palette", 33*16) + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_dleague) + MCFG_PALETTE_ADD(m_palette, 33*16) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) MCFG_DEVICE_ADD("tc0080vco", TC0080VCO, 0) diff --git a/src/mame/drivers/taito_o.cpp b/src/mame/drivers/taito_o.cpp index d09da0d7018..c581e2f79cb 100644 --- a/src/mame/drivers/taito_o.cpp +++ b/src/mame/drivers/taito_o.cpp @@ -239,7 +239,7 @@ MACHINE_CONFIG_START(taitoo_state::parentj) MCFG_DEVICE_PROGRAM_MAP(parentj_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", taitoo_state, parentj_interrupt, "screen", 0, 1) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/taitogn.cpp b/src/mame/drivers/taitogn.cpp index 86415c7faa9..bc3cd545d24 100644 --- a/src/mame/drivers/taitogn.cpp +++ b/src/mame/drivers/taitogn.cpp @@ -720,7 +720,7 @@ MACHINE_CONFIG_START(taitogn_state::coh3002t) MCFG_DEVICE_ADD("pccard", PCCARD_SLOT, 0) MCFG_DEVICE_SLOT_INTERFACE(slot_ataflash, nullptr, false) - MCFG_MB3773_ADD("mb3773") + MB3773(config, "mb3773"); INTEL_TE28F160(config, "biosflash"); INTEL_E28F400B(config, "pgmflash"); diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp index 9fcdf538b22..69370b98ab5 100644 --- a/src/mame/drivers/taitosj.cpp +++ b/src/mame/drivers/taitosj.cpp @@ -1835,8 +1835,7 @@ MACHINE_CONFIG_START(taitosj_state::nomcu) MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(*this, taitosj_state, taitosj_sndnmi_msk_w)) /* port Bwrite */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 128); // 74LS393 on CPU board, counts 128 vblanks before firing watchdog + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // 74LS393 on CPU board, counts 128 vblanks before firing watchdog 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) diff --git a/src/mame/drivers/tecmo.cpp b/src/mame/drivers/tecmo.cpp index 40a22c6e7bd..cb1de631c97 100644 --- a/src/mame/drivers/tecmo.cpp +++ b/src/mame/drivers/tecmo.cpp @@ -724,7 +724,7 @@ MACHINE_CONFIG_START(tecmo_state::rygar) MCFG_DEVICE_ADD("soundcpu", Z80, XTAL(4'000'000)) /* verified on pcb */ MCFG_DEVICE_PROGRAM_MAP(rygar_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tecmosys.cpp b/src/mame/drivers/tecmosys.cpp index 3d18f17a53d..9c3530511e3 100644 --- a/src/mame/drivers/tecmosys.cpp +++ b/src/mame/drivers/tecmosys.cpp @@ -459,8 +459,7 @@ MACHINE_CONFIG_START(tecmosys_state::tecmosys) MCFG_DEVICE_PROGRAM_MAP(main_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tecmosys_state, irq1_line_hold) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 400) // guess + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 400); // guess MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(16'000'000)/2 ) MCFG_DEVICE_PROGRAM_MAP(sound_map) diff --git a/src/mame/drivers/tehkanwc.cpp b/src/mame/drivers/tehkanwc.cpp index a4d05511913..1f95e7d17d3 100644 --- a/src/mame/drivers/tehkanwc.cpp +++ b/src/mame/drivers/tehkanwc.cpp @@ -683,7 +683,7 @@ MACHINE_CONFIG_START(tehkanwc_state::tehkanwc) MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - seems enough to keep the CPUs in sync */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -918,6 +918,34 @@ ROM_START( tehkanwcd ) // from a 2-PCB set labeled "A-32302 Tehkan" and "B-32302 ROM_LOAD( "twc-5.bin", 0x0000, 0x4000, CRC(444b5544) SHA1(0786d6d9ada7fe49c8ab9751b049095474d2e598) ) ROM_END +/* Just a year hack to put "1986" plus some other small changes, but this set has been found on different bootleg TWC PCBs. */ +ROM_START( tehkanwch ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "worldcup_3.bin", 0x0000, 0x4000, CRC(dd3f789b) SHA1(8e616a64d96f62797485c78e9c3f36fa90486e3f) ) // 27128 + ROM_LOAD( "worldcup_2.bin", 0x4000, 0x4000, CRC(7017a221) SHA1(4b4700af0a6ff64f976db369ba4b9d97cee1fd5f) ) // 27128 + ROM_LOAD( "worldcup_1.bin", 0x8000, 0x4000, CRC(8b662902) SHA1(13bcd4bf23e34dd7193545561e05bb2cb2c95f9b) ) // 27128 + + ROM_REGION( 0x10000, "sub", 0 ) + ROM_LOAD( "worldcup_6.bin", 0x0000, 0x8000, CRC(70a9f883) SHA1(ace04359265271eb37512a89eb0217eb013aecb7) ) // 24256 + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "worldcup_5.bin", 0x0000, 0x4000, CRC(e3112be2) SHA1(7859e51b4312dc5df01c88e1d97cf608abc7ca72) ) // 27128 + + ROM_REGION( 0x04000, "gfx1", 0 ) /* fg tiles */ + ROM_LOAD( "worldcup_9.bin", 0x00000, 0x4000, CRC(79383e09) SHA1(cefc6483412bee9b01b210b690ed0335617b766c) ) // 27128 + + ROM_REGION( 0x10000, "gfx2", 0 ) /* sprites */ + ROM_LOAD( "worldcup_7.bin", 0x00000, 0x8000, CRC(055a5264) SHA1(fe294ba57c2c858952e2fab0be1b8859730846cb) ) // 24256 + ROM_LOAD( "worldcup_8.bin", 0x08000, 0x8000, CRC(59faebe7) SHA1(85dad90928369601e039467d575750539410fcf6) ) // 24256 + + ROM_REGION( 0x10000, "gfx3", 0 ) /* bg tiles */ + ROM_LOAD( "worldcup_10.bin", 0x00000, 0x8000, CRC(669389fc) SHA1(a93e8455060ce5242cb65f78e47b4840aa13ab13) ) // 24256 + ROM_LOAD( "worldcup_11.bin", 0x08000, 0x8000, CRC(4ea7586f) SHA1(fd852c1d5ff09270e398137a7687f68d7256c8a6) ) // 24256 + + ROM_REGION( 0x8000, "adpcm", 0 ) /* ADPCM samples */ + ROM_LOAD( "worldcup_4.bin", 0x0000, 0x4000, CRC(444b5544) SHA1(0786d6d9ada7fe49c8ab9751b049095474d2e598) ) // 27128 +ROM_END + ROM_START( gridiron ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "gfight1.bin", 0x0000, 0x4000, CRC(51612741) SHA1(a0417a35f0ce51ba7fc81f27b356852a97f52a58) ) @@ -981,5 +1009,6 @@ GAME( 1985, tehkanwc, 0, tehkanwc, tehkanwc, tehkanwc_state, empty_init, GAME( 1985, tehkanwcb, tehkanwc, tehkanwcb,tehkanwc, tehkanwc_state, empty_init, ROT0, "Tehkan", "Tehkan World Cup (set 2, bootleg?)", MACHINE_SUPPORTS_SAVE ) GAME( 1985, tehkanwcc, tehkanwc, tehkanwcb,tehkanwc, tehkanwc_state, empty_init, ROT0, "bootleg", "Tehkan World Cup (set 3, bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // aka 'World Cup 85', different inputs? GAME( 1985, tehkanwcd, tehkanwc, tehkanwc, tehkanwcd,tehkanwc_state, empty_init, ROT0, "Tehkan", "Tehkan World Cup (set 4, earlier)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, tehkanwch, tehkanwc, tehkanwc, tehkanwcd,tehkanwc_state, empty_init, ROT0, "hack", "Tehkan World Cup (1986 year hack)", MACHINE_SUPPORTS_SAVE ) GAMEL(1985, gridiron, 0, tehkanwc, gridiron, tehkanwc_state, empty_init, ROT0, "Tehkan", "Gridiron Fight", MACHINE_SUPPORTS_SAVE, layout_gridiron ) GAME( 1986, teedoff, 0, tehkanwc, teedoff, tehkanwc_state, init_teedoff, ROT90, "Tecmo", "Tee'd Off (Japan)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/tempest.cpp b/src/mame/drivers/tempest.cpp index ae8c8593ba6..7657f1027e2 100644 --- a/src/mame/drivers/tempest.cpp +++ b/src/mame/drivers/tempest.cpp @@ -638,8 +638,7 @@ MACHINE_CONFIG_START(tempest_state::tempest) MCFG_DEVICE_PROGRAM_MAP(main_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(tempest_state, irq0_line_assert, CLOCK_3KHZ / 12) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(CLOCK_3KHZ / 256)) + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_hz(CLOCK_3KHZ / 256)); MCFG_DEVICE_ADD("earom", ER2055) diff --git a/src/mame/drivers/tetrisp2.cpp b/src/mame/drivers/tetrisp2.cpp index 9e0d9831997..6acd4ecccac 100644 --- a/src/mame/drivers/tetrisp2.cpp +++ b/src/mame/drivers/tetrisp2.cpp @@ -1701,8 +1701,7 @@ MACHINE_CONFIG_START(tetrisp2_state::tetrisp2) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) /* guess */ + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); /* guess */ /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1737,7 +1736,7 @@ MACHINE_CONFIG_START(tetrisp2_state::nndmseal) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1770,7 +1769,7 @@ MACHINE_CONFIG_START(tetrisp2_state::rockn) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1805,7 +1804,7 @@ MACHINE_CONFIG_START(tetrisp2_state::rockn2) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1844,7 +1843,7 @@ MACHINE_CONFIG_START(tetrisp2_state::rocknms) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ @@ -1895,7 +1894,7 @@ MACHINE_CONFIG_START(stepstag_state::stepstag) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // video hardware screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER)); @@ -1963,7 +1962,7 @@ MACHINE_CONFIG_START(stepstag_state::vjdash) // 4 Screens NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // video hardware MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/thedealr.cpp b/src/mame/drivers/thedealr.cpp index 9a9e82dc927..12a7f3c5d35 100644 --- a/src/mame/drivers/thedealr.cpp +++ b/src/mame/drivers/thedealr.cpp @@ -552,7 +552,7 @@ MACHINE_CONFIG_START(thedealr_state::thedealr) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("spritegen", SETA001_SPRITE, 0) MCFG_SETA001_SPRITE_GFXDECODE("gfxdecode") diff --git a/src/mame/drivers/thepit.cpp b/src/mame/drivers/thepit.cpp index 8e3f6091b47..7db344a3e9d 100644 --- a/src/mame/drivers/thepit.cpp +++ b/src/mame/drivers/thepit.cpp @@ -734,7 +734,7 @@ MACHINE_CONFIG_START(thepit_state::thepit) m_mainlatch->q_out_cb<6>().set(FUNC(thepit_state::flip_screen_x_w)); m_mainlatch->q_out_cb<7>().set(FUNC(thepit_state::flip_screen_y_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_thepit) diff --git a/src/mame/drivers/thoop2.cpp b/src/mame/drivers/thoop2.cpp index 8835d482c21..7f636b7eb70 100644 --- a/src/mame/drivers/thoop2.cpp +++ b/src/mame/drivers/thoop2.cpp @@ -283,7 +283,7 @@ MACHINE_CONFIG_START(thoop2_state::thoop2) m_outlatch->q_out_cb<4>().set_nop(); // unknown. Sound related? m_outlatch->q_out_cb<5>().set_nop(); // unknown - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp index b328ae34754..454eadf302f 100644 --- a/src/mame/drivers/thunderj.cpp +++ b/src/mame/drivers/thunderj.cpp @@ -251,7 +251,7 @@ MACHINE_CONFIG_START(thunderj_state::thunderj) EEPROM_2816(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* perfect synchronization due to shared RAM */ MCFG_QUANTUM_PERFECT_CPU("maincpu") diff --git a/src/mame/drivers/thunderx.cpp b/src/mame/drivers/thunderx.cpp index c2dfd9fac65..816b5315fcb 100644 --- a/src/mame/drivers/thunderx.cpp +++ b/src/mame/drivers/thunderx.cpp @@ -650,7 +650,7 @@ MACHINE_CONFIG_START(thunderx_state::scontra) ADDRESS_MAP_BANK(config, m_bank5800).set_map(&thunderx_state::scontra_bank5800_map).set_options(ENDIANNESS_BIG, 8, 12, 0x800); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tickee.cpp b/src/mame/drivers/tickee.cpp index 05a28b601fc..0e21be1246c 100644 --- a/src/mame/drivers/tickee.cpp +++ b/src/mame/drivers/tickee.cpp @@ -822,7 +822,7 @@ MACHINE_CONFIG_START(tickee_state::rapidfir) MCFG_MACHINE_RESET_OVERRIDE(tickee_state,rapidfir) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) diff --git a/src/mame/drivers/timelimt.cpp b/src/mame/drivers/timelimt.cpp index 946a92b52c7..125ca2454ef 100644 --- a/src/mame/drivers/timelimt.cpp +++ b/src/mame/drivers/timelimt.cpp @@ -244,7 +244,7 @@ MACHINE_CONFIG_START(timelimt_state::timelimt) mainlatch.q_out_cb<6>().set_nop(); // probably flip screen mainlatch.q_out_cb<7>().set_nop(); // probably flip screen - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/timeplt.cpp b/src/mame/drivers/timeplt.cpp index 62e53dbcdd5..2859c91e521 100644 --- a/src/mame/drivers/timeplt.cpp +++ b/src/mame/drivers/timeplt.cpp @@ -441,7 +441,7 @@ MACHINE_CONFIG_START(timeplt_state::timeplt) m_mainlatch->q_out_cb<6>().set(FUNC(timeplt_state::coin_counter_2_w)); m_mainlatch->q_out_cb<7>().set_nop(); // PAY OUT - not used - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp index a30eeb97b8b..13631ad3113 100644 --- a/src/mame/drivers/tmnt.cpp +++ b/src/mame/drivers/tmnt.cpp @@ -1925,7 +1925,7 @@ MACHINE_CONFIG_START(tmnt_state::cuebrick) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1980,7 +1980,7 @@ MACHINE_CONFIG_START(tmnt_state::mia) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2045,7 +2045,7 @@ MACHINE_CONFIG_START(tmnt_state::tmnt) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,tmnt) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2113,7 +2113,7 @@ MACHINE_CONFIG_START(tmnt_state::punkshot) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2166,7 +2166,7 @@ MACHINE_CONFIG_START(tmnt_state::lgtnfght) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2226,7 +2226,7 @@ MACHINE_CONFIG_START(tmnt_state::blswhstl) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2303,7 +2303,7 @@ MACHINE_CONFIG_START(tmnt_state::glfgreat) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2372,7 +2372,7 @@ MACHINE_CONFIG_START(tmnt_state::prmrsocr) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2442,7 +2442,7 @@ MACHINE_CONFIG_START(tmnt_state::tmnt2) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2502,7 +2502,7 @@ MACHINE_CONFIG_START(tmnt_state::ssriders) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/toki.cpp b/src/mame/drivers/toki.cpp index b14a82db097..e3d0124d770 100644 --- a/src/mame/drivers/toki.cpp +++ b/src/mame/drivers/toki.cpp @@ -558,7 +558,7 @@ MACHINE_CONFIG_START(toki_state::tokib) MCFG_DEVICE_ADD("audiocpu", Z80, 4000000) /* verified with PCB */ MCFG_DEVICE_PROGRAM_MAP(tokib_audio_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16) diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp index 4b63c4b5484..f59e5b1f04b 100644 --- a/src/mame/drivers/tomcat.cpp +++ b/src/mame/drivers/tomcat.cpp @@ -356,7 +356,7 @@ MACHINE_CONFIG_START(tomcat_state::tomcat) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); MCFG_DEVICE_ADD("m48t02", M48T02, 0) diff --git a/src/mame/drivers/toobin.cpp b/src/mame/drivers/toobin.cpp index a14f7e4a0d1..d9d0148dd28 100644 --- a/src/mame/drivers/toobin.cpp +++ b/src/mame/drivers/toobin.cpp @@ -211,8 +211,7 @@ MACHINE_CONFIG_START(toobin_state::toobin) EEPROM_2804(config, "eeprom").lock_after_write(true); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); /* video hardware */ MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 4, toobin_state, get_playfield_tile_info, 8,8, SCAN_ROWS, 128,64) diff --git a/src/mame/drivers/tourtabl.cpp b/src/mame/drivers/tourtabl.cpp index 340c8fbfc60..ba9914a0fd4 100644 --- a/src/mame/drivers/tourtabl.cpp +++ b/src/mame/drivers/tourtabl.cpp @@ -170,7 +170,7 @@ MACHINE_CONFIG_START(tourtabl_state::tourtabl) riot2.in_pb_callback().set_ioport("RIOT1_SWB"); riot2.out_pb_callback().set(FUNC(tourtabl_state::tourtabl_led_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("tia_video", TIA_NTSC_VIDEO, 0, "tia") diff --git a/src/mame/drivers/tp84.cpp b/src/mame/drivers/tp84.cpp index 76f43e8f3e6..2735f5b9b29 100644 --- a/src/mame/drivers/tp84.cpp +++ b/src/mame/drivers/tp84.cpp @@ -351,7 +351,7 @@ MACHINE_CONFIG_START(tp84_state::tp84) mainlatch.q_out_cb<4>().set(FUNC(tp84_state::flip_screen_x_w)); mainlatch.q_out_cb<5>().set(FUNC(tp84_state::flip_screen_y_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/trackfld.cpp b/src/mame/drivers/trackfld.cpp index 89046f80517..fc01c834e12 100644 --- a/src/mame/drivers/trackfld.cpp +++ b/src/mame/drivers/trackfld.cpp @@ -919,7 +919,7 @@ MACHINE_CONFIG_START(trackfld_state::trackfld) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD(m_screen, RASTER) @@ -995,7 +995,7 @@ MACHINE_CONFIG_START(trackfld_state::yieartf) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD(m_screen, RASTER) diff --git a/src/mame/drivers/triplhnt.cpp b/src/mame/drivers/triplhnt.cpp index 58fa459194b..988b4d24fb4 100644 --- a/src/mame/drivers/triplhnt.cpp +++ b/src/mame/drivers/triplhnt.cpp @@ -292,7 +292,7 @@ MACHINE_CONFIG_START(triplhnt_state::triplhnt) m_latch->q_out_cb<7>().set([this] (int state) { m_sprite_bank = state; }); m_latch->q_out_cb<7>().append(m_discrete, FUNC(discrete_device::write_line)); // bear - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/truco.cpp b/src/mame/drivers/truco.cpp index 2f563a15f2f..e975a1f50b8 100644 --- a/src/mame/drivers/truco.cpp +++ b/src/mame/drivers/truco.cpp @@ -424,8 +424,7 @@ MACHINE_CONFIG_START(truco_state::truco) MCFG_DEVICE_PROGRAM_MAP(main_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", truco_state, interrupt) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(1.6)) /* 1.6 seconds */ + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_seconds(1.6)); /* 1.6 seconds */ pia6821_device &pia(PIA6821(config, "pia0", 0)); pia.readpa_handler().set_ioport("P1"); diff --git a/src/mame/drivers/trucocl.cpp b/src/mame/drivers/trucocl.cpp index c88e681638b..61ff21d60df 100644 --- a/src/mame/drivers/trucocl.cpp +++ b/src/mame/drivers/trucocl.cpp @@ -187,7 +187,7 @@ MACHINE_CONFIG_START(trucocl_state::trucocl) MCFG_DEVICE_IO_MAP(main_io) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", trucocl_state, trucocl_interrupt) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/tutankhm.cpp b/src/mame/drivers/tutankhm.cpp index 375b3106409..3bb852c263b 100644 --- a/src/mame/drivers/tutankhm.cpp +++ b/src/mame/drivers/tutankhm.cpp @@ -242,7 +242,7 @@ MACHINE_CONFIG_START(tutankhm_state::tutankhm) mainlatch.q_out_cb<6>().set(FUNC(tutankhm_state::flip_screen_x_w)); mainlatch.q_out_cb<7>().set(FUNC(tutankhm_state::flip_screen_y_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/twin16.cpp b/src/mame/drivers/twin16.cpp index 7af28422157..058b3d08511 100644 --- a/src/mame/drivers/twin16.cpp +++ b/src/mame/drivers/twin16.cpp @@ -662,7 +662,7 @@ MACHINE_CONFIG_START(twin16_state::twin16) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // video hardware MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16) @@ -717,7 +717,7 @@ MACHINE_CONFIG_START(fround_state::fround) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16) diff --git a/src/mame/drivers/twinkle.cpp b/src/mame/drivers/twinkle.cpp index a77a5bde9be..cea9840352d 100644 --- a/src/mame/drivers/twinkle.cpp +++ b/src/mame/drivers/twinkle.cpp @@ -1087,8 +1087,7 @@ MACHINE_CONFIG_START(twinkle_state::twinkle) MCFG_DEVICE_PERIODIC_INT_DRIVER(twinkle_state, irq1_line_assert, 60) MCFG_DEVICE_PERIODIC_INT_DRIVER(twinkle_state, irq2_line_assert, 60) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1200)) /* check TD pin on LTC1232 */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_msec(1200)); /* check TD pin on LTC1232 */ MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0) MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "cdrom", SCSICD, SCSI_ID_4) diff --git a/src/mame/drivers/tx1.cpp b/src/mame/drivers/tx1.cpp index 1d5c7936bb8..4eb0c97dfce 100644 --- a/src/mame/drivers/tx1.cpp +++ b/src/mame/drivers/tx1.cpp @@ -171,7 +171,7 @@ MACHINE_CONFIG_START(tx1_state::tx1) MCFG_DEVICE_ADD("main_cpu", I8086, CPU_MASTER_CLOCK / 3) MCFG_DEVICE_PROGRAM_MAP(tx1_main) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // MCFG_WATCHDOG_TIME_INIT(5) MCFG_DEVICE_ADD("math_cpu", I8086, CPU_MASTER_CLOCK / 3) @@ -218,7 +218,7 @@ MACHINE_CONFIG_START(tx1_state::buggyboy) MCFG_DEVICE_ADD("main_cpu", I8086, CPU_MASTER_CLOCK / 3) MCFG_DEVICE_PROGRAM_MAP(buggyboy_main) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // MCFG_WATCHDOG_TIME_INIT(5) MCFG_DEVICE_ADD("math_cpu", I8086, CPU_MASTER_CLOCK / 3) @@ -257,7 +257,7 @@ MACHINE_CONFIG_START(tx1_state::buggybjr) MCFG_DEVICE_ADD("main_cpu", I8086, CPU_MASTER_CLOCK / 3) MCFG_DEVICE_PROGRAM_MAP(buggybjr_main) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); // MCFG_WATCHDOG_TIME_INIT(5) MCFG_DEVICE_ADD("math_cpu", I8086, CPU_MASTER_CLOCK / 3) diff --git a/src/mame/drivers/ultraman.cpp b/src/mame/drivers/ultraman.cpp index 4fcec36d959..5ceab9446df 100644 --- a/src/mame/drivers/ultraman.cpp +++ b/src/mame/drivers/ultraman.cpp @@ -189,7 +189,7 @@ MACHINE_CONFIG_START(ultraman_state::ultraman) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/ultratnk.cpp b/src/mame/drivers/ultratnk.cpp index aff11fd30f2..45b879ee884 100644 --- a/src/mame/drivers/ultratnk.cpp +++ b/src/mame/drivers/ultratnk.cpp @@ -302,8 +302,7 @@ MACHINE_CONFIG_START(ultratnk_state::ultratnk) latch.q_out_cb<6>().set("discrete", FUNC(discrete_device::write_line)); latch.q_out_cb<7>().set("discrete", FUNC(discrete_device::write_line)); - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_VBLANK_INIT("screen", 8) + WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp index b4c96d7bb4a..8a70c90d8e2 100644 --- a/src/mame/drivers/vendetta.cpp +++ b/src/mame/drivers/vendetta.cpp @@ -444,7 +444,7 @@ MACHINE_CONFIG_START(vendetta_state::vendetta) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/videopin.cpp b/src/mame/drivers/videopin.cpp index 28a3c619cae..e783361f81f 100644 --- a/src/mame/drivers/videopin.cpp +++ b/src/mame/drivers/videopin.cpp @@ -366,7 +366,7 @@ MACHINE_CONFIG_START(videopin_state::videopin) MCFG_DEVICE_ADD("maincpu", M6502, 12096000 / 16) MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/vlc.cpp b/src/mame/drivers/vlc.cpp index a718f92037b..f00c70b8ad6 100644 --- a/src/mame/drivers/vlc.cpp +++ b/src/mame/drivers/vlc.cpp @@ -590,8 +590,7 @@ MACHINE_CONFIG_START(nevada_state::nevada) MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CPU) MCFG_DEVICE_PROGRAM_MAP(nevada_map) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(150)) /* 150ms Ds1232 TD to Ground */ + WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_msec(150)); /* 150ms Ds1232 TD to Ground */ MCFG_MACHINE_START_OVERRIDE(nevada_state, nevada) diff --git a/src/mame/drivers/wardner.cpp b/src/mame/drivers/wardner.cpp index e33e66a4364..61161389ea1 100644 --- a/src/mame/drivers/wardner.cpp +++ b/src/mame/drivers/wardner.cpp @@ -432,7 +432,7 @@ MACHINE_CONFIG_START(wardner_state::wardner) m_screen->set_palette(m_palette); MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_wardner) - MCFG_PALETTE_ADD("palette", 2048) + MCFG_PALETTE_ADD("palette", 4096) MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) MCFG_VIDEO_START_OVERRIDE(wardner_state,toaplan0) diff --git a/src/mame/drivers/warpwarp.cpp b/src/mame/drivers/warpwarp.cpp index 984ce8adcdc..ad20f333f1c 100644 --- a/src/mame/drivers/warpwarp.cpp +++ b/src/mame/drivers/warpwarp.cpp @@ -795,7 +795,7 @@ MACHINE_CONFIG_START(warpwarp_state::bombbee) m_latch->q_out_cb<6>().set(FUNC(warpwarp_state::ball_on_w)); m_latch->q_out_cb<7>().set(FUNC(warpwarp_state::inv_w)); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/wc90.cpp b/src/mame/drivers/wc90.cpp index d325744cc90..10f675cd997 100644 --- a/src/mame/drivers/wc90.cpp +++ b/src/mame/drivers/wc90.cpp @@ -359,7 +359,7 @@ MACHINE_CONFIG_START(wc90_state::wc90) MCFG_DEVICE_PROGRAM_MAP(sound_map) /* NMIs are triggered by the main CPU */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/williams.cpp b/src/mame/drivers/williams.cpp index 9eee6d54914..73e3e4fe971 100644 --- a/src/mame/drivers/williams.cpp +++ b/src/mame/drivers/williams.cpp @@ -1500,7 +1500,7 @@ MACHINE_CONFIG_START(williams_state::williams) // also set a timer to go off on scanline 240 MCFG_TIMER_DRIVER_ADD_SCANLINE("240_timer", williams_state, williams_count240_callback, "screen", 0, 240) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1758,7 +1758,7 @@ MACHINE_CONFIG_START(williams2_state::williams2) // also set a timer to go off on scanline 254 MCFG_TIMER_DRIVER_ADD_SCANLINE("254_timer", williams2_state, williams2_endscreen_callback, "screen", 8, 246) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_PALETTE_ADD("palette", 1024) diff --git a/src/mame/drivers/wiping.cpp b/src/mame/drivers/wiping.cpp index 7dcdbdf8554..4ee0b399094 100644 --- a/src/mame/drivers/wiping.cpp +++ b/src/mame/drivers/wiping.cpp @@ -302,7 +302,7 @@ MACHINE_CONFIG_START(wiping_state::wiping) mainlatch.q_out_cb<2>().set(FUNC(wiping_state::flipscreen_w)); // INV mainlatch.q_out_cb<3>().set_inputline(m_audiocpu, INPUT_LINE_RESET).invert(); // CP2RE - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/wiz.cpp b/src/mame/drivers/wiz.cpp index dbcb1e54a59..abd9fd4e172 100644 --- a/src/mame/drivers/wiz.cpp +++ b/src/mame/drivers/wiz.cpp @@ -855,7 +855,7 @@ MACHINE_CONFIG_START(wiz_state::stinger) MCFG_DEVICE_MODIFY("audiocpu") MCFG_DEVICE_PROGRAM_MAP(stinger_sound_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_MODIFY("screen") diff --git a/src/mame/drivers/wmg.cpp b/src/mame/drivers/wmg.cpp index 68bf473037c..f33cd649002 100644 --- a/src/mame/drivers/wmg.cpp +++ b/src/mame/drivers/wmg.cpp @@ -534,7 +534,7 @@ MACHINE_CONFIG_START(wmg_state::wmg) // also set a timer to go off on scanline 240 MCFG_TIMER_DRIVER_ADD_SCANLINE("240_timer", williams_state, williams_count240_callback, "screen", 0, 240) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/wolfpack.cpp b/src/mame/drivers/wolfpack.cpp index fc12eb1f081..865412a8b05 100644 --- a/src/mame/drivers/wolfpack.cpp +++ b/src/mame/drivers/wolfpack.cpp @@ -312,7 +312,7 @@ MACHINE_CONFIG_START(wolfpack_state::wolfpack) MCFG_DEVICE_ADD("maincpu", M6502, 12096000 / 16) MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp index 25e3b5a4ab0..c5e5a806b95 100644 --- a/src/mame/drivers/xmen.cpp +++ b/src/mame/drivers/xmen.cpp @@ -310,7 +310,7 @@ MACHINE_CONFIG_START(xmen_state::xmen) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -363,7 +363,7 @@ MACHINE_CONFIG_START(xmen_state::xmen6p) EEPROM_ER5911_8BIT(config, "eeprom"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_PALETTE_ADD("palette", 2048) diff --git a/src/mame/drivers/xtheball.cpp b/src/mame/drivers/xtheball.cpp index 79073671194..821a1fca3dd 100644 --- a/src/mame/drivers/xtheball.cpp +++ b/src/mame/drivers/xtheball.cpp @@ -320,7 +320,7 @@ MACHINE_CONFIG_START(xtheball_state::xtheball) MCFG_TICKET_DISPENSER_ADD("ticket", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_TLC34076_ADD("tlc34076", TLC34076_6_BIT) diff --git a/src/mame/drivers/yiear.cpp b/src/mame/drivers/yiear.cpp index 08cd29734d2..b5b2c3a90c5 100644 --- a/src/mame/drivers/yiear.cpp +++ b/src/mame/drivers/yiear.cpp @@ -285,7 +285,7 @@ MACHINE_CONFIG_START(yiear_state::yiear) MCFG_DEVICE_PROGRAM_MAP(main_map) MCFG_DEVICE_PERIODIC_INT_DRIVER(yiear_state, yiear_nmi_interrupt, 480) /* music tempo (correct frequency unknown) */ - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ MCFG_SCREEN_ADD(m_screen, RASTER) diff --git a/src/mame/drivers/zaccaria.cpp b/src/mame/drivers/zaccaria.cpp index 26a0d3c03d8..d469db0c6fe 100644 --- a/src/mame/drivers/zaccaria.cpp +++ b/src/mame/drivers/zaccaria.cpp @@ -339,7 +339,7 @@ MACHINE_CONFIG_START(zaccaria_state::zaccaria) // MCFG_QUANTUM_TIME(attotime::from_hz(1000000)) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, "watchdog"); ls259_device &mainlatch(LS259(config, "mainlatch")); // 3G on 1B1141 I/O (Z80) board mainlatch.q_out_cb<0>().set(FUNC(zaccaria_state::flip_screen_x_w)); // VCMA diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp index 55e4c17f4b5..5ba1a7e7dc7 100644 --- a/src/mame/drivers/zn.cpp +++ b/src/mame/drivers/zn.cpp @@ -1149,7 +1149,7 @@ MACHINE_CONFIG_START(zn_state::coh1000ta) ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - MCFG_MB3773_ADD("mb3773") + MB3773(config, "mb3773"); MCFG_DEVICE_ADD("tc0140syt", TC0140SYT, 0) MCFG_TC0140SYT_MASTER_CPU("maincpu") @@ -1198,7 +1198,7 @@ MACHINE_CONFIG_START(zn_state::coh1000tb) MCFG_MACHINE_RESET_OVERRIDE(zn_state, coh1000ta) NVRAM(config, "fm1208s", nvram_device::DEFAULT_ALL_1); - MCFG_MB3773_ADD("mb3773") + MB3773(config, "mb3773"); /* sound hardware */ MCFG_DEVICE_MODIFY("spu") @@ -1222,7 +1222,7 @@ MACHINE_CONFIG_START(zn_state::coh1002tb) MCFG_MACHINE_RESET_OVERRIDE(zn_state, coh1000ta) NVRAM(config, "fm1208s", nvram_device::DEFAULT_ALL_1); - MCFG_MB3773_ADD("mb3773") + MB3773(config, "mb3773"); /* sound hardware */ MCFG_DEVICE_MODIFY("spu") diff --git a/src/mame/drivers/zr107.cpp b/src/mame/drivers/zr107.cpp index ca5202ec3ad..7038f398ceb 100644 --- a/src/mame/drivers/zr107.cpp +++ b/src/mame/drivers/zr107.cpp @@ -788,7 +788,7 @@ MACHINE_CONFIG_START(zr107_state::zr107) K056230(config, "k056230", "maincpu"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -858,7 +858,7 @@ MACHINE_CONFIG_START(zr107_state::jetwave) K056230(config, "k056230", "maincpu"); - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/zwackery.cpp b/src/mame/drivers/zwackery.cpp index 206233043ae..17a368531e0 100644 --- a/src/mame/drivers/zwackery.cpp +++ b/src/mame/drivers/zwackery.cpp @@ -499,7 +499,7 @@ MACHINE_CONFIG_START(zwackery_state::zwackery) MCFG_DEVICE_ADD("maincpu", M68000, 7652400) // based on counter usage, should be XTAL(16'000'000)/2 MCFG_DEVICE_PROGRAM_MAP(zwackery_map) - MCFG_WATCHDOG_ADD("watchdog") + WATCHDOG_TIMER(config, m_watchdog); PTM6840(config, m_ptm, 7652400 / 10); m_ptm->irq_callback().set_inputline("maincpu", 6); diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index 0db3e43cea5..310607ad535 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -310,6 +310,7 @@ public: void gmgalax(machine_config &config); void tenspot(machine_config &config); void froggers(machine_config &config); + void froggervd(machine_config &config); void mshuttle(machine_config &config); void anteateruk(machine_config &config); void monsterz(machine_config &config); @@ -357,6 +358,7 @@ protected: void frogf_map(address_map &map); void frogg_map(address_map &map); void frogger_map(address_map &map); + void froggervd_map(address_map &map); void frogger_sound_map(address_map &map); void frogger_sound_portmap(address_map &map); void froggeram_map(address_map &map); diff --git a/src/mame/includes/namcos2.h b/src/mame/includes/namcos2.h index d52979f9543..15746f731ed 100644 --- a/src/mame/includes/namcos2.h +++ b/src/mame/includes/namcos2.h @@ -18,6 +18,8 @@ #include "sound/c140.h" #include "video/c45.h" #include "video/namco_c116.h" +#include "machine/namco65.h" +#include "machine/namco68.h" #include "cpu/m6502/m3745x.h" #include "emupal.h" @@ -112,7 +114,6 @@ public: , m_dspslave(*this, "dspslave") , m_gametype(0) , m_c140(*this, "c140") - , m_c68(*this, "c68") , m_c116(*this, "c116") , m_master_intc(*this, "master_intc") , m_slave_intc(*this, "slave_intc") @@ -127,6 +128,8 @@ public: , m_audiocpu(*this, "audiocpu") , m_slave(*this, "slave") , m_mcu(*this, "mcu") + , m_c65(*this, "c65mcu") + , m_c68new(*this, "c68mcu") , m_gfxdecode(*this, "gfxdecode") , m_screen(*this, "screen") , m_palette(*this, "palette") @@ -139,7 +142,6 @@ public: protected: optional_device m_c140; - optional_device m_c68; optional_device m_c116; optional_device m_master_intc; optional_device m_slave_intc; @@ -149,9 +151,6 @@ protected: // game type helpers bool is_system21(); - int m_mcu_analog_ctrl; - int m_mcu_analog_data; - int m_mcu_analog_complete; std::unique_ptr m_eeprom; DECLARE_WRITE8_MEMBER(sound_reset_w); @@ -266,18 +265,15 @@ protected: DECLARE_WRITE8_MEMBER( namcos2_68k_eeprom_w ); DECLARE_READ8_MEMBER( namcos2_68k_eeprom_r ); - DECLARE_WRITE8_MEMBER( namcos2_mcu_port_d_w ); - DECLARE_READ8_MEMBER( namcos2_mcu_port_d_r ); - DECLARE_WRITE8_MEMBER( namcos2_mcu_analog_ctrl_w ); - DECLARE_READ8_MEMBER( namcos2_mcu_analog_ctrl_r ); - DECLARE_WRITE8_MEMBER( namcos2_mcu_analog_port_w ); - DECLARE_READ8_MEMBER( namcos2_mcu_analog_port_r ); DECLARE_WRITE8_MEMBER( namcos2_sound_bankselect_w ); required_device m_maincpu; optional_device m_audiocpu; optional_device m_slave; optional_device m_mcu; + optional_device m_c65; + optional_device m_c68new; + optional_device m_gfxdecode; optional_device m_screen; required_device m_palette; @@ -297,6 +293,8 @@ public: void configure_c116_standard(machine_config &config); void configure_c148_standard(machine_config &config); + void configure_c65_standard(machine_config &config); + void configure_c68_standard(machine_config &config); void metlhawk(machine_config &config); void gollygho(machine_config &config); void assaultp(machine_config &config); @@ -345,13 +343,10 @@ public: void init_rthun2(); private: - DECLARE_READ8_MEMBER(c68_p5_r); - DECLARE_WRITE8_MEMBER(c68_p3_w); DECLARE_READ16_MEMBER(dpram_word_r); DECLARE_WRITE16_MEMBER(dpram_word_w); DECLARE_READ8_MEMBER(dpram_byte_r); DECLARE_WRITE8_MEMBER(dpram_byte_w); - DECLARE_READ8_MEMBER(ack_mcu_vbl_r); virtual void video_start() override; void video_start_finallap(); @@ -407,7 +402,6 @@ private: void RozCB_luckywld(uint16_t code, int *tile, int *mask, int which); void RozCB_metlhawk(uint16_t code, int *tile, int *mask, int which); - void c68_default_am(address_map &map); void common_default_am(address_map &map); void common_finallap_am(address_map &map); void common_luckywld_am(address_map &map); @@ -418,7 +412,7 @@ private: void master_luckywld_am(address_map &map); void master_metlhawk_am(address_map &map); void master_sgunner_am(address_map &map); - void mcu_default_am(address_map &map); + void namcos2_68k_default_cpu_board_am(address_map &map); void slave_default_am(address_map &map); void slave_finallap_am(address_map &map); diff --git a/src/mame/includes/namcos21.h b/src/mame/includes/namcos21.h index 9efa80343b1..965241af099 100644 --- a/src/mame/includes/namcos21.h +++ b/src/mame/includes/namcos21.h @@ -204,6 +204,7 @@ private: void render_slave_output(uint16_t data); void winrun_flush_poly(); void init(int game_type); + void configure_c65_namcos21(machine_config &config); void common_map(address_map &map); void driveyes_common_map(address_map &map); void driveyes_master_map(address_map &map); diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp index f599ab20794..695aaabf164 100644 --- a/src/mame/machine/abc1600mac.cpp +++ b/src/mame/machine/abc1600mac.cpp @@ -69,8 +69,7 @@ void abc1600_mac_device::program_map(address_map &map) MACHINE_CONFIG_START(abc1600_mac_device::device_add_mconfig) - MCFG_WATCHDOG_ADD("watchdog") - MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1600)) // XTAL(64'000'000)/8/10/20000/8/8 + WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(1600)); // XTAL(64'000'000)/8/10/20000/8/8 MACHINE_CONFIG_END diff --git a/src/mame/machine/c117.cpp b/src/mame/machine/c117.cpp index ff01f311cda..e82122c1bb6 100644 --- a/src/mame/machine/c117.cpp +++ b/src/mame/machine/c117.cpp @@ -104,9 +104,10 @@ void namco_c117_device::device_reset() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(namco_c117_device::device_add_mconfig) - MCFG_WATCHDOG_ADD("watchdog") -MACHINE_CONFIG_END +void namco_c117_device::device_add_mconfig(machine_config &config) +{ + WATCHDOG_TIMER(config, m_watchdog); +} READ8_MEMBER(namco_c117_device::main_r) diff --git a/src/mame/machine/namco65.cpp b/src/mame/machine/namco65.cpp new file mode 100644 index 00000000000..3e9f0f0b8af --- /dev/null +++ b/src/mame/machine/namco65.cpp @@ -0,0 +1,208 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood, K.Wilkins + +/* +TODO: +output support, Golly Ghost is currently hacking this based on DPRAM in the namcos2.cpp driver side! +some of this can likely be moved into the actual MCU core too + +*/ + +#include "emu.h" +#include "machine/namco65.h" + +DEFINE_DEVICE_TYPE(NAMCOC65, namcoc65_device, "namcoc65", "Namco C65 I/O") + +namcoc65_device::namcoc65_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, NAMCOC65, tag, owner, clock), + m_mcu(*this, "mcu"), + m_in_pb_cb(*this), + m_in_pc_cb(*this), + m_in_ph_cb(*this), + m_in_pdsw_cb(*this), + m_port_analog_in_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}}, + m_port_dial_in_cb{{*this}, {*this}, {*this}, {*this}}, + m_dp_in(*this), + m_dp_out(*this) +{ +} + +ROM_START( namcoc65 ) + ROM_REGION( 0x2000, "mcu", 0 ) + ROM_LOAD( "sys2mcpu.bin", 0x000000, 0x002000, CRC(a342a97e) SHA1(2c420d34dba21e409bf78ddca710fc7de65a6642) ) +ROM_END + + +WRITE8_MEMBER( namcoc65_device::namcos2_mcu_port_d_w ) +{ + /* Undefined operation on write */ +} + +READ8_MEMBER(namcoc65_device::namcos2_mcu_port_d_r) +{ + /* Provides a digital version of the analog ports */ + int threshold = 0x7f; + int data = 0; + + /* Read/convert the bits one at a time */ + if (m_port_analog_in_cb[0]() > threshold) data |= 0x01; + if (m_port_analog_in_cb[1]() > threshold) data |= 0x02; + if (m_port_analog_in_cb[2]() > threshold) data |= 0x04; + if (m_port_analog_in_cb[3]() > threshold) data |= 0x08; + if (m_port_analog_in_cb[4]() > threshold) data |= 0x10; + if (m_port_analog_in_cb[5]() > threshold) data |= 0x20; + if (m_port_analog_in_cb[6]() > threshold) data |= 0x40; + if (m_port_analog_in_cb[7]() > threshold) data |= 0x80; + + /* Return the result */ + return data; +} + + +READ8_MEMBER(namcoc65_device::namcos2_mcu_analog_ctrl_r) +{ + int data = 0; + + /* ADEF flag is only cleared AFTER a read from control THEN a read from DATA */ + if (m_mcu_analog_complete == 2) m_mcu_analog_complete = 1; + if (m_mcu_analog_complete) data |= 0x80; + + /* Mask on the lower 6 register bits, Irq EN/Channel/Clock */ + data |= m_mcu_analog_ctrl & 0x3f; + /* Return the value */ + return data; +} + +WRITE8_MEMBER( namcoc65_device::namcos2_mcu_analog_port_w ) +{ +} + +READ8_MEMBER(namcoc65_device::namcos2_mcu_analog_port_r) +{ + if (m_mcu_analog_complete == 1) m_mcu_analog_complete = 0; + return m_mcu_analog_data; +} + + +WRITE8_MEMBER(namcoc65_device::namcos2_mcu_analog_ctrl_w) +{ + m_mcu_analog_ctrl = data & 0xff; + + /* Check if this is a start of conversion */ + /* Input ports 2 through 9 are the analog channels */ + + if (data & 0x40) + { + /* Set the conversion complete flag */ + m_mcu_analog_complete = 2; + /* We convert instantly, good eh! (not really) */ + switch ((data >> 2) & 0x07) + { + case 0: + m_mcu_analog_data = m_port_analog_in_cb[0](); + break; + case 1: + m_mcu_analog_data = m_port_analog_in_cb[1](); + break; + case 2: + m_mcu_analog_data = m_port_analog_in_cb[2](); + break; + case 3: + m_mcu_analog_data = m_port_analog_in_cb[3](); + break; + case 4: + m_mcu_analog_data = m_port_analog_in_cb[4](); + break; + case 5: + m_mcu_analog_data = m_port_analog_in_cb[5](); + break; + case 6: + m_mcu_analog_data = m_port_analog_in_cb[6](); + break; + case 7: + m_mcu_analog_data = m_port_analog_in_cb[7](); + break; + default: + //output().set_value("anunk",data); + break; + } + + /* If the interrupt enable bit is set trigger an A/D IRQ */ + if (data & 0x20) + { + m_mcu->pulse_input_line(HD63705_INT_ADCONV, m_mcu->minimum_quantum_time()); + } + } +} + +READ8_MEMBER(namcoc65_device::dpram_byte_r) +{ + return m_dp_in(offset); +} + +WRITE8_MEMBER(namcoc65_device::dpram_byte_w) +{ + m_dp_out(offset,data); +} + +void namcoc65_device::mcu_map(address_map &map) +{ + map(0x0000, 0x003f).ram(); /* Fill in register to stop logging */ + map(0x0000, 0x0000).nopr(); /* Keep logging quiet */ + map(0x0001, 0x0001).r(FUNC(namcoc65_device::mcub_r)); /* Usually P1/P2 direction inputs (UDL) + start buttons */ + map(0x0002, 0x0002).r(FUNC(namcoc65_device::mcuc_r)); /* Usually coins + start */ + map(0x0003, 0x0003).rw(FUNC(namcoc65_device::namcos2_mcu_port_d_r), FUNC(namcoc65_device::namcos2_mcu_port_d_w)); + map(0x0007, 0x0007).r(FUNC(namcoc65_device::mcuh_r)); /* Usually P1/P2 direction input (R) + Buttons 1,2,3 */ + map(0x0010, 0x0010).rw(FUNC(namcoc65_device::namcos2_mcu_analog_ctrl_r), FUNC(namcoc65_device::namcos2_mcu_analog_ctrl_w)); + map(0x0011, 0x0011).rw(FUNC(namcoc65_device::namcos2_mcu_analog_port_r), FUNC(namcoc65_device::namcos2_mcu_analog_port_w)); + map(0x0040, 0x01bf).ram(); + map(0x01c0, 0x1fff).rom(); /* internal ROM */ + map(0x2000, 0x2000).r(FUNC(namcoc65_device::mcudsw_r)); /* Dipswitch, including service mode */ + map(0x3000, 0x3000).r(FUNC(namcoc65_device::mcudi0_r)); + map(0x3001, 0x3001).r(FUNC(namcoc65_device::mcudi1_r)); + map(0x3002, 0x3002).r(FUNC(namcoc65_device::mcudi2_r)); + map(0x3003, 0x3003).r(FUNC(namcoc65_device::mcudi3_r)); + map(0x5000, 0x57ff).rw(FUNC(namcoc65_device::dpram_byte_r), FUNC(namcoc65_device::dpram_byte_w)); + map(0x6000, 0x6fff).nopr(); /* watchdog */ + map(0x8000, 0xffff).rom().region("external", 0);; /* external ROM socket */ +} + + +void namcoc65_device::device_add_mconfig(machine_config &config) +{ + HD63705(config, m_mcu, DERIVED_CLOCK(1, 1)); + m_mcu->set_addrmap(AS_PROGRAM, &namcoc65_device::mcu_map); +} + +void namcoc65_device::device_resolve_objects() +{ + m_in_pb_cb.resolve_safe(0xff); + m_in_pc_cb.resolve_safe(0xff); + m_in_ph_cb.resolve_safe(0xff); + m_in_pdsw_cb.resolve_safe(0xff); + + for (auto &cb : m_port_analog_in_cb) + cb.resolve_safe(0xff); + + for (auto &cb : m_port_dial_in_cb) + cb.resolve_safe(0xff); + + m_dp_in.resolve_safe(0xff); + m_dp_out.resolve_safe(); +} + +void namcoc65_device::device_start() +{ +} + +void namcoc65_device::device_reset() +{ + m_mcu_analog_ctrl = 0; + m_mcu_analog_data = 0xaa; + m_mcu_analog_complete = 0; +} + +const tiny_rom_entry *namcoc65_device::device_rom_region() const +{ + return ROM_NAME(namcoc65); +} diff --git a/src/mame/machine/namco65.h b/src/mame/machine/namco65.h new file mode 100644 index 00000000000..017387f8c58 --- /dev/null +++ b/src/mame/machine/namco65.h @@ -0,0 +1,95 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +#ifndef MAME_MACHINE_NAMCO65_H +#define MAME_MACHINE_NAMCO65_H + +#pragma once + +#include "machine/bankdev.h" +#include "cpu/m6805/m6805.h" + +DECLARE_DEVICE_TYPE(NAMCOC65, namcoc65_device) + + +class namcoc65_device : public device_t +{ +public: + // construction/destruction + namcoc65_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + auto in_pb_callback() { return m_in_pb_cb.bind(); } + auto in_pc_callback() { return m_in_pc_cb.bind(); } + auto in_ph_callback() { return m_in_ph_cb.bind(); } + auto in_pdsw_callback() { return m_in_pdsw_cb.bind(); } + + auto an0_in_cb() { return m_port_analog_in_cb[0].bind(); } + auto an1_in_cb() { return m_port_analog_in_cb[1].bind(); } + auto an2_in_cb() { return m_port_analog_in_cb[2].bind(); } + auto an3_in_cb() { return m_port_analog_in_cb[3].bind(); } + auto an4_in_cb() { return m_port_analog_in_cb[4].bind(); } + auto an5_in_cb() { return m_port_analog_in_cb[5].bind(); } + auto an6_in_cb() { return m_port_analog_in_cb[6].bind(); } + auto an7_in_cb() { return m_port_analog_in_cb[7].bind(); } + + auto di0_in_cb() { return m_port_dial_in_cb[0].bind(); } + auto di1_in_cb() { return m_port_dial_in_cb[1].bind(); } + auto di2_in_cb() { return m_port_dial_in_cb[2].bind(); } + auto di3_in_cb() { return m_port_dial_in_cb[3].bind(); } + + auto dp_in_callback() { return m_dp_in.bind(); } + auto dp_out_callback() { return m_dp_out.bind(); } + + void ext_interrupt(int state) { m_mcu->set_input_line(0, state); } + void ext_reset(int state) { m_mcu->set_input_line(INPUT_LINE_RESET, state); } + +protected: + void mcu_map(address_map &map); + + virtual void device_add_mconfig(machine_config &config) override; + virtual void device_resolve_objects() override; + virtual void device_start() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_reset() override; + +private: + required_device m_mcu; + + devcb_read8 m_in_pb_cb; + devcb_read8 m_in_pc_cb; + devcb_read8 m_in_ph_cb; + devcb_read8 m_in_pdsw_cb; + + devcb_read8 m_port_analog_in_cb[8]; + devcb_read8 m_port_dial_in_cb[4]; + + devcb_read8 m_dp_in; + devcb_write8 m_dp_out; + + DECLARE_READ8_MEMBER(namcos2_mcu_port_d_r); + DECLARE_WRITE8_MEMBER(namcos2_mcu_port_d_w); + + DECLARE_READ8_MEMBER(namcos2_mcu_analog_port_r ); + DECLARE_WRITE8_MEMBER(namcos2_mcu_analog_port_w); + + DECLARE_READ8_MEMBER(namcos2_mcu_analog_ctrl_r); + DECLARE_WRITE8_MEMBER(namcos2_mcu_analog_ctrl_w); + + DECLARE_READ8_MEMBER(dpram_byte_r); + DECLARE_WRITE8_MEMBER(dpram_byte_w); + + DECLARE_READ8_MEMBER(mcub_r) { return m_in_pb_cb(); } + DECLARE_READ8_MEMBER(mcuc_r) { return m_in_pc_cb(); } + DECLARE_READ8_MEMBER(mcuh_r) { return m_in_ph_cb(); } + DECLARE_READ8_MEMBER(mcudsw_r) { return m_in_pdsw_cb(); } + + DECLARE_READ8_MEMBER(mcudi0_r) { return m_port_dial_in_cb[0](); } + DECLARE_READ8_MEMBER(mcudi1_r) { return m_port_dial_in_cb[1](); } + DECLARE_READ8_MEMBER(mcudi2_r) { return m_port_dial_in_cb[2](); } + DECLARE_READ8_MEMBER(mcudi3_r) { return m_port_dial_in_cb[3](); } + + int m_mcu_analog_ctrl; + int m_mcu_analog_data; + int m_mcu_analog_complete; +}; + +#endif // MAME_MACHINE_NAMCO65_H diff --git a/src/mame/machine/namco68.cpp b/src/mame/machine/namco68.cpp new file mode 100644 index 00000000000..571002f87e6 --- /dev/null +++ b/src/mame/machine/namco68.cpp @@ -0,0 +1,118 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood, K.Wilkins + +/* +TODO: +output support, Golly Ghost is currently hacking this based on DPRAM in the namcos2.cpp driver side! +some of this can likely be moved into the actual MCU core too + +*/ + +#include "emu.h" +#include "machine/namco68.h" + +DEFINE_DEVICE_TYPE(NAMCOC68, namcoc68_device, "namcoc68", "Namco C68 I/O") + +namcoc68_device::namcoc68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, NAMCOC68, tag, owner, clock), + m_mcu(*this, "mcu"), + m_in_pb_cb(*this), + m_in_pb2_cb(*this), + m_in_pc_cb(*this), + m_in_ph_cb(*this), + m_in_pdsw_cb(*this), + m_port_analog_in_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}}, + m_port_dial_in_cb{{*this}, {*this}, {*this}, {*this}}, + m_dp_in(*this), + m_dp_out(*this) +{ +} + +ROM_START( namcoc68 ) + ROM_REGION( 0x8000, "mcu", 0 ) + ROM_LOAD( "c68.3d", 0x000000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) ) +ROM_END + + + +READ8_MEMBER(namcoc68_device::c68_p5_r) +{ + return (m_player_mux) ? m_in_pb2_cb() : m_in_pb_cb(); +} + +WRITE8_MEMBER(namcoc68_device::c68_p3_w) +{ + m_player_mux = (data & 0x80) ? 1 : 0; +} + +READ8_MEMBER(namcoc68_device::ack_mcu_vbl_r) +{ + m_mcu->set_input_line(m37450_device::M3745X_INT1_LINE, CLEAR_LINE); + return 0; +} + +READ8_MEMBER(namcoc68_device::dpram_byte_r) +{ + return m_dp_in(offset); +} + +WRITE8_MEMBER(namcoc68_device::dpram_byte_w) +{ + m_dp_out(offset,data); +} + +void namcoc68_device::c68_default_am(address_map &map) +{ + /* input ports and dips are mapped here */ + map(0x2000, 0x2000).r(FUNC(namcoc68_device::mcudsw_r)); + map(0x3000, 0x3000).r(FUNC(namcoc68_device::mcudi0_r)); + map(0x3001, 0x3001).r(FUNC(namcoc68_device::mcudi1_r)); + map(0x3002, 0x3002).r(FUNC(namcoc68_device::mcudi2_r)); + map(0x3003, 0x3003).r(FUNC(namcoc68_device::mcudi3_r)); + map(0x5000, 0x57ff).rw(FUNC(namcoc68_device::dpram_byte_r), FUNC(namcoc68_device::dpram_byte_w)); + map(0x6000, 0x6fff).r(FUNC(namcoc68_device::ack_mcu_vbl_r)); // VBL ack + map(0x8000, 0xffff).rom().region("mcu", 0); +} + +void namcoc68_device::device_add_mconfig(machine_config &config) +{ + m3745x_device* device = &M37450(config, m_mcu, DERIVED_CLOCK(1, 1)); // ugly, needs modernizing + MCFG_M3745X_ADC14_CALLBACKS(READ8(*this, namcoc68_device, mcuan0_r), READ8(*this, namcoc68_device, mcuan1_r), READ8(*this, namcoc68_device, mcuan2_r), READ8(*this, namcoc68_device, mcuan3_r)) + MCFG_M3745X_ADC58_CALLBACKS(READ8(*this, namcoc68_device, mcuan4_r), READ8(*this, namcoc68_device, mcuan5_r), READ8(*this, namcoc68_device, mcuan6_r), READ8(*this, namcoc68_device, mcuan7_r)) + MCFG_M3745X_PORT3_CALLBACKS(READ8(*this, namcoc68_device, mcuh_r), WRITE8(*this, namcoc68_device, c68_p3_w)) // coins/test/service + MCFG_M3745X_PORT5_CALLBACKS(READ8(*this, namcoc68_device, c68_p5_r), NOOP) // muxed player 1/2 + MCFG_M3745X_PORT6_CALLBACKS(READ8(*this, namcoc68_device, mcuc_r), NOOP) // unused in sgunner2 + MCFG_DEVICE_PROGRAM_MAP(c68_default_am) +} + +void namcoc68_device::device_resolve_objects() +{ + m_in_pb_cb.resolve_safe(0xff); + m_in_pb2_cb.resolve_safe(0xff); + m_in_pc_cb.resolve_safe(0xff); + m_in_ph_cb.resolve_safe(0xff); + m_in_pdsw_cb.resolve_safe(0xff); + + for (auto &cb : m_port_analog_in_cb) + cb.resolve_safe(0xff); + + for (auto &cb : m_port_dial_in_cb) + cb.resolve_safe(0xff); + + m_dp_in.resolve_safe(0xff); + m_dp_out.resolve_safe(); +} + +void namcoc68_device::device_start() +{ +} + +void namcoc68_device::device_reset() +{ + m_player_mux = 0; +} + +const tiny_rom_entry *namcoc68_device::device_rom_region() const +{ + return ROM_NAME(namcoc68); +} diff --git a/src/mame/machine/namco68.h b/src/mame/machine/namco68.h new file mode 100644 index 00000000000..98136cc9ffb --- /dev/null +++ b/src/mame/machine/namco68.h @@ -0,0 +1,104 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +#ifndef MAME_MACHINE_NAMCO68_H +#define MAME_MACHINE_NAMCO68_H + +#pragma once + +#include "machine/bankdev.h" +#include "cpu/m6502/m3745x.h" + +DECLARE_DEVICE_TYPE(NAMCOC68, namcoc68_device) + + +class namcoc68_device : public device_t +{ +public: + // construction/destruction + namcoc68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + auto in_pb_callback() { return m_in_pb_cb.bind(); } + auto in_pb2_callback() { return m_in_pb2_cb.bind(); } + + auto in_pc_callback() { return m_in_pc_cb.bind(); } + auto in_ph_callback() { return m_in_ph_cb.bind(); } + auto in_pdsw_callback() { return m_in_pdsw_cb.bind(); } + + auto an0_in_cb() { return m_port_analog_in_cb[0].bind(); } + auto an1_in_cb() { return m_port_analog_in_cb[1].bind(); } + auto an2_in_cb() { return m_port_analog_in_cb[2].bind(); } + auto an3_in_cb() { return m_port_analog_in_cb[3].bind(); } + auto an4_in_cb() { return m_port_analog_in_cb[4].bind(); } + auto an5_in_cb() { return m_port_analog_in_cb[5].bind(); } + auto an6_in_cb() { return m_port_analog_in_cb[6].bind(); } + auto an7_in_cb() { return m_port_analog_in_cb[7].bind(); } + + auto di0_in_cb() { return m_port_dial_in_cb[0].bind(); } + auto di1_in_cb() { return m_port_dial_in_cb[1].bind(); } + auto di2_in_cb() { return m_port_dial_in_cb[2].bind(); } + auto di3_in_cb() { return m_port_dial_in_cb[3].bind(); } + + auto dp_in_callback() { return m_dp_in.bind(); } + auto dp_out_callback() { return m_dp_out.bind(); } + + void ext_interrupt(int state) { m_mcu->set_input_line(0, state); } // 37450 maps INT1 to irq0 as it's the first external interrupt on that chip + void ext_reset(int state) { m_mcu->set_input_line(INPUT_LINE_RESET, state); } + +protected: + void c68_default_am(address_map &map); + + virtual void device_add_mconfig(machine_config &config) override; + virtual void device_resolve_objects() override; + virtual void device_start() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_reset() override; + +private: + required_device m_mcu; + + devcb_read8 m_in_pb_cb; + devcb_read8 m_in_pb2_cb; + + devcb_read8 m_in_pc_cb; + devcb_read8 m_in_ph_cb; + devcb_read8 m_in_pdsw_cb; + + devcb_read8 m_port_analog_in_cb[8]; + devcb_read8 m_port_dial_in_cb[4]; + + devcb_read8 m_dp_in; + devcb_write8 m_dp_out; + + DECLARE_READ8_MEMBER(c68_p5_r); + DECLARE_WRITE8_MEMBER(c68_p3_w); + DECLARE_READ8_MEMBER(ack_mcu_vbl_r); + + DECLARE_READ8_MEMBER(dpram_byte_r); + DECLARE_WRITE8_MEMBER(dpram_byte_w); + + DECLARE_READ8_MEMBER(mcub_r) { return m_in_pb_cb(); } + DECLARE_READ8_MEMBER(mcub2_r) { return m_in_pb2_cb(); } + + + DECLARE_READ8_MEMBER(mcuc_r) { return m_in_pc_cb(); } + DECLARE_READ8_MEMBER(mcuh_r) { return m_in_ph_cb(); } + DECLARE_READ8_MEMBER(mcudsw_r) { return m_in_pdsw_cb(); } + + DECLARE_READ8_MEMBER(mcudi0_r) { return m_port_dial_in_cb[0](); } + DECLARE_READ8_MEMBER(mcudi1_r) { return m_port_dial_in_cb[1](); } + DECLARE_READ8_MEMBER(mcudi2_r) { return m_port_dial_in_cb[2](); } + DECLARE_READ8_MEMBER(mcudi3_r) { return m_port_dial_in_cb[3](); } + + DECLARE_READ8_MEMBER(mcuan0_r) { return m_port_analog_in_cb[0](); } + DECLARE_READ8_MEMBER(mcuan1_r) { return m_port_analog_in_cb[1](); } + DECLARE_READ8_MEMBER(mcuan2_r) { return m_port_analog_in_cb[2](); } + DECLARE_READ8_MEMBER(mcuan3_r) { return m_port_analog_in_cb[3](); } + DECLARE_READ8_MEMBER(mcuan4_r) { return m_port_analog_in_cb[4](); } + DECLARE_READ8_MEMBER(mcuan5_r) { return m_port_analog_in_cb[5](); } + DECLARE_READ8_MEMBER(mcuan6_r) { return m_port_analog_in_cb[6](); } + DECLARE_READ8_MEMBER(mcuan7_r) { return m_port_analog_in_cb[7](); } + + uint8_t m_player_mux; +}; + +#endif // MAME_MACHINE_NAMCO68_H diff --git a/src/mame/machine/namcos2.cpp b/src/mame/machine/namcos2.cpp index 4dfc4b91407..e743a344eb4 100644 --- a/src/mame/machine/namcos2.cpp +++ b/src/mame/machine/namcos2.cpp @@ -107,14 +107,23 @@ WRITE8_MEMBER(namcos2_shared_state::system_reset_w) void namcos2_shared_state::reset_all_subcpus(int state) { m_slave->set_input_line(INPUT_LINE_RESET, state); - if (m_c68) + if (m_c68new) { - m_c68->set_input_line(INPUT_LINE_RESET, state); + m_c68new->ext_reset(state); } - else + else if (m_mcu) { m_mcu->set_input_line(INPUT_LINE_RESET, state); } + else if (m_c65) + { + m_c65->ext_reset(state); + } + else + { + logerror("no MCU to reset?\n"); + } + switch( m_gametype ) { case NAMCOS21_SOLVALOU: @@ -144,10 +153,6 @@ MACHINE_RESET_MEMBER(namcos2_shared_state, namcos2) // address_space &space = m_maincpu->space(AS_PROGRAM); address_space &audio_space = m_audiocpu->space(AS_PROGRAM); - m_mcu_analog_ctrl = 0; - m_mcu_analog_data = 0xaa; - m_mcu_analog_complete = 0; - /* Initialise the bank select in the sound CPU */ namcos2_sound_bankselect_w(audio_space, 0, 0); /* Page in bank 0 */ @@ -438,116 +443,3 @@ WRITE8_MEMBER( namcos2_shared_state::namcos2_sound_bankselect_w ) int bank = ( data >> 4 ) % max; /* 991104.CAB */ membank(BANKED_SOUND_ROM)->set_base(&RAM[ 0x10000 + ( 0x4000 * bank ) ] ); } - -/**************************************************************/ -/* */ -/* 68705 IO CPU Support functions */ -/* */ -/**************************************************************/ - -WRITE8_MEMBER( namcos2_shared_state::namcos2_mcu_analog_ctrl_w ) -{ - m_mcu_analog_ctrl = data & 0xff; - - /* Check if this is a start of conversion */ - /* Input ports 2 through 9 are the analog channels */ - - if(data & 0x40) - { - /* Set the conversion complete flag */ - m_mcu_analog_complete = 2; - /* We convert instantly, good eh! */ - switch((data>>2) & 0x07) - { - case 0: - m_mcu_analog_data=ioport("AN0")->read(); - break; - case 1: - m_mcu_analog_data=ioport("AN1")->read(); - break; - case 2: - m_mcu_analog_data=ioport("AN2")->read(); - break; - case 3: - m_mcu_analog_data=ioport("AN3")->read(); - break; - case 4: - m_mcu_analog_data=ioport("AN4")->read(); - break; - case 5: - m_mcu_analog_data=ioport("AN5")->read(); - break; - case 6: - m_mcu_analog_data=ioport("AN6")->read(); - break; - case 7: - m_mcu_analog_data=ioport("AN7")->read(); - break; - default: - output().set_value("anunk",data); - } -#if 0 - /* Perform the offset handling on the input port */ - /* this converts it to a twos complement number */ - if( m_gametype == NAMCOS2_DIRT_FOX || - m_gametype == NAMCOS2_DIRT_FOX_JP ) - { - m_mcu_analog_data ^= 0x80; - } -#endif - /* If the interrupt enable bit is set trigger an A/D IRQ */ - if(data & 0x20) - { - m_mcu->pulse_input_line(HD63705_INT_ADCONV, m_mcu->minimum_quantum_time()); - } - } -} - -READ8_MEMBER( namcos2_shared_state::namcos2_mcu_analog_ctrl_r ) -{ - int data=0; - - /* ADEF flag is only cleared AFTER a read from control THEN a read from DATA */ - if(m_mcu_analog_complete==2) m_mcu_analog_complete=1; - if(m_mcu_analog_complete) data|=0x80; - - /* Mask on the lower 6 register bits, Irq EN/Channel/Clock */ - data|=m_mcu_analog_ctrl&0x3f; - /* Return the value */ - return data; -} - -WRITE8_MEMBER( namcos2_shared_state::namcos2_mcu_analog_port_w ) -{ -} - -READ8_MEMBER( namcos2_shared_state::namcos2_mcu_analog_port_r ) -{ - if(m_mcu_analog_complete==1) m_mcu_analog_complete=0; - return m_mcu_analog_data; -} - -WRITE8_MEMBER( namcos2_shared_state::namcos2_mcu_port_d_w ) -{ - /* Undefined operation on write */ -} - -READ8_MEMBER( namcos2_shared_state::namcos2_mcu_port_d_r ) -{ - /* Provides a digital version of the analog ports */ - int threshold = 0x7f; - int data = 0; - - /* Read/convert the bits one at a time */ - if(ioport("AN0")->read() > threshold) data |= 0x01; - if(ioport("AN1")->read() > threshold) data |= 0x02; - if(ioport("AN2")->read() > threshold) data |= 0x04; - if(ioport("AN3")->read() > threshold) data |= 0x08; - if(ioport("AN4")->read() > threshold) data |= 0x10; - if(ioport("AN5")->read() > threshold) data |= 0x20; - if(ioport("AN6")->read() > threshold) data |= 0x40; - if(ioport("AN7")->read() > threshold) data |= 0x80; - - /* Return the result */ - return data; -} diff --git a/src/mame/machine/taitoio.cpp b/src/mame/machine/taitoio.cpp index 200ad1a8a98..24d6d7fea15 100644 --- a/src/mame/machine/taitoio.cpp +++ b/src/mame/machine/taitoio.cpp @@ -112,9 +112,10 @@ void tc0040ioc_device::device_reset() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(tc0040ioc_device::device_add_mconfig) - MCFG_WATCHDOG_ADD("watchdog") -MACHINE_CONFIG_END +void tc0040ioc_device::device_add_mconfig(machine_config &config) +{ + WATCHDOG_TIMER(config, m_watchdog); +} /***************************************************************************** DEVICE HANDLERS @@ -255,10 +256,11 @@ void tc0220ioc_device::device_reset() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(tc0220ioc_device::device_add_mconfig) - MCFG_WATCHDOG_ADD("watchdog") -// MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(3200)) -MACHINE_CONFIG_END +void tc0220ioc_device::device_add_mconfig(machine_config &config) +{ + WATCHDOG_TIMER(config, m_watchdog); +// m_watchdog->set_time(attotime::from_msec(3200)); +} /***************************************************************************** DEVICE HANDLERS @@ -372,9 +374,10 @@ void tc0510nio_device::device_reset() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(tc0510nio_device::device_add_mconfig) - MCFG_WATCHDOG_ADD("watchdog") -MACHINE_CONFIG_END +void tc0510nio_device::device_add_mconfig(machine_config &config) +{ + WATCHDOG_TIMER(config, m_watchdog); +} /***************************************************************************** DEVICE HANDLERS @@ -511,9 +514,10 @@ void tc0640fio_device::device_reset() // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(tc0640fio_device::device_add_mconfig) - MCFG_WATCHDOG_ADD("watchdog") -MACHINE_CONFIG_END +void tc0640fio_device::device_add_mconfig(machine_config &config) +{ + WATCHDOG_TIMER(config, m_watchdog); +} /***************************************************************************** diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 41193a7b6f6..c00dd58fb92 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -13300,6 +13300,7 @@ froggers1 // (c) 1981 Sega froggers2 // 834-0068 (c) 1981 Sega froggers3 // froggrs // +froggervd // Video Dens galap1 // hack galap4 // hack galapx // hack @@ -33763,6 +33764,7 @@ scotrsht // GX545 (c) 1985 @source:scramble.cpp 800fath // (c) 1981 Amenip + U.S. Billiards license +800fatha // (c) 1981 Amenip + U.S. Billiards license ad2083 // (c) 1983 Midcoin cavelon // (c) 1983 Jetsoft ckongs // bootleg @@ -36004,6 +36006,7 @@ brickzn11 // (c) 1992 SunA brickznv4 // (c) 1992 SunA brickznv5 // (c) 1992 SunA hardhea2 // (c) 1991 SunA +hardhea2a // (c) 1991 SunA hardhea2b // bootleg hardhead // (c) 1988 SunA hardheadb // bootleg @@ -36911,6 +36914,7 @@ tehkanwc // (c) 1985 Tehkan tehkanwcb // bootleg tehkanwcc // bootleg tehkanwcd // (c) 1985 Tehkan +tehkanwch // (c) 1986 (hack) @source:tek405x.cpp tek4051 // diff --git a/src/mame/video/fuukifg2.cpp b/src/mame/video/fuukifg2.cpp index 0fc08a62ab4..c931183a79b 100644 --- a/src/mame/video/fuukifg2.cpp +++ b/src/mame/video/fuukifg2.cpp @@ -129,7 +129,7 @@ void fuuki16_state::video_start() /* Wrapper to handle bg and bg2 ttogether */ void fuuki16_state::draw_layer( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri ) { - int buffer = (m_vregs[0x1e / 2] & 0x40); + int buffer = (m_vregs[0x1e / 2] & 0x40) >> 6; switch( i ) { diff --git a/src/mame/video/fuukifg3.cpp b/src/mame/video/fuukifg3.cpp index a0e285b15f1..49eab40a929 100644 --- a/src/mame/video/fuukifg3.cpp +++ b/src/mame/video/fuukifg3.cpp @@ -123,7 +123,7 @@ void fuuki32_state::video_start() /* Wrapper to handle bg and bg2 ttogether */ void fuuki32_state::draw_layer( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri ) { - int buffer = ((m_vregs[0x1e / 4] & 0x0000ffff) & 0x40); + int buffer = ((m_vregs[0x1e / 4] & 0x0000ffff) & 0x40) >> 6; switch( i ) {