--- np2/io/egc.c 2003/10/25 10:19:57 1.4 +++ np2/io/egc.c 2005/02/08 09:19:00 1.8 @@ -1,8 +1,8 @@ #include "compiler.h" -#include "memory.h" -#include "egcmem.h" +#include "cpucore.h" #include "pccore.h" #include "iocore.h" +#include "memegc.h" #include "vram.h" @@ -19,7 +19,7 @@ static const UINT16 maskword[16][4] = { {0x0000,0xffff,0xffff,0xffff}, {0xffff,0xffff,0xffff,0xffff}}; -static void IOOUTCALL egc_o4a0(UINT port, BYTE value) { +static void IOOUTCALL egc_o4a0(UINT port, REG8 value) { if (!(vramop.operate & VOP_EGCBIT)) { return; @@ -91,22 +91,26 @@ static void IOOUTCALL egc_o4a0(UINT port egc.sft &= 0xff00; egc.sft |= value; egcshift(); + egc.srcmask.w = 0xffff; break; case 0x0d: egc.sft &= 0x00ff; egc.sft |= value << 8; egcshift(); + egc.srcmask.w = 0xffff; break; case 0x0e: egc.leng &= 0xff00; egc.leng |= value; egcshift(); + egc.srcmask.w = 0xffff; break; case 0x0f: egc.leng &= 0x00ff; egc.leng |= value << 8; egcshift(); + egc.srcmask.w = 0xffff; break; } } @@ -119,6 +123,7 @@ void egc_reset(void) { egc.mask.w = 0xffff; egc.leng = 0x000f; egcshift(); + egc.srcmask.w = 0xffff; } void egc_bind(void) { @@ -130,7 +135,7 @@ void egc_bind(void) { } } -void IOOUTCALL egc_w16(UINT port, UINT16 value) { +void IOOUTCALL egc_w16(UINT port, REG16 value) { if (!(vramop.operate & VOP_EGCBIT)) { return; @@ -171,11 +176,13 @@ void IOOUTCALL egc_w16(UINT port, UINT16 case 0x0c: egc.sft = value; egcshift(); + egc.srcmask.w = 0xffff; break; case 0x0e: egc.leng = value; egcshift(); + egc.srcmask.w = 0xffff; break; } }