OSDN Git Service

[VM][WIP] Use namespace to devices per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / j3100 / dmareg.h
1 /*
2         TOSHIBA J-3100GT Emulator 'eJ-3100GT'
3         TOSHIBA J-3100SL Emulator 'eJ-3100SL'
4
5         Author : Takeda.Toshiya
6         Date   : 2011.08.28-
7
8         [ dma bank register ]
9 */
10
11 #ifndef _DMAREG_H_
12 #define _DMAREG_H_
13
14 #include "../vm.h"
15 #include "../../emu.h"
16 #include "../device.h"
17
18 namespace J3100 {
19         
20 class DMAREG : public DEVICE
21 {
22 private:
23         DEVICE *d_dma;
24 #ifndef TYPE_SL
25         DEVICE *d_dma2;
26 #endif
27         
28 public:
29         DMAREG(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
30         {
31                 set_device_name(_T("DMA Register"));
32         }
33         ~DMAREG() {}
34         
35         // common function
36         void write_io8(uint32_t addr, uint32_t data);
37         
38         // unique functions
39         void set_context_dma(DEVICE* device)
40         {
41                 d_dma = device;
42         }
43 #ifndef TYPE_SL
44         void set_context_dma2(DEVICE* device)
45         {
46                 d_dma2 = device;
47         }
48 #endif
49 };
50
51 }
52 #endif
53