diff options
author | 2015-09-13 08:41:44 +0200 | |
---|---|---|
committer | 2015-09-13 08:41:44 +0200 | |
commit | f88cefad27a1737c76e09d99c9fb43e173506081 (patch) | |
tree | 2d8167d03579c46e226471747eb4407bd00ed6fa /src/devices/bus/snes/rom21.h | |
parent | e92ac9e0fa8e99869894bea00589bbb526be30aa (diff) |
Move all devices into separate part of src tree (nw)
Diffstat (limited to 'src/devices/bus/snes/rom21.h')
-rw-r--r-- | src/devices/bus/snes/rom21.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/devices/bus/snes/rom21.h b/src/devices/bus/snes/rom21.h new file mode 100644 index 00000000000..a70d9fdc6c8 --- /dev/null +++ b/src/devices/bus/snes/rom21.h @@ -0,0 +1,67 @@ +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli +#ifndef __SNS_ROM21_H +#define __SNS_ROM21_H + +#include "snes_slot.h" + + +// ======================> sns_rom21_device + +class sns_rom21_device : public device_t, + public device_sns_cart_interface +{ +public: + // construction/destruction + sns_rom21_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + sns_rom21_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_l); + virtual DECLARE_READ8_MEMBER(read_h); +}; + +// ======================> sns_rom21_srtc_device + +class sns_rom21_srtc_device : public sns_rom21_device +{ +public: + // construction/destruction + sns_rom21_srtc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + // reading and writing + virtual DECLARE_READ8_MEMBER(chip_read); + virtual DECLARE_WRITE8_MEMBER(chip_write); + + // S-RTC specific variables + enum + { + RTCM_Ready = 0, + RTCM_Command, + RTCM_Read, + RTCM_Write + }; + + void update_time(); + UINT8 srtc_weekday(UINT32 year, UINT32 month, UINT32 day); + + //this is now allocated in the main snes cart class, to allow saving to nvram + //UINT8 m_rtc_ram[13]; + INT32 m_mode; + INT8 m_index; +}; + + +// device type definition +extern const device_type SNS_HIROM; +extern const device_type SNS_HIROM_SRTC; + +#endif |