Diff for /np2/io/artic.c between versions 1.2 and 1.6

version 1.2, 2003/10/19 14:56:15 version 1.6, 2004/02/19 11:32:12
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "i286.h"  #include        "cpucore.h"
 #include        "pccore.h"  #include        "pccore.h"
 #include        "iocore.h"  #include        "iocore.h"
   
Line 9  void artic_callback(void) { Line 9  void artic_callback(void) {
         SINT32  mul;          SINT32  mul;
         SINT32  leng;          SINT32  leng;
   
         mul = pc.multiple;          mul = pccore.multiple;
         if (pc.baseclock == PCBASECLOCK25) {          if (pccore.cpumode & CPUMODE_8MHZ) {
                 mul *= 16;                  mul *= 13;
         }          }
         else {          else {
                 mul *= 13;                  mul *= 16;
         }          }
         leng = I286_CLOCK + I286_BASECLOCK + I286_REMCLOCK;          leng = CPU_CLOCK + CPU_BASECLOCK + CPU_REMCLOCK;
         leng *= 2;          leng *= 2;
         leng -= artic.lastclk2;          leng -= artic.lastclk2;
         if (leng > 0) {          if (leng > 0) {
Line 31  static UINT32 artic_getcnt(void) { Line 31  static UINT32 artic_getcnt(void) {
         SINT32  mul;          SINT32  mul;
         SINT32  leng;          SINT32  leng;
   
         mul = pc.multiple;          mul = pccore.multiple;
         if (pc.baseclock != PCBASECLOCK20) {          if (pccore.cpumode & CPUMODE_8MHZ) {
                 mul *= 16;                  mul *= 13;
         }          }
         else {          else {
                 mul *= 13;                  mul *= 16;
         }          }
         leng = I286_CLOCK + I286_BASECLOCK + I286_REMCLOCK;          leng = CPU_CLOCK + CPU_BASECLOCK + CPU_REMCLOCK;
         leng *= 2;          leng *= 2;
         leng -= artic.lastclk2;          leng -= artic.lastclk2;
         if (leng > 0) {          if (leng > 0) {
Line 51  static UINT32 artic_getcnt(void) { Line 51  static UINT32 artic_getcnt(void) {
   
 // ---- I/O  // ---- I/O
   
 static void IOOUTCALL artic_o5c(UINT port, BYTE dat) {  static void IOOUTCALL artic_o5f(UINT port, REG8 dat) {
   
         (void)port;          (void)port;
         (void)dat;          (void)dat;
         I286_REMCLOCK -= 20;          CPU_REMCLOCK -= 20;
 }  }
   
 static BYTE IOINPCALL artic_i5c(UINT port) {  static REG8 IOINPCALL artic_i5c(UINT port) {
   
         (void)port;          (void)port;
         return((BYTE)artic_getcnt());          return((UINT8)artic_getcnt());
 }  }
   
 static BYTE IOINPCALL artic_i5d(UINT port) {  static REG8 IOINPCALL artic_i5d(UINT port) {
   
         (void)port;          (void)port;
         return((BYTE)(artic_getcnt() >> 8));          return((UINT8)(artic_getcnt() >> 8));
 }  }
   
 static BYTE IOINPCALL artic_i5f(UINT port) {  static REG8 IOINPCALL artic_i5f(UINT port) {
   
         (void)port;          (void)port;
         return((BYTE)(artic_getcnt() >> 16));          return((UINT8)(artic_getcnt() >> 16));
 }  }
   
   
Line 86  void artic_reset(void) { Line 86  void artic_reset(void) {
   
 void artic_bind(void) {  void artic_bind(void) {
   
         iocore_attachout(0x005c, artic_o5c);          iocore_attachout(0x005f, artic_o5f);
         iocore_attachinp(0x005c, artic_i5c);          iocore_attachinp(0x005c, artic_i5c);
         iocore_attachinp(0x005d, artic_i5d);          iocore_attachinp(0x005d, artic_i5d);
         iocore_attachinp(0x005e, artic_i5d);          iocore_attachinp(0x005e, artic_i5d);
         iocore_attachinp(0x005f, artic_i5f);          iocore_attachinp(0x005f, artic_i5f);
 }  }
   
 UINT16 IOINPCALL artic_r16(UINT port) {  REG16 IOINPCALL artic_r16(UINT port) {
   
         UINT32  cnt;          UINT32  cnt;
   

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


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