--- np2/io/iocore.c 2004/01/27 07:24:25 1.8 +++ np2/io/iocore.c 2004/03/19 00:30:01 1.13 @@ -21,8 +21,9 @@ _GDC gdc; _GDCS gdcs; _GRCG grcg; - _KEYB keyb; + _KEYBRD keybrd; _MOUSEIF mouseif; + _NECIO necio; _NMIIO nmiio; _NP2SYSP np2sysp; _PIC pic; @@ -49,6 +50,7 @@ typedef struct { typedef struct { IOFUNC base[256]; + UINT busclock; LISTARRAY iotbl; } _IOCORE, *IOCORE; @@ -432,6 +434,9 @@ static const IOCBFN resetfn[] = { #if !defined(CPUCORE_IA32) emsio_reset, #endif +#if defined(SUPPORT_PC9821) + pcidev_reset, +#endif }; static const IOCBFN bindfn[] = { @@ -451,6 +456,9 @@ static const IOCBFN bindfn[] = { #if !defined(CPUCORE_IA32) emsio_bind, #endif +#if defined(SUPPORT_PC9821) + pcidev_bind, +#endif }; @@ -469,6 +477,7 @@ void iocore_reset(void) { void iocore_bind(void) { + iocore.busclock = pccore.multiple; iocore_cb(bindfn, sizeof(bindfn)/sizeof(IOCBFN)); } @@ -476,6 +485,8 @@ void IOOUTCALL iocore_out8(UINT port, RE IOFUNC iof; +// VERBOSE(("iocore_out8(%x, %x)", port, dat)); + CPU_REMCLOCK -= iocore.busclock; iof = iocore.base[(port >> 8) & 0xff]; iof->ioout[port & 0xff](port, dat); } @@ -484,6 +495,8 @@ REG8 IOINPCALL iocore_inp8(UINT port) { IOFUNC iof; +// VERBOSE(("iocore_inp8(%x)", port)); + CPU_REMCLOCK -= iocore.busclock; iof = iocore.base[(port >> 8) & 0xff]; return(iof->ioinp[port & 0xff](port)); } @@ -492,6 +505,7 @@ void IOOUTCALL iocore_out16(UINT port, R IOFUNC iof; + CPU_REMCLOCK -= iocore.busclock; if ((port & 0xfff1) == 0x04a0) { egc_w16(port, dat); return; @@ -522,6 +536,7 @@ REG16 IOINPCALL iocore_inp16(UINT port) IOFUNC iof; REG8 ret; + CPU_REMCLOCK -= iocore.busclock; if ((port & 0xfffc) == 0x005c) { return(artic_r16(port)); }