diff options
Diffstat (limited to 'src/devices/machine/ds128x.cpp')
-rw-r--r-- | src/devices/machine/ds128x.cpp | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/src/devices/machine/ds128x.cpp b/src/devices/machine/ds128x.cpp index 91e022e07e7..7a397aab303 100644 --- a/src/devices/machine/ds128x.cpp +++ b/src/devices/machine/ds128x.cpp @@ -10,12 +10,7 @@ DEFINE_DEVICE_TYPE(DS12885, ds12885_device, "ds12885", "DS12885 RTC/NVRAM") //------------------------------------------------- ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : ds12885_device(mconfig, DS12885, tag, owner, clock) -{ -} - -ds12885_device::ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) - : mc146818_device(mconfig, type, tag, owner, clock) + : mc146818_device(mconfig, DS12885, tag, owner, clock) { } @@ -28,54 +23,3 @@ int ds12885_device::get_timer_bypass() return 22; // No tick } - -DEFINE_DEVICE_TYPE(DS12885EXT, ds12885ext_device, "ds12885ext", "DS12885 RTC/NVRAM size 256 bytes") - -//------------------------------------------------- -// ds12885ext_device - constructor -//------------------------------------------------- - -ds12885ext_device::ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : ds12885_device(mconfig, DS12885EXT, tag, owner, clock) -{ -} - -//------------------------------------------------- -// ds12885ext_device - handlers that allow acces to extended memory size -//------------------------------------------------- - -uint8_t ds12885ext_device::read_extended(offs_t offset) -{ - switch (offset) - { - case 0: - case 1: - return read(offset); - break; - case 2: - case 3: - return read(offset - 2); - break; - default: - return 0xff; - } -} - -void ds12885ext_device::write_extended(offs_t offset, uint8_t data) -{ - switch (offset) - { - case 0: - write(offset, data & 127); - break; - case 1: - write(offset, data); - break; - case 2: - write(offset - 2, data); - break; - case 3: - write(offset - 2, data); - break; - } -} |