From 1780f7023289dfa6a4626ed08dec71a5ecd76fc9 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 27 Jul 2003 22:53:37 +0000 Subject: [PATCH] Core_full cpu decoder starts up when protected mode is enabled. Small change for certain flag bits always being on/off Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1169 --- src/cpu/cpu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp index a70c5d22..c44dcd7a 100644 --- a/src/cpu/cpu.cpp +++ b/src/cpu/cpu.cpp @@ -86,7 +86,7 @@ PhysPt SelBase(Bitu sel) { } void CPU_SetFlags(Bitu word) { - flags.word=word; + flags.word=(word|2)&~0x14; } bool CPU_CheckCodeType(CODE_TYPE type) { @@ -524,6 +524,7 @@ bool CPU_SET_CRX(Bitu cr,Bitu value) { cpu.pmode=true; LOG_MSG("Protected mode"); PAGING_Enable((value & CR0_PAGING)>0); + CPU_Core_Full_Start(cpu.code.big); } else { cpu.pmode=false; PAGING_Enable(false); @@ -850,7 +851,7 @@ void CPU_Init(Section* sec) { SegSet16(ss,0); reg_eip=0; - flags.word=FLAG_IF; + CPU_SetFlags(FLAG_IF); //Enable interrupts cpu.cr0=0xffffffff; CPU_SET_CRX(0,0); //Initialize cpu.v86=false;