1
0
Fork 0

swap simple/normal core again; have some stack exception executed instead of exiting dosbox

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2752
This commit is contained in:
Sebastian Strohhäcker 2007-01-11 16:31:10 +00:00
parent 267d7bfeb1
commit 872b63bb49
2 changed files with 9 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.92 2007-01-09 17:18:52 c2woody Exp $ */
/* $Id: cpu.cpp,v 1.93 2007-01-11 16:31:10 c2woody Exp $ */
#include <assert.h>
#include "dosbox.h"
@ -1813,8 +1813,8 @@ bool CPU_SetSegGeneral(SegNames seg,Bitu value) {
}
if (!desc.saved.seg.p) {
E_Exit("CPU_SetSegGeneral: Stack segment not present"); // or #SS(sel)
// return CPU_PrepareException(EXCEPTION_SS,value & 0xfffc);
// E_Exit("CPU_SetSegGeneral: Stack segment not present"); // or #SS(sel)
return CPU_PrepareException(EXCEPTION_SS,value & 0xfffc);
}
Segs.val[seg]=value;
@ -2072,11 +2072,11 @@ public:
CPU_CycleUp=section->Get_int("cycleup");
CPU_CycleDown=section->Get_int("cycledown");
const char * core=section->Get_string("core");
cpudecoder=&CPU_Core_Simple_Run;
cpudecoder=&CPU_Core_Normal_Run;
if (!strcasecmp(core,"normal")) {
cpudecoder=&CPU_Core_Simple_Run;
} else if (!strcasecmp(core,"force_normal")) {
cpudecoder=&CPU_Core_Normal_Run;
} else if (!strcasecmp(core,"simple")) {
cpudecoder=&CPU_Core_Simple_Run;
} else if (!strcasecmp(core,"full")) {
cpudecoder=&CPU_Core_Full_Run;
}
@ -2088,7 +2088,7 @@ public:
cpudecoder=&CPU_Core_Dyn_X86_Run;
CPU_Core_Dyn_X86_SetFPUMode(false);
} else if (!strcasecmp(core,"auto")) {
cpudecoder=&CPU_Core_Simple_Run;
cpudecoder=&CPU_Core_Normal_Run;
CPU_AutoDetermineMode|=CPU_AUTODETERMINE_CORE;
}
#endif

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos_execute.cpp,v 1.59 2007-01-10 12:04:35 qbix79 Exp $ */
/* $Id: dos_execute.cpp,v 1.60 2007-01-11 16:31:10 c2woody Exp $ */
#include <string.h>
#include <ctype.h>
@ -27,7 +27,6 @@
#include "callback.h"
#include "debug.h"
#include "cpu.h"
#include "paging.h"
const char * RunningProgram="DOSBOX";
@ -154,8 +153,7 @@ bool DOS_Terminate(bool tsr) {
}
#if (C_DYNAMIC_X86)
if (CPU_AutoDetermineMode&CPU_AUTODETERMINE_CORE) {
if (PAGING_Enabled()) cpudecoder=&CPU_Core_Normal_Run;
else cpudecoder=&CPU_Core_Simple_Run;
cpudecoder=&CPU_Core_Normal_Run;
CPU_CycleLeft=0;
CPU_Cycles=0;
}