mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
timekpr: Default input clock for all devices; convert M48T37 callbacks to devcb3 (nw)
This commit is contained in:
parent
09b41d33f1
commit
61693ea709
@ -22,17 +22,6 @@
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_M48T37_RESET_HANDLER(_devcb) \
|
||||
downcast<timekeeper_device &>(*device).set_reset_handler(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_M48T37_IRQ_HANDLER(_devcb) \
|
||||
downcast<timekeeper_device &>(*device).set_irq_handler(DEVCB_##_devcb);
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
@ -46,8 +35,9 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER(watchdog_write);
|
||||
template <class Object> devcb_base &set_reset_handler(Object &&cb) { return m_reset_cb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_cb.set_callback(std::forward<Object>(cb)); }
|
||||
|
||||
auto reset_cb() { return m_reset_cb.bind(); }
|
||||
auto irq_cb() { return m_irq_cb.bind(); }
|
||||
|
||||
protected:
|
||||
// construction/destruction
|
||||
@ -105,37 +95,37 @@ protected:
|
||||
class m48t02_device : public timekeeper_device
|
||||
{
|
||||
public:
|
||||
m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
};
|
||||
|
||||
class m48t35_device : public timekeeper_device
|
||||
{
|
||||
public:
|
||||
m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
};
|
||||
|
||||
class m48t37_device : public timekeeper_device
|
||||
{
|
||||
public:
|
||||
m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
};
|
||||
|
||||
class m48t58_device : public timekeeper_device
|
||||
{
|
||||
public:
|
||||
m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
};
|
||||
|
||||
class mk48t08_device : public timekeeper_device
|
||||
{
|
||||
public:
|
||||
mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
};
|
||||
|
||||
class mk48t12_device : public timekeeper_device
|
||||
{
|
||||
public:
|
||||
mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
};
|
||||
|
||||
// device type definition
|
||||
|
@ -828,9 +828,9 @@ MACHINE_CONFIG_START(atlantis_state::mwskins)
|
||||
MCFG_PCI9050_USER_OUTPUT_CALLBACK(WRITE32(*this, atlantis_state, user_io_output))
|
||||
MCFG_PCI9050_USER_INPUT_CALLBACK(READ32(*this, atlantis_state, user_io_input))
|
||||
|
||||
MCFG_DEVICE_ADD(m_rtc, M48T37, 0)
|
||||
MCFG_M48T37_RESET_HANDLER(WRITELINE(*this, atlantis_state, watchdog_reset))
|
||||
MCFG_M48T37_IRQ_HANDLER(WRITELINE(*this, atlantis_state, watchdog_irq))
|
||||
M48T37(config, m_rtc);
|
||||
m_rtc->reset_cb().set(FUNC(atlantis_state::watchdog_reset));
|
||||
m_rtc->irq_cb().set(FUNC(atlantis_state::watchdog_irq));
|
||||
|
||||
MCFG_DEVICE_ADD(m_ide, IDE_PCI, 0, 0x10950646, 0x07, 0x0)
|
||||
MCFG_IDE_PCI_IRQ_HANDLER(WRITELINE(*this, atlantis_state, ide_irq))
|
||||
|
@ -1770,9 +1770,9 @@ MACHINE_CONFIG_START(vegas_state::vegascore)
|
||||
MCFG_DEVICE_MODIFY(PCI_ID_VIDEO":voodoo")
|
||||
MCFG_VOODOO_VBLANK_CB(WRITELINE(*this, vegas_state, vblank_assert))
|
||||
|
||||
MCFG_DEVICE_ADD(m_timekeeper, M48T37, 0)
|
||||
MCFG_M48T37_RESET_HANDLER(WRITELINE(*this, vegas_state, watchdog_reset))
|
||||
MCFG_M48T37_IRQ_HANDLER(WRITELINE(*this, vegas_state, watchdog_irq))
|
||||
M48T37(config, m_timekeeper);
|
||||
m_timekeeper->reset_cb().set(FUNC(vegas_state::watchdog_reset));
|
||||
m_timekeeper->irq_cb().set(FUNC(vegas_state::watchdog_irq));
|
||||
|
||||
MCFG_SMC91C94_ADD(m_ethernet)
|
||||
MCFG_SMC91C94_IRQ_CALLBACK(WRITELINE(*this, vegas_state, ethernet_interrupt))
|
||||
|
Loading…
Reference in New Issue
Block a user