|
|
| version 1.13, 2004/05/21 14:09:27 | version 1.18, 2007/11/03 00:00:20 |
|---|---|
| Line 84 void fdcsend_error7(void) { | Line 84 void fdcsend_error7(void) { |
| fdc.event = FDCEVENT_BUFSEND; | fdc.event = FDCEVENT_BUFSEND; |
| fdc.bufp = 0; | fdc.bufp = 0; |
| fdc.bufcnt = 7; | fdc.bufcnt = 7; |
| fdc.buf[0] = (BYTE)(fdc.stat[fdc.us] >> 0); | fdc.buf[0] = (UINT8)(fdc.stat[fdc.us] >> 0); |
| fdc.buf[1] = (BYTE)(fdc.stat[fdc.us] >> 8); | fdc.buf[1] = (UINT8)(fdc.stat[fdc.us] >> 8); |
| fdc.buf[2] = (BYTE)(fdc.stat[fdc.us] >> 16); | fdc.buf[2] = (UINT8)(fdc.stat[fdc.us] >> 16); |
| fdc.buf[3] = fdc.C; | fdc.buf[3] = fdc.C; |
| fdc.buf[4] = fdc.H; | fdc.buf[4] = fdc.H; |
| fdc.buf[5] = fdc.R; | fdc.buf[5] = fdc.R; |
| Line 267 static void FDC_SenseDeviceStatus(void) | Line 267 static void FDC_SenseDeviceStatus(void) |
| } | } |
| } | } |
| static BOOL writesector(void) { | static BRESULT writesector(void) { |
| fdc.stat[fdc.us] = (fdc.hd << 2) | fdc.us; | fdc.stat[fdc.us] = (fdc.hd << 2) | fdc.us; |
| if (!FDC_DriveCheck(TRUE)) { | if (!FDC_DriveCheck(TRUE)) { |
| Line 430 static void FDC_SenceintStatus(void) { | Line 430 static void FDC_SenceintStatus(void) { |
| if (fdc_isfdcinterrupt()) { | if (fdc_isfdcinterrupt()) { |
| i = 0; | i = 0; |
| if (fdc.stat[fdc.us]) { | if (fdc.stat[fdc.us]) { |
| fdc.buf[0] = (BYTE)fdc.stat[fdc.us]; | fdc.buf[0] = (UINT8)fdc.stat[fdc.us]; |
| fdc.buf[1] = fdc.treg[fdc.us]; | fdc.buf[1] = fdc.treg[fdc.us]; |
| fdc.bufcnt = 2; | fdc.bufcnt = 2; |
| fdc.stat[fdc.us] = 0; | fdc.stat[fdc.us] = 0; |
| Line 439 static void FDC_SenceintStatus(void) { | Line 439 static void FDC_SenceintStatus(void) { |
| else { | else { |
| for (; i<4; i++) { | for (; i<4; i++) { |
| if (fdc.stat[i]) { | if (fdc.stat[i]) { |
| fdc.buf[0] = (BYTE)fdc.stat[i]; | fdc.buf[0] = (UINT8)fdc.stat[i]; |
| fdc.buf[1] = fdc.treg[i]; | fdc.buf[1] = fdc.treg[i]; |
| fdc.bufcnt = 2; | fdc.bufcnt = 2; |
| fdc.stat[i] = 0; | fdc.stat[i] = 0; |
| Line 771 static REG8 IOINPCALL fdc_i94(UINT port) | Line 771 static REG8 IOINPCALL fdc_i94(UINT port) |
| if (((port >> 4) ^ fdc.chgreg) & 1) { | if (((port >> 4) ^ fdc.chgreg) & 1) { |
| return(0xff); | return(0xff); |
| } | } |
| return(0x40); | if (port & 0x10) { // 94 |
| return(0x40); | |
| } | |
| else { // CC | |
| return(0x70); // readyを立てるるる | |
| } | |
| } | } |
| Line 818 static const IOINP fdci90[4] = { | Line 823 static const IOINP fdci90[4] = { |
| static const IOOUT fdcobe[1] = {fdc_obe}; | static const IOOUT fdcobe[1] = {fdc_obe}; |
| static const IOINP fdcibe[1] = {fdc_ibe}; | static const IOINP fdcibe[1] = {fdc_ibe}; |
| void fdc_reset(void) { | void fdc_reset(const NP2CFG *pConfig) { |
| ZeroMemory(&fdc, sizeof(fdc)); | ZeroMemory(&fdc, sizeof(fdc)); |
| fdc.equip = np2cfg.fddequip; | fdc.equip = pConfig->fddequip; |
| #if defined(SUPPORT_PC9821) | #if defined(SUPPORT_PC9821) |
| fdc.support144 = 1; | fdc.support144 = 1; |
| #else | #else |
| fdc.support144 = np2cfg.usefd144; | fdc.support144 = pConfig->usefd144; |
| #endif | #endif |
| fdcstatusreset(); | fdcstatusreset(); |
| dmac_attach(DMADEV_2HD, FDC_DMACH2HD); | dmac_attach(DMADEV_2HD, FDC_DMACH2HD); |