Diff for /np2/fdd/sxsi.c between versions 1.12 and 1.15

version 1.12, 2004/03/23 13:32:50 version 1.15, 2005/02/12 12:40:39
Line 37  const SASIHDD *sasi; Line 37  const SASIHDD *sasi;
         UINT            i;          UINT            i;
   
         sasi = sasihdd;          sasi = sasihdd;
         for (i=0; i<sizeof(sasihdd)/sizeof(SASIHDD); i++, sasi++) {          for (i=0; i<NELEMENTS(sasihdd); i++, sasi++) {
                 if ((sxsi->size == 256) &&                  if ((sxsi->size == 256) &&
                         (sxsi->sectors == sasi->sectors) &&                          (sxsi->sectors == sasi->sectors) &&
                         (sxsi->surfaces == sasi->surfaces) &&                          (sxsi->surfaces == sasi->surfaces) &&
Line 56  void sxsi_initialize(void) { Line 56  void sxsi_initialize(void) {
         UINT    i;          UINT    i;
   
         ZeroMemory(sxsi_dev, sizeof(sxsi_dev));          ZeroMemory(sxsi_dev, sizeof(sxsi_dev));
         for (i=0; i<(sizeof(sxsi_dev)/sizeof(_SXSIDEV)); i++) {          for (i=0; i<NELEMENTS(sxsi_dev); i++) {
                 sxsi_dev[i].fh = (long)FILEH_INVALID;                  sxsi_dev[i].fh = (long)FILEH_INVALID;
         }          }
 }  }
Line 81  SXSIDEV sxsi_getptr(REG8 drv) { Line 81  SXSIDEV sxsi_getptr(REG8 drv) {
         return(NULL);          return(NULL);
 }  }
   
 const char *sxsi_getname(REG8 drv) {  const OEMCHAR *sxsi_getname(REG8 drv) {
   
         SXSIDEV sxsi;          SXSIDEV sxsi;
   
Line 92  const char *sxsi_getname(REG8 drv) { Line 92  const char *sxsi_getname(REG8 drv) {
         return(NULL);          return(NULL);
 }  }
   
 BOOL sxsi_hddopen(REG8 drv, const char *file) {  BRESULT sxsi_hddopen(REG8 drv, const OEMCHAR *file) {
   
         SXSIDEV sxsi;          SXSIDEV         sxsi;
         FILEH   fh;          FILEH           fh;
 const char      *ext;  const OEMCHAR   *ext;
         UINT16  type;          UINT16          type;
         long    totals;          long            totals;
         UINT32  headersize;          UINT32          headersize;
         UINT32  surfaces;          UINT32          surfaces;
         UINT32  cylinders;          UINT32          cylinders;
         UINT32  sectors;          UINT32          sectors;
         UINT32  size;          UINT32          size;
   
         if ((file == NULL) || (file[0] == '\0')) {          if ((file == NULL) || (file[0] == '\0')) {
                 goto sxsiope_err1;                  goto sxsiope_err1;
Line 116  const char *ext; Line 116  const char *ext;
         if (fh == FILEH_INVALID) {          if (fh == FILEH_INVALID) {
                 goto sxsiope_err1;                  goto sxsiope_err1;
         }          }
         ext = file_getext((char *)file);          ext = file_getext(file);
         type = SXSITYPE_HDD;          type = SXSITYPE_HDD;
         if ((!file_cmpname(ext, str_thd)) && (!(drv & 0x20))) {          if ((!file_cmpname(ext, str_thd)) && (!(drv & 0x20))) {
                 THDHDR thd;                                             // T98 HDD (IDE)                  THDHDR thd;                                             // T98 HDD (IDE)
Line 196  const char *ext; Line 196  const char *ext;
         sxsi->type = type;          sxsi->type = type;
         sxsi->headersize = headersize;          sxsi->headersize = headersize;
         sxsi->fh = (long)fh;          sxsi->fh = (long)fh;
         file_cpyname(sxsi->fname, file, sizeof(sxsi->fname));          file_cpyname(sxsi->fname, file, NELEMENTS(sxsi->fname));
         if (type == (SXSITYPE_IDE | SXSITYPE_HDD)) {          if (type == (SXSITYPE_IDE | SXSITYPE_HDD)) {
                 sasihddcheck(sxsi);                  sasihddcheck(sxsi);
         }          }
Line 237  void sxsi_flash(void) { Line 237  void sxsi_flash(void) {
         SXSIDEV sxsiterm;          SXSIDEV sxsiterm;
   
         sxsi = sxsi_dev;          sxsi = sxsi_dev;
         sxsiterm = sxsi + (sizeof(sxsi_dev)/sizeof(_SXSIDEV));          sxsiterm = sxsi + NELEMENTS(sxsi_dev);
         while(sxsi < sxsiterm) {          while(sxsi < sxsiterm) {
                 if ((FILEH)sxsi->fh != FILEH_INVALID) {                  if ((FILEH)sxsi->fh != FILEH_INVALID) {
                         file_close((FILEH)sxsi->fh);                          file_close((FILEH)sxsi->fh);
Line 253  void sxsi_trash(void) { Line 253  void sxsi_trash(void) {
         SXSIDEV sxsiterm;          SXSIDEV sxsiterm;
   
         sxsi = sxsi_dev;          sxsi = sxsi_dev;
         sxsiterm = sxsi + (sizeof(sxsi_dev)/sizeof(_SXSIDEV));          sxsiterm = sxsi + NELEMENTS(sxsi_dev);
         while(sxsi < sxsiterm) {          while(sxsi < sxsiterm) {
                 if ((FILEH)sxsi->fh != FILEH_INVALID) {                  if ((FILEH)sxsi->fh != FILEH_INVALID) {
                         file_close((FILEH)sxsi->fh);                          file_close((FILEH)sxsi->fh);
Line 335  BOOL sxsi_iside(void) { Line 335  BOOL sxsi_iside(void) {
         return(FALSE);          return(FALSE);
 }  }
   
 REG8 sxsi_read(REG8 drv, long pos, BYTE *buf, UINT size) {  REG8 sxsi_read(REG8 drv, long pos, UINT8 *buf, UINT size) {
   
 const _SXSIDEV  *sxsi;  const _SXSIDEV  *sxsi;
         long            r;          long            r;
Line 365  const _SXSIDEV *sxsi; Line 365  const _SXSIDEV *sxsi;
         return(0x00);          return(0x00);
 }  }
   
 REG8 sxsi_write(REG8 drv, long pos, const BYTE *buf, UINT size) {  REG8 sxsi_write(REG8 drv, long pos, const UINT8 *buf, UINT size) {
   
 const _SXSIDEV  *sxsi;  const _SXSIDEV  *sxsi;
         long            r;          long            r;
Line 400  REG8 sxsi_format(REG8 drv, long pos) { Line 400  REG8 sxsi_format(REG8 drv, long pos) {
 const _SXSIDEV  *sxsi;  const _SXSIDEV  *sxsi;
         long            r;          long            r;
         UINT16          i;          UINT16          i;
         BYTE            work[256];          UINT8           work[256];
         UINT            size;          UINT            size;
         UINT            wsize;          UINT            wsize;
   

Removed from v.1.12  
changed lines
  Added in v.1.15


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