OSDN Git Service

[INITIAL] Import 20141226 version of http://homepage3.nifty.com/takeda-toshiya/common...
[csp-qt/common_source_project-fm7.git] / source / src / vm / pasopia7 / iotrap.h
1 /*\r
2         TOSHIBA PASOPIA 7 Emulator 'EmuPIA7'\r
3 \r
4         Author : Takeda.Toshiya\r
5         Date   : 2006.09.20 -\r
6 \r
7         [ i/o trap ]\r
8 */\r
9 \r
10 #ifndef _IOTRAP_H_\r
11 #define _IOTRAP_H_\r
12 \r
13 #include "../vm.h"\r
14 #include "../../emu.h"\r
15 #include "../device.h"\r
16 \r
17 #define SIG_IOTRAP_I8255_2_A    0\r
18 #define SIG_IOTRAP_I8255_2_C    1\r
19 \r
20 class IOTRAP : public DEVICE\r
21 {\r
22 private:\r
23         DEVICE *d_cpu, *d_pio2;\r
24         bool nmi_mask, pasopia;\r
25         \r
26 public:\r
27         IOTRAP(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}\r
28         ~IOTRAP() {}\r
29         \r
30         // common functions\r
31         void initialize();\r
32         void write_io8(uint32 addr, uint32 data);\r
33         uint32 read_io8(uint32 addr);\r
34         void write_signal(int id, uint32 data, uint32 mask);\r
35         \r
36         // unique functions\r
37         void set_context_cpu(DEVICE* device)\r
38         {\r
39                 d_cpu = device;\r
40         }\r
41         void set_context_pio2(DEVICE* device)\r
42         {\r
43                 d_pio2 = device;\r
44         }\r
45         void do_reset();\r
46 };\r
47 \r
48 #endif\r
49 \r