--- np2/i386c/memory.c 2004/01/05 15:47:18 1.7 +++ np2/i386c/memory.c 2004/01/25 05:41:29 1.8 @@ -14,6 +14,7 @@ BYTE mem[0x200000]; +// これ要る?? #define USE_HIMEM 0x10fff0 // ---- write byte @@ -183,11 +184,6 @@ static void MEMCALL egc_wt(UINT32 addres egc_write(address, value); } -static void MEMCALL emmc_wt(UINT32 address, REG8 value) { - - extmem.pageptr[(address >> 14) & 3][LOW14(address)] = (BYTE)value; -} - static void MEMCALL i286_wb(UINT32 address, REG8 value) { mem[address + 0x1c8000 - 0xe8000] = (BYTE)value; @@ -288,11 +284,6 @@ static REG8 MEMCALL egc_rd(UINT32 addres return(egc_read(address)); } -static REG8 MEMCALL emmc_rd(UINT32 address) { - - return(extmem.pageptr[(address >> 14) & 3][LOW14(address)]); -} - static REG8 MEMCALL i286_rb(UINT32 address) { if (CPU_ITFBANK) { @@ -465,20 +456,6 @@ static void MEMCALL egcw_wt(UINT32 addre } } -static void MEMCALL emmcw_wt(UINT32 address, REG16 value) { - - BYTE *ptr; - - if ((address & 0x3fff) != 0x3fff) { - ptr = extmem.pageptr[(address >> 14) & 3] + LOW14(address); - STOREINTELWORD(ptr, value); - } - else { - extmem.pageptr[(address >> 14) & 3][0x3fff] = (BYTE)value; - extmem.pageptr[((address + 1) >> 14) & 3][0] = (BYTE)(value >> 8); - } -} - static void MEMCALL i286w_wb(UINT32 address, REG16 value) { mem[address + 0x1c8000 - 0xe8000] = (BYTE)value; @@ -611,22 +588,6 @@ static REG16 MEMCALL egcw_rd(UINT32 addr } } -static REG16 MEMCALL emmcw_rd(UINT32 address) { - -const BYTE *ptr; - REG16 ret; - - if ((address & 0x3fff) != 0x3fff) { - ptr = extmem.pageptr[(address >> 14) & 3] + LOW14(address); - return(LOADINTELWORD(ptr)); - } - else { - ret = extmem.pageptr[(address >> 14) & 3][0x3fff]; - ret += extmem.pageptr[((address + 1) >> 14) & 3][0] << 8; - return(ret); - } -} - static REG16 MEMCALL i286w_rb(UINT32 address) { if (CPU_ITFBANK) { @@ -675,7 +636,7 @@ static MEMFN memfn = { i286_rd, i286_rd, i286_rd, i286_rd, // 60 i286_rd, i286_rd, i286_rd, i286_rd, // 80 tram_rd, vram_r0, vram_r0, vram_r0, // a0 - emmc_rd, emmc_rd, i286_rd, i286_rd, // c0 + i286_rd, i286_rd, i286_rd, i286_rd, // c0 vram_r0, i286_rd, i286_rd, i286_rb}, // f0 {i286_wt, i286_wt, i286_wt, i286_wt, // 00 @@ -684,7 +645,7 @@ static MEMFN memfn = { i286_wt, i286_wt, i286_wt, i286_wt, // 60 i286_wt, i286_wt, i286_wt, i286_wt, // 80 tram_wt, vram_w0, vram_w0, vram_w0, // a0 - emmc_wt, emmc_wt, i286_wn, i286_wn, // c0 + i286_wn, i286_wn, i286_wn, i286_wn, // c0 vram_w0, i286_wn, i286_wn, i286_wn}, // e0 {i286w_rd, i286w_rd, i286w_rd, i286w_rd, // 00 @@ -693,7 +654,7 @@ static MEMFN memfn = { i286w_rd, i286w_rd, i286w_rd, i286w_rd, // 60 i286w_rd, i286w_rd, i286w_rd, i286w_rd, // 80 tramw_rd, vramw_r0, vramw_r0, vramw_r0, // a0 - emmcw_rd, emmcw_rd, i286w_rd, i286w_rd, // c0 + i286w_rd, i286w_rd, i286w_rd, i286w_rd, // c0 vramw_r0, i286w_rd, i286w_rd, i286w_rb}, // e0 {i286w_wt, i286w_wt, i286w_wt, i286w_wt, // 00 @@ -702,7 +663,7 @@ static MEMFN memfn = { i286w_wt, i286w_wt, i286w_wt, i286w_wt, // 60 i286w_wt, i286w_wt, i286w_wt, i286w_wt, // 80 tramw_wt, vramw_w0, vramw_w0, vramw_w0, // a0 - emmcw_wt, emmcw_wt, i286w_wn, i286w_wn, // c0 + i286w_wn, i286w_wn, i286w_wn, i286w_wn, // c0 vramw_w0, i286w_wn, i286w_wn, i286w_wn}}; // e0 static const MMAPTBL mmaptbl[2] = { @@ -1100,6 +1061,5 @@ const BYTE *out; } } } - #endif