OSDN Git Service

[VM] MEMORY:: class within some VM will change Foo_MEMORY:: to reduce misundestanding...
[csp-qt/common_source_project-fm7.git] / source / src / vm / fmr30 / cmos.h
1 /*
2         FUJITSU FMR-30 Emulator 'eFMR-30'
3
4         Author : Takeda.Toshiya
5         Date   : 2008.12.30 -
6
7         [ cmos ]
8 */
9
10 #ifndef _CMOS_H_
11 #define _CMOS_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 class CMOS : public DEVICE
18 {
19 private:
20         uint8_t cmos[0x2000];
21         bool modified;
22         
23 public:
24         CMOS(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
25         {
26                 set_device_name(_T("CMOS RAM"));
27         }
28         ~CMOS() {}
29         
30         // common functions
31         void initialize();
32         void release();
33         void write_io8(uint32_t addr, uint32_t data);
34         uint32_t read_io8(uint32_t addr);
35         bool process_state(FILEIO* state_fio, bool loading);
36         
37         // unique function
38         uint8_t* get_cmos()
39         {
40                 return cmos;
41         }
42 };
43
44 #endif
45