ds1643_device: fix wrong constructor

This commit is contained in:
hap 2024-12-07 23:44:10 +01:00
parent 450382ae37
commit 3d36c381f3
2 changed files with 16 additions and 15 deletions

View File

@ -148,8 +148,8 @@ m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, dev
m_offset_flags = 0x7ff0;
}
m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: timekeeper_device(mconfig, M48T58, tag, owner, clock, 0x2000)
m48t58_device::m48t58_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
: timekeeper_device(mconfig, type, tag, owner, clock, 0x2000)
{
m_offset_watchdog = -1;
m_offset_control = 0x1ff8;
@ -164,8 +164,13 @@ m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, dev
m_offset_flags = -1;
}
m48t58_device::m48t58_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
: timekeeper_device(mconfig, type, tag, owner, clock, 0x2000)
m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: m48t58_device(mconfig, M48T58, tag, owner, clock)
{
}
ds1643_device::ds1643_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: m48t58_device(mconfig, DS1643, tag, owner, clock)
{
}
@ -200,11 +205,6 @@ mk48t12_device::mk48t12_device(const machine_config &mconfig, const char *tag, d
m_offset_century = -1;
}
ds1643_device::ds1643_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: m48t58_device(mconfig, DS1643, tag, owner, clock)
{
}
//-------------------------------------------------
// device_start - device-specific startup

View File

@ -85,6 +85,7 @@ private:
emu_timer* m_watchdog_timer;
attotime m_watchdog_delay;
protected:
u32 const m_size;
s32 m_offset_watchdog;
@ -127,6 +128,12 @@ protected:
m48t58_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
};
class ds1643_device : public m48t58_device
{
public:
ds1643_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
};
class mk48t08_device : public timekeeper_device
{
public:
@ -139,12 +146,6 @@ public:
mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
};
class ds1643_device : public m48t58_device
{
public:
ds1643_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
};
// device type definition
DECLARE_DEVICE_TYPE(M48T02, m48t02_device)
DECLARE_DEVICE_TYPE(M48T35, m48t35_device)