OSDN Git Service

[VM][WIP] Use namespace to devices per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / x1 / emm.h
1 /*
2         SHARP X1 Emulator 'eX1'
3         SHARP X1twin Emulator 'eX1twin'
4         SHARP X1turbo Emulator 'eX1turbo'
5         SHARP X1turboZ Emulator 'eX1turboZ'
6
7         Author : Takeda.Toshiya
8         Date   : 2011.02.17-
9
10         [ emm ]
11 */
12
13 #ifndef _EMM_H_
14 #define _EMM_H_
15
16 #include "../vm.h"
17 #include "../../emu.h"
18 #include "../device.h"
19
20 #define EMM_BUFFER_SIZE 0x50000
21
22 namespace X1 {
23
24 class EMM : public DEVICE
25 {
26 private:
27         uint8_t data_buffer[EMM_BUFFER_SIZE];
28         uint32_t data_addr;
29         
30 public:
31         EMM(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
32         {
33                 set_device_name(_T("EMM"));
34         }
35         ~EMM() {}
36         
37         // common functions
38         void initialize();
39         void reset();
40         void write_io8(uint32_t addr, uint32_t data);
41         uint32_t read_io8(uint32_t addr);
42         bool process_state(FILEIO* state_fio, bool loading);
43 };
44
45 }
46 #endif
47