diff options
Diffstat (limited to 'src/emu/machine/mm58274c.h')
-rw-r--r-- | src/emu/machine/mm58274c.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/emu/machine/mm58274c.h b/src/emu/machine/mm58274c.h new file mode 100644 index 00000000000..983d501dc59 --- /dev/null +++ b/src/emu/machine/mm58274c.h @@ -0,0 +1,56 @@ +#ifndef MM58274C_H +#define MM58274C_H + +/*************************************************************************** + MACROS +***************************************************************************/ + +class mm58274c_device : public device_t +{ +public: + mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ~mm58274c_device() { global_free(m_token); } + + // access to legacy token + void *token() const { assert(m_token != NULL); return m_token; } +protected: + // device-level overrides + virtual void device_config_complete(); + virtual void device_start(); + virtual void device_reset(); +private: + // internal state + void *m_token; +}; + +extern const device_type MM58274C; + + +/*************************************************************************** + FUNCTION PROTOTYPES +***************************************************************************/ +/* interface */ +/* + Initializes the clock chip. + day1 must be set to a value from 0 (sunday), 1 (monday) ... + to 6 (saturday) and is needed to correctly retrieve the day-of-week + from the host system clock. +*/ +struct mm58274c_interface +{ + int mode24; /* 24/12 mode */ + int day1; /* first day of week */ +}; + +DECLARE_READ8_DEVICE_HANDLER ( mm58274c_r ); +DECLARE_WRITE8_DEVICE_HANDLER( mm58274c_w ); + +/*************************************************************************** + DEVICE CONFIGURATION MACROS +***************************************************************************/ + +#define MCFG_MM58274C_ADD(_tag, _intrf) \ + MCFG_DEVICE_ADD(_tag, MM58274C, 0) \ + MCFG_DEVICE_CONFIG(_intrf) + +#endif /* MM58274C_H */ |