Diff for /np2/fdd/sxsicd.c between versions 1.6 and 1.8

version 1.6, 2005/04/05 20:37:07 version 1.8, 2011/01/15 18:04:43
Line 298  static BRESULT opencue(SXSIDEV sxsi, con Line 298  static BRESULT opencue(SXSIDEV sxsi, con
   
         _CDTRK          trk[99];          _CDTRK          trk[99];
         OEMCHAR         path[MAX_PATH];          OEMCHAR         path[MAX_PATH];
         UINT            index;          UINT            idx;
         UINT8           curtrk;          UINT8           curtrk;
         UINT            curtype;          UINT            curtype;
         TEXTFILEH       tfh;          TEXTFILEH       tfh;
Line 308  static BRESULT opencue(SXSIDEV sxsi, con Line 308  static BRESULT opencue(SXSIDEV sxsi, con
   
         ZeroMemory(trk, sizeof(trk));          ZeroMemory(trk, sizeof(trk));
         path[0] = '\0';          path[0] = '\0';
         index = 0;          idx = 0;
         curtrk = 1;          curtrk = 1;
         curtype = 0x14;          curtype = 0x14;
         tfh = textfile_open(fname, 0x800);          tfh = textfile_open(fname, 0x800);
Line 332  static BRESULT opencue(SXSIDEV sxsi, con Line 332  static BRESULT opencue(SXSIDEV sxsi, con
                         }                          }
                 }                  }
                 else if ((argc >= 3) && (!milstr_cmp(argv[0], str_index))) {                  else if ((argc >= 3) && (!milstr_cmp(argv[0], str_index))) {
                         if (index < NELEMENTS(trk)) {                          if (idx < NELEMENTS(trk)) {
                                 trk[index].type = curtype;                                  trk[idx].type = curtype;
                                 trk[index].track = curtrk;                                  trk[idx].track = curtrk;
                                 trk[index].pos = getpos(argv[2]);                                  trk[idx].pos = getpos(argv[2]);
                                 index++;                                  idx++;
                         }                          }
                 }                  }
         }          }
         textfile_close(tfh);          textfile_close(tfh);
         return(openimg(sxsi, path, trk, index));          return(openimg(sxsi, path, trk, idx));
 }  }
   
 BRESULT sxsicd_open(SXSIDEV sxsi, const OEMCHAR *fname) {  BRESULT sxsicd_open(SXSIDEV sxsi, const OEMCHAR *fname) {
Line 366  CDTRK sxsicd_gettrk(SXSIDEV sxsi, UINT * Line 366  CDTRK sxsicd_gettrk(SXSIDEV sxsi, UINT *
         return(cdinfo->trk);          return(cdinfo->trk);
 }  }
   
   BRESULT sxsicd_readraw(SXSIDEV sxsi, long pos, void *buf) {
   
           CDINFO  cdinfo;
           FILEH   fh;
           long    fpos;
   
           cdinfo = (CDINFO)sxsi->hdl;
           if (cdinfo->type != 2352) {
                   return(FAILURE);
           }
           if (sxsi_prepare(sxsi) != SUCCESS) {
                   return(FAILURE);
           }
           if ((pos < 0) || (pos >= sxsi->totals)) {
                   return(FAILURE);
           }
           fh = ((CDINFO)sxsi->hdl)->fh;
           fpos = pos * 2352;
           if ((file_seek(fh, fpos, FSEEK_SET) != fpos) ||
                   (file_read(fh, buf, 2352) != 2352)) {
                   return(FAILURE);
           }
           return(SUCCESS);
   }
   

Removed from v.1.6  
changed lines
  Added in v.1.8


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