Diff for /np2/bios/bios.c between versions 1.73 and 1.77

version 1.73, 2005/02/27 15:07:36 version 1.77, 2007/11/11 13:54:14
Line 85  static void bios_reinitbyswitch(void) { Line 85  static void bios_reinitbyswitch(void) {
         UINT8   prxcrt;          UINT8   prxcrt;
         UINT8   prxdupd;          UINT8   prxdupd;
         UINT8   biosflag;          UINT8   biosflag;
           UINT8   extmem;
         UINT8   boot;          UINT8   boot;
   
         if (!(np2cfg.dipsw[2] & 0x80)) {          if (!(pccore.dipsw[2] & 0x80)) {
 #if defined(CPUCORE_IA32)  #if defined(CPUCORE_IA32)
                 mem[MEMB_SYS_TYPE] = 0x03;              // 80386〜                  mem[MEMB_SYS_TYPE] = 0x03;              // 80386〜
 #else  #else
Line 100  static void bios_reinitbyswitch(void) { Line 101  static void bios_reinitbyswitch(void) {
   
         mem[MEMB_BIOS_FLAG0] = 0x01;          mem[MEMB_BIOS_FLAG0] = 0x01;
         prxcrt = 0x08;          prxcrt = 0x08;
         if (!(np2cfg.dipsw[0] & 0x01)) {                        // dipsw1-1 on          if (!(pccore.dipsw[0] & 0x01)) {                        // dipsw1-1 on
                 prxcrt |= 0x40;                  prxcrt |= 0x40;
         }          }
         if (gdc.display & (1 << GDCDISP_ANALOG)) {          if (gdc.display & (1 << GDCDISP_ANALOG)) {
                 prxcrt |= 0x04;                                                 // color16                  prxcrt |= 0x04;                                                 // color16
         }          }
         if (!(np2cfg.dipsw[0] & 0x80)) {                        // dipsw1-8 on          if (!(pccore.dipsw[0] & 0x80)) {                        // dipsw1-8 on
                 prxcrt |= 0x01;                  prxcrt |= 0x01;
         }          }
         if (grcg.chip) {          if (grcg.chip) {
Line 118  static void bios_reinitbyswitch(void) { Line 119  static void bios_reinitbyswitch(void) {
         if (grcg.chip >= 3) {          if (grcg.chip >= 3) {
                 prxdupd |= 0x40;                  prxdupd |= 0x40;
         }          }
         if (!(np2cfg.dipsw[1] & 0x80)) {                        // dipsw2-8 on          if (!(pccore.dipsw[1] & 0x80)) {                        // dipsw2-8 on
                 prxdupd |= 0x20;                  prxdupd |= 0x20;
         }          }
         mem[MEMB_PRXDUPD] = prxdupd;          mem[MEMB_PRXDUPD] = prxdupd;
Line 128  static void bios_reinitbyswitch(void) { Line 129  static void bios_reinitbyswitch(void) {
                 biosflag |= 0x80;                  biosflag |= 0x80;
         }          }
         biosflag |= mem[0xa3fea] & 7;          biosflag |= mem[0xa3fea] & 7;
         if (np2cfg.dipsw[2] & 0x80) {          if (pccore.dipsw[2] & 0x80) {
                 biosflag |= 0x40;                  biosflag |= 0x40;
         }          }
         mem[MEMB_BIOS_FLAG1] = biosflag;          mem[MEMB_BIOS_FLAG1] = biosflag;
         mem[MEMB_EXPMMSZ] = (UINT8)(pccore.extmem << 3);          extmem = pccore.extmem;
           extmem = min(extmem, 14);
           mem[MEMB_EXPMMSZ] = (UINT8)(extmem << 3);
           if (pccore.extmem >= 15) {
                   mem[0x0594] = pccore.extmem - 15;
           }
         mem[MEMB_CRT_RASTER] = 0x0f;          mem[MEMB_CRT_RASTER] = 0x0f;
   
         // FDD initialize          // FDD initialize
Line 187  static void bios_screeninit(void) { Line 193  static void bios_screeninit(void) {
         REG8    al;          REG8    al;
   
         al = 4;          al = 4;
         al += (np2cfg.dipsw[1] & 0x04) >> 1;          al += (pccore.dipsw[1] & 0x04) >> 1;
         al += (np2cfg.dipsw[1] & 0x08) >> 3;          al += (pccore.dipsw[1] & 0x08) >> 3;
         bios0x18_0a(al);          bios0x18_0a(al);
 }  }
   
Line 262  void bios_initialize(void) { Line 268  void bios_initialize(void) {
 #if defined(BIOS_SIMULATE)  #if defined(BIOS_SIMULATE)
         mem[0xf8e80] = 0x98;          mem[0xf8e80] = 0x98;
         mem[0xf8e81] = 0x21;          mem[0xf8e81] = 0x21;
           mem[0xf8e82] = 0x1f;
           mem[0xf8e83] = 0x20;    // Model Number?
           mem[0xf8e84] = 0x2c;
           mem[0xf8e85] = 0xb0;
   
           // mem[0xf8eaf] = 0x21;         // <- これって何だっけ?
 #endif  #endif
 #endif  #endif
   
Line 352  UINT MEMCALL biosfunc(UINT32 adrs) { Line 364  UINT MEMCALL biosfunc(UINT32 adrs) {
 //      TRACEOUT(("biosfunc(%x)", adrs));  //      TRACEOUT(("biosfunc(%x)", adrs));
 #if defined(CPUCORE_IA32) && defined(TRACE)  #if defined(CPUCORE_IA32) && defined(TRACE)
         if (CPU_STAT_PAGING) {          if (CPU_STAT_PAGING) {
                 UINT32 pde = i286_memoryread_d(CPU_STAT_PDE_BASE);                  UINT32 pde = MEMP_READ32(CPU_STAT_PDE_BASE);
                 if (!(pde & CPU_PDE_PRESENT)) {                  if (!(pde & CPU_PDE_PRESENT)) {
                         TRACEOUT(("page0: PTE not present"));                          TRACEOUT(("page0: PTE not present"));
                 }                  }
                 else {                  else {
                         UINT32 pte = i286_memoryread_d(pde & CPU_PDE_BASEADDR_MASK);                          UINT32 pte = MEMP_READ32(pde & CPU_PDE_BASEADDR_MASK);
                         if (!(pte & CPU_PTE_PRESENT)) {                          if (!(pte & CPU_PTE_PRESENT)) {
                                 TRACEOUT(("page0: not present"));                                  TRACEOUT(("page0: not present"));
                         }                          }
Line 449  UINT MEMCALL biosfunc(UINT32 adrs) { Line 461  UINT MEMCALL biosfunc(UINT32 adrs) {
   
                 case BIOS_BASE + BIOSOFST_WAIT:                  case BIOS_BASE + BIOSOFST_WAIT:
                         CPU_STI;                          CPU_STI;
 #if 1  
                         return(bios0x1b_wait());                                                                // ver0.78                          return(bios0x1b_wait());                                                                // ver0.78
 #else  
                         if (fddmtr.busy) {  
                                 CPU_IP--;  
                                 CPU_REMCLOCK = -1;  
                         }  
                         else {  
                                 if (fdc.chgreg & 1) {  
                                         if (!(mem[MEMB_DISK_INTL] & (0x01 << fdc.us))) {  
                                                 CPU_IP--;  
                                                 CPU_REMCLOCK -= 1000;  
                                         }  
                                 }  
                                 else {  
                                         if (!(mem[MEMB_DISK_INTH] & (0x10 << fdc.us))) {  
                                                 CPU_IP--;  
                                                 CPU_REMCLOCK -= 1000;  
                                         }  
                                 }  
                         }  
                         return(1);  
 #endif  
   
                 case 0xfffe8:                                   // ブートストラップロード                  case 0xfffe8:                                   // ブートストラップロード
                         CPU_REMCLOCK -= 2000;                          CPU_REMCLOCK -= 2000;

Removed from v.1.73  
changed lines
  Added in v.1.77


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