diff options
author | 2011-05-18 16:24:02 +0000 | |
---|---|---|
committer | 2011-05-18 16:24:02 +0000 | |
commit | d96852828bfe9368712de3cb6ac1d5bebae9e247 (patch) | |
tree | f36a0ad5e337217e1bac2b7d0522f4c6d29b0114 /src/emu/cpu/i86/i286.c | |
parent | 8f7dba221cc1666ca3c18653191ce900f592fa06 (diff) |
i286 - More protected mode fixes by Carl (no whatsnew)
Diffstat (limited to 'src/emu/cpu/i86/i286.c')
-rw-r--r-- | src/emu/cpu/i86/i286.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c index 2765070e70c..085a1628470 100644 --- a/src/emu/cpu/i86/i286.c +++ b/src/emu/cpu/i86/i286.c @@ -170,6 +170,7 @@ static CPU_RESET( i80286 ) cpustate->ldtr.rights=cpustate->tr.rights=0; cpustate->ldtr.sel=cpustate->tr.sel=0; cpustate->rep_in_progress = FALSE; + cpustate->seg_prefix = FALSE; CHANGE_PC(cpustate->pc); @@ -239,10 +240,12 @@ static CPU_EXECUTE( i80286 ) debugger_instruction_hook(device, cpustate->pc); cpustate->seg_prefix=FALSE; - cpustate->prevpc = cpustate->pc; - try { + if (PM && ((cpustate->pc-cpustate->base[CS]) > cpustate->limit[CS])) + throw TRAP(GENERAL_PROTECTION_FAULT, cpustate->sregs[CS] & ~3); + cpustate->prevpc = cpustate->pc; + TABLE286 // call instruction } catch (UINT32 e) |