OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pasopia7 / pac2.h
1 /*
2         TOSHIBA PASOPIA 7 Emulator 'EmuPIA7'
3
4         Author : Takeda.Toshiya
5         Date   : 2006.09.20 -
6
7         [ pac slot 2 ]
8 */
9
10 #ifndef _PAC2_H_
11 #define _PAC2_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 namespace PASOPIA7 {
18         class PAC2DEV;
19         class RAMPAC2;
20         class KANJIPAC2;
21         class JOYPAC2;
22 }
23
24 namespace PASOPIA7 {
25
26 class PAC2 : public DEVICE
27 {
28 private:
29         PAC2DEV* dev[8];
30         int sel;
31         
32         PASOPIA7::RAMPAC2* rampac2[2];
33         PASOPIA7::KANJIPAC2* kanji;
34         PASOPIA7::JOYPAC2* joy;
35         PASOPIA7::PAC2DEV* dummy;
36         
37 public:
38         PAC2(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
39         {
40                 set_device_name(_T("PAC2 Slot"));
41         }
42         ~PAC2() {}
43         
44         // common functions
45         void initialize();
46         void release();
47         void reset();
48         void write_io8(uint32_t addr, uint32_t data);
49         uint32_t read_io8(uint32_t addr);
50         bool process_state(FILEIO* state_fio, bool loading);
51         
52         // unique function
53         void open_rampac2(int drv, const _TCHAR* file_path);
54 };
55
56 }
57 #endif
58