Diff for /np2/bios/bios1b.c between versions 1.18 and 1.22

version 1.18, 2004/01/30 01:29:13 version 1.22, 2004/03/04 17:36:05
Line 17  enum { Line 17  enum {
 };  };
   
   
 static  BYTE    mtr_c = 0;  
 static  UINT    mtr_r = 0;  
   
   
 // ---- FDD  // ---- FDD
   
 static BOOL setfdcmode(REG8 drv, REG8 type, REG8 rpm) {  static BOOL setfdcmode(REG8 drv, REG8 type, REG8 rpm) {
Line 97  static BOOL biosfd_seek(REG8 track, BOOL Line 93  static BOOL biosfd_seek(REG8 track, BOOL
                 }                  }
         }          }
         fdc.ncn = track;          fdc.ncn = track;
         mtr_c = track;  
         if (fdd_seek()) {          if (fdd_seek()) {
                 return(FAILURE);                  return(FAILURE);
         }          }
Line 298  static REG8 fdd_operate(REG8 type, REG8  Line 293  static REG8 fdd_operate(REG8 type, REG8 
         BYTE    hd;          BYTE    hd;
         int             result = FDCBIOS_NORESULT;          int             result = FDCBIOS_NORESULT;
         UINT32  addr;          UINT32  addr;
           UINT8   mtr_c;
           UINT    mtr_r;
   
         mtr_c = 0xff;          mtr_c = fdc.ncn;
         mtr_r = 0;          mtr_r = 0;
   
         // とりあえずBIOSの時は無視する          // とりあえずBIOSの時は無視する
Line 494  static REG8 fdd_operate(REG8 type, REG8  Line 491  static REG8 fdd_operate(REG8 type, REG8 
                                 else {                                  else {
                                         accesssize = size;                                          accesssize = size;
                                 }                                  }
                                 i286_memx_read(addr, fdc.buf, accesssize);                                  MEML_READ(addr, fdc.buf, accesssize);
                                 if (fdd_write()) {                                  if (fdd_write()) {
                                         break;                                          break;
                                 }                                  }
Line 563  static REG8 fdd_operate(REG8 type, REG8  Line 560  static REG8 fdd_operate(REG8 type, REG8 
                                 if (fdd_read()) {                                  if (fdd_read()) {
                                         break;                                          break;
                                 }                                  }
                                 i286_memx_write(addr, fdc.buf, accesssize);                                  MEML_WRITE(addr, fdc.buf, accesssize);
                                 addr += accesssize;                                  addr += accesssize;
                                 size -= accesssize;                                  size -= accesssize;
                                 mtr_r += accesssize;                                            // ver0.26                                  mtr_r += accesssize;                                            // ver0.26
Line 664  static REG8 fdd_operate(REG8 type, REG8  Line 661  static REG8 fdd_operate(REG8 type, REG8 
                         fdd_formatinit();                          fdd_formatinit();
                         pos = CPU_BP;                          pos = CPU_BP;
                         for (s=0; s<fdc.sc; s++) {                          for (s=0; s<fdc.sc; s++) {
                                 i286_memstr_read(CPU_ES, pos, ID, 4);                                  MEML_READSTR(CPU_ES, pos, ID, 4);
                                 fdd_formating(ID);                                  fdd_formating(ID);
                                 pos += 4;                                  pos += 4;
                                 if (ID[3] < 8) {                                  if (ID[3] < 8) {
Line 678  static REG8 fdd_operate(REG8 type, REG8  Line 675  static REG8 fdd_operate(REG8 type, REG8 
                         break;                          break;
         }          }
         fdd_int(result);          fdd_int(result);
         fddmtr_seek(fdc.us, mtr_c, mtr_r);          if (mtr_c != fdc.ncn) {
                   fddmtr_seek(fdc.us, mtr_c, mtr_r);
           }
         return(ret_ah);          return(ret_ah);
 }  }
   
Line 891  void bios0x1b(void) { Line 890  void bios0x1b(void) {
                 i286_memword_write(CPU_SS, sp - 14, CPU_CX);            // +4                  i286_memword_write(CPU_SS, sp - 14, CPU_CX);            // +4
                 i286_memword_write(CPU_SS, sp - 16, CPU_BX);            // +2                  i286_memword_write(CPU_SS, sp - 16, CPU_BX);            // +2
                 i286_memword_write(CPU_SS, sp - 18, CPU_AX);            // +0                  i286_memword_write(CPU_SS, sp - 18, CPU_AX);            // +0
   #if 0
                 TRACEOUT(("bypass to %.4x:0018", seg << 8));                  TRACEOUT(("bypass to %.4x:0018", seg << 8));
                 TRACEOUT(("AX=%04x BX=%04x %02x:%02x:%02x:%02x ES=%04x BP=%04x",                  TRACEOUT(("AX=%04x BX=%04x %02x:%02x:%02x:%02x ES=%04x BP=%04x",
                                                         CPU_AX, CPU_BX, CPU_CL, CPU_DH, CPU_DL, CPU_CH,                                                          CPU_AX, CPU_BX, CPU_CL, CPU_DH, CPU_DL, CPU_CH,
                                                         CPU_ES, CPU_BP));                                                          CPU_ES, CPU_BP));
   #endif
                 sp -= 18;                  sp -= 18;
                 CPU_SP = sp;                  CPU_SP = sp;
                 CPU_BP = sp;                  CPU_BP = sp;

Removed from v.1.18  
changed lines
  Added in v.1.22


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