Permalink
Browse files

CPU: Allow cputype=486 for NEW 486 and cputype=486old for OLD 486

  • Loading branch information...
joncampbell123 committed Aug 17, 2018
1 parent 394b151 commit 59fe77e40a0219ad733d4c1b74e576c3b07a3a41
Showing with 31 additions and 7 deletions.
  1. +28 −6 src/cpu/cpu.cpp
  2. +1 −1 src/dosbox.cpp
  3. +2 −0 src/gui/menu.cpp
@@ -182,10 +182,6 @@ void menu_update_cputype(void) {
Section_prop * cpu_section = static_cast<Section_prop *>(control->GetSection("cpu"));
const std::string cpu_sec_type = cpu_section->Get_string("cputype");
bool is486 =
(CPU_ArchitectureType == CPU_ARCHTYPE_486OLD) ||
(CPU_ArchitectureType == CPU_ARCHTYPE_486NEW);
mainMenu.get_item("cputype_auto").
check(CPU_ArchitectureType == CPU_ARCHTYPE_MIXED).
refresh_item(mainMenu);
@@ -217,11 +213,18 @@ void menu_update_cputype(void) {
check(CPU_ArchitectureType == CPU_ARCHTYPE_386 && (cpudecoder == &CPU_Core_Prefetch_Run)).
enable(cpudecoder == &CPU_Core_Normal_Run || cpudecoder == &CPU_Core_Prefetch_Run).
refresh_item(mainMenu);
mainMenu.get_item("cputype_486old").
check(CPU_ArchitectureType == CPU_ARCHTYPE_486OLD && (cpudecoder != &CPU_Core_Prefetch_Run)).
refresh_item(mainMenu);
mainMenu.get_item("cputype_486old_prefetch").
check(CPU_ArchitectureType == CPU_ARCHTYPE_486OLD && (cpudecoder == &CPU_Core_Prefetch_Run)).
enable(cpudecoder == &CPU_Core_Normal_Run || cpudecoder == &CPU_Core_Prefetch_Run).
refresh_item(mainMenu);
mainMenu.get_item("cputype_486").
check(is486 && (cpudecoder != &CPU_Core_Prefetch_Run)).
check(CPU_ArchitectureType == CPU_ARCHTYPE_486NEW && (cpudecoder != &CPU_Core_Prefetch_Run)).
refresh_item(mainMenu);
mainMenu.get_item("cputype_486_prefetch").
check(is486 && (cpudecoder == &CPU_Core_Prefetch_Run)).
check(CPU_ArchitectureType == CPU_ARCHTYPE_486NEW && (cpudecoder == &CPU_Core_Prefetch_Run)).
enable(cpudecoder == &CPU_Core_Normal_Run || cpudecoder == &CPU_Core_Prefetch_Run).
refresh_item(mainMenu);
mainMenu.get_item("cputype_pentium").
@@ -3042,10 +3045,15 @@ class CPU: public Module_base {
set_text("386").set_callback_function(CpuType_ByName);
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"cputype_386_prefetch").
set_text("386 with prefetch").set_callback_function(CpuType_ByName);
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"cputype_486old").
set_text("486 (old)").set_callback_function(CpuType_ByName);
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"cputype_486old_prefetch").
set_text("486 (old) with prefetch").set_callback_function(CpuType_ByName);
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"cputype_486").
set_text("486").set_callback_function(CpuType_ByName);
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"cputype_486_prefetch").
set_text("486 with prefetch").set_callback_function(CpuType_ByName);
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"cputype_pentium").
set_text("Pentium").set_callback_function(CpuType_ByName);
mainMenu.alloc_item(DOSBoxMenu::item_type_id,"cputype_pentium_mmx").
@@ -3274,6 +3282,20 @@ class CPU: public Module_base {
} else {
E_Exit("prefetch queue emulation requires the normal core setting.");
}
} else if (cputype == "486old") {
CPU_ArchitectureType = CPU_ARCHTYPE_486OLD;
} else if (cputype == "486old_prefetch") {
CPU_ArchitectureType = CPU_ARCHTYPE_486OLD;
if (core == "normal") {
cpudecoder=&CPU_Core_Prefetch_Run;
CPU_PrefetchQueueSize = 16;
} else if (core == "auto") {
cpudecoder=&CPU_Core_Prefetch_Run;
CPU_PrefetchQueueSize = 16;
CPU_AutoDetermineMode&=(~CPU_AUTODETERMINE_CORE);
} else {
E_Exit("prefetch queue emulation requires the normal core setting.");
}
} else if (cputype == "pentium") {
CPU_ArchitectureType = CPU_ARCHTYPE_PENTIUM;
} else if (cputype == "pentium_mmx") {
@@ -816,7 +816,7 @@ void DOSBOX_SetupConfigSections(void) {
const char* capturechromaformats[] = { "auto", "4:4:4", "4:2:2", "4:2:0", 0};
const char* controllertypes[] = { "auto", "at", "xt", "pcjr", "pc98", 0}; // Future work: Tandy(?) and USB
const char* auxdevices[] = {"none","2button","3button","intellimouse","intellimouse45",0};
const char* cputype_values[] = {"auto", "8086", "8086_prefetch", "80186", "80186_prefetch", "286", "286_prefetch", "386", "386_prefetch", "486", "486_prefetch", "pentium", "pentium_mmx", "ppro_slow", 0};
const char* cputype_values[] = {"auto", "8086", "8086_prefetch", "80186", "80186_prefetch", "286", "286_prefetch", "386", "386_prefetch", "486old", "486old_prefetch", "486", "486_prefetch", "pentium", "pentium_mmx", "ppro_slow", 0};
const char* rates[] = { "44100", "48000", "32000","22050", "16000", "11025", "8000", "49716", 0 };
const char* oplrates[] = { "44100", "49716", "48000", "32000","22050", "16000", "11025", "8000", 0 };
const char* devices[] = { "default", "win32", "alsa", "oss", "coreaudio", "coremidi", "mt32", "synth", "timidity", "none", 0}; // FIXME: add some way to offer the actually available choices.
@@ -694,6 +694,8 @@ static const char *def_menu_cpu_type[] = {
"cputype_286_prefetch",
"cputype_386",
"cputype_386_prefetch",
"cputype_486old",
"cputype_486old_prefetch",
"cputype_486",
"cputype_486_prefetch",
"cputype_pentium",

0 comments on commit 59fe77e

Please sign in to comment.