--- np2/io/cpuio.c 2003/10/16 17:57:50 1.1 +++ np2/io/cpuio.c 2003/12/01 10:45:46 1.3 @@ -1,6 +1,5 @@ #include "compiler.h" #include "i286.h" -#include "memory.h" #include "pccore.h" #include "iocore.h" #include "sound.h" @@ -11,8 +10,8 @@ static void IOOUTCALL cpuio_of0(UINT port, BYTE dat) { - cpuio.reset_req = 1; - extmem.adrsmask = 0x0fffff; + i286core.s.adrsmask = 0x0fffff; + i286core.s.resetreq = 1; i286_interrupt(0x02); nevent_forceexit(); (void)port; @@ -21,7 +20,7 @@ static void IOOUTCALL cpuio_of0(UINT por static void IOOUTCALL cpuio_of2(UINT port, BYTE dat) { - extmem.adrsmask = 0x1fffff; + i286core.s.adrsmask = 0x1fffff; (void)port; (void)dat; } @@ -45,7 +44,7 @@ static BYTE IOINPCALL cpuio_if2(UINT por BYTE ret; ret = 0xfe; - if (extmem.adrsmask != 0x1fffff) { + if (i286core.s.adrsmask != 0x1fffff) { ret++; } (void)port; @@ -58,11 +57,11 @@ static void IOOUTCALL cpuio_of6(UINT por switch(dat) { case 0x02: - extmem.adrsmask = 0x1fffff; + i286core.s.adrsmask = 0x1fffff; break; case 0x03: - extmem.adrsmask = 0x0fffff; + i286core.s.adrsmask = 0x0fffff; break; } (void)port; @@ -73,7 +72,7 @@ static BYTE IOINPCALL cpuio_if6(UINT por BYTE ret; ret = 0x00; - if (extmem.adrsmask != 0x1fffff) { + if (i286core.s.adrsmask != 0x1fffff) { ret |= 0x01; } if (nmi.enable) { @@ -105,11 +104,6 @@ static const IOINP cpuioif0[8] = { NULL, NULL, NULL, NULL}; #endif -void cpuio_reset(void) { - - ZeroMemory(&cpuio, sizeof(cpuio)); -} - void cpuio_bind(void) { iocore_attachsysoutex(0x00f0, 0x0cf1, cpuioof0, 8);