Correct CS:IP initialisation on 286+ reset. Patch from Greatpsycho.
This commit is contained in:
parent
40ddf31d30
commit
8a5b552a9a
2 changed files with 36 additions and 5 deletions
12
src/x86seg.c
12
src/x86seg.c
|
|
@ -68,6 +68,18 @@ static void seg_reset(x86seg *s)
|
|||
s->limit = 0xFFFF;
|
||||
s->limit_low = 0;
|
||||
s->limit_high = 0xffff;
|
||||
if (s == &_cs)
|
||||
{
|
||||
// TODO - When the PC is reset, initialization of the CS descriptor must be like the annotated line below.
|
||||
//s->base = AT ? (cpu_16bitbus ? 0xFF0000 : 0xFFFF0000) : 0xFFFF0;
|
||||
s->base = AT ? 0xF0000 : 0xFFFF0;
|
||||
s->seg = AT ? 0xF000 : 0xFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
s->base = 0;
|
||||
s->seg = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void x86seg_reset()
|
||||
|
|
|
|||
Loading…
Reference in a new issue