1
0
Fork 0

enable core=auto switching for recompiling core as well

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2957
This commit is contained in:
Sebastian Strohhäcker 2007-08-09 19:52:33 +00:00
parent ef032e575c
commit d404647529
3 changed files with 19 additions and 11 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: cpu.cpp,v 1.102 2007-06-12 20:22:07 c2woody Exp $ */
/* $Id: cpu.cpp,v 1.103 2007-08-09 19:52:32 c2woody Exp $ */
#include <assert.h>
#include <sstream>
@ -1487,11 +1487,16 @@ void CPU_SET_CRX(Bitu cr,Bitu value) {
} else {
GFX_SetTitle(-1,-1,false);
}
#if (C_DYNAMIC_X86)
#if (C_DYNAMIC_X86)
if (CPU_AutoDetermineMode&CPU_AUTODETERMINE_CORE) {
CPU_Core_Dyn_X86_Cache_Init(true);
cpudecoder=&CPU_Core_Dyn_X86_Run;
}
#elif (C_DYNREC)
if (CPU_AutoDetermineMode&CPU_AUTODETERMINE_CORE) {
CPU_Core_Dynrec_Cache_Init(true);
cpudecoder=&CPU_Core_Dynrec_Run;
}
#endif
CPU_AutoDetermineMode<<=CPU_AUTODETERMINE_SHIFT;
} else {
@ -2183,6 +2188,9 @@ public:
#elif (C_DYNREC)
else if (!strcasecmp(core,"dynamic")) {
cpudecoder=&CPU_Core_Dynrec_Run;
} else if (!strcasecmp(core,"auto")) {
cpudecoder=&CPU_Core_Normal_Run;
CPU_AutoDetermineMode|=CPU_AUTODETERMINE_CORE;
}
#endif
else {

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_execute.cpp,v 1.60 2007-01-11 16:31:10 c2woody Exp $ */
/* $Id: dos_execute.cpp,v 1.61 2007-08-09 19:52:33 c2woody Exp $ */
#include <string.h>
#include <ctype.h>
@ -151,7 +151,7 @@ bool DOS_Terminate(bool tsr) {
} else {
GFX_SetTitle(-1,-1,false);
}
#if (C_DYNAMIC_X86)
#if (C_DYNAMIC_X86) || (C_DYNREC)
if (CPU_AutoDetermineMode&CPU_AUTODETERMINE_CORE) {
cpudecoder=&CPU_Core_Normal_Run;
CPU_CycleLeft=0;

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dosbox.cpp,v 1.119 2007-08-07 21:01:08 c2woody Exp $ */
/* $Id: dosbox.cpp,v 1.120 2007-08-09 19:52:33 c2woody Exp $ */
#include <stdlib.h>
#include <stdarg.h>
@ -299,7 +299,7 @@ void DOSBOX_Init(void) {
MSG_Add("DOSBOX_CONFIGFILE_HELP",
"language -- Select another language file.\n"
"memsize -- Amount of memory dosbox has in megabytes.\n"
"memsize -- Amount of memory DOSBox has in megabytes.\n"
"machine -- The type of machine tries to emulate:hercules,cga,tandy,pcjr,vga.\n"
"captures -- Directory where things like wave,midi,screenshot get captured.\n"
);
@ -309,7 +309,7 @@ void DOSBOX_Init(void) {
secprop->Add_bool("aspect",false);
secprop->Add_string("scaler","normal2x");
MSG_Add("RENDER_CONFIGFILE_HELP",
"frameskip -- How many frames dosbox skips before drawing one.\n"
"frameskip -- How many frames DOSBox skips before drawing one.\n"
"aspect -- Do aspect correction, if your output method doesn't support scaling this can slow things down!.\n"
"scaler -- Scaler used to enlarge/enhance low resolution modes.\n"
" Supported are none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x,\n"
@ -320,7 +320,7 @@ void DOSBOX_Init(void) {
);
secprop=control->AddSection_prop("cpu",&CPU_Init,true);//done
#if (C_DYNAMIC_X86)
#if (C_DYNAMIC_X86) || (C_DYNREC)
secprop->Add_string("core","auto");
#else
secprop->Add_string("core","normal");
@ -330,12 +330,12 @@ void DOSBOX_Init(void) {
secprop->Add_int("cycledown",20);
MSG_Add("CPU_CONFIGFILE_HELP",
"core -- CPU Core used in emulation: normal,simple"
#if (C_DYNAMIC_X86)
#if (C_DYNAMIC_X86) || (C_DYNREC)
",dynamic,auto.\n"
" auto switches from normal to dynamic if appropriate"
#endif
".\n"
"cycles -- Amount of instructions dosbox tries to emulate each millisecond.\n"
"cycles -- Amount of instructions DOSBox tries to emulate each millisecond.\n"
" Setting this value too high results in sound dropouts and lags.\n"
" You can also let DOSBox guess the correct value by setting it to max.\n"
" The default setting (auto) switches to max if appropriate.\n"
@ -395,7 +395,7 @@ void DOSBOX_Init(void) {
MSG_Add("SBLASTER_CONFIGFILE_HELP",
"sbtype -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.\n"
"sbbase,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.\n"
"mixer -- Allow the soundblaster mixer to modify the dosbox mixer.\n"
"mixer -- Allow the soundblaster mixer to modify the DOSBox mixer.\n"
"oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3.\n"
" On auto the mode is determined by sblaster type.\n"
" All OPL modes are 'Adlib', except for CMS.\n"