OSDN Git Service

9cb7844a86c7d68467243da34ef32a94c174b681
[csp-qt/common_source_project-fm7.git] / source / src / vm / n5200 / system.h
1 /*
2         NEC N5200 Emulator 'eN5200'
3
4         Author : Takeda.Toshiya
5         Date   : 2009.06.04-
6
7         [ system i/o ]
8 */
9
10 #ifndef _SYSTEM_H_
11 #define _SYSTEM_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 class SYSTEM : public DEVICE
18 {
19 private:
20         DEVICE *d_dma;
21         
22         uint8_t mode;
23         bool nmi_enb;
24         
25 public:
26         SYSTEM(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
27         {
28                 set_device_name(_T("System I/O"));
29         }
30         ~SYSTEM() {}
31         
32         // common functions
33         void reset();
34         void write_io8(uint32_t addr, uint32_t data);
35         uint32_t read_io8(uint32_t addr);
36         
37         // unique function
38         void set_context_dma(DEVICE* device)
39         {
40                 d_dma = device;
41         }
42 };
43
44 #endif
45