Diff for /np2/debugsub.c between versions 1.1 and 1.4

version 1.1, 2003/10/16 17:57:09 version 1.4, 2003/12/08 00:55:30
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "strres.h"  #include        "strres.h"
 #include        "dosio.h"  #include        "dosio.h"
 #include        "i286.h"  #include        "cpucore.h"
 #include        "memory.h"  #include        "memory.h"
 #include        "pccore.h"  #include        "pccore.h"
 #include        "iocore.h"  #include        "iocore.h"
 #include        "debugsub.h"  #include        "debugsub.h"
   
   
   #if defined(MACOS)
   #define CRLITERAL       "\r"
   #define CRCONST         str_cr
   #elif defined(X11) || defined(SLZAURUS)
   #define CRLITERAL       "\n"
   #define CRCONST         str_lf
   #else
   #define CRLITERAL       "\r\n"
   #define CRCONST         str_crlf
   #endif
   
   
 static const char s_nv[] = "NV";  static const char s_nv[] = "NV";
 static const char s_ov[] = "OV";  static const char s_ov[] = "OV";
 static const char s_dn[] = "DN";  static const char s_dn[] = "DN";
Line 43  static const char *flagstr[16][2] = { Line 55  static const char *flagstr[16][2] = {
                                 {NULL, NULL},           // 0x0002                                  {NULL, NULL},           // 0x0002
                                 {s_nc, s_cy}};          // 0x0001                                  {s_nc, s_cy}};          // 0x0001
   
 static const char file_i286reg[] = "i286reg.%03u";  static const char file_i286reg[] = "i286reg.%.3u";
 static const char file_i286cs[] = "i286_cs.%03u";  static const char file_i286cs[] = "i286_cs.%.3u";
 static const char file_i286ds[] = "i286_ds.%03u";  static const char file_i286ds[] = "i286_ds.%.3u";
 static const char file_i286es[] = "i286_es.%03u";  static const char file_i286es[] = "i286_es.%.3u";
 static const char file_i286ss[] = "i286_ss.%03u";  static const char file_i286ss[] = "i286_ss.%.3u";
 static const char file_i286txt[] = "i286txt.%03u";  static const char file_i286txt[] = "i286txt.%.3u";
 static const char file_memorybin[] = "memory.bin";  static const char file_memorybin[] = "memory.bin";
   
 static const char str_register[] =                                                                      \  static const char str_register[] =                                                                              \
                                         "AX=%04x  BX=%04x  CX=%04x  DX=%04x  "                  \                                          "AX=%.4x  BX=%.4x  CX=%.4x  DX=%.4x  "                          \
                                         "SP=%04x  BP=%04x  SI=%04x  DI=%04x\n"                  \                                          "SP=%.4x  BP=%.4x  SI=%.4x  DI=%.4x" CRLITERAL          \
                                         "DS=%04x  ES=%04x  SS=%04x  CS=%04x  "                  \                                          "DS=%.4x  ES=%.4x  SS=%.4x  CS=%.4x  "                          \
                                         "IP=%04x   ";                                          "IP=%.4x   ";
 static const char str_picstat[] =                                                                       \  static const char str_picstat[] =                                                                               \
                                         "\nPIC0=%02x:%02x:%02x\nPIC1=%02x:%02x:%02x\n"  \                                          CRLITERAL "PIC0=%.2x:%.2x:%.2x"                                         \
                                         "8255PORTC = %02x / system-port = %02x";                                          CRLITERAL "PIC1=%.2x:%.2x:%.2x"                                         \
                                           CRLITERAL "8255PORTC = %.2x / system-port = %.2x";
   
   
 const char *debugsub_flags(UINT16 flag) {  const char *debugsub_flags(UINT16 flag) {
Line 88  const char *debugsub_regs(void) { Line 101  const char *debugsub_regs(void) {
   
 static char work[256];  static char work[256];
   
         SPRINTF(work, str_register, I286_AX, I286_BX, I286_CX, I286_DX,          SPRINTF(work, str_register, CPU_AX, CPU_BX, CPU_CX, CPU_DX,
                                                                 I286_SP, I286_BP, I286_SI, I286_DI,                                                                  CPU_SP, CPU_BP, CPU_SI, CPU_DI,
                                                                 I286_DS, I286_ES, I286_SS, I286_CS, I286_IP);                                                                  CPU_DS, CPU_ES, CPU_SS, CPU_CS, CPU_IP);
         milstr_ncat(work, debugsub_flags(I286_FLAG), sizeof(work));          milstr_ncat(work, debugsub_flags(CPU_FLAG), sizeof(work));
         milstr_ncat(work, str_cr, sizeof(work));          milstr_ncat(work, CRCONST, sizeof(work));
         return(work);          return(work);
 }  }
   
Line 156  void debugsub_memorydump(void) { Line 169  void debugsub_memorydump(void) {
   
         fh = file_create_c(file_memorybin);          fh = file_create_c(file_memorybin);
         if (fh != FILEH_INVALID) {          if (fh != FILEH_INVALID) {
                 for (i=0; i<34; i++) {  //              for (i=0; i<34; i++) {
                   for (i=0; i<64; i++) {
                         file_write(fh, mem + i*0x8000, 0x8000);                          file_write(fh, mem + i*0x8000, 0x8000);
                 }                  }
                 file_close(fh);                  file_close(fh);

Removed from v.1.1  
changed lines
  Added in v.1.4


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