Diff for /np2/bios/sxsibios.c between versions 1.8 and 1.11

version 1.8, 2004/01/28 23:36:13 version 1.11, 2004/03/04 15:20:13
Line 47  static REG8 sxsi_pos(UINT type, SXSIDEV  Line 47  static REG8 sxsi_pos(UINT type, SXSIDEV 
 static REG8 sxsibios_write(UINT type, SXSIDEV sxsi) {  static REG8 sxsibios_write(UINT type, SXSIDEV sxsi) {
   
         REG8    ret;          REG8    ret;
         UINT32  addr;  
         UINT    size;          UINT    size;
         long    pos;          long    pos;
           UINT    bp;
         UINT    r;          UINT    r;
         BYTE    work[1024];          BYTE    work[1024];
   
         addr = (CPU_ES << 4) + CPU_BP;  
         size = CPU_BX;          size = CPU_BX;
         if (!size) {          if (!size) {
                 size = 0x10000;                  size = 0x10000;
         }          }
         ret = sxsi_pos(type, sxsi, &pos);          ret = sxsi_pos(type, sxsi, &pos);
         if (!ret) {          if (!ret) {
                   bp = CPU_BP;
                 while(size) {                  while(size) {
                         r = min(size, sxsi->size);                          r = min(size, sxsi->size);
                         i286_memx_read(addr, work, r);                          i286_memstr_read(CPU_ES, bp, work, r);
                         ret = sxsi_write(CPU_AL, pos, work, r);                          ret = sxsi_write(CPU_AL, pos, work, r);
                         if (ret >= 0x20) {                          if (ret >= 0x20) {
                                 break;                                  break;
                         }                          }
                         size -= r;                          size -= r;
                         addr += r;                          bp += r;
                         pos++;                          pos++;
                 }                  }
         }          }
Line 78  static REG8 sxsibios_write(UINT type, SX Line 78  static REG8 sxsibios_write(UINT type, SX
 static REG8 sxsibios_read(UINT type, SXSIDEV sxsi) {  static REG8 sxsibios_read(UINT type, SXSIDEV sxsi) {
   
         REG8    ret;          REG8    ret;
         UINT32  addr;  
         UINT    size;          UINT    size;
         long    pos;          long    pos;
           UINT    bp;
         UINT    r;          UINT    r;
         BYTE    work[1024];          BYTE    work[1024];
   
         addr = (CPU_ES << 4) + CPU_BP;  
         size = CPU_BX;          size = CPU_BX;
         if (!size) {          if (!size) {
                 size = 0x10000;                  size = 0x10000;
         }          }
         ret = sxsi_pos(type, sxsi, &pos);          ret = sxsi_pos(type, sxsi, &pos);
         if (!ret) {          if (!ret) {
                   bp = CPU_BP;
                 while(size) {                  while(size) {
                         r = min(size, sxsi->size);                          r = min(size, sxsi->size);
                         ret = sxsi_read(CPU_AL, pos, work, r);                          ret = sxsi_read(CPU_AL, pos, work, r);
                         if (ret >= 0x20) {                          if (ret >= 0x20) {
                                 break;                                  break;
                         }                          }
                         i286_memx_write(addr, work, r);                          i286_memstr_write(CPU_ES, bp, work, r);
                         size -= r;                          size -= r;
                         addr += r;                          bp += r;
                         pos++;                          pos++;
                 }                  }
         }          }
Line 186  static REG8 sasibios_init(UINT type, SXS Line 186  static REG8 sasibios_init(UINT type, SXS
   
 static REG8 sasibios_sense(UINT type, SXSIDEV sxsi) {  static REG8 sasibios_sense(UINT type, SXSIDEV sxsi) {
   
         TRACEOUT(("sasibios_sense type=%d", type));  
         if (type == SXSIBIOS_SASI) {          if (type == SXSIBIOS_SASI) {
                 return((REG8)((sxsi->type >> 8) & 7));                  return((REG8)((sxsi->type >> 8) & 7));
         }          }
Line 315  static REG8 scsibios_sense(UINT type, SX Line 314  static REG8 scsibios_sense(UINT type, SX
                 CPU_BX = 256 << ((scsiinf[3] >> 4) & 3);                  CPU_BX = 256 << ((scsiinf[3] >> 4) & 3);
         }          }
         (void)type;          (void)type;
           (void)sxsi;
         return(0x00);          return(0x00);
 }  }
   

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


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