Diff for /xmil/io/fdc.c between versions 1.16 and 1.17

version 1.16, 2004/08/15 07:52:16 version 1.17, 2004/08/15 11:14:42
Line 35  static void setbusy(SINT32 clock) { Line 35  static void setbusy(SINT32 clock) {
         }          }
 }  }
   
   #if defined(SUPPORT_MOTORRISEUP)
 static void setmotor(REG8 drvcmd) {  static void setmotor(REG8 drvcmd) {
   
         UINT    drv;          UINT    drv;
Line 80  void fdc_callback(void) { Line 81  void fdc_callback(void) {
         }          }
 }  }
   
   static SINT32 motorwait(REG8 drv) {
   
           SINT32  curclock;
           SINT32  nextclock;
   
           if (fdc.s.motorevent[drv] == FDCMOTOR_STARTING) {
                   curclock = CPU_CLOCK + CPU_BASECLOCK - CPU_REMCLOCK;
                   curclock -= fdc.s.motorclock[drv];
                   if (curclock < (SINT32)pccore.realclock) {
                           nextclock = pccore.realclock - curclock;
   //                      TRACEOUT(("motor starting busy %d", nextclock));
                           return(nextclock);
                   }
           }
           return(0);
   }
   #endif
   
   
 static REG8 getstat(void) {  static REG8 getstat(void) {
   
         FDDFILE fdd;          FDDFILE fdd;
Line 149  static REG8 type2cmd(REG8 sc) { Line 169  static REG8 type2cmd(REG8 sc) {
         FDDFILE fdd;          FDDFILE fdd;
         UINT    size;          UINT    size;
         REG8    stat;          REG8    stat;
 #if defined(SUPPORT_DISKEXT)  
         SINT32  clock;          SINT32  clock;
   #if defined(SUPPORT_DISKEXT)
         SINT32  curclock;          SINT32  curclock;
         SINT32  nextclock;          SINT32  nextclock;
         UINT32  secinfo;          UINT32  secinfo;
Line 190  static REG8 type2cmd(REG8 sc) { Line 210  static REG8 type2cmd(REG8 sc) {
         fdc.s.bufsize = size;          fdc.s.bufsize = size;
         fdc.s.curtime = 0;          fdc.s.curtime = 0;
   
 #if defined(SUPPORT_DISKEXT)  
         // ウェイト値を計算  
         clock = 0;          clock = 0;
         if (fdc.s.motorevent[fdc.s.drv] == FDCMOTOR_STARTING) {  #if defined(SUPPORT_MOTORRISEUP)
                 curclock = CPU_CLOCK + CPU_BASECLOCK - CPU_REMCLOCK;          clock += motorwait(fdc.s.drv);
                 curclock -= fdc.s.motorclock[fdc.s.drv];  #endif
                 if (curclock < (SINT32)pccore.realclock) {  #if defined(SUPPORT_DISKEXT)
                         nextclock = pccore.realclock - curclock;  
 //                      TRACEOUT(("motor starting busy %d", nextclock));  
                         clock += nextclock;  
                 }  
         }  
         secinfo = fdd->sec(fdd, fdc.s.media, track, sc);          secinfo = fdd->sec(fdd, fdc.s.media, track, sc);
         if (secinfo) {          if (secinfo) {
                 nextclock = LOW16(secinfo);                  nextclock = LOW16(secinfo);
Line 216  static REG8 type2cmd(REG8 sc) { Line 229  static REG8 type2cmd(REG8 sc) {
 //                                                                      LOW16(secinfo), LOW16(secinfo >> 16)));  //                                                                      LOW16(secinfo), LOW16(secinfo >> 16)));
                 clock += nextclock;                  clock += nextclock;
         }          }
         setbusy(max(clock, 500));  
 #else  
         setbusy(500);  
 #endif  #endif
           setbusy(max(clock, 500));
         return(stat);          return(stat);
 }  }
   
Line 440  void IOOUTCALL fdc_o(UINT port, REG8 val Line 451  void IOOUTCALL fdc_o(UINT port, REG8 val
                                 fdc.s.r = 0;                                            // SACOM TELENET                                  fdc.s.r = 0;                                            // SACOM TELENET
                                 fdc.s.rreg = 0;                                  fdc.s.rreg = 0;
                         }                          }
   #if defined(SUPPORT_MOTORRISEUP)
                         setmotor(value);                          setmotor(value);
   #endif
                         break;                          break;
         }          }
 }  }

Removed from v.1.16  
changed lines
  Added in v.1.17


RetroPC.NET-CVS <cvs@retropc.net>