diff options
author | 2025-01-02 12:30:59 +0700 | |
---|---|---|
committer | 2025-01-02 12:32:32 +0700 | |
commit | 2da636bb214ee65c339b385ffc3be275d06ff76e (patch) | |
tree | 02fccfdded5689b089e0f3cb711debd6cc1f1386 /src/devices/machine/ds1315.h | |
parent | ab34107f9f6487444682837e106edaed0c35c491 (diff) |
ds1215: modernize and complete emulation
* rename previous ds1315 to earlier/original ds1215 device
* support both ds1215 and transparent access methods
* implement rtc and nvram interfaces
* support updating registers
Diffstat (limited to 'src/devices/machine/ds1315.h')
-rw-r--r-- | src/devices/machine/ds1315.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/devices/machine/ds1315.h b/src/devices/machine/ds1315.h deleted file mode 100644 index f42152c19a7..00000000000 --- a/src/devices/machine/ds1315.h +++ /dev/null @@ -1,65 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Tim Lindner -/********************************************************************* - - ds1315.h - - Dallas Semiconductor's Phantom Time Chip DS1315. - - by tim lindner, November 2001. - -*********************************************************************/ - -#ifndef MAME_MACHINE_DS1315_H -#define MAME_MACHINE_DS1315_H - -#pragma once - -class ds1315_device : public device_t -{ -public: - ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - ~ds1315_device() {} - - auto read_backing() { return m_backing_read.bind(); } - - // this handler automates the bits 0/2 stuff - uint8_t read(offs_t offset); - - uint8_t read_0(); - uint8_t read_1(); - uint8_t read_data(); - uint8_t write_data(offs_t offset); - - bool chip_enable(); - void chip_reset(); - -protected: - // device-level overrides - virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; - -private: - devcb_read8 m_backing_read; - - enum mode_t : u8 - { - DS_SEEK_MATCHING, - DS_CALENDAR_IO - }; - - // internal state - mode_t m_mode; - - void fill_raw_data(); - void input_raw_data(); - - int m_count; - uint8_t m_raw_data[8*8]; -}; - -ALLOW_SAVE_TYPE(ds1315_device::mode_t); - -DECLARE_DEVICE_TYPE(DS1315, ds1315_device) - -#endif // MAME_MACHINE_DS1315_H |