• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

Common Source Code Project for Qt (a.k.a for FM-7).


Commit MetaInfo

Révision157ebfef5f075eefe591ab0a9485683631a9ad9f (tree)
l'heure2021-02-03 01:11:00
AuteurK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Message de Log

[VM][I286][I86][V30][FMR][PC9801] Separate namespace CPUTYPE ENUMS.

[VM][I286][I86] Fix weird bitmask default value.

Change Summary

Modification

--- a/source/src/vm/fmr30/fmr30.cpp
+++ b/source/src/vm/fmr30/fmr30.cpp
@@ -87,7 +87,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
8787 cpu->device_model = INTEL_8086;
8888 #elif defined(HAS_I286)
8989 cpu = new I286(this, emu);
90- cpu->device_model = INTEL_80286;
90+ cpu->device_model = I286_MAME::INTEL_80286;
9191 #endif
9292 io = new IO(this, emu);
9393 fdc = new MB8877(this, emu);
--- a/source/src/vm/fmr50/fmr50.cpp
+++ b/source/src/vm/fmr50/fmr50.cpp
@@ -121,7 +121,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
121121
122122 #if defined(HAS_I286)
123123 cpu = new I286(this, emu);
124-// cpu->device_model = INTEL_80286;
124+ cpu->device_model = I286_MAME::INTEL_80286;
125125 #elif defined(HAS_I386)
126126 cpu = new I386(this, emu);
127127 cpu->device_model = INTEL_80386;
--- a/source/src/vm/i286.h
+++ b/source/src/vm/i286.h
@@ -16,6 +16,15 @@
1616
1717 #define SIG_I86_TEST 0
1818 #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+}
1928
2029 class DEBUGGER;
2130
@@ -44,6 +53,7 @@ public:
4453 d_dma = NULL;
4554 d_debugger = NULL;
4655 opaque = NULL;
56+ device_model = I286_MAME::INTEL_80286;
4757
4858 set_device_name(_T("80286 CPU"));
4959 }
@@ -108,7 +118,7 @@ public:
108118 {
109119 d_io = device;
110120 }
111- void set_context_intr(DEVICE* device, uint32_t bit = 0xfffffffff)
121+ void set_context_intr(DEVICE* device, uint32_t bit = 0xffffffff)
112122 {
113123 d_pic = device;
114124 }
@@ -133,6 +143,7 @@ public:
133143 uint32_t get_address_mask();
134144 void set_shutdown_flag(int shutdown);
135145 int get_shutdown_flag();
146+ int device_model;
136147 };
137148
138149 #endif
--- a/source/src/vm/i86.h
+++ b/source/src/vm/i86.h
@@ -20,10 +20,11 @@ class DEBUGGER;
2020 //#endif
2121
2222 enum {
23- INTEL_8086 = 0,
24- INTEL_8088,
25- INTEL_80186,
23+ INTEL_80286 = 0,
2624 NEC_V30,
25+ INTEL_8086,
26+ INTEL_80186,
27+ INTEL_8088,
2728 };
2829
2930 class DLL_PREFIX I86 : public DEVICE
@@ -52,6 +53,7 @@ public:
5253 //#ifdef SINGLE_MODE_DMA
5354 d_dma = NULL;
5455 //#endif
56+ device_model = INTEL_8086;
5557 }
5658 ~I86() {}
5759
@@ -111,7 +113,7 @@ public:
111113 {
112114 d_io = device;
113115 }
114- void set_context_intr(DEVICE* device, uint32_t bit = 0xfffffffff)
116+ void set_context_intr(DEVICE* device, uint32_t bit = 0xffffffff)
115117 {
116118 d_pic = device;
117119 }
--- a/source/src/vm/pc9801/pc9801.cpp
+++ b/source/src/vm/pc9801/pc9801.cpp
@@ -211,7 +211,7 @@ VM::VM(EMU_TEMPLATE* parent_emu) : VM_TEMPLATE(parent_emu)
211211 cpu->device_model = NEC_V30;
212212 #elif defined(HAS_I286)
213213 cpu = new I286(this, emu);
214- cpu->device_model = INTEL_80286;
214+ cpu->device_model = I286_MAME::INTEL_80286;
215215 #elif defined(HAS_I386)
216216 cpu = new I386(this, emu);
217217 cpu->device_model = INTEL_80386;
--- a/source/src/vm/v30.h
+++ b/source/src/vm/v30.h
@@ -6,6 +6,7 @@ class V30 : public I8086
66 public:
77 V30(VM_TEMPLATE* parent_vm, EMU_TEMPLATE* parent_emu) : I8086(parent_vm, parent_emu)
88 {
9+ device_model = NEC_V30;
910 set_device_name(_T("NEC V30 CPU"));
1011 }
1112 ~V30() {}
Afficher sur ancien navigateur de dépôt.