--- np2/i286x/i286x.cpp 2003/12/09 15:49:14 1.8 +++ np2/i286x/i286x.cpp 2003/12/25 20:30:22 1.13 @@ -5,7 +5,6 @@ #include "i286xs.h" #include "i286xrep.h" #include "i286xcts.h" -#include "memory.h" #include "pccore.h" #include "iocore.h" #include "i286x.mcr" @@ -61,11 +60,33 @@ void i286x_initialize(void) { void i286x_reset(void) { ZeroMemory(&i286core.s, sizeof(i286core.s)); - I286_CS = 0x1fc0; - CS_BASE = 0x1fc00; + I286_CS = 0xf000; + CS_BASE = 0xf0000; + I286_IP = 0xfff0; i286core.s.adrsmask = 0xfffff; } +void i286x_shut(void) { + + I286_MSW = 0; + + I286_ES = 0; + I286_CS = 0xf000; + I286_SS = 0; + I286_DS = 0; + + ES_BASE = 0; + CS_BASE = 0xf0000; + SS_BASE = 0; + DS_BASE = 0; + SS_FIX = 0; + DS_FIX = 0; + + I286_IP = 0xfff0; + I286_ADRSMASK = 0xfffff; + i286x_resetprefetch(); +} + LABEL void i286x_resetprefetch(void) { @@ -2678,7 +2699,7 @@ I286 _popf(void) { // 9D: popf not ax test al, pic.pi[0].irr jne irqcheck - test al, pic.pi[1].irr + test ah, pic.pi[1].irr jne irqcheck nextop: ret @@ -3608,7 +3629,7 @@ I286 _iret(void) { // CF: iret not ax test al, pic.pi[0].irr jne irqcheck - test al, pic.pi[1].irr + test ah, pic.pi[1].irr jne irqcheck nextop: ret @@ -4212,7 +4233,7 @@ I286 _sti(void) { // FB: sti not ax test al, pic.pi[0].irr jne nextopandexit - test al, pic.pi[1].irr + test ah, pic.pi[1].irr jne nextopandexit jmp_nextop: jmp i286op[ebp*4]