Diff for /np2/io/gdc.c between versions 1.2 and 1.4

version 1.2, 2003/10/17 07:17:20 version 1.4, 2003/10/19 14:56:15
Line 47  void gdc_setanalogpal(int color, int rgb Line 47  void gdc_setanalogpal(int color, int rgb
         PAL1EVENT       *event;          PAL1EVENT       *event;
   
         ptr = ((BYTE *)(gdc.anapal + color)) + rgb;          ptr = ((BYTE *)(gdc.anapal + color)) + rgb;
         if ((*ptr ^ value) & 0x0f) {          if (((*ptr) ^ value) & 0x0f) {
                 gdcs.palchange = GDCSCRN_REDRAW;                  gdcs.palchange = GDCSCRN_REDRAW;
                 if ((palevent.events < PALEVENTMAX) && (!gdc.vsync)) {                  if (palevent.events < PALEVENTMAX) {
                         event = palevent.event + palevent.events;                          if (!gdc.vsync) {
                         event->clock = nevent.item[NEVENT_FLAMES].clock -                                  event = palevent.event + palevent.events;
                                                                         (nevent.baseclock - nevent.remainclock);                                  event->clock = nevent.item[NEVENT_FLAMES].clock -
                         event->color = (color * sizeof(RGB32)) + rgb;                                                                                          (I286_BASECLOCK - I286_REMCLOCK);
                         event->value = value;                                  event->color = (color * sizeof(RGB32)) + rgb;
                         palevent.events++;                                  event->value = value;
                                   palevent.events++;
                           }
                           else {
                                   palevent.vsyncpal = 1;
                           }
                 }                  }
         }          }
         *ptr = value;          *ptr = value;
Line 389  static BYTE IOINPCALL gdc_i60(UINT port) Line 394  static BYTE IOINPCALL gdc_i60(UINT port)
                 gdc_work(GDCWORK_MASTER);                  gdc_work(GDCWORK_MASTER);
         }          }
 #ifdef SEARHC_SYNC  #ifdef SEARHC_SYNC
         if ((i286reg.inport) && (nevent.remainclock >= 5)) {          if ((i286reg.inport) && (I286_REMCLOCK >= 5)) {
                 UINT16 jadr = 0xfa74;                  UINT16 jadr = 0xfa74;
                 UINT16 memv;                  UINT16 memv;
                 memv = i286_memoryread_w(i286reg.inport);                  memv = i286_memoryread_w(i286reg.inport);
Line 402  static BYTE IOINPCALL gdc_i60(UINT port) Line 407  static BYTE IOINPCALL gdc_i60(UINT port)
                         memv = i286_memoryread_w(i286reg.inport + 2);                          memv = i286_memoryread_w(i286reg.inport + 2);
                         if (memv == jadr) {                                     // je                          if (memv == jadr) {                                     // je
                                 if (!gdc.vsync) {                                  if (!gdc.vsync) {
                                         nevent.remainclock = -1;                                          I286_REMCLOCK = -1;
                                 }                                  }
                         }                          }
                         else if (memv == (jadr + 1)) {          // jne                          else if (memv == (jadr + 1)) {          // jne
                                 if (gdc.vsync) {                                  if (gdc.vsync) {
                                         nevent.remainclock = -1;                                          I286_REMCLOCK = -1;
                                 }                                  }
                         }                          }
                 }                  }
         }          }
 #endif  #endif
 #ifdef TURE_SYNC                                // クロックイベントの誤差修正  #ifdef TURE_SYNC                                // クロックイベントの誤差修正
         if (nevent.item[NEVENT_FLAMES].clock <          if (nevent.item[NEVENT_FLAMES].clock < (I286_BASECLOCK - I286_REMCLOCK)) {
                                                                 (nevent.baseclock - nevent.remainclock)) {  
                 ret ^= 0x20;                  ret ^= 0x20;
         }          }
 #endif  #endif
Line 555  static BYTE IOINPCALL gdc_ia0(UINT port) Line 559  static BYTE IOINPCALL gdc_ia0(UINT port)
                 gdc_work(GDCWORK_SLAVE);                  gdc_work(GDCWORK_SLAVE);
         }          }
 #ifdef SEARHC_SYNC  #ifdef SEARHC_SYNC
         if ((i286reg.inport) && (nevent.remainclock >= 5)) {          if ((i286reg.inport) && (I286_REMCLOCK >= 5)) {
                 UINT16 jadr = 0xfa74;                  UINT16 jadr = 0xfa74;
                 UINT16 memv;                  UINT16 memv;
                 memv = i286_memoryread_w(i286reg.inport);                  memv = i286_memoryread_w(i286reg.inport);
Line 568  static BYTE IOINPCALL gdc_ia0(UINT port) Line 572  static BYTE IOINPCALL gdc_ia0(UINT port)
                         memv = i286_memoryread_w(i286reg.inport + 2);                          memv = i286_memoryread_w(i286reg.inport + 2);
                         if (memv == jadr) {                                     // je                          if (memv == jadr) {                                     // je
                                 if (!gdc.vsync) {                                  if (!gdc.vsync) {
                                         nevent.remainclock = -1;                                          I286_REMCLOCK = -1;
                                 }                                  }
                         }                          }
                         else if (memv == (jadr + 1)) {          // jne                          else if (memv == (jadr + 1)) {          // jne
                                 if (gdc.vsync) {                                  if (gdc.vsync) {
                                         nevent.remainclock = -1;                                          I286_REMCLOCK = -1;
                                 }                                  }
                         }                          }
                 }                  }
         }          }
 #endif  #endif
 #ifdef TURE_SYNC                                // クロックイベントの誤差修正  #ifdef TURE_SYNC                                // クロックイベントの誤差修正
         if (nevent.item[NEVENT_FLAMES].clock <          if (nevent.item[NEVENT_FLAMES].clock < (I286_BASECLOCK - I286_REMCLOCK)) {
                                                                 (nevent.baseclock - nevent.remainclock)) {  
                 ret ^= 0x20;                  ret ^= 0x20;
         }          }
 #endif  #endif

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


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