Diff for /np2/debugsub386.c between versions 1.2 and 1.5

version 1.2, 2004/03/08 12:45:57 version 1.5, 2004/03/19 00:30:00
Line 149  const char   *p; Line 149  const char   *p;
                 SPRINTF(work, str_picstat,                  SPRINTF(work, str_picstat,
                                                                 pic.pi[0].imr, pic.pi[0].irr, pic.pi[0].isr,                                                                  pic.pi[0].imr, pic.pi[0].irr, pic.pi[0].isr,
                                                                 pic.pi[1].imr, pic.pi[1].irr, pic.pi[1].isr,                                                                  pic.pi[1].imr, pic.pi[1].irr, pic.pi[1].isr,
                                                                 mouseif.portc, sysport.c);                                                                  mouseif.upd8255.portc, sysport.c);
                 file_write(fh, work, strlen(work));                  file_write(fh, work, strlen(work));
                 file_close(fh);                  file_close(fh);
         }          }
   
         SPRINTF(work, file_i386cs, filenum);          SPRINTF(work, file_i386cs, filenum);
         debugwriteseg(work, &CPU_STAT_SREG(CPU_CS_INDEX), 0, 0x10000);          debugwriteseg(work, &CPU_STAT_SREG(CPU_CS_INDEX), CPU_EIP & 0xffff0000, 0x10000);
         SPRINTF(work, file_i386ds, filenum);          SPRINTF(work, file_i386ds, filenum);
         debugwriteseg(work, &CPU_STAT_SREG(CPU_DS_INDEX), 0, 0x10000);          debugwriteseg(work, &CPU_STAT_SREG(CPU_DS_INDEX), 0, 0x10000);
         SPRINTF(work, file_i386es, filenum);          SPRINTF(work, file_i386es, filenum);
         debugwriteseg(work, &CPU_STAT_SREG(CPU_ES_INDEX), 0, 0x10000);          debugwriteseg(work, &CPU_STAT_SREG(CPU_ES_INDEX), 0, 0x10000);
         SPRINTF(work, file_i386ss, filenum);          SPRINTF(work, file_i386ss, filenum);
         debugwriteseg(work, &CPU_STAT_SREG(CPU_SS_INDEX), 0, 0x10000);          debugwriteseg(work, &CPU_STAT_SREG(CPU_SS_INDEX), CPU_ESP & 0xffff0000, 0x10000);
         filenum++;          filenum++;
 }  }
   
Line 181  void debugsub_memorydump(void) { Line 181  void debugsub_memorydump(void) {
         }          }
 }  }
   
   
   #if 1   // ²¶ÍѥǥХ°
   
   void debugpageptr(UINT32 addr) {
   
           FILEH   fh;
           char    buf[256];
           UINT32  pde;
           UINT32  pte;
           UINT    i;
           UINT32  a;
   
           fh = file_create("page.txt");
           SPRINTF(buf, "CR3=%.8x\r\n", CPU_CR3);
           file_write(fh, buf, strlen(buf));
           for (i=0; i<1024; i++) {
                   a = CPU_STAT_PDE_BASE + (i * 4);
                   pde = cpu_memoryread_d(a);
                   SPRINTF(buf, "%.8x=>%.8x [%.8x]\r\n", (i << 22), pde, a);
                   file_write(fh, buf, strlen(buf));
           }
           addr >>= 22;
           pde = cpu_memoryread_d(CPU_STAT_PDE_BASE + (addr * 4));
           for (i=0; i<1024; i++) {
                   a = (pde & CPU_PDE_BASEADDR_MASK) + (i * 4);
                   pte = cpu_memoryread_d(a);
                   SPRINTF(buf, "%.8x=>%.8x [%.8x]\r\n", (addr << 22) + (i << 12), pte, a);
                   file_write(fh, buf, strlen(buf));
           }
           file_close(fh);
   }
   
   #endif

Removed from v.1.2  
changed lines
  Added in v.1.5


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