Common Source Code Project for Qt (a.k.a for FM-7).
Révision | 157ebfef5f075eefe591ab0a9485683631a9ad9f (tree) |
---|---|
l'heure | 2021-02-03 01:11:00 |
Auteur | K.Ohta <whatisthis.sowhat@gmai...> |
Commiter | K.Ohta |
[VM][I286][I86][V30][FMR][PC9801] Separate namespace CPUTYPE ENUMS.
[VM][I286][I86] Fix weird bitmask default value.
@@ -87,7 +87,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu) | ||
87 | 87 | cpu->device_model = INTEL_8086; |
88 | 88 | #elif defined(HAS_I286) |
89 | 89 | cpu = new I286(this, emu); |
90 | - cpu->device_model = INTEL_80286; | |
90 | + cpu->device_model = I286_MAME::INTEL_80286; | |
91 | 91 | #endif |
92 | 92 | io = new IO(this, emu); |
93 | 93 | fdc = new MB8877(this, emu); |
@@ -121,7 +121,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu) | ||
121 | 121 | |
122 | 122 | #if defined(HAS_I286) |
123 | 123 | cpu = new I286(this, emu); |
124 | -// cpu->device_model = INTEL_80286; | |
124 | + cpu->device_model = I286_MAME::INTEL_80286; | |
125 | 125 | #elif defined(HAS_I386) |
126 | 126 | cpu = new I386(this, emu); |
127 | 127 | cpu->device_model = INTEL_80386; |
@@ -16,6 +16,15 @@ | ||
16 | 16 | |
17 | 17 | #define SIG_I86_TEST 0 |
18 | 18 | #define SIG_I286_A20 1 |
19 | +namespace I286_MAME { | |
20 | +enum { | |
21 | + INTEL_80286 = 0, | |
22 | + NEC_V30, | |
23 | + INTEL_8086, | |
24 | + INTEL_80186, | |
25 | + INTEL_8088, | |
26 | +}; | |
27 | +} | |
19 | 28 | |
20 | 29 | class DEBUGGER; |
21 | 30 |
@@ -44,6 +53,7 @@ public: | ||
44 | 53 | d_dma = NULL; |
45 | 54 | d_debugger = NULL; |
46 | 55 | opaque = NULL; |
56 | + device_model = I286_MAME::INTEL_80286; | |
47 | 57 | |
48 | 58 | set_device_name(_T("80286 CPU")); |
49 | 59 | } |
@@ -108,7 +118,7 @@ public: | ||
108 | 118 | { |
109 | 119 | d_io = device; |
110 | 120 | } |
111 | - void set_context_intr(DEVICE* device, uint32_t bit = 0xfffffffff) | |
121 | + void set_context_intr(DEVICE* device, uint32_t bit = 0xffffffff) | |
112 | 122 | { |
113 | 123 | d_pic = device; |
114 | 124 | } |
@@ -133,6 +143,7 @@ public: | ||
133 | 143 | uint32_t get_address_mask(); |
134 | 144 | void set_shutdown_flag(int shutdown); |
135 | 145 | int get_shutdown_flag(); |
146 | + int device_model; | |
136 | 147 | }; |
137 | 148 | |
138 | 149 | #endif |
@@ -20,10 +20,11 @@ class DEBUGGER; | ||
20 | 20 | //#endif |
21 | 21 | |
22 | 22 | enum { |
23 | - INTEL_8086 = 0, | |
24 | - INTEL_8088, | |
25 | - INTEL_80186, | |
23 | + INTEL_80286 = 0, | |
26 | 24 | NEC_V30, |
25 | + INTEL_8086, | |
26 | + INTEL_80186, | |
27 | + INTEL_8088, | |
27 | 28 | }; |
28 | 29 | |
29 | 30 | class DLL_PREFIX I86 : public DEVICE |
@@ -52,6 +53,7 @@ public: | ||
52 | 53 | //#ifdef SINGLE_MODE_DMA |
53 | 54 | d_dma = NULL; |
54 | 55 | //#endif |
56 | + device_model = INTEL_8086; | |
55 | 57 | } |
56 | 58 | ~I86() {} |
57 | 59 |
@@ -111,7 +113,7 @@ public: | ||
111 | 113 | { |
112 | 114 | d_io = device; |
113 | 115 | } |
114 | - void set_context_intr(DEVICE* device, uint32_t bit = 0xfffffffff) | |
116 | + void set_context_intr(DEVICE* device, uint32_t bit = 0xffffffff) | |
115 | 117 | { |
116 | 118 | d_pic = device; |
117 | 119 | } |
@@ -211,7 +211,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu) | ||
211 | 211 | cpu->device_model = NEC_V30; |
212 | 212 | #elif defined(HAS_I286) |
213 | 213 | cpu = new I286(this, emu); |
214 | - cpu->device_model = INTEL_80286; | |
214 | + cpu->device_model = I286_MAME::INTEL_80286; | |
215 | 215 | #elif defined(HAS_I386) |
216 | 216 | cpu = new I386(this, emu); |
217 | 217 | cpu->device_model = INTEL_80386; |
@@ -6,6 +6,7 @@ class V30 : public I8086 | ||
6 | 6 | public: |
7 | 7 | V30(VM_TEMPLATE* parent_vm, EMU_TEMPLATE* parent_emu) : I8086(parent_vm, parent_emu) |
8 | 8 | { |
9 | + device_model = NEC_V30; | |
9 | 10 | set_device_name(_T("NEC V30 CPU")); |
10 | 11 | } |
11 | 12 | ~V30() {} |