Pre-386 CPUs don't clear integer registers on soft reset. Patch from Greatpsycho.
This commit is contained in:
parent
cac99a8bf4
commit
e3b9ed13fc
1 changed files with 9 additions and 2 deletions
11
src/808x.c
11
src/808x.c
|
|
@ -677,8 +677,15 @@ void softresetx86()
|
|||
//rammask=0xFFFFFFFF;
|
||||
cpu_state.flags=2;
|
||||
idt.base = 0;
|
||||
idt.limit = is386 ? 0x03FF : 0xFFFF;
|
||||
EAX = EBX = ECX = EDX = ESI = EDI = EBP = ESP = 0;
|
||||
if (is386)
|
||||
{
|
||||
idt.limit = 0x03FF;
|
||||
EAX = EBX = ECX = EDX = ESI = EDI = EBP = ESP = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
idt.limit = 0xFFFF;
|
||||
}
|
||||
x86seg_reset();
|
||||
flushmmucache();
|
||||
x86_was_reset = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue