From 3d36c381f378833e8be7a9953ed145867d34eb29 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 7 Dec 2024 23:44:10 +0100 Subject: [PATCH] ds1643_device: fix wrong constructor --- src/devices/machine/timekpr.cpp | 18 +++++++++--------- src/devices/machine/timekpr.h | 13 +++++++------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp index 4ba1ef306f1..7f004f33873 100644 --- a/src/devices/machine/timekpr.cpp +++ b/src/devices/machine/timekpr.cpp @@ -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 diff --git a/src/devices/machine/timekpr.h b/src/devices/machine/timekpr.h index 3ad28851513..653a73060ea 100644 --- a/src/devices/machine/timekpr.h +++ b/src/devices/machine/timekpr.h @@ -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)