OSDN Git Service

1dc9f22bec76dd3b92669f5a8af6cb9ef6182d3d
[csp-qt/common_source_project-fm7.git] / source / src / vm / msx / rtcif.h
1 /*
2         ASCII MSX2 Emulator 'yaMSX2'
3
4         Author : umaiboux
5         Date   : 2014.12.xx-
6
7         modified by Takeda.Toshiya
8
9         [ rtc i/f ]
10 */
11
12 #ifndef _RTCIF_H_
13 #define _RTCIF_H_
14
15 #include "../vm.h"
16 #include "../../emu.h"
17 #include "../device.h"
18
19 class RTCIF : public DEVICE
20 {
21 private:
22         DEVICE *d_rtc;
23         uint8_t adrs;
24         
25 public:
26         RTCIF(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
27         {
28                 set_device_name(_T("RTC I/F"));
29         }
30         ~RTCIF() {}
31         
32         // common functions
33         void write_io8(uint32_t addr, uint32_t data);
34         uint32_t read_io8(uint32_t addr);
35         void decl_state();
36         void save_state(FILEIO* state_fio);
37         bool load_state(FILEIO* state_fio);
38         
39         // unique function
40         void set_context_rtc(DEVICE* device)
41         {
42                 d_rtc = device;
43         }
44 };
45
46 #endif
47