--- np2/io/iocore.h 2004/03/19 00:30:01 1.10 +++ np2/io/iocore.h 2007/11/03 00:00:20 1.14 @@ -6,11 +6,11 @@ #define IOINPCALL #endif +typedef void (*FNIORESET)(const NP2CFG *pConfig); +typedef void (*FNIOBIND)(void); typedef void (IOOUTCALL *IOOUT)(UINT port, REG8 val); typedef REG8 (IOINPCALL *IOINP)(UINT port); -typedef void (*IOCBFN)(void); - #include "lsidef.h" #include "artic.h" @@ -30,7 +30,6 @@ typedef void (*IOCBFN)(void); #include "necio.h" #include "nmiio.h" #include "np2sysp.h" -#include "pcidev.h" #include "pic.h" #include "pit.h" #include "printif.h" @@ -38,6 +37,10 @@ typedef void (*IOCBFN)(void); #include "sysport.h" #include "upd4990.h" +#if defined(SUPPORT_PC9821) +#include "pcidev.h" +#endif + #ifdef __cplusplus extern "C" { @@ -66,6 +69,10 @@ extern _RS232C rs232c; extern _SYSPORT sysport; extern _UPD4990 uPD4990; +#if defined(SUPPORT_PC9821) +extern _PCIDEV pcidev; +#endif + // I/O - 8bit decode void iocore_attachcmnout(UINT port, IOOUT func); @@ -84,19 +91,20 @@ void iocore_attachsysinpex(UINT port, UI const IOINP *func, UINT funcs); // サウンドI/O - 12bit decode -BOOL iocore_attachsndout(UINT port, IOOUT func); -BOOL iocore_attachsndinp(UINT port, IOINP func); +BRESULT iocore_attachsndout(UINT port, IOOUT func); +BRESULT iocore_attachsndinp(UINT port, IOINP func); // 拡張I/O - 16bit decode -BOOL iocore_attachout(UINT port, IOOUT func); -BOOL iocore_attachinp(UINT port, IOINP func); +BRESULT iocore_attachout(UINT port, IOOUT func); +BRESULT iocore_attachinp(UINT port, IOINP func); void iocore_create(void); void iocore_destroy(void); -BOOL iocore_build(void); +BRESULT iocore_build(void); -void iocore_cb(const IOCBFN *cbfn, UINT count); -void iocore_reset(void); +void iocore_cbreset(const FNIORESET *pfn, UINT uCount, const NP2CFG *pConfig); +void iocore_cbbind(const FNIOBIND *pfn, UINT uCount); +void iocore_reset(const NP2CFG *pConfig); void iocore_bind(void); void IOOUTCALL iocore_out8(UINT port, REG8 dat);