|
|
| version 1.1, 2003/10/16 17:57:56 | version 1.3, 2003/12/08 00:55:32 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "strres.h" | #include "strres.h" |
| #include "taskmng.h" | #include "taskmng.h" |
| #include "i286.h" | #include "cpucore.h" |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| // #include "hostdrv.h" | // #include "hostdrv.h" |
| Line 64 static void np2sysp_cpu(const void *arg1 | Line 64 static void np2sysp_cpu(const void *arg1 |
| // CPUを返す | // CPUを返す |
| #if 1 // 80286 or V30 | #if 1 // 80286 or V30 |
| if (!(CPUTYPE & CPUTYPE_V30)) { | if (!(CPU_TYPE & CPUTYPE_V30)) { |
| np2sysp_outstr(str_80286, NULL); | np2sysp_outstr(str_80286, NULL); |
| } | } |
| else { | else { |
| Line 190 static BOOL np2syspcmp(const char *p) { | Line 190 static BOOL np2syspcmp(const char *p) { |
| return(FALSE); | return(FALSE); |
| } | } |
| static void IOOUTCALL np2sysp_o7bf(UINT port, BYTE dat) { | static void IOOUTCALL np2sysp_o7ef(UINT port, REG8 dat) { |
| UINT i; | const SYSPCMD *cmd; |
| const SYSPCMD *cmdterm; | |
| np2sysp.substr[np2sysp.strpos] = dat; | np2sysp.substr[np2sysp.strpos] = (char)dat; |
| for (i=0; i<(sizeof(np2spcmd)/sizeof(SYSPCMD)); i++) { | cmd = np2spcmd; |
| if (!np2syspcmp(np2spcmd[i].key)) { | cmdterm = cmd + (sizeof(np2spcmd) / sizeof(SYSPCMD)); |
| np2spcmd[i].func(np2spcmd[i].arg1, np2spcmd[i].arg2); | while(cmd < cmdterm) { |
| if (!np2syspcmp(cmd->key)) { | |
| cmd->func(cmd->arg1, cmd->arg2); | |
| break; | break; |
| } | } |
| } | } |
| Line 206 static void IOOUTCALL np2sysp_o7bf(UINT | Line 209 static void IOOUTCALL np2sysp_o7bf(UINT |
| (void)port; | (void)port; |
| } | } |
| static BYTE IOINPCALL np2sysp_i7bf(UINT port) { | static REG8 IOINPCALL np2sysp_i7ef(UINT port) { |
| BYTE ret; | REG8 ret; |
| ret = np2sysp.outstr[np2sysp.outpos]; | ret = (UINT8)np2sysp.outstr[np2sysp.outpos]; |
| if (ret) { | if (ret) { |
| np2sysp.outpos++; | np2sysp.outpos++; |
| np2sysp.outpos &= NP2SYSP_MASK; | np2sysp.outpos &= NP2SYSP_MASK; |
| Line 229 void np2sysp_reset(void) { | Line 232 void np2sysp_reset(void) { |
| void np2sysp_bind(void) { | void np2sysp_bind(void) { |
| iocore_attachout(0x07bf, np2sysp_o7bf); | iocore_attachout(0x07ef, np2sysp_o7ef); |
| iocore_attachinp(0x07bf, np2sysp_i7bf); | iocore_attachinp(0x07ef, np2sysp_i7ef); |
| } | } |