devices\bus: some MCFG macros removal (nw)

This commit is contained in:
Ivan Vangelista 2019-01-31 18:02:11 +01:00
parent 3add987857
commit 49109286af
55 changed files with 495 additions and 758 deletions

View File

@ -21,30 +21,6 @@
#define CBM_IEC_TAG "iec_bus"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_CBM_IEC_BUS_ADD() \
MCFG_DEVICE_ADD(CBM_IEC_TAG, CBM_IEC, 0)
#define MCFG_CBM_IEC_SLOT_ADD(_tag, _address, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, CBM_IEC_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
downcast<cbm_iec_slot_device *>(device)->set_address(_address);
#define MCFG_CBM_IEC_ADD(_default_drive) \
MCFG_CBM_IEC_SLOT_ADD("iec4", 4, cbm_iec_devices, nullptr) \
MCFG_CBM_IEC_SLOT_ADD("iec8", 8, cbm_iec_devices, _default_drive) \
MCFG_CBM_IEC_SLOT_ADD("iec9", 9, cbm_iec_devices, nullptr) \
MCFG_CBM_IEC_SLOT_ADD("iec10", 10, cbm_iec_devices, nullptr) \
MCFG_CBM_IEC_SLOT_ADD("iec11", 11, cbm_iec_devices, nullptr) \
MCFG_CBM_IEC_BUS_ADD()
void cbm_iec_devices(device_slot_interface &device);
//**************************************************************************

View File

@ -80,9 +80,10 @@ READ32_MEMBER( sms_ctrl_adaptor_device::pixel_r )
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(sms_ctrl_adaptor_device::device_add_mconfig)
MCFG_SMS_CONTROL_PORT_ADD("ctrl", sms_control_port_devices, "joypad")
MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(WRITELINE(*this, sms_ctrl_adaptor_device, th_pin_w))
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(*this, sms_ctrl_adaptor_device, pixel_r))
MACHINE_CONFIG_END
void sms_ctrl_adaptor_device::device_add_mconfig(machine_config &config)
{
SMS_CONTROL_PORT(config, m_subctrl_port, sms_control_port_devices, "joypad");
m_subctrl_port->th_input_handler().set(FUNC(sms_ctrl_adaptor_device::th_pin_w));
m_subctrl_port->pixel_handler().set(FUNC(sms_ctrl_adaptor_device::pixel_r));
}

View File

@ -18,22 +18,6 @@
#include "imagedev/floppy.h"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_C2040_SYNC_CALLBACK(_write) \
downcast<c2040_fdc_device &>(*device).set_sync_wr_callback(DEVCB_##_write);
#define MCFG_C2040_READY_CALLBACK(_write) \
downcast<c2040_fdc_device &>(*device).set_ready_wr_callback(DEVCB_##_write);
#define MCFG_C2040_ERROR_CALLBACK(_write) \
downcast<c2040_fdc_device &>(*device).set_error_wr_callback(DEVCB_##_write);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -46,9 +30,6 @@ public:
// construction/destruction
c2040_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> devcb_base &set_sync_wr_callback(Object &&cb) { return m_write_sync.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ready_wr_callback(Object &&cb) { return m_write_ready.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_error_wr_callback(Object &&cb) { return m_write_error.set_callback(std::forward<Object>(cb)); }
auto sync_wr_callback() { return m_write_sync.bind(); }
auto ready_wr_callback() { return m_write_ready.bind(); }
auto error_wr_callback() { return m_write_error.bind(); }

View File

@ -14,17 +14,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_MACPDS_ONBOARD_ADD(_nbtag, _tag, _dev_type, _def_inp) \
MCFG_DEVICE_ADD(_tag, _dev_type, 0) \
MCFG_DEVICE_INPUT_DEFAULTS(_def_inp) \
downcast<device_macpds_card_interface &>(*device).set_macpds_tag(_nbtag, _tag);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************

View File

@ -14,42 +14,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_NUBUS_CPU(_cputag) \
downcast<nubus_device &>(*device).set_cputag(_cputag);
#define MCFG_NUBUS_OUT_IRQ9_CB(_devcb) \
downcast<nubus_device &>(*device).set_out_irq9_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQA_CB(_devcb) \
downcast<nubus_device &>(*device).set_out_irqa_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQB_CB(_devcb) \
downcast<nubus_device &>(*device).set_out_irqb_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQC_CB(_devcb) \
downcast<nubus_device &>(*device).set_out_irqc_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQD_CB(_devcb) \
downcast<nubus_device &>(*device).set_out_irqd_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_OUT_IRQE_CB(_devcb) \
downcast<nubus_device &>(*device).set_out_irqe_callback(DEVCB_##_devcb);
#define MCFG_NUBUS_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, NUBUS_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
downcast<nubus_slot_device &>(*device).set_nubus_slot(_nbtag, _tag);
#define MCFG_NUBUS_ONBOARD_ADD(_nbtag, _tag, _dev_type, _def_inp) \
MCFG_DEVICE_ADD(_tag, _dev_type, 0) \
MCFG_DEVICE_INPUT_DEFAULTS(_def_inp) \
downcast<device_nubus_card_interface &>(*device).set_nubus_tag(_nbtag, _tag);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -99,12 +63,6 @@ public:
// inline configuration
void set_cputag(const char *tag) { m_cputag = tag; }
template <class Object> devcb_base &set_out_irq9_callback(Object &&cb) { return m_out_irq9_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_irqa_callback(Object &&cb) { return m_out_irqa_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_irqb_callback(Object &&cb) { return m_out_irqb_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_irqc_callback(Object &&cb) { return m_out_irqc_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_irqd_callback(Object &&cb) { return m_out_irqd_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_irqe_callback(Object &&cb) { return m_out_irqe_cb.set_callback(std::forward<Object>(cb)); }
auto out_irq9_callback() { return m_out_irq9_cb.bind(); }
auto out_irqa_callback() { return m_out_irqa_cb.bind(); }
auto out_irqb_callback() { return m_out_irqb_cb.bind(); }

View File

@ -64,13 +64,13 @@ const tiny_rom_entry *plus4_sid_cartridge_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(plus4_sid_cartridge_device::device_add_mconfig)
void plus4_sid_cartridge_device::device_add_mconfig(machine_config &config)
{
SPEAKER(config, "speaker").front_center();
MCFG_DEVICE_ADD(MOS8580_TAG, MOS8580, XTAL(17'734'470)/20)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
MOS8580(config, m_sid, XTAL(17'734'470)/20).add_route(ALL_OUTPUTS, "speaker", 1.0);
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MACHINE_CONFIG_END
VCS_CONTROL_PORT(config, m_joy, vcs_control_port_devices, nullptr);
}

View File

@ -25,9 +25,10 @@ void psx_controller_port_device::device_config_complete()
m_dev = dynamic_cast<device_psx_controller_interface *>(get_card_device());
}
MACHINE_CONFIG_START(psx_controller_port_device::device_add_mconfig)
MCFG_PSXCARD_ADD("card")
MACHINE_CONFIG_END
void psx_controller_port_device::device_add_mconfig(machine_config &config)
{
PSXCARD(config, m_card, 0);
}
void psx_controller_port_device::disable_card(bool state)
{

View File

@ -77,11 +77,6 @@ private:
required_ioport m_pad1;
};
#define MCFG_PSX_CONTROLLER_PORTS_DSR_HANDLER(_devcb) \
downcast<psxcontrollerports_device &>(*device).set_dsr_handler(DEVCB_##_devcb);
#define MCFG_PSX_CONTROLLER_PORTS_RXD_HANDLER(_devcb) \
downcast<psxcontrollerports_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
class psxcontrollerports_device : public device_t
{

View File

@ -8,8 +8,6 @@
class psx_controller_port_device;
#define MCFG_PSXCARD_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, PSXCARD, 0)
class psxcard_device : public device_t,
public device_image_interface

View File

@ -67,7 +67,16 @@ class sat_cart_slot_device : public device_t,
{
public:
// construction/destruction
sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
sat_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: sat_cart_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~sat_cart_slot_device();
// image-level overrides
@ -117,9 +126,4 @@ DECLARE_DEVICE_TYPE(SATURN_CART_SLOT, sat_cart_slot_device)
#define SATSLOT_ROM_REGION_TAG ":cart:rom"
#define MCFG_SATURN_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
MCFG_DEVICE_ADD(_tag, SATURN_CART_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#endif // MAME_BUS_SATURN_SAT_SLOT_H

View File

@ -66,7 +66,17 @@ class scv_cart_slot_device : public device_t,
{
public:
// construction/destruction
scv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
scv_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: scv_cart_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
scv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~scv_cart_slot_device();
// image-level overrides
@ -116,8 +126,4 @@ DECLARE_DEVICE_TYPE(SCV_CART_SLOT, scv_cart_slot_device)
#define SCVSLOT_ROM_REGION_TAG ":cart:rom"
#define MCFG_SCV_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
MCFG_DEVICE_ADD(_tag, SCV_CART_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#endif // MAME_BUS_SCV_SLOT_H

View File

@ -15,20 +15,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_SG1000_EXPANSION_ADD(_tag, _slot_intf, _def_slot, _fixed) \
MCFG_DEVICE_ADD(_tag, SG1000_EXPANSION_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _fixed)
#define MCFG_SG1000_EXPANSION_MODIFY(_tag) \
MCFG_DEVICE_MODIFY(_tag)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -41,7 +27,17 @@ class sg1000_expansion_slot_device : public device_t, public device_slot_interfa
{
public:
// construction/destruction
sg1000_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
sg1000_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, bool const fixed)
: sg1000_expansion_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(fixed);
}
sg1000_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~sg1000_expansion_slot_device();
DECLARE_READ8_MEMBER(read);

View File

@ -129,15 +129,16 @@ READ32_MEMBER( sms_multitap_device::pixel_r )
}
MACHINE_CONFIG_START(sms_multitap_device::device_add_mconfig)
void sms_multitap_device::device_add_mconfig(machine_config &config)
{
// Controller subports setup, without the TH callback declaration,
// because the circuit scheme shows TH of subports without connection.
MCFG_SMS_CONTROL_PORT_ADD("ctrl1", sms_control_port_devices, "joypad")
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(*this, sms_multitap_device, pixel_r))
MCFG_SMS_CONTROL_PORT_ADD("ctrl2", sms_control_port_devices, "joypad")
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(*this, sms_multitap_device, pixel_r))
MCFG_SMS_CONTROL_PORT_ADD("ctrl3", sms_control_port_devices, "joypad")
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(*this, sms_multitap_device, pixel_r))
MCFG_SMS_CONTROL_PORT_ADD("ctrl4", sms_control_port_devices, "joypad")
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(*this, sms_multitap_device, pixel_r))
MACHINE_CONFIG_END
SMS_CONTROL_PORT(config, m_subctrl1_port, sms_control_port_devices, "joypad");
m_subctrl1_port->pixel_handler().set(FUNC(sms_multitap_device::pixel_r));
SMS_CONTROL_PORT(config, m_subctrl2_port, sms_control_port_devices, "joypad");
m_subctrl2_port->pixel_handler().set(FUNC(sms_multitap_device::pixel_r));
SMS_CONTROL_PORT(config, m_subctrl3_port, sms_control_port_devices, "joypad");
m_subctrl3_port->pixel_handler().set(FUNC(sms_multitap_device::pixel_r));
SMS_CONTROL_PORT(config, m_subctrl4_port, sms_control_port_devices, "joypad");
m_subctrl4_port->pixel_handler().set(FUNC(sms_multitap_device::pixel_r));
}

View File

@ -138,8 +138,9 @@ READ32_MEMBER( sms_rapid_fire_device::pixel_r )
}
MACHINE_CONFIG_START(sms_rapid_fire_device::device_add_mconfig)
MCFG_SMS_CONTROL_PORT_ADD("ctrl", sms_control_port_devices, "joypad")
MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(WRITELINE(*this, sms_rapid_fire_device, th_pin_w))
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(*this, sms_rapid_fire_device, pixel_r))
MACHINE_CONFIG_END
void sms_rapid_fire_device::device_add_mconfig(machine_config &config)
{
SMS_CONTROL_PORT(config, m_subctrl_port, sms_control_port_devices, "joypad");
m_subctrl_port->th_input_handler().set(FUNC(sms_rapid_fire_device::th_pin_w));
m_subctrl_port->pixel_handler().set(FUNC(sms_rapid_fire_device::pixel_r));
}

View File

@ -15,26 +15,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_SMS_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, SMS_CONTROL_PORT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_SMS_CONTROL_PORT_MODIFY(_tag) \
MCFG_DEVICE_MODIFY(_tag)
#define MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(_devcb) \
downcast<sms_control_port_device &>(*device).set_th_input_handler(DEVCB_##_devcb);
#define MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(_devcb) \
downcast<sms_control_port_device &>(*device).set_pixel_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -48,13 +28,23 @@ class sms_control_port_device : public device_t,
{
public:
// construction/destruction
template <typename T>
sms_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: sms_control_port_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
sms_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~sms_control_port_device();
// static configuration helpers
template <class Object> devcb_base &set_th_input_handler(Object &&cb) { return m_th_pin_handler.set_callback(std::forward<Object>(cb)); }
auto th_input_handler() { return m_th_pin_handler.bind(); }
template <class Object> devcb_base &set_pixel_handler(Object &&cb) { return m_pixel_handler.set_callback(std::forward<Object>(cb)); }
auto pixel_handler() { return m_pixel_handler.bind(); }
// Physical DE-9 connector interface

View File

@ -15,18 +15,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_SMS_EXPANSION_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, SMS_EXPANSION_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -61,7 +49,16 @@ class sms_expansion_slot_device : public device_t,
{
public:
// construction/destruction
sms_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
sms_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: sms_expansion_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
sms_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~sms_expansion_slot_device();
// reading and writing

View File

@ -51,7 +51,7 @@ public:
// construction/destruction
template <typename T>
snes_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: snes_control_port_device(mconfig, tag, owner, (uint32_t)0)
: snes_control_port_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
@ -61,8 +61,8 @@ public:
snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~snes_control_port_device();
template <typename Object> void set_onscreen_callback(Object &&cb) { m_onscreen_cb = std::forward<Object>(cb); }
template <typename Object> void set_gunlatch_callback(Object &&cb) { m_gunlatch_cb = std::forward<Object>(cb); }
template <typename... T> void set_onscreen_callback(T &&... args) { m_onscreen_cb = snesctrl_onscreen_delegate(std::forward<T>(args)...); }
template <typename... T> void set_gunlatch_callback(T &&... args) { m_gunlatch_cb = snesctrl_gunlatch_delegate(std::forward<T>(args)...); }
uint8_t read_pin4();
uint8_t read_pin5();
@ -87,22 +87,6 @@ protected:
// device type definition
DECLARE_DEVICE_TYPE(SNES_CONTROL_PORT, snes_control_port_device)
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_SNES_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, SNES_CONTROL_PORT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_SNESCTRL_ONSCREEN_CB(_class, _method) \
downcast<snes_control_port_device &>(*device).set_onscreen_callback(snesctrl_onscreen_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_SNESCTRL_GUNLATCH_CB(_class, _method) \
downcast<snes_control_port_device &>(*device).set_gunlatch_callback(snesctrl_gunlatch_delegate(&_class::_method, #_class "::" #_method, this));
void snes_control_port_devices(device_slot_interface &device);

View File

@ -47,12 +47,13 @@ static void snes_multitap(device_slot_interface &device)
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(snes_multitap_device::device_add_mconfig)
MCFG_SNES_CONTROL_PORT_ADD("port1", snes_multitap, "joypad")
MCFG_SNES_CONTROL_PORT_ADD("port2", snes_multitap, "joypad")
MCFG_SNES_CONTROL_PORT_ADD("port3", snes_multitap, "joypad")
MCFG_SNES_CONTROL_PORT_ADD("port4", snes_multitap, "joypad")
MACHINE_CONFIG_END
void snes_multitap_device::device_add_mconfig(machine_config &config)
{
SNES_CONTROL_PORT(config, m_port1, snes_multitap, "joypad");
SNES_CONTROL_PORT(config, m_port2, snes_multitap, "joypad");
SNES_CONTROL_PORT(config, m_port3, snes_multitap, "joypad");
SNES_CONTROL_PORT(config, m_port4, snes_multitap, "joypad");
}
//**************************************************************************

View File

@ -11,19 +11,6 @@
#ifndef MAME_DEVICES_BUS_SS50_INTERFACE_H
#define MAME_DEVICES_BUS_SS50_INTERFACE_H
//**************************************************************************
// CONFIGURATION MACROS
//**************************************************************************
#define MCFG_SS50_INTERFACE_PORT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, SS50_INTERFACE, 0) \
MCFG_DEVICE_SLOT_INTERFACE(ss50_##_slot_intf, _def_slot, false)
#define MCFG_SS50_INTERFACE_IRQ_CALLBACK(_devcb) \
downcast<ss50_interface_port_device &>(*device).set_irq_cb(DEVCB_##_devcb);
#define MCFG_SS50_INTERFACE_FIRQ_CALLBACK(_devcb) \
downcast<ss50_interface_port_device &>(*device).set_firq_cb(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
@ -40,11 +27,21 @@ class ss50_interface_port_device : public device_t, public device_slot_interface
public:
// construction/destruction
ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
template <typename T>
ss50_interface_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: ss50_interface_port_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// static configuration
template<class Object> devcb_base &set_irq_cb(Object &&object) { return m_irq_cb.set_callback(std::forward<Object>(object)); }
template<class Object> devcb_base &set_firq_cb(Object &&object) { return m_firq_cb.set_callback(std::forward<Object>(object)); }
auto irq_cb() { return m_irq_cb.bind(); }
auto firq_cb() { return m_firq_cb.bind(); }
// memory accesses
DECLARE_READ8_MEMBER(read);

View File

@ -40,36 +40,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_SVI_EXPANDER_BUS_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, SVI_EXPANDER, 0) \
MCFG_DEVICE_SLOT_INTERFACE(svi_expander_modules, nullptr, false)
#define MCFG_SVI_EXPANDER_INT_HANDLER(_devcb) \
downcast<svi_expander_device &>(*device).set_int_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_ROMDIS_HANDLER(_devcb) \
downcast<svi_expander_device &>(*device).set_romdis_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_RAMDIS_HANDLER(_devcb) \
downcast<svi_expander_device &>(*device).set_ramdis_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_CTRL1_HANDLER(_devcb) \
downcast<svi_expander_device &>(*device).set_ctrl1_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_CTRL2_HANDLER(_devcb) \
downcast<svi_expander_device &>(*device).set_ctrl2_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_EXCSR_HANDLER(_devcb) \
downcast<svi_expander_device &>(*device).set_excsr_handler(DEVCB_##_devcb);
#define MCFG_SVI_EXPANDER_EXCSW_HANDLER(_devcb) \
downcast<svi_expander_device &>(*device).set_excsw_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -82,17 +52,27 @@ class svi_expander_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
template <typename T>
svi_expander_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts)
: svi_expander_device(mconfig, tag, owner, uint32_t(0))
{
option_reset();
opts(*this);
set_default_option(nullptr);
set_fixed(false);
}
svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~svi_expander_device();
// callbacks
template <class Object> devcb_base &set_int_handler(Object &&cb) { return m_int_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_romdis_handler(Object &&cb) { return m_romdis_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ramdis_handler(Object &&cb) { return m_ramdis_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ctrl1_handler(Object &&cb) { return m_ctrl1_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ctrl2_handler(Object &&cb) { return m_ctrl2_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_excsr_handler(Object &&cb) { return m_excsr_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_excsw_handler(Object &&cb) { return m_excsw_handler.set_callback(std::forward<Object>(cb)); }
auto int_handler() { return m_int_handler.bind(); }
auto romdis_handler() { return m_romdis_handler.bind(); }
auto ramdis_handler() { return m_ramdis_handler.bind(); }
auto ctrl1_handler() { return m_ctrl1_handler.bind(); }
auto ctrl2_handler() { return m_ctrl2_handler.bind(); }
auto excsr_handler() { return m_excsr_handler.bind(); }
auto excsw_handler() { return m_excsw_handler.bind(); }
// called from cart device
DECLARE_WRITE_LINE_MEMBER( int_w ) { m_int_handler(state); }

View File

@ -20,19 +20,20 @@ DEFINE_DEVICE_TYPE(SV601, sv601_device, "sv601", "SV-601 Super Expander")
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(sv601_device::device_add_mconfig)
MCFG_SVI_SLOT_BUS_ADD
MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(*this, sv601_device, int_w))
MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(*this, sv601_device, romdis_w))
MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(*this, sv601_device, ramdis_w))
MCFG_SVI_SLOT_ADD("0", svi_slot_cards, nullptr)
MCFG_SVI_SLOT_ADD("1", svi_slot_cards, nullptr)
MCFG_SVI_SLOT_ADD("2", svi_slot_cards, nullptr)
MCFG_SVI_SLOT_ADD("3", svi_slot_cards, nullptr)
MCFG_SVI_SLOT_ADD("4", svi_slot_cards, nullptr)
MCFG_SVI_SLOT_ADD("5", svi_slot_cards, nullptr)
MCFG_SVI_SLOT_ADD("6", svi_slot_cards, nullptr)
MACHINE_CONFIG_END
void sv601_device::device_add_mconfig(machine_config &config)
{
SVI_SLOT_BUS(config, m_slotbus, 0);
m_slotbus->int_handler().set(FUNC(sv601_device::int_w));
m_slotbus->romdis_handler().set(FUNC(sv601_device::romdis_w));
m_slotbus->ramdis_handler().set(FUNC(sv601_device::ramdis_w));
SVI_SLOT(config, "0", svi_slot_cards, nullptr);
SVI_SLOT(config, "1", svi_slot_cards, nullptr);
SVI_SLOT(config, "2", svi_slot_cards, nullptr);
SVI_SLOT(config, "3", svi_slot_cards, nullptr);
SVI_SLOT(config, "4", svi_slot_cards, nullptr);
SVI_SLOT(config, "5", svi_slot_cards, nullptr);
SVI_SLOT(config, "6", svi_slot_cards, nullptr);
}
//**************************************************************************

View File

@ -20,13 +20,14 @@ DEFINE_DEVICE_TYPE(SV602, sv602_device, "sv602", "SV-602 Single Slot Expander")
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(sv602_device::device_add_mconfig)
MCFG_SVI_SLOT_BUS_ADD
MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(*this, sv602_device, int_w))
MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(*this, sv602_device, romdis_w))
MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(*this, sv602_device, ramdis_w))
MCFG_SVI_SLOT_ADD("0", sv602_slot_cards, nullptr)
MACHINE_CONFIG_END
void sv602_device::device_add_mconfig(machine_config &config)
{
SVI_SLOT_BUS(config, m_slotbus, 0);
m_slotbus->int_handler().set(FUNC(sv602_device::int_w));
m_slotbus->romdis_handler().set(FUNC(sv602_device::romdis_w));
m_slotbus->ramdis_handler().set(FUNC(sv602_device::ramdis_w));
SVI_SLOT(config, "0", sv602_slot_cards, nullptr);
}
//**************************************************************************

View File

@ -40,29 +40,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_SVI_SLOT_BUS_ADD \
MCFG_DEVICE_ADD("slotbus", SVI_SLOT_BUS, 0)
#define MCFG_SVI_SLOT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, SVI_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
downcast<svi_slot_device &>(*device).set_bus(this, "slotbus");
#define MCFG_SVI_SLOT_INT_HANDLER(_devcb) \
downcast<svi_slot_bus_device &>(*device).set_int_handler(DEVCB_##_devcb);
#define MCFG_SVI_SLOT_ROMDIS_HANDLER(_devcb) \
downcast<svi_slot_bus_device &>(*device).set_romdis_handler(DEVCB_##_devcb);
#define MCFG_SVI_SLOT_RAMDIS_HANDLER(_devcb) \
downcast<svi_slot_bus_device &>(*device).set_ramdis_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -79,9 +56,9 @@ public:
virtual ~svi_slot_bus_device();
// callbacks
template <class Object> devcb_base &set_int_handler(Object &&cb) { return m_int_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_romdis_handler(Object &&cb) { return m_romdis_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ramdis_handler(Object &&cb) { return m_ramdis_handler.set_callback(std::forward<Object>(cb)); }
auto int_handler() { return m_int_handler.bind(); }
auto romdis_handler() { return m_romdis_handler.bind(); }
auto ramdis_handler() { return m_ramdis_handler.bind(); }
void add_card(device_svi_slot_interface *card);
@ -122,6 +99,17 @@ class svi_slot_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
template <typename T>
svi_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: svi_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
set_bus(this, "slot_bus");
}
svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration

View File

@ -61,15 +61,16 @@ WRITE_LINE_MEMBER(tee_connector_device::ring_b_w)
}
MACHINE_CONFIG_START(tee_connector_device::device_add_mconfig)
MCFG_DEVICE_ADD(m_port_a, TI8X_LINK_PORT, default_ti8x_link_devices, nullptr)
MCFG_TI8X_LINK_TIP_HANDLER(WRITELINE(*this, tee_connector_device, tip_a_w))
MCFG_TI8X_LINK_RING_HANDLER(WRITELINE(*this, tee_connector_device, ring_a_w))
void tee_connector_device::device_add_mconfig(machine_config &config)
{
TI8X_LINK_PORT(config, m_port_a, default_ti8x_link_devices, nullptr);
m_port_a->tip_handler().set(FUNC(tee_connector_device::tip_a_w));
m_port_a->ring_handler().set(FUNC(tee_connector_device::ring_a_w));
MCFG_DEVICE_ADD(m_port_b, TI8X_LINK_PORT, default_ti8x_link_devices, nullptr)
MCFG_TI8X_LINK_TIP_HANDLER(WRITELINE(*this, tee_connector_device, tip_b_w))
MCFG_TI8X_LINK_RING_HANDLER(WRITELINE(*this, tee_connector_device, ring_b_w))
MACHINE_CONFIG_END
TI8X_LINK_PORT(config, m_port_b, default_ti8x_link_devices, nullptr);
m_port_b->tip_handler().set(FUNC(tee_connector_device::tip_b_w));
m_port_b->ring_handler().set(FUNC(tee_connector_device::ring_b_w));
}
void tee_connector_device::device_start()

View File

@ -42,13 +42,6 @@
DECLARE_DEVICE_TYPE(TI8X_LINK_PORT, ti8x_link_port_device)
#define MCFG_TI8X_LINK_TIP_HANDLER(cb) \
downcast<ti8x_link_port_device &>(*device).set_tip_handler(DEVCB_##cb);
#define MCFG_TI8X_LINK_RING_HANDLER(cb) \
downcast<ti8x_link_port_device &>(*device).set_ring_handler(DEVCB_##cb);
class device_ti8x_link_port_interface;
@ -67,8 +60,8 @@ public:
ti8x_link_port_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0);
// static configuration helpers
template <class Object> devcb_base &set_tip_handler(Object &&cb) { return m_tip_handler.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ring_handler(Object &&cb) { return m_ring_handler.set_callback(std::forward<Object>(cb)); }
auto tip_handler() { return m_tip_handler.bind(); }
auto ring_handler() { return m_ring_handler.bind(); }
DECLARE_WRITE_LINE_MEMBER(tip_w);
DECLARE_WRITE_LINE_MEMBER(ring_w);

View File

@ -25,36 +25,6 @@
#define TIKI100_BUS_TAG "tiki100bus"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_TIKI100_BUS_ADD() \
MCFG_DEVICE_ADD(TIKI100_BUS_TAG, TIKI100_BUS, 0)
#define MCFG_TIKI100_BUS_SLOT_ADD(_tag, _def_slot) \
MCFG_DEVICE_ADD(_tag, TIKI100_BUS_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(tiki100_cards, _def_slot, false)
#define MCFG_TIKI100_BUS_IRQ_CALLBACK(_write) \
downcast<tiki100_bus_device &>(*device).set_irq_wr_callback(DEVCB_##_write);
#define MCFG_TIKI100_BUS_NMI_CALLBACK(_write) \
downcast<tiki100_bus_device &>(*device).set_nmi_wr_callback(DEVCB_##_write);
#define MCFG_TIKI100_BUS_BUSRQ_CALLBACK(_write) \
downcast<tiki100_bus_device &>(*device).set_busrq_wr_callback(DEVCB_##_write);
#define MCFG_TIKI100_BUS_IN_MREQ_CALLBACK(_read) \
downcast<tiki100_bus_device &>(*device).set_mrq_rd_callback(DEVCB_##_read);
#define MCFG_TIKI100_BUS_OUT_MREQ_CALLBACK(_write) \
downcast<tiki100_bus_device &>(*device).set_mrq_wr_callback(DEVCB_##_write);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -111,7 +81,17 @@ class tiki100_bus_slot_device : public device_t,
{
public:
// construction/destruction
tiki100_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
tiki100_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: tiki100_bus_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
tiki100_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// device-level overrides
virtual void device_start() override;
@ -142,11 +122,11 @@ public:
tiki100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~tiki100_bus_device() { m_device_list.detach_all(); }
template <class Object> devcb_base &set_irq_wr_callback(Object &&cb) { return m_irq_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_nmi_wr_callback(Object &&cb) { return m_nmi_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_busrq_wr_callback(Object &&cb) { return m_busrq_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_mrq_rd_callback(Object &&cb) { return m_in_mrq_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_mrq_wr_callback(Object &&cb) { return m_out_mrq_cb.set_callback(std::forward<Object>(cb)); }
auto irq_wr_callback() { return m_irq_cb.bind(); }
auto nmi_wr_callback() { return m_nmi_cb.bind(); }
auto busrq_wr_callback() { return m_busrq_cb.bind(); }
auto mrq_rd_callback() { return m_in_mrq_cb.bind(); }
auto mrq_wr_callback() { return m_out_mrq_cb.bind(); }
void add_card(device_tiki100bus_card_interface *card);

View File

@ -56,17 +56,6 @@
#define TMC600_EURO_BUS_TAG "bus"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_TMC600_EURO_BUS_SLOT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, TMC600_EURO_BUS_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -96,7 +85,17 @@ class tmc600_euro_bus_slot_t : public device_t,
{
public:
// construction/destruction
tmc600_euro_bus_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
tmc600_euro_bus_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: tmc600_euro_bus_slot_t(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
tmc600_euro_bus_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
protected:
// device-level overrides

View File

@ -91,11 +91,21 @@ class tvcexp_slot_device : public device_t,
{
public:
// construction/destruction
tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: tvcexp_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~tvcexp_slot_device();
template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
auto out_irq_callback() { return m_out_irq_cb.bind(); }
auto out_nmi_callback() { return m_out_nmi_cb.bind(); }
// reading and writing
virtual uint8_t id_r();
@ -120,14 +130,4 @@ protected:
DECLARE_DEVICE_TYPE(TVCEXP_SLOT, tvcexp_slot_device)
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MCFG_TVCEXP_SLOT_OUT_IRQ_CB(_devcb) \
downcast<tvcexp_slot_device &>(*device).set_out_irq_callback(DEVCB_##_devcb);
#define MCFG_TVCEXP_SLOT_OUT_NMI_CB(_devcb) \
downcast<tvcexp_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#endif // MAME_BUS_TVC_TVC_H

View File

@ -62,7 +62,16 @@ class vboy_cart_slot_device : public device_t,
{
public:
// construction/destruction
vboy_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
vboy_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: vboy_cart_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
vboy_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~vboy_cart_slot_device();
// image-level overrides
@ -110,8 +119,4 @@ DECLARE_DEVICE_TYPE(VBOY_CART_SLOT, vboy_cart_slot_device)
#define VBOYSLOT_ROM_REGION_TAG ":cart:rom"
#define MCFG_VBOY_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
MCFG_DEVICE_ADD(_tag, VBOY_CART_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#endif // MAME_BUS_VBOY_SLOT_H

View File

@ -15,22 +15,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_VCS_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, VCS_CONTROL_PORT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(_write) \
downcast<vcs_control_port_device &>(*device).set_trigger_wr_callback(DEVCB_##_write);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -79,7 +63,6 @@ public:
vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// static configuration helpers
template <class Object> devcb_base &set_trigger_wr_callback(Object &&cb) { return m_write_trigger.set_callback(std::forward<Object>(cb)); }
auto trigger_wr_callback() { return m_write_trigger.bind(); }
// computer interface

View File

@ -112,8 +112,4 @@ DECLARE_DEVICE_TYPE(VECTREX_CART_SLOT, vectrex_cart_slot_device)
#define VECSLOT_ROM_REGION_TAG ":cart:rom"
#define MCFG_VECTREX_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
MCFG_DEVICE_ADD(_tag, VECTREX_CART_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#endif // MAME_BUS_VECTREX_SLOT_H

View File

@ -49,21 +49,6 @@
#define VIDEOBRAIN_EXPANSION_SLOT_TAG "exp"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_VIDEOBRAIN_EXPANSION_SLOT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, VIDEOBRAIN_EXPANSION_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_VIDEOBRAIN_EXPANSION_SLOT_EXTRES_CALLBACK(_write) \
downcast<videobrain_expansion_slot_device &>(*device).set_extres_wr_callback(DEVCB_##_write);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -110,9 +95,18 @@ class videobrain_expansion_slot_device : public device_t,
{
public:
// construction/destruction
videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, char const* dflt)
: videobrain_expansion_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
template <class Object> devcb_base &set_extres_wr_callback(Object &&cb) { return m_write_extres.set_callback(std::forward<Object>(cb)); }
auto extres_wr_callback() { return m_write_extres.bind(); }
// computer interface
uint8_t bo_r(address_space &space, offs_t offset, int cs1, int cs2);

View File

@ -45,18 +45,6 @@
#define VIP_BYTEIO_PORT_TAG "byteio"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_VIP_BYTEIO_PORT_ADD(_tag, _slot_intf, _def_slot, _inst) \
MCFG_DEVICE_ADD(_tag, VIP_BYTEIO_PORT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
downcast<vip_byteio_port_device *>(device)->set_inst_callback(DEVCB_##_inst);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -70,9 +58,19 @@ class vip_byteio_port_device : public device_t,
{
public:
// construction/destruction
vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt)
: vip_byteio_port_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
template <class Object> void set_inst_callback(Object &&inst) { m_write_inst.set_callback(std::forward<Object>(inst)); }
vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
auto inst_callback() { return m_write_inst.bind(); }
// computer interface
uint8_t in_r();

View File

@ -46,27 +46,6 @@
#define VIP_EXPANSION_SLOT_TAG "exp"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_VIP_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, VIP_EXPANSION_SLOT, _clock) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
#define MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(_write) \
downcast<vip_expansion_slot_device &>(*device).set_int_wr_callback(DEVCB_##_write);
#define MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(_write) \
downcast<vip_expansion_slot_device &>(*device).set_dma_out_wr_callback(DEVCB_##_write);
#define MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(_write) \
downcast<vip_expansion_slot_device &>(*device).set_dma_in_wr_callback(DEVCB_##_write);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -80,11 +59,20 @@ class vip_expansion_slot_device : public device_t,
{
public:
// construction/destruction
template <typename T>
vip_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt)
: vip_expansion_slot_device(mconfig, tag, owner, clock)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
vip_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <class Object> devcb_base &set_int_wr_callback(Object &&cb) { return m_write_int.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_out_wr_callback(Object &&cb) { return m_write_dma_out.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_in_wr_callback(Object &&cb) { return m_write_dma_in.set_callback(std::forward<Object>(cb)); }
auto int_wr_callback() { return m_write_int.bind(); }
auto dma_out_wr_callback() { return m_write_dma_out.bind(); }
auto dma_in_wr_callback() { return m_write_dma_in.bind(); }
// computer interface
uint8_t program_r(address_space &space, offs_t offset, int cs, int cdef, int *minh);

View File

@ -45,32 +45,33 @@ void vp575_device::update_interrupts()
// MACHINE_CONFIG_START( vp575 )
//-------------------------------------------------
MACHINE_CONFIG_START(vp575_device::device_add_mconfig)
MCFG_VIP_EXPANSION_SLOT_ADD("exp1", XTAL(3'521'280)/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(*this, vp575_device, exp1_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(*this, vp575_device, exp1_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(*this, vp575_device, exp1_dma_in_w))
void vp575_device::device_add_mconfig(machine_config &config)
{
VIP_EXPANSION_SLOT(config, m_expansion_slot[0], XTAL(3'521'280)/2, vip_expansion_cards, nullptr);
m_expansion_slot[0]->int_wr_callback().set(FUNC(vp575_device::exp1_int_w));
m_expansion_slot[0]->dma_out_wr_callback().set(FUNC(vp575_device::exp1_dma_out_w));
m_expansion_slot[0]->dma_in_wr_callback().set(FUNC(vp575_device::exp1_dma_in_w));
MCFG_VIP_EXPANSION_SLOT_ADD("exp2", XTAL(3'521'280)/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(*this, vp575_device, exp2_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(*this, vp575_device, exp2_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(*this, vp575_device, exp2_dma_in_w))
VIP_EXPANSION_SLOT(config, m_expansion_slot[1], XTAL(3'521'280)/2, vip_expansion_cards, nullptr);
m_expansion_slot[1]->int_wr_callback().set(FUNC(vp575_device::exp2_int_w));
m_expansion_slot[1]->dma_out_wr_callback().set(FUNC(vp575_device::exp2_dma_out_w));
m_expansion_slot[1]->dma_in_wr_callback().set(FUNC(vp575_device::exp2_dma_in_w));
MCFG_VIP_EXPANSION_SLOT_ADD("exp3", XTAL(3'521'280)/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(*this, vp575_device, exp3_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(*this, vp575_device, exp3_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(*this, vp575_device, exp3_dma_in_w))
VIP_EXPANSION_SLOT(config, m_expansion_slot[2], XTAL(3'521'280)/2, vip_expansion_cards, nullptr);
m_expansion_slot[2]->int_wr_callback().set(FUNC(vp575_device::exp3_int_w));
m_expansion_slot[2]->dma_out_wr_callback().set(FUNC(vp575_device::exp3_dma_out_w));
m_expansion_slot[2]->dma_in_wr_callback().set(FUNC(vp575_device::exp3_dma_in_w));
MCFG_VIP_EXPANSION_SLOT_ADD("exp4", XTAL(3'521'280)/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(*this, vp575_device, exp4_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(*this, vp575_device, exp4_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(*this, vp575_device, exp4_dma_in_w))
VIP_EXPANSION_SLOT(config, m_expansion_slot[3], XTAL(3'521'280)/2, vip_expansion_cards, nullptr);
m_expansion_slot[3]->int_wr_callback().set(FUNC(vp575_device::exp4_int_w));
m_expansion_slot[3]->dma_out_wr_callback().set(FUNC(vp575_device::exp4_dma_out_w));
m_expansion_slot[3]->dma_in_wr_callback().set(FUNC(vp575_device::exp4_dma_in_w));
MCFG_VIP_EXPANSION_SLOT_ADD("exp5", XTAL(3'521'280)/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(*this, vp575_device, exp5_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(*this, vp575_device, exp5_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(*this, vp575_device, exp5_dma_in_w))
MACHINE_CONFIG_END
VIP_EXPANSION_SLOT(config, m_expansion_slot[4], XTAL(3'521'280)/2, vip_expansion_cards, nullptr);
m_expansion_slot[4]->int_wr_callback().set(FUNC(vp575_device::exp5_int_w));
m_expansion_slot[4]->dma_out_wr_callback().set(FUNC(vp575_device::exp5_dma_out_w));
m_expansion_slot[4]->dma_in_wr_callback().set(FUNC(vp575_device::exp5_dma_in_w));
}

View File

@ -24,51 +24,6 @@
#define WANGPC_BUS_TAG "wangpcbus"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_WANGPC_BUS_ADD() \
MCFG_DEVICE_ADD(WANGPC_BUS_TAG, WANGPC_BUS, 0)
#define MCFG_WANGPC_BUS_SLOT_ADD(_tag, _sid, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, WANGPC_BUS_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
downcast<wangpcbus_slot_device &>(*device).set_wangpcbus_slot(_sid);
#define MCFG_WANGPC_BUS_IRQ2_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_irq2_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ3_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_irq3_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ4_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_irq4_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ5_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_irq5_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ6_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_irq6_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IRQ7_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_irq7_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_DRQ1_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_drq1_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_DRQ2_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_drq2_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_DRQ3_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_drq3_wr_callback(DEVCB_##_write);
#define MCFG_WANGPC_BUS_IOERROR_CALLBACK(_write) \
downcast<wangpcbus_device &>(*device).set_ioerror_wr_callback(DEVCB_##_write);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -81,7 +36,17 @@ class wangpcbus_slot_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
wangpcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
wangpcbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, int sid)
: wangpcbus_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
set_wangpcbus_slot(sid);
}
wangpcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
// inline configuration
void set_wangpcbus_slot(int sid) { m_sid = sid; }
@ -113,16 +78,16 @@ public:
wangpcbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~wangpcbus_device() { m_device_list.detach_all(); }
template <class Object> devcb_base &set_irq2_wr_callback(Object &&cb) { return m_write_irq2.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq3_wr_callback(Object &&cb) { return m_write_irq3.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq4_wr_callback(Object &&cb) { return m_write_irq4.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq5_wr_callback(Object &&cb) { return m_write_irq5.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq6_wr_callback(Object &&cb) { return m_write_irq6.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_irq7_wr_callback(Object &&cb) { return m_write_irq7.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_drq1_wr_callback(Object &&cb) { return m_write_drq1.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_drq2_wr_callback(Object &&cb) { return m_write_drq2.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_drq3_wr_callback(Object &&cb) { return m_write_drq3.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_ioerror_wr_callback(Object &&cb) { return m_write_ioerror.set_callback(std::forward<Object>(cb)); }
auto irq2_wr_callback() { return m_write_irq2.bind(); }
auto irq3_wr_callback() { return m_write_irq3.bind(); }
auto irq4_wr_callback() { return m_write_irq4.bind(); }
auto irq5_wr_callback() { return m_write_irq5.bind(); }
auto irq6_wr_callback() { return m_write_irq6.bind(); }
auto irq7_wr_callback() { return m_write_irq7.bind(); }
auto drq1_wr_callback() { return m_write_drq1.bind(); }
auto drq2_wr_callback() { return m_write_drq2.bind(); }
auto drq3_wr_callback() { return m_write_drq3.bind(); }
auto ioerror_wr_callback() { return m_write_ioerror.bind(); }
void add_card(device_wangpcbus_card_interface *card, int sid);

View File

@ -73,22 +73,6 @@
#define X68K_EXP_SLOT_TAG "x68kexp"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_X68K_EXPANSION_SLOT_OUT_IRQ2_CB(_devcb) \
downcast<x68k_expansion_slot_device &>(*device).set_out_irq2_callback(DEVCB_##_devcb);
#define MCFG_X68K_EXPANSION_SLOT_OUT_IRQ4_CB(_devcb) \
downcast<x68k_expansion_slot_device &>(*device).set_out_irq4_callback(DEVCB_##_devcb);
#define MCFG_X68K_EXPANSION_SLOT_OUT_NMI_CB(_devcb) \
downcast<x68k_expansion_slot_device &>(*device).set_out_nmi_callback(DEVCB_##_devcb);
#define MCFG_X68K_EXPANSION_SLOT_OUT_RESET_CB(_devcb) \
downcast<x68k_expansion_slot_device &>(*device).set_out_reset_callback(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
@ -123,13 +107,22 @@ class x68k_expansion_slot_device : public device_t, public device_slot_interface
{
public:
// construction/destruction
x68k_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
template <typename T>
x68k_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: x68k_expansion_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
x68k_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~x68k_expansion_slot_device();
template <class Object> devcb_base &set_out_irq2_callback(Object &&cb) { return m_out_irq2_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_irq4_callback(Object &&cb) { return m_out_irq4_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_cb.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_reset_callback(Object &&cb) { return m_out_reset_cb.set_callback(std::forward<Object>(cb)); }
auto out_irq2_callback() { return m_out_irq2_cb.bind(); }
auto out_irq4_callback() { return m_out_irq4_cb.bind(); }
auto out_nmi_callback() { return m_out_nmi_cb.bind(); }
auto out_reset_callback() { return m_out_reset_cb.bind(); }
DECLARE_WRITE_LINE_MEMBER( irq2_w );

View File

@ -90,9 +90,18 @@ class z88cart_slot_device : public device_t,
{
public:
// construction/destruction
template <typename T>
z88cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
: z88cart_slot_device(mconfig, tag, owner, 0)
{
option_reset();
opts(*this);
set_default_option(dflt);
set_fixed(false);
}
z88cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
template <class Object> devcb_base &set_out_flp_callback(Object &&cb) { return m_out_flp_cb.set_callback(std::forward<Object>(cb)); }
auto out_flp_callback() { return m_out_flp_cb.bind(); }
// image-level overrides
virtual image_init_result call_load() override;
@ -133,12 +142,4 @@ private:
// device type definition
DECLARE_DEVICE_TYPE(Z88CART_SLOT, z88cart_slot_device)
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define MCFG_Z88CART_SLOT_OUT_FLP_CB(_devcb) \
downcast<z88cart_slot_device &>(*device).set_out_flp_callback(DEVCB_##_devcb);
#endif // MAME_BUS_Z88_Z88_H

View File

@ -279,7 +279,7 @@ MACHINE_CONFIG_START(primo_state::primoa32)
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED);
/* floppy from serial bus */
MCFG_CBM_IEC_ADD(nullptr)
cbm_iec_slot_device::add(config, m_iec, nullptr);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, nullptr)

View File

@ -874,45 +874,44 @@ static void saturn_cart(device_slot_interface &device)
}
MACHINE_CONFIG_START(sat_console_state::saturnus)
void sat_console_state::saturnus(machine_config &config)
{
saturn(config);
MCFG_DEVICE_ADD("saturn_cdb", SATURN_CDB, 16000000)
SATURN_CDB(config, "saturn_cdb", 16000000);
SOFTWARE_LIST(config, "cd_list").set_original("saturn").set_filter("NTSC-U");
MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, nullptr)
SATURN_CART_SLOT(config, "exp", saturn_cart, nullptr);
SOFTWARE_LIST(config, "cart_list").set_original("sat_cart");
MCFG_DEVICE_MODIFY("smpc")
downcast<smpc_hle_device &>(*device).set_region_code(4);
m_smpc_hle->set_region_code(4);
}
MACHINE_CONFIG_END
MACHINE_CONFIG_START(sat_console_state::saturneu)
void sat_console_state::saturneu(machine_config &config)
{
saturn(config);
MCFG_DEVICE_ADD("saturn_cdb", SATURN_CDB, 16000000)
SATURN_CDB(config, "saturn_cdb", 16000000);
SOFTWARE_LIST(config, "cd_list").set_original("saturn").set_filter("PAL");
MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, nullptr)
SATURN_CART_SLOT(config, "exp", saturn_cart, nullptr);
SOFTWARE_LIST(config, "cart_list").set_original("sat_cart");
MCFG_DEVICE_MODIFY("smpc")
downcast<smpc_hle_device &>(*device).set_region_code(12);
MACHINE_CONFIG_END
m_smpc_hle->set_region_code(12);
}
MACHINE_CONFIG_START(sat_console_state::saturnjp)
void sat_console_state::saturnjp(machine_config &config)
{
saturn(config);
MCFG_DEVICE_ADD("saturn_cdb", SATURN_CDB, 16000000)
SATURN_CDB(config, "saturn_cdb", 16000000);
SOFTWARE_LIST(config, "cd_list").set_original("saturn").set_filter("NTSC-J");
MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, nullptr)
SATURN_CART_SLOT(config, "exp", saturn_cart, nullptr);
SOFTWARE_LIST(config, "cart_list").set_original("sat_cart");
MCFG_DEVICE_MODIFY("smpc")
downcast<smpc_hle_device &>(*device).set_region_code(1);
MACHINE_CONFIG_END
m_smpc_hle->set_region_code(1);
}
void sat_console_state::saturn_init_driver(int rgn)

View File

@ -649,8 +649,8 @@ static void scv_cart(device_slot_interface &device)
device.option_add_internal("rom128k_ram", SCV_ROM128K_RAM4K);
}
MACHINE_CONFIG_START(scv_state::scv)
void scv_state::scv(machine_config &config)
{
upd7801_device &upd(UPD7801(config, m_maincpu, 4_MHz_XTAL));
upd.set_addrmap(AS_PROGRAM, &scv_state::scv_mem);
upd.pa_out_cb().set(FUNC(scv_state::porta_w));
@ -664,7 +664,7 @@ MACHINE_CONFIG_START(scv_state::scv)
m_screen->set_screen_update(FUNC(scv_state::screen_update_scv));
m_screen->set_palette("palette");
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_scv)
GFXDECODE(config, "gfxdecode", "palette", gfx_scv);
PALETTE(config, "palette", FUNC(scv_state::scv_palette), 16);
/* Sound is generated by UPD1771C clocked at XTAL(6'000'000) */
@ -673,11 +673,11 @@ MACHINE_CONFIG_START(scv_state::scv)
m_upd1771c->ack_handler().set(FUNC(scv_state::upd1771_ack_w));
m_upd1771c->add_route(ALL_OUTPUTS, "mono", 1.00);
MCFG_SCV_CARTRIDGE_ADD("cartslot", scv_cart, nullptr)
SCV_CART_SLOT(config, m_cart, scv_cart, nullptr);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("scv");
MACHINE_CONFIG_END
}
void scv_state::scv_pal(machine_config &config)

View File

@ -548,7 +548,7 @@ MACHINE_CONFIG_START(sg1000_state::sg1000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* expansion slot */
MCFG_SG1000_EXPANSION_ADD(EXPSLOT_TAG, sg1000_expansion_devices, nullptr, false)
SG1000_EXPANSION_SLOT(config, m_sgexpslot, sg1000_expansion_devices, nullptr, false);
/* cartridge */
MCFG_SG1000_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, nullptr)
@ -600,7 +600,7 @@ MACHINE_CONFIG_START(sc3000_state::sc3000)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* sc3000 has all sk1100 features built-in, so add it as a fixed slot */
MCFG_SG1000_EXPANSION_ADD(EXPSLOT_TAG, sg1000_expansion_devices, "sk1100", true)
SG1000_EXPANSION_SLOT(config, m_sgexpslot, sg1000_expansion_devices, "sk1100", true);
/* cartridge */
MCFG_SC3000_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, nullptr)
@ -660,7 +660,7 @@ MACHINE_CONFIG_START(sf7000_state::sf7000)
m_centronics->set_output_latch(cent_data_out);
/* sf7000 (sc3000) has all sk1100 features built-in, so add it as a fixed slot */
MCFG_SG1000_EXPANSION_ADD(EXPSLOT_TAG, sg1000_expansion_devices, "sk1100", true)
SG1000_EXPANSION_SLOT(config, m_sgexpslot, sg1000_expansion_devices, "sk1100", true);
/* software lists */
SOFTWARE_LIST(config, "flop_list").set_original("sf7000");

View File

@ -501,13 +501,13 @@ MACHINE_CONFIG_START(sms_state::sms_base)
SOFTWARE_LIST(config, "cart_list").set_original("sms");
MCFG_SMS_CONTROL_PORT_ADD(CONTROL1_TAG, sms_control_port_devices, "joypad")
MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(WRITELINE(*this, sms_state, sms_ctrl1_th_input))
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(*this, sms_state, sms_pixel_color))
SMS_CONTROL_PORT(config, m_port_ctrl1, sms_control_port_devices, "joypad");
m_port_ctrl1->th_input_handler().set(FUNC(sms_state::sms_ctrl1_th_input));
m_port_ctrl1->pixel_handler().set(FUNC(sms_state::sms_pixel_color));
MCFG_SMS_CONTROL_PORT_ADD(CONTROL2_TAG, sms_control_port_devices, "joypad")
MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(WRITELINE(*this, sms_state, sms_ctrl2_th_input))
MCFG_SMS_CONTROL_PORT_PIXEL_HANDLER(READ32(*this, sms_state, sms_pixel_color))
SMS_CONTROL_PORT(config, m_port_ctrl2, sms_control_port_devices, "joypad");
m_port_ctrl2->th_input_handler().set(FUNC(sms_state::sms_ctrl2_th_input));
m_port_ctrl2->pixel_handler().set(FUNC(sms_state::sms_pixel_color));
MACHINE_CONFIG_END
MACHINE_CONFIG_START(sms_state::sms_ntsc_base)
@ -622,7 +622,7 @@ MACHINE_CONFIG_START(sms_state::sms1_ntsc)
// card and expansion slots, not present in Master System II
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
MCFG_SMS_EXPANSION_ADD("smsexp", sms_expansion_devices, nullptr)
SMS_EXPANSION_SLOT(config, "smsexp", sms_expansion_devices, nullptr);
m_has_bios_full = true;
m_has_pwr_led = true;
@ -744,7 +744,7 @@ MACHINE_CONFIG_START(sms_state::sms1_pal)
// card and expansion slots, not present in Master System II
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
MCFG_SMS_EXPANSION_ADD("smsexp", sms_expansion_devices, nullptr)
SMS_EXPANSION_SLOT(config, "smsexp", sms_expansion_devices, nullptr);
m_has_bios_full = true;
m_has_pwr_led = true;
@ -816,7 +816,7 @@ MACHINE_CONFIG_START(sms_state::sms1_paln)
// card and expansion slots, not present in Tec Toy Master System III
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
MCFG_SMS_EXPANSION_ADD("smsexp", sms_expansion_devices, nullptr)
SMS_EXPANSION_SLOT(config, "smsexp", sms_expansion_devices, nullptr);
m_has_bios_full = true;
m_has_pwr_led = true;
@ -890,7 +890,7 @@ MACHINE_CONFIG_START(sms_state::sms1_br)
// card and expansion slots, not present in Tec Toy Master System III
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
MCFG_SMS_EXPANSION_ADD("smsexp", sms_expansion_devices, nullptr)
SMS_EXPANSION_SLOT(config, "smsexp", sms_expansion_devices, nullptr);
m_has_bios_full = true;
m_has_pwr_led = true;
@ -922,7 +922,7 @@ MACHINE_CONFIG_START(sms_state::sms1_kr)
config.device_remove("smsexp");
MCFG_SG1000MK3_CARTRIDGE_ADD("slot", sg1000mk3_cart, nullptr)
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
MCFG_SMS_EXPANSION_ADD("smsexp", sms_expansion_devices, nullptr)
SMS_EXPANSION_SLOT(config, "smsexp", sms_expansion_devices, nullptr);
SOFTWARE_LIST(config, "cart_list2").set_original("sg1000");
@ -959,15 +959,13 @@ MACHINE_CONFIG_START(sms_state::sg1000m3)
config.device_remove("smsexp");
MCFG_SG1000MK3_CARTRIDGE_ADD("slot", sg1000mk3_cart, nullptr)
MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
MCFG_SG1000_EXPANSION_ADD("sgexp", sg1000_expansion_devices, nullptr, false)
SG1000_EXPANSION_SLOT(config, "sgexp", sg1000_expansion_devices, nullptr, false);
SOFTWARE_LIST(config, "cart_list2").set_original("sg1000");
// Mark III does not have TH connected.
MCFG_SMS_CONTROL_PORT_MODIFY(CONTROL1_TAG)
MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(NOOP)
MCFG_SMS_CONTROL_PORT_MODIFY(CONTROL2_TAG)
MCFG_SMS_CONTROL_PORT_TH_INPUT_HANDLER(NOOP)
m_port_ctrl1->th_input_handler().set_nop();
m_port_ctrl2->th_input_handler().set_nop();
m_has_bios_full = false;
m_is_mark_iii = true;

View File

@ -1356,11 +1356,11 @@ MACHINE_CONFIG_START(snes_console_state::snes)
m_ppu->open_bus_callback().set([this] { return snes_open_bus_r(); }); // lambda because overloaded function name
m_ppu->set_screen("screen");
MCFG_SNES_CONTROL_PORT_ADD("ctrl1", snes_control_port_devices, "joypad")
MCFG_SNESCTRL_ONSCREEN_CB(snes_console_state, onscreen_cb)
MCFG_SNES_CONTROL_PORT_ADD("ctrl2", snes_control_port_devices, "joypad")
MCFG_SNESCTRL_ONSCREEN_CB(snes_console_state, onscreen_cb)
MCFG_SNESCTRL_GUNLATCH_CB(snes_console_state, gun_latch_cb)
SNES_CONTROL_PORT(config, m_ctrl1, snes_control_port_devices, "joypad");
m_ctrl1->set_onscreen_callback(FUNC(snes_console_state::onscreen_cb), this);
SNES_CONTROL_PORT(config, m_ctrl2, snes_control_port_devices, "joypad");
m_ctrl2->set_onscreen_callback(FUNC(snes_console_state::onscreen_cb), this);
m_ctrl2->set_gunlatch_callback(FUNC(snes_console_state::gun_latch_cb), this);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();

View File

@ -568,13 +568,13 @@ MACHINE_CONFIG_START(svi3x8_state::svi318)
SOFTWARE_LIST(config, "cart_list").set_original("svi318_cart");
// expander bus
MCFG_SVI_EXPANDER_BUS_ADD("exp")
MCFG_SVI_EXPANDER_INT_HANDLER(WRITELINE(*this, svi3x8_state, intexp_w))
MCFG_SVI_EXPANDER_ROMDIS_HANDLER(WRITELINE(*this, svi3x8_state, romdis_w))
MCFG_SVI_EXPANDER_RAMDIS_HANDLER(WRITELINE(*this, svi3x8_state, ramdis_w))
MCFG_SVI_EXPANDER_CTRL1_HANDLER(WRITELINE(*this, svi3x8_state, ctrl1_w))
MCFG_SVI_EXPANDER_EXCSR_HANDLER(READ8(*this, svi3x8_state, excs_r))
MCFG_SVI_EXPANDER_EXCSW_HANDLER(WRITE8(*this, svi3x8_state, excs_w))
SVI_EXPANDER(config, m_expander, svi_expander_modules);
m_expander->int_handler().set(FUNC(svi3x8_state::intexp_w));
m_expander->romdis_handler().set(FUNC(svi3x8_state::romdis_w));
m_expander->ramdis_handler().set(FUNC(svi3x8_state::ramdis_w));
m_expander->ctrl1_handler().set(FUNC(svi3x8_state::ctrl1_w));
m_expander->excsr_handler().set(FUNC(svi3x8_state::excs_r));
m_expander->excsw_handler().set(FUNC(svi3x8_state::excs_w));
MACHINE_CONFIG_END
void svi3x8_state::svi318p(machine_config &config)

View File

@ -97,10 +97,11 @@ void swtpc_state::machine_start()
m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer());
}
MACHINE_CONFIG_START(swtpc_state::swtpc)
void swtpc_state::swtpc(machine_config &config)
{
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", M6800, XTAL(1'843'200) / 2)
MCFG_DEVICE_PROGRAM_MAP(mem_map)
M6800(config, m_maincpu, XTAL(1'843'200) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &swtpc_state::mem_map);
MC14411(config, m_brg, XTAL(1'843'200));
m_brg->out_f<7>().set("io0", FUNC(ss50_interface_port_device::f600_1200_w)); // 1200b
@ -144,48 +145,46 @@ MACHINE_CONFIG_START(swtpc_state::swtpc)
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>))
MCFG_SS50_INTERFACE_FIRQ_CALLBACK(WRITELINE("mainnmi", input_merger_device, in_w<0>))
MCFG_SS50_INTERFACE_PORT_ADD("io1", default_2rs_devices, "mps")
MCFG_SS50_INTERFACE_IRQ_CALLBACK(WRITELINE("mainirq", input_merger_device, in_w<1>))
MCFG_SS50_INTERFACE_FIRQ_CALLBACK(WRITELINE("mainnmi", input_merger_device, in_w<1>))
MCFG_SS50_INTERFACE_PORT_ADD("io2", default_2rs_devices, nullptr)
MCFG_SS50_INTERFACE_IRQ_CALLBACK(WRITELINE("mainirq", input_merger_device, in_w<2>))
MCFG_SS50_INTERFACE_FIRQ_CALLBACK(WRITELINE("mainnmi", input_merger_device, in_w<2>))
MCFG_SS50_INTERFACE_PORT_ADD("io3", default_2rs_devices, nullptr)
MCFG_SS50_INTERFACE_IRQ_CALLBACK(WRITELINE("mainirq", input_merger_device, in_w<3>))
MCFG_SS50_INTERFACE_FIRQ_CALLBACK(WRITELINE("mainnmi", input_merger_device, in_w<3>))
MCFG_SS50_INTERFACE_PORT_ADD("io4", default_2rs_devices, nullptr)
MCFG_SS50_INTERFACE_IRQ_CALLBACK(WRITELINE("mainirq", input_merger_device, in_w<4>))
MCFG_SS50_INTERFACE_FIRQ_CALLBACK(WRITELINE("mainnmi", input_merger_device, in_w<4>))
MCFG_SS50_INTERFACE_PORT_ADD("io5", default_2rs_devices, nullptr)
MCFG_SS50_INTERFACE_IRQ_CALLBACK(WRITELINE("mainirq", input_merger_device, in_w<5>))
MCFG_SS50_INTERFACE_FIRQ_CALLBACK(WRITELINE("mainnmi", input_merger_device, in_w<5>))
MCFG_SS50_INTERFACE_PORT_ADD("io6", default_2rs_devices, nullptr)
MCFG_SS50_INTERFACE_IRQ_CALLBACK(WRITELINE("mainirq", input_merger_device, in_w<6>))
MCFG_SS50_INTERFACE_FIRQ_CALLBACK(WRITELINE("mainnmi", input_merger_device, in_w<6>))
MCFG_SS50_INTERFACE_PORT_ADD("io7", default_2rs_devices, nullptr)
MCFG_SS50_INTERFACE_IRQ_CALLBACK(WRITELINE("mainirq", input_merger_device, in_w<7>))
MCFG_SS50_INTERFACE_FIRQ_CALLBACK(WRITELINE("mainnmi", input_merger_device, in_w<7>))
ss50_interface_port_device &io0(SS50_INTERFACE(config, "io0", ss50_default_2rs_devices, nullptr));
io0.irq_cb().set("mainirq", FUNC(input_merger_device::in_w<0>));
io0.firq_cb().set("mainnmi", FUNC(input_merger_device::in_w<0>));
ss50_interface_port_device &io1(SS50_INTERFACE(config, "io1", ss50_default_2rs_devices, "mps"));
io1.irq_cb().set("mainirq", FUNC(input_merger_device::in_w<1>));
io1.firq_cb().set("mainnmi", FUNC(input_merger_device::in_w<1>));
ss50_interface_port_device &io2(SS50_INTERFACE(config, "io2", ss50_default_2rs_devices, nullptr));
io2.irq_cb().set("mainirq", FUNC(input_merger_device::in_w<2>));
io2.firq_cb().set("mainnmi", FUNC(input_merger_device::in_w<2>));
ss50_interface_port_device &io3(SS50_INTERFACE(config, "io3", ss50_default_2rs_devices, nullptr));
io3.irq_cb().set("mainirq", FUNC(input_merger_device::in_w<3>));
io3.firq_cb().set("mainnmi", FUNC(input_merger_device::in_w<3>));
ss50_interface_port_device &io4(SS50_INTERFACE(config, "io4", ss50_default_2rs_devices, nullptr));
io4.irq_cb().set("mainirq", FUNC(input_merger_device::in_w<4>));
io4.firq_cb().set("mainnmi", FUNC(input_merger_device::in_w<4>));
ss50_interface_port_device &io5(SS50_INTERFACE(config, "io5", ss50_default_2rs_devices, nullptr));
io5.irq_cb().set("mainirq", FUNC(input_merger_device::in_w<5>));
io5.firq_cb().set("mainnmi", FUNC(input_merger_device::in_w<5>));
ss50_interface_port_device &io6(SS50_INTERFACE(config, "io6", ss50_default_2rs_devices, nullptr));
io6.irq_cb().set("mainirq", FUNC(input_merger_device::in_w<6>));
io6.firq_cb().set("mainnmi", FUNC(input_merger_device::in_w<6>));
ss50_interface_port_device &io7(SS50_INTERFACE(config, "io7", ss50_default_2rs_devices, nullptr));
io7.irq_cb().set("mainirq", FUNC(input_merger_device::in_w<7>));
io7.firq_cb().set("mainnmi", FUNC(input_merger_device::in_w<7>));
INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6800_IRQ_LINE);
INPUT_MERGER_ANY_HIGH(config, "mainnmi").output_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
RAM(config, RAM_TAG).set_default_size("2K").set_extra_options("4K,8K,12K,16K,20K,24K,28K,32K");
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(swtpc_state::swtpcm)
void swtpc_state::swtpcm(machine_config &config)
{
swtpc(config);
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_CLOCK(XTAL(1'797'100) / 2)
m_maincpu->set_clock(XTAL(1'797'100) / 2);
MCFG_DEVICE_MODIFY("brg")
MCFG_DEVICE_CLOCK(XTAL(1'797'100))
m_brg->set_clock(XTAL(1'797'100));
MCFG_DEVICE_MODIFY("io1")
MCFG_SLOT_DEFAULT_OPTION("mpc")
MACHINE_CONFIG_END
subdevice<ss50_interface_port_device>("io1")->set_default_option("mpc");
}
/* ROM definition */
ROM_START( swtpc )

View File

@ -700,7 +700,8 @@ void tiki100_state::machine_reset()
/* Machine Driver */
MACHINE_CONFIG_START(tiki100_state::tiki100)
void tiki100_state::tiki100(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, 8_MHz_XTAL / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &tiki100_state::tiki100_mem);
@ -708,20 +709,20 @@ MACHINE_CONFIG_START(tiki100_state::tiki100)
m_maincpu->set_daisy_config(tiki100_daisy_chain);
/* video hardware */
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_RAW_PARAMS(20_MHz_XTAL, 1280, 0, 1024, 312, 0, 256)
MCFG_SCREEN_UPDATE_DRIVER(tiki100_state, screen_update)
MCFG_PALETTE_ADD("palette", 16)
screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
screen.set_raw(20_MHz_XTAL, 1280, 0, 1024, 312, 0, 256);
screen.set_screen_update(FUNC(tiki100_state::screen_update));
PALETTE(config, m_palette).set_entries(16);
MCFG_TIKI100_BUS_ADD()
MCFG_TIKI100_BUS_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
MCFG_TIKI100_BUS_NMI_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_NMI))
MCFG_TIKI100_BUS_BUSRQ_CALLBACK(WRITELINE(*this, tiki100_state, busrq_w))
MCFG_TIKI100_BUS_IN_MREQ_CALLBACK(READ8(*this, tiki100_state, mrq_r))
MCFG_TIKI100_BUS_OUT_MREQ_CALLBACK(WRITE8(*this, tiki100_state, mrq_w))
MCFG_TIKI100_BUS_SLOT_ADD("slot1", "8088")
MCFG_TIKI100_BUS_SLOT_ADD("slot2", "hdc")
MCFG_TIKI100_BUS_SLOT_ADD("slot3", nullptr)
TIKI100_BUS(config, m_exp, 0);
m_exp->irq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
m_exp->nmi_wr_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
m_exp->busrq_wr_callback().set(FUNC(tiki100_state::busrq_w));
m_exp->mrq_rd_callback().set(FUNC(tiki100_state::mrq_r));
m_exp->mrq_wr_callback().set(FUNC(tiki100_state::mrq_w));
TIKI100_BUS_SLOT(config, "slot1", tiki100_cards, "8088");
TIKI100_BUS_SLOT(config, "slot2", tiki100_cards, "hdc");
TIKI100_BUS_SLOT(config, "slot3", tiki100_cards, nullptr);
/* devices */
Z80DART(config, m_dart, 8_MHz_XTAL / 4);
@ -786,7 +787,7 @@ MACHINE_CONFIG_START(tiki100_state::tiki100)
// software list
SOFTWARE_LIST(config, "flop_list").set_original("tiki100");
MACHINE_CONFIG_END
}
/* ROMs */

View File

@ -253,7 +253,8 @@ WRITE8_MEMBER( tmc600_state::sc_w )
/* Machine Drivers */
MACHINE_CONFIG_START(tmc600_state::tmc600)
void tmc600_state::tmc600(machine_config &config)
{
// CPU
cdp1802_device &cpu(CDP1802(config, CDP1802_TAG, 3.57_MHz_XTAL));
cpu.set_addrmap(AS_PROGRAM, &tmc600_state::tmc600_map);
@ -293,11 +294,11 @@ MACHINE_CONFIG_START(tmc600_state::tmc600)
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
// expansion bus connector
MCFG_TMC600_EURO_BUS_SLOT_ADD(TMC600_EURO_BUS_TAG, tmc600_euro_bus_cards, nullptr)
TMC600_EURO_BUS_SLOT(config, m_bus, tmc600_euro_bus_cards, nullptr);
// internal RAM
RAM(config, RAM_TAG).set_default_size("8K");
MACHINE_CONFIG_END
}
/* ROMs */

View File

@ -809,22 +809,18 @@ MACHINE_CONFIG_START(tvc_state::tvc)
MCFG_GENERIC_EXTENSIONS("bin,rom,crt")
/* expansion interface */
MCFG_DEVICE_ADD("exp1", TVCEXP_SLOT, 0)
MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , nullptr, false)
MCFG_TVCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_DEVICE_ADD("exp2", TVCEXP_SLOT, 0)
MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , nullptr, false)
MCFG_TVCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_DEVICE_ADD("exp3", TVCEXP_SLOT, 0)
MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , nullptr, false)
MCFG_TVCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_DEVICE_ADD("exp4", TVCEXP_SLOT, 0)
MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , nullptr, false)
MCFG_TVCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
TVCEXP_SLOT(config, m_expansions[0], tvc_exp , nullptr);
m_expansions[0]->out_irq_callback().set_inputline(m_maincpu, 0);
m_expansions[0]->out_nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
TVCEXP_SLOT(config, m_expansions[1], tvc_exp , nullptr);
m_expansions[1]->out_irq_callback().set_inputline(m_maincpu, 0);
m_expansions[1]->out_nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
TVCEXP_SLOT(config, m_expansions[2], tvc_exp , nullptr);
m_expansions[2]->out_irq_callback().set_inputline(m_maincpu, 0);
m_expansions[2]->out_nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
TVCEXP_SLOT(config, m_expansions[3], tvc_exp , nullptr);
m_expansions[3]->out_irq_callback().set_inputline(m_maincpu, 0);
m_expansions[3]->out_nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
/* cassette */
CASSETTE(config, m_cassette);

View File

@ -1337,7 +1337,7 @@ MACHINE_CONFIG_START(vboy_state::vboy)
MCFG_SCREEN_PALETTE(m_palette)
/* cartridge */
MCFG_VBOY_CARTRIDGE_ADD("cartslot", vboy_cart, nullptr)
VBOY_CART_SLOT(config, m_cart, vboy_cart, nullptr);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("vboy");

View File

@ -425,7 +425,7 @@ MACHINE_CONFIG_START(vidbrain_state::vidbrain)
m_smi->int_req_callback().set_inputline(F3850_TAG, F8_INPUT_LINE_INT_REQ);
// cartridge
MCFG_VIDEOBRAIN_EXPANSION_SLOT_ADD(VIDEOBRAIN_EXPANSION_SLOT_TAG, vidbrain_expansion_cards, nullptr)
VIDEOBRAIN_EXPANSION_SLOT(config, VIDEOBRAIN_EXPANSION_SLOT_TAG, vidbrain_expansion_cards, nullptr);
// software lists
SOFTWARE_LIST(config, "cart_list").set_original("vidbrain");

View File

@ -728,14 +728,15 @@ MACHINE_CONFIG_START(vip_state::vip)
// sound hardware
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD(DISCRETE_TAG, DISCRETE, vip_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
DISCRETE(config, m_beeper, vip_discrete);
m_beeper->add_route(ALL_OUTPUTS, "mono", 0.80);
MCFG_VIP_BYTEIO_PORT_ADD(VIP_BYTEIO_PORT_TAG, vip_byteio_cards, nullptr, WRITELINE(*this, vip_state, byteio_inst_w))
MCFG_VIP_EXPANSION_SLOT_ADD(VIP_EXPANSION_SLOT_TAG, 3.52128_MHz_XTAL / 2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(*this, vip_state, exp_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(*this, vip_state, exp_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(*this, vip_state, exp_dma_in_w))
VIP_BYTEIO_PORT(config, m_byteio, vip_byteio_cards, nullptr);
m_byteio->inst_callback().set(FUNC(vip_state::byteio_inst_w));
VIP_EXPANSION_SLOT(config, m_exp, 3.52128_MHz_XTAL / 2, vip_expansion_cards, nullptr);
m_exp->int_wr_callback().set(FUNC(vip_state::exp_int_w));
m_exp->dma_out_wr_callback().set(FUNC(vip_state::exp_dma_out_w));
m_exp->dma_in_wr_callback().set(FUNC(vip_state::exp_dma_in_w));
// devices
MCFG_QUICKLOAD_ADD("quickload", vip_state, vip, "bin,c8,c8x", 0)

View File

@ -1275,11 +1275,12 @@ void wangpc_state::on_disk1_unload(floppy_image_device *image)
// MACHINE_CONFIG( wangpc )
//-------------------------------------------------
MACHINE_CONFIG_START(wangpc_state::wangpc)
MCFG_DEVICE_ADD(I8086_TAG, I8086, 8000000)
MCFG_DEVICE_PROGRAM_MAP(wangpc_mem)
MCFG_DEVICE_IO_MAP(wangpc_io)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE(I8259A_TAG, pic8259_device, inta_cb)
void wangpc_state::wangpc(machine_config &config)
{
I8086(config, m_maincpu, 8000000);
m_maincpu->set_addrmap(AS_PROGRAM, &wangpc_state::wangpc_mem);
m_maincpu->set_addrmap(AS_IO, &wangpc_state::wangpc_io);
m_maincpu->set_irq_acknowledge_callback(I8259A_TAG, FUNC(pic8259_device::inta_cb));
//config.m_perfect_cpu_quantum = subtag(I8086_TAG);
// devices
@ -1351,29 +1352,29 @@ MACHINE_CONFIG_START(wangpc_state::wangpc)
WANGPC_KEYBOARD(config, "wangpckb").txd_handler().set(m_uart, FUNC(im6402_device::write_rri));
// bus
MCFG_WANGPC_BUS_ADD()
MCFG_WANGPC_BUS_IRQ2_CALLBACK(WRITELINE(*this, wangpc_state, bus_irq2_w))
MCFG_WANGPC_BUS_IRQ3_CALLBACK(WRITELINE(I8259A_TAG, pic8259_device, ir3_w))
MCFG_WANGPC_BUS_IRQ4_CALLBACK(WRITELINE(I8259A_TAG, pic8259_device, ir4_w))
MCFG_WANGPC_BUS_IRQ5_CALLBACK(WRITELINE(I8259A_TAG, pic8259_device, ir5_w))
MCFG_WANGPC_BUS_IRQ6_CALLBACK(WRITELINE(I8259A_TAG, pic8259_device, ir6_w))
MCFG_WANGPC_BUS_IRQ7_CALLBACK(WRITELINE(I8259A_TAG, pic8259_device, ir7_w))
MCFG_WANGPC_BUS_DRQ1_CALLBACK(WRITELINE(AM9517A_TAG, am9517a_device, dreq1_w))
MCFG_WANGPC_BUS_DRQ2_CALLBACK(WRITELINE(AM9517A_TAG, am9517a_device, dreq2_w))
MCFG_WANGPC_BUS_DRQ3_CALLBACK(WRITELINE(AM9517A_TAG, am9517a_device, dreq3_w))
MCFG_WANGPC_BUS_IOERROR_CALLBACK(INPUTLINE(I8086_TAG, INPUT_LINE_NMI))
MCFG_WANGPC_BUS_SLOT_ADD("slot1", 1, wangpc_cards, nullptr)
MCFG_WANGPC_BUS_SLOT_ADD("slot2", 2, wangpc_cards, "mvc")
MCFG_WANGPC_BUS_SLOT_ADD("slot3", 3, wangpc_cards, nullptr)
MCFG_WANGPC_BUS_SLOT_ADD("slot4", 4, wangpc_cards, nullptr)
MCFG_WANGPC_BUS_SLOT_ADD("slot5", 5, wangpc_cards, nullptr)
WANGPC_BUS(config, m_bus, 0);
m_bus->irq2_wr_callback().set(FUNC(wangpc_state::bus_irq2_w));
m_bus->irq3_wr_callback().set(m_pic, FUNC(pic8259_device::ir3_w));
m_bus->irq4_wr_callback().set(m_pic, FUNC(pic8259_device::ir4_w));
m_bus->irq5_wr_callback().set(m_pic, FUNC(pic8259_device::ir5_w));
m_bus->irq6_wr_callback().set(m_pic, FUNC(pic8259_device::ir6_w));
m_bus->irq7_wr_callback().set(m_pic, FUNC(pic8259_device::ir7_w));
m_bus->drq1_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq1_w));
m_bus->drq2_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq2_w));
m_bus->drq3_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq3_w));
m_bus->ioerror_wr_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
WANGPC_BUS_SLOT(config, "slot1", wangpc_cards, nullptr, 1);
WANGPC_BUS_SLOT(config, "slot2", wangpc_cards, "mvc", 2);
WANGPC_BUS_SLOT(config, "slot3", wangpc_cards, nullptr, 3);
WANGPC_BUS_SLOT(config, "slot4", wangpc_cards, nullptr, 4);
WANGPC_BUS_SLOT(config, "slot5", wangpc_cards, nullptr, 5);
// internal ram
RAM(config, RAM_TAG).set_default_size("128K");
// software list
SOFTWARE_LIST(config, "flop_list").set_original("wangpc");
MACHINE_CONFIG_END
}

View File

@ -1551,7 +1551,8 @@ static void keyboard_devices(device_slot_interface &device)
device.option_add("x68k", X68K_KEYBOARD);
}
MACHINE_CONFIG_START(x68k_state::x68000_base)
void x68k_state::x68000_base(machine_config &config)
{
config.m_minimum_quantum = attotime::from_hz(60);
/* device hardware */
@ -1626,17 +1627,16 @@ MACHINE_CONFIG_START(x68k_state::x68000_base)
SOFTWARE_LIST(config, "flop_list").set_original("x68k_flop");
MCFG_DEVICE_ADD("exp", X68K_EXPANSION_SLOT, 0)
MCFG_DEVICE_SLOT_INTERFACE(x68000_exp_cards, nullptr, false)
MCFG_X68K_EXPANSION_SLOT_OUT_IRQ2_CB(WRITELINE(*this, x68k_state, irq2_line))
MCFG_X68K_EXPANSION_SLOT_OUT_IRQ4_CB(WRITELINE(*this, x68k_state, irq4_line))
MCFG_X68K_EXPANSION_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", M68K_IRQ_7))
X68K_EXPANSION_SLOT(config, m_expansion, x68000_exp_cards, nullptr);
m_expansion->out_irq2_callback().set(FUNC(x68k_state::irq2_line));
m_expansion->out_irq4_callback().set(FUNC(x68k_state::irq4_line));
m_expansion->out_nmi_callback().set_inputline(m_maincpu, M68K_IRQ_7);
/* internal ram */
RAM(config, m_ram).set_default_size("4M").set_extra_options("1M,2M,3M,5M,6M,7M,8M,9M,10M,11M,12M");
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
MACHINE_CONFIG_END
}
void x68k_state::x68000(machine_config &config)
{

View File

@ -596,7 +596,8 @@ static void z88_cart(device_slot_interface &device)
device.option_add("1024kflash", Z88_1024K_FLASH); // 1024KB Flash cart
}
MACHINE_CONFIG_START(z88_state::z88)
void z88_state::z88(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(9'830'400)/3); // divided by 3 through the uPD65031
m_maincpu->set_addrmap(AS_PROGRAM, &z88_state::z88_mem);
@ -629,21 +630,18 @@ MACHINE_CONFIG_START(z88_state::z88)
RAM(config, RAM_TAG).set_default_size("128K").set_extra_options("32K,64K,256K,512K");
/* cartridges */
device = &Z88CART_SLOT(config, m_carts[1]);
MCFG_DEVICE_SLOT_INTERFACE(z88_cart, nullptr, false)
MCFG_Z88CART_SLOT_OUT_FLP_CB(WRITELINE("blink", upd65031_device, flp_w))
Z88CART_SLOT(config, m_carts[1], z88_cart, nullptr);
m_carts[1]->out_flp_callback().set(m_blink, FUNC(upd65031_device::flp_w));
device = &Z88CART_SLOT(config, m_carts[2]);
MCFG_DEVICE_SLOT_INTERFACE(z88_cart, nullptr, false)
MCFG_Z88CART_SLOT_OUT_FLP_CB(WRITELINE("blink", upd65031_device, flp_w))
Z88CART_SLOT(config, m_carts[2], z88_cart, nullptr);
m_carts[2]->out_flp_callback().set(m_blink, FUNC(upd65031_device::flp_w));
device = &Z88CART_SLOT(config, m_carts[3]);
MCFG_DEVICE_SLOT_INTERFACE(z88_cart, nullptr, false)
MCFG_Z88CART_SLOT_OUT_FLP_CB(WRITELINE("blink", upd65031_device, flp_w))
Z88CART_SLOT(config, m_carts[3], z88_cart, nullptr);
m_carts[3]->out_flp_callback().set(m_blink, FUNC(upd65031_device::flp_w));
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("z88_cart");
MACHINE_CONFIG_END
}
/***************************************************************************