--- np2/io/cgrom.c 2003/10/21 11:22:05 1.2 +++ np2/io/cgrom.c 2003/12/12 01:04:40 1.5 @@ -1,5 +1,5 @@ #include "compiler.h" -#include "memory.h" +#include "cpucore.h" #include "pccore.h" #include "iocore.h" #include "font.h" @@ -41,7 +41,7 @@ static void cgwindowset(CGROM cr) { // ---- I/O // write charactor code low -static void IOOUTCALL cgrom_oa1(UINT port, BYTE dat) { +static void IOOUTCALL cgrom_oa1(UINT port, REG8 dat) { CGROM cr; @@ -52,7 +52,7 @@ static void IOOUTCALL cgrom_oa1(UINT por } // write charactor code high -static void IOOUTCALL cgrom_oa3(UINT port, BYTE dat) { +static void IOOUTCALL cgrom_oa3(UINT port, REG8 dat) { CGROM cr; @@ -63,7 +63,7 @@ static void IOOUTCALL cgrom_oa3(UINT por } // write charactor line -static void IOOUTCALL cgrom_oa5(UINT port, BYTE dat) { +static void IOOUTCALL cgrom_oa5(UINT port, REG8 dat) { CGROM cr; @@ -75,26 +75,26 @@ static void IOOUTCALL cgrom_oa5(UINT por } // CG write pattern -static void IOOUTCALL cgrom_oa9(UINT port, BYTE dat) { +static void IOOUTCALL cgrom_oa9(UINT port, REG8 dat) { CGROM cr; cr = &cgrom; if ((cr->code & 0x007e) == 0x0056) { - font[((cr->code & 0x7f7f) << 4) + - cr->lr + cr->line] = dat; + fontrom[((cr->code & 0x7f7f) << 4) + + cr->lr + cr->line] = (UINT8)dat; cgwindow.writable |= 0x80; } (void)port; } -static BYTE IOINPCALL cgrom_ia9(UINT port) { +static REG8 IOINPCALL cgrom_ia9(UINT port) { CGROM cr; - BYTE *ptr; +const BYTE *ptr; cr = &cgrom; - ptr = font; + ptr = fontrom; if (cr->code & 0xff00) { ptr += (cr->code & 0x7f7f) << 4; ptr += cr->lr;