Protected mode improvements :
- LTR now sets TSS state to busy - LMSW preserves ET bit in CR0 - Fixed PC size in 16-bit system segment on CALL/JMP Patch from Greatpsycho
This commit is contained in:
@@ -628,8 +628,8 @@ void loadcsjmp(uint16_t seg, uint32_t oxpc)
|
||||
return;
|
||||
}
|
||||
type=segdat[2]&0xF00;
|
||||
if (type==0x400) newpc=segdat[0];
|
||||
else newpc=segdat[0]|(segdat[3]<<16);
|
||||
newpc=segdat[0];
|
||||
if (type&0x800) newpc|=segdat[3]<<16;
|
||||
switch (type)
|
||||
{
|
||||
case 0x400: /*Call gate*/
|
||||
@@ -737,6 +737,7 @@ void loadcsjmp(uint16_t seg, uint32_t oxpc)
|
||||
case 0x100: /*286 Task gate*/
|
||||
case 0x900: /*386 Task gate*/
|
||||
cpu_state.pc=oxpc;
|
||||
optype=JMP;
|
||||
cpl_override=1;
|
||||
taskswitch286(seg,segdat,segdat[2]&0x800);
|
||||
flags &= ~NT_FLAG;
|
||||
@@ -874,8 +875,8 @@ void loadcscall(uint16_t seg)
|
||||
segdat[2]=readmemw(0,addr+4);
|
||||
segdat[3]=readmemw(0,addr+6); cpl_override=0; if (cpu_state.abrt) return;
|
||||
type=segdat[2]&0xF00;
|
||||
if (type==0x400) newpc=segdat[0];
|
||||
else newpc=segdat[0]|(segdat[3]<<16);
|
||||
newpc=segdat[0];
|
||||
if (type&0x800) newpc|=segdat[3]<<16;
|
||||
|
||||
if (csout) pclog("Code seg call - %04X - %04X %04X %04X\n",seg,segdat[0],segdat[1],segdat[2]);
|
||||
if (segdat[2]&0x1000)
|
||||
@@ -900,7 +901,7 @@ void loadcscall(uint16_t seg)
|
||||
}
|
||||
if (!(segdat[2]&0x8000))
|
||||
{
|
||||
x86np("Load CS call not present", seg & 0xfffc);
|
||||
x86ss("Load CS call not present", seg & 0xfffc);
|
||||
return;
|
||||
}
|
||||
set_use32(segdat[3]&0x40);
|
||||
|
||||
Reference in New Issue
Block a user