summaryrefslogtreecommitdiffstats
path: root/src/emu/machine/lpc-rtc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine/lpc-rtc.h')
-rw-r--r--src/emu/machine/lpc-rtc.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/emu/machine/lpc-rtc.h b/src/emu/machine/lpc-rtc.h
new file mode 100644
index 00000000000..9135d1a590b
--- /dev/null
+++ b/src/emu/machine/lpc-rtc.h
@@ -0,0 +1,42 @@
+#ifndef LPC_RTC_H
+#define LPC_RTC_H
+
+#include "lpc.h"
+
+#define MCFG_LPC_RTC_ADD(_tag) \
+ MCFG_DEVICE_ADD(_tag, LPC_RTC, 0)
+
+class lpc_rtc_device : public lpc_device {
+public:
+ lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ virtual void map_device(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
+ UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
+
+ virtual void map_extdevice(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space,
+ UINT64 io_window_start, UINT64 io_window_end, UINT64 io_offset, address_space *io_space);
+
+ DECLARE_READ8_MEMBER( index_r);
+ DECLARE_WRITE8_MEMBER( index_w);
+ DECLARE_READ8_MEMBER( target_r);
+ DECLARE_WRITE8_MEMBER( target_w);
+ DECLARE_READ8_MEMBER( extindex_r);
+ DECLARE_WRITE8_MEMBER( extindex_w);
+ DECLARE_READ8_MEMBER( exttarget_r);
+ DECLARE_WRITE8_MEMBER( exttarget_w);
+
+protected:
+ void device_start();
+ void device_reset();
+
+private:
+ DECLARE_ADDRESS_MAP(map, 32);
+ DECLARE_ADDRESS_MAP(extmap, 32);
+
+ UINT8 cur_index, cur_extindex;
+ UINT8 ram[256];
+};
+
+extern const device_type LPC_RTC;
+
+#endif