Diff for /np2/bios/bios.c between versions 1.33 and 1.38

version 1.33, 2004/01/25 05:41:28 version 1.38, 2004/02/16 05:09:00
Line 59  static void bios_reinitbyswitch(void) { Line 59  static void bios_reinitbyswitch(void) {
         }          }
   
         mem[MEMB_BIOS_FLAG0] = 0x01;          mem[MEMB_BIOS_FLAG0] = 0x01;
         prxcrt = 0x48;                                                          // ver0.74          prxcrt = 0x08;
           if (!(np2cfg.dipsw[0] & 0x01)) {                        // dipsw1-1 on
                   prxcrt |= 0x40;
           }
         if (gdc.display & 2) {          if (gdc.display & 2) {
                 prxcrt |= 0x04;                                                 // color16                  prxcrt |= 0x04;                                                 // color16
         }          }
Line 103  static void bios_reinitbyswitch(void) { Line 106  static void bios_reinitbyswitch(void) {
         SETBIOSMEM32(MEMD_F2HD_POINTER, 0xfd801aaf);          SETBIOSMEM32(MEMD_F2HD_POINTER, 0xfd801aaf);
         boot = mem[MEMB_MSW5] & 0xf0;          boot = mem[MEMB_MSW5] & 0xf0;
         if (boot != 0x20) {             // 1MB          if (boot != 0x20) {             // 1MB
                 fddbios_equip(DISKTYPE_2HD, TRUE);                  fddbios_equip(3, TRUE);
                 mem[MEMB_BIOS_FLAG0] |= 0x02;                  mem[MEMB_BIOS_FLAG0] |= 0x02;
         }          }
         else {                                  // 640KB          else {                                  // 640KB
                 fddbios_equip(DISKTYPE_2DD, TRUE);                  fddbios_equip(0, TRUE);
                 mem[MEMB_BIOS_FLAG0] &= ~0x02;                  mem[MEMB_BIOS_FLAG0] &= ~0x02;
         }          }
         mem[MEMB_F2DD_MODE] = 0xff;          mem[MEMB_F2DD_MODE] = 0xff;
Line 136  static void bios_vectorset(void) {       Line 139  static void bios_vectorset(void) {      
   
 static void bios_screeninit(void) {  static void bios_screeninit(void) {
   
         UINT    ax;          REG8    al;
   
         ax = 0x0a04;          al = 4;
         ax += (np2cfg.dipsw[1] & 0x04) >> 1;          al += (np2cfg.dipsw[1] & 0x04) >> 1;
         ax += (np2cfg.dipsw[1] & 0x08) >> 3;          al += (np2cfg.dipsw[1] & 0x08) >> 3;
         CPU_AX = ax;          bios0x18_0a(al);
         bios0x18();  
 }  }
   
   
Line 158  static const UINT16 biosoffset[0x20] = { Line 160  static const UINT16 biosoffset[0x20] = {
                         BIOSOFST_EOIS,  BIOSOFST_EOIS,  BIOSOFST_EOIS,  BIOSOFST_EOIS,                          BIOSOFST_EOIS,  BIOSOFST_EOIS,  BIOSOFST_EOIS,  BIOSOFST_EOIS,
   
                         BIOSOFST_18,    BIOSOFST_19,    BIOSOFST_1a,    BIOSOFST_1b,                          BIOSOFST_18,    BIOSOFST_19,    BIOSOFST_1a,    BIOSOFST_1b,
                         BIOSOFST_1c,    BIOSOFST_IRET,  BIOSOFST_1e,    BIOSOFST_IRET};                          BIOSOFST_1c,    BIOSOFST_IRET,  BIOSOFST_1e,    BIOSOFST_1f};
   
   
 void bios_init(void) {  void bios_init(void) {
Line 192  void bios_init(void) { Line 194  void bios_init(void) {
         }          }
         SETBIOSMEM16(BIOS_BASE + BIOSOFST_IRET, 0x50cf);          SETBIOSMEM16(BIOS_BASE + BIOSOFST_IRET, 0x50cf);
         SETBIOSMEM16(BIOS_BASE + BIOSOFST_WAIT, 0xcf90);          SETBIOSMEM16(BIOS_BASE + BIOSOFST_WAIT, 0xcf90);
         for (i=(BIOS_BASE+BIOSOFST_EOIM); i<=(BIOS_BASE+BIOSOFST_1c); i+=2) {          for (i=(BIOS_BASE+BIOSOFST_EOIM); i<=(BIOS_BASE+BIOSOFST_1f); i+=2) {
                 SETBIOSMEM16(i, 0xcf90);                  SETBIOSMEM16(i, 0xcf90);
         }          }
         CopyMemory(mem + BIOS_BASE + BIOSOFST_PRT, printmain, sizeof(printmain));          CopyMemory(mem + BIOS_BASE + BIOSOFST_PRT, printmain, sizeof(printmain));
Line 225  void bios_init(void) { Line 227  void bios_init(void) {
         }          }
   
         bios_reinitbyswitch();          bios_reinitbyswitch();
         mem[MEMB_CRT_STS_FLAG] = 0x84;  //      mem[MEMB_CRT_STS_FLAG] = 0x84;          // -> bios_screeninit()
 //      mem[MEMB_BIOS_FLAG0] = 0x03;  //      mem[MEMB_BIOS_FLAG0] = 0x03;
 //      mem[MEMB_F2DD_MODE] = 0xff;                                                                             // ver0.29  //      mem[MEMB_F2DD_MODE] = 0xff;                                                                             // ver0.29
 //      SETBIOSMEM16(MEMW_DISK_EQUIP, 0x0003);                                                  // ver0.29  //      SETBIOSMEM16(MEMW_DISK_EQUIP, 0x0003);                                                  // ver0.29
Line 365  UINT MEMCALL biosfunc(UINT32 adrs) { Line 367  UINT MEMCALL biosfunc(UINT32 adrs) {
                         bios0x1c();                          bios0x1c();
                         return(1);                          return(1);
   
                   case BIOS_BASE + BIOSOFST_1f:
                           CPU_REMCLOCK -= 200;
                           return(1);
   
                 case BIOS_BASE + BIOSOFST_WAIT:                  case BIOS_BASE + BIOSOFST_WAIT:
                         CPU_STI;                          CPU_STI;
                         if (fddmtr_biosbusy) {                                          // ver0.26                          if (fddmtr_biosbusy) {                                          // ver0.26
Line 372  UINT MEMCALL biosfunc(UINT32 adrs) { Line 378  UINT MEMCALL biosfunc(UINT32 adrs) {
                                 CPU_REMCLOCK = -1;                                  CPU_REMCLOCK = -1;
                         }                          }
                         else {                          else {
                                 switch(CTRL_FDMEDIA) {                                  if (fdc.chgreg & 1) {
                                         case DISKTYPE_2HD:                                          if (!(mem[0x0055e] & (0x01 << fdc.us))) {
                                                 if (pic.pi[1].isr & PIC_INT42) {                                                  CPU_IP--;
                                                         CPU_IP--;                                                  CPU_REMCLOCK -= 1000;
                                                         CPU_REMCLOCK -= 1000;                                          }
                                                 }                                  }
                                                 break;                                  else {
                                         case DISKTYPE_2DD:                                          if (!(mem[0x0055f] & (0x10 << fdc.us))) {
                                                 if (pic.pi[1].isr & PIC_INT41) {                                                  CPU_IP--;
                                                         CPU_IP--;                                                  CPU_REMCLOCK -= 1000;
                                                         CPU_REMCLOCK -= 1000;                                          }
                                                 }  
                                                 break;  
                                 }                                  }
                         }                          }
                         return(1);                          return(1);

Removed from v.1.33  
changed lines
  Added in v.1.38


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