OSDN Git Service

[VM] .
[csp-qt/common_source_project-fm7.git] / source / src / vm / pc98ha / calendar.h
1 /*
2         NEC PC-98LT Emulator 'ePC-98LT'
3         NEC PC-98HA Emulator 'eHANDY98'
4
5         Author : Takeda.Toshiya
6         Date   : 2008.08.14 -
7
8         [ calendar ]
9 */
10
11 #ifndef _CALENDAR_H_
12 #define _CALENDAR_H_
13
14 #include "../vm.h"
15 #include "../../emu.h"
16 #include "../device.h"
17
18 class CALENDAR : public DEVICE
19 {
20 private:
21         DEVICE *d_rtc;
22 #ifdef _PC98HA
23         uint8_t ch;
24 #endif
25         
26 public:
27         CALENDAR(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
28         {
29                 set_device_name(_T("RTC I/F"));
30         }
31         ~CALENDAR() {}
32         
33         // common functions
34         void initialize();
35         void write_io8(uint32_t addr, uint32_t data);
36         uint32_t read_io8(uint32_t addr);
37 #ifdef _PC98HA
38         bool process_state(FILEIO* state_fio, bool loading);
39 #endif
40         
41         // unique function
42         void set_context_rtc(DEVICE* device)
43         {
44                 d_rtc = device;
45         }
46 };
47
48 #endif
49