--- np2/io/cpuio.c 2003/12/08 00:55:32 1.4 +++ np2/io/cpuio.c 2003/12/25 19:26:55 1.6 @@ -6,7 +6,7 @@ #include "fmboard.h" // 後で調整 -#if defined(CPU386) +#if defined(CPUCORE_IA32) DWORD cpumem_addrmask = 0xfffff; #endif @@ -16,11 +16,11 @@ DWORD cpumem_addrmask = 0xfffff; static void IOOUTCALL cpuio_of0(UINT port, REG8 dat) { CPU_ADRSMASK = 0x0fffff; -#if defined(CPU386) +#if defined(CPUCORE_IA32) cpumem_addrmask = 0xfffff; #endif CPU_RESETREQ = 1; - CPU_INTERRUPT(0x02); +// CPU_INTERRUPT(0x02); nevent_forceexit(); (void)port; (void)dat; @@ -28,8 +28,8 @@ static void IOOUTCALL cpuio_of0(UINT por static void IOOUTCALL cpuio_of2(UINT port, REG8 dat) { - CPU_ADRSMASK = 0x1fffff; -#if defined(CPU386) + CPU_ADRSMASK = 0xffffffff; +#if defined(CPUCORE_IA32) cpumem_addrmask = 0xffffffff; #endif (void)port; @@ -54,34 +54,27 @@ static REG8 IOINPCALL cpuio_if2(UINT por REG8 ret; -#if 1 ret = 0xff; ret -= (REG8)((CPU_ADRSMASK >> 20) & 1); -#else - ret = 0xfe; - if (CPU_ADRSMASK != 0x1fffff) { - ret++; - } -#endif (void)port; return(ret); } -#ifdef CPU386 // defineを変えてね +#if defined(CPUCORE_IA32) static void IOOUTCALL cpuio_of6(UINT port, REG8 dat) { switch(dat) { case 0x02: - CPU_ADRSMASK = 0x1fffff; -#if defined(CPU_386) + CPU_ADRSMASK = 0xffffffff; +#if defined(CPUCORE_IA32) cpumem_addrmask = 0xffffffff; #endif break; case 0x03: CPU_ADRSMASK = 0x0fffff; -#if defined(CPU_386) +#if defined(CPUCORE_IA32) cpumem_addrmask = 0xfffff; #endif break; @@ -94,7 +87,7 @@ static REG8 IOINPCALL cpuio_if6(UINT por REG8 ret; ret = 0x00; - if (CPU_ADRSMASK != 0x1fffff) { + if (!(CPU_ADRSMASK & (1 << 20))) { ret |= 0x01; } if (nmiio.enable) { @@ -108,7 +101,7 @@ static REG8 IOINPCALL cpuio_if6(UINT por // ---- I/F -#ifndef CPU386 // defineを変えてね +#if !defined(CPUCORE_IA32) static const IOOUT cpuioof0[8] = { cpuio_of0, cpuio_of2, NULL, NULL, NULL, NULL, NULL, NULL};