Diff for /np2/pccore.c between versions 1.18 and 1.25

version 1.18, 2003/11/15 07:10:02 version 1.25, 2003/12/04 09:47:08
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
   #include        "strres.h"
   #include        "dosio.h"
 #include        "soundmng.h"  #include        "soundmng.h"
 #include        "sysmng.h"  #include        "sysmng.h"
 #include        "timemng.h"  #include        "timemng.h"
Line 50 Line 52
                                 1, 0x82,                                  1, 0x82,
                                 0, {0x17, 0x04, 0x1f}, {0x0c, 0x0c, 0x02, 0x10, 0x3f, 0x3f},                                  0, {0x17, 0x04, 0x1f}, {0x0c, 0x0c, 0x02, 0x10, 0x3f, 0x3f},
                                 1, 80, 0,                                  1, 80, 0,
                                 {"", ""}, ""};                                  {"", ""}, "", ""};
   
         PCCORE  pc = {  PCBASECLOCK25,          PCCORE  pc = {  PCBASECLOCK25,
                                         4,                                          4,
Line 116  static void setvsyncclock(void) { Line 118  static void setvsyncclock(void) {
         pc.vsyncclock = cnt - pc.dispclock;          pc.vsyncclock = cnt - pc.dispclock;
 }  }
   
 static void setpcclock(UINT base, UINT multiple) {                      // ver0.28  static void setpcclock(UINT base, UINT multiple) {
   
         pc.model = PCMODEL_VX;          pc.model = PCMODEL_VX;
   
Line 183  static void sound_term(void) { Line 185  static void sound_term(void) {
   
 void pccore_init(void) {  void pccore_init(void) {
   
           char    *p;
   
           p = np2cfg.biospath;
           if (p[0]) {
                   file_setseparator(p, sizeof(np2cfg.biospath));
           }
           else {
                   file_cpyname(p, file_getcd(str_null), sizeof(np2cfg.biospath));
           }
   
           i286_initialize();
   
         pal_initlcdtable();          pal_initlcdtable();
         pal_makelcdpal();          pal_makelcdpal();
         pal_makeskiptable();          pal_makeskiptable();
Line 487  void screenvsync(NEVENTITEM item) { Line 501  void screenvsync(NEVENTITEM item) {
         (void)item;          (void)item;
 }  }
   
   
 // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
   
   #if defined(TRACE)
   static int resetcnt = 0;
   static int execcnt = 0;
   int piccnt = 0;
   #endif
   
 void pccore_exec(BOOL draw) {  void pccore_exec(BOOL draw) {
   
         drawframe = draw;          drawframe = draw;
Line 507  void pccore_exec(BOOL draw) { Line 528  void pccore_exec(BOOL draw) {
 //      nevent_get1stevent();  //      nevent_get1stevent();
   
         while(screendispflag) {          while(screendispflag) {
   #if defined(TRACE)
           resetcnt++;
   #endif
                 pic_irq();                  pic_irq();
                 if (cpuio.reset_req) {                  if (i286core.s.resetreq) {
                         cpuio.reset_req = 0;                          i286core.s.resetreq = 0;
                         I286_CS = 0xf000;                          I286_CS = 0xf000;
                         CS_BASE = 0xf0000;                          CS_BASE = 0xf0000;
                         I286_IP = 0xfff0;                          I286_IP = 0xfff0;
Line 519  void pccore_exec(BOOL draw) { Line 543  void pccore_exec(BOOL draw) {
                         i286_resetprefetch();                          i286_resetprefetch();
                 }                  }
   
 #ifndef TRACE  #if 1 // ndef TRACE
                 if (I286_REMCLOCK > 0) {                  if (I286_REMCLOCK > 0) {
                         if (!(CPUTYPE & CPUTYPE_V30)) {                          if (!(CPUTYPE & CPUTYPE_V30)) {
                                 i286();                                  i286();
Line 530  void pccore_exec(BOOL draw) { Line 554  void pccore_exec(BOOL draw) {
                 }                  }
 #else  #else
                 while(I286_REMCLOCK > 0) {                  while(I286_REMCLOCK > 0) {
                           TRACEOUT(("%.4x:%.4x", I286_CS, I286_IP));
                         i286_step();                          i286_step();
                 }                  }
 #endif  #endif
                 nevent_progress();                  nevent_progress();
         }          }
         artic_callback();                                                                                               // ver0.28          artic_callback();
         mpu98ii_callback();          mpu98ii_callback();
         diskdrv_callback();          diskdrv_callback();
         calendar_inc();          calendar_inc();
         sound_sync();                                                                                                   // happy!          sound_sync();                                                                                                   // happy!
   
   #if defined(TRACE)
           execcnt++;
           if (execcnt >= 60) {
                   TRACEOUT(("resetcnt = %d / pic %d", resetcnt, piccnt));
                   execcnt = 0;
                   resetcnt = 0;
                   piccnt = 0;
           }
   #endif
 }  }
   

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


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