mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
mpu401: Eliminate MCFG_ macros (nw)
This commit is contained in:
parent
5a61d57123
commit
449e0f88eb
@ -44,9 +44,10 @@ DEFINE_DEVICE_TYPE(MPU_PC98, mpu_pc98_device, "mpu_pc98", "Roland MPU-401 MIDI I
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_START(mpu_pc98_device::device_add_mconfig)
|
||||
MCFG_MPU401_ADD(MPU_CORE_TAG, WRITELINE(*this, mpu_pc98_device, mpu_irq_out))
|
||||
MACHINE_CONFIG_END
|
||||
void mpu_pc98_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
MPU401(config, m_mpu401).irq_cb().set(FUNC(mpu_pc98_device::mpu_irq_out));
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -48,9 +48,10 @@ DEFINE_DEVICE_TYPE(ISA8_MPU401, isa8_mpu401_device, "isa_mpu401", "Roland MPU-40
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_START(isa8_mpu401_device::device_add_mconfig)
|
||||
MCFG_MPU401_ADD(MPU_CORE_TAG, WRITELINE(*this, isa8_mpu401_device, mpu_irq_out))
|
||||
MACHINE_CONFIG_END
|
||||
void isa8_mpu401_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
MPU401(config, m_mpu401).irq_cb().set(FUNC(isa8_mpu401_device::mpu_irq_out));
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -7,13 +7,6 @@
|
||||
|
||||
#include "cpu/m6800/m6801.h"
|
||||
|
||||
#define MCFG_MPU401_ADD(tag, irqf) \
|
||||
MCFG_DEVICE_ADD((tag), MPU401, 0) \
|
||||
MCFG_IRQ_FUNC(irqf)
|
||||
|
||||
#define MCFG_IRQ_FUNC(irqf) \
|
||||
downcast<mpu401_device *>(device)->set_irqf(DEVCB_##irqf);
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
@ -22,12 +15,9 @@ class mpu401_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
template <class Write> devcb_base &set_irqf(Write &&wr)
|
||||
{
|
||||
return write_irq.set_callback(std::forward<Write>(wr));
|
||||
}
|
||||
auto irq_cb() { return write_irq.bind(); }
|
||||
|
||||
// public API - call for reads/writes at I/O 330/331 on PC, C0n0/C0n1 on Apple II, etc.
|
||||
DECLARE_READ8_MEMBER(mpu_r);
|
||||
|
Loading…
Reference in New Issue
Block a user