OSDN Git Service

[VM] Apply VM_TEMPLATE to all 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 class DMAREG : public DEVICE
19 {
20 private:
21         DEVICE *d_dma;
22 #ifndef TYPE_SL
23         DEVICE *d_dma2;
24 #endif
25         
26 public:
27         DMAREG(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
28         {
29                 set_device_name(_T("DMA Register"));
30         }
31         ~DMAREG() {}
32         
33         // common function
34         void write_io8(uint32_t addr, uint32_t data);
35         
36         // unique functions
37         void set_context_dma(DEVICE* device)
38         {
39                 d_dma = device;
40         }
41 #ifndef TYPE_SL
42         void set_context_dma2(DEVICE* device)
43         {
44                 d_dma2 = device;
45         }
46 #endif
47 };
48
49 #endif
50