--- np2/i286a/i286a.c 2003/12/25 19:26:55 1.4 +++ np2/i286a/i286a.c 2004/01/07 12:51:29 1.8 @@ -73,20 +73,29 @@ const UINT8 iflags[512] = { // Z_FLA // ---- -void i286a_reset(void) { +static void i286a_initreg(void) { - ZeroMemory(&CPU_STATSAVE, sizeof(CPU_STATSAVE)); - CPU_CS = 0xffff; - CS_BASE = 0xffff0; + CPU_CS = 0xf000; + CS_BASE = 0xf0000; + CPU_IP = 0xfff0; CPU_ADRSMASK = 0xfffff; } +void i286a_reset(void) { + +#if 0 + if (offsetof(I286CORE, m) != 120) { + exit(1); + } +#endif + ZeroMemory(&i286acore.s, sizeof(i286acore.s)); + i286a_initreg(); +} + void i286a_shut(void) { - CPU_CS = 0xffff; - CS_BASE = 0xffff0; - CPU_IP = 0; - CPU_ADRSMASK = 0xfffff; + ZeroMemory(&i286acore.s, offsetof(I286STAT, cpu_type)); + i286a_initreg(); }