--- np2/io/np2sysp.c 2005/02/14 06:25:31 1.17 +++ np2/io/np2sysp.c 2007/11/03 00:00:20 1.23 @@ -119,6 +119,8 @@ static void np2sysp_hwreset(const void * // ---- static const char cmd_np2[] = "NP2"; +static const OEMCHAR rep_np2[] = OEMTEXT("NP2"); + static const char cmd_ver[] = "ver"; static const char cmd_poweroff[] = "poweroff"; static const char cmd_credit[] = "credit"; @@ -138,6 +140,7 @@ static const char cmd_hdrvcheck[] = "che static const char cmd_hdrvopen[] = "open_hostdrv"; static const char cmd_hdrvclose[] = "close_hostdrv"; static const char cmd_hdrvintr[] = "intr_hostdrv"; +static const OEMCHAR rep_hdrvcheck[] = OEMTEXT("0.74"); #endif #if defined(NP2SYSP_VER) @@ -154,7 +157,7 @@ static const OEMCHAR str_syspcredit[] = static const SYSPCMD np2spcmd[] = { - {cmd_np2, np2sysp_outstr, str_np2, 0}, + {cmd_np2, np2sysp_outstr, rep_np2, 0}, {cmd_ver, np2sysp_outstr, str_syspver, 0}, // version:A @@ -179,7 +182,7 @@ static const SYSPCMD np2spcmd[] = { #endif #if defined(SUPPORT_HOSTDRV) - {cmd_hdrvcheck, np2sysp_outstr, OEMTEXT("0.74"),0}, + {cmd_hdrvcheck, np2sysp_outstr, rep_hdrvcheck, 0}, {cmd_hdrvopen, hostdrv_mount, NULL, 0}, {cmd_hdrvclose, hostdrv_unmount, NULL, 0}, {cmd_hdrvintr, hostdrv_intr, NULL, 0}, @@ -187,24 +190,24 @@ static const SYSPCMD np2spcmd[] = { }; -static BOOL np2syspcmp(const char *p) { +static BRESULT np2syspcmp(const char *p) { int len; int pos; - len = strlen(p); + len = (int)STRLEN(p); if (!len) { - return(TRUE); + return(FAILURE); } pos = np2sysp.strpos; while(len--) { if (p[len] != np2sysp.substr[pos]) { - return(TRUE); + return(FAILURE); } pos--; pos &= NP2SYSP_MASK; } - return(FALSE); + return(SUCCESS); } static void IOOUTCALL np2sysp_o7ed(UINT port, REG8 dat) { @@ -256,12 +259,27 @@ static REG8 IOINPCALL np2sysp_i7ef(UINT return(ret); } +#if defined(NP2APPDEV) +static void IOOUTCALL np2sysp_o0e9(UINT port, REG8 dat) { + + APPDEVOUT(dat); + (void)port; +} + +static REG8 IOINPCALL np2sysp_i0e9(UINT port) { + + return((UINT8)port); +} +#endif + // ---- I/F -void np2sysp_reset(void) { +void np2sysp_reset(const NP2CFG *pConfig) { ZeroMemory(&np2sysp, sizeof(np2sysp)); + + (void)pConfig; } void np2sysp_bind(void) { @@ -270,5 +288,10 @@ void np2sysp_bind(void) { iocore_attachout(0x07ef, np2sysp_o7ef); iocore_attachinp(0x07ef, np2sysp_i7ed); iocore_attachinp(0x07ef, np2sysp_i7ef); + +#if defined(NP2APPDEV) + iocore_attachout(0x00e9, np2sysp_o0e9); + iocore_attachinp(0x00e9, np2sysp_i0e9); +#endif }