File: srtcemu.h

package info (click to toggle)
libretro-snes9x 1.53%2Bgit20160522-1
  • links: PTS
  • area: non-free
  • in suites: bullseye, buster, stretch
  • size: 3,048 kB
  • ctags: 6,243
  • sloc: cpp: 58,003; makefile: 212; sh: 2
file content (30 lines) | stat: -rw-r--r-- 517 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*****
 * S-RTC emulation code
 * Copyright (c) byuu
 *****/


#ifndef _SRTCEMU_H_
#define _SRTCEMU_H_

class SRTC {
public:
  void update_time();
  unsigned weekday(unsigned year, unsigned month, unsigned day);

  void init();
  void enable();
  void power();
  void reset();

  uint8 mmio_read (unsigned addr);
  void  mmio_write(unsigned addr, uint8 data);

  SRTC();

  static const unsigned months[12];
  enum RTC_Mode { RTCM_Ready, RTCM_Command, RTCM_Read, RTCM_Write } rtc_mode;
  signed rtc_index;
};

#endif