Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/snes/chip/srtc/srtc.hpp
2 views
1
class SRTC {
2
public:
3
uint8* rtc; //[20];
4
5
void init();
6
void load();
7
void unload();
8
void power();
9
void reset();
10
11
uint8 read(unsigned addr);
12
void write(unsigned addr, uint8 data);
13
14
void serialize(serializer&);
15
void initialize();
16
SRTC();
17
~SRTC();
18
19
private:
20
static const unsigned months[12];
21
enum RtcMode { RtcReady, RtcCommand, RtcRead, RtcWrite };
22
unsigned rtc_mode;
23
signed rtc_index;
24
25
void update_time();
26
unsigned weekday(unsigned year, unsigned month, unsigned day);
27
};
28
29
extern SRTC srtc;
30
31