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

version 1.2, 2003/12/08 00:55:32 version 1.4, 2003/12/24 16:11:40
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
   #include        "commng.h"
 #include        "cpucore.h"  #include        "cpucore.h"
 #include        "pccore.h"  #include        "pccore.h"
 #include        "iocore.h"  #include        "iocore.h"
   
   
           COMMNG  cm_prt;
   
   
 // ---- I/O  // ---- I/O
   
   static void IOOUTCALL prt_o40(UINT port, REG8 dat) {
   
           COMMNG  prt;
   
           prt = cm_prt;
           if (prt == NULL) {
                   prt = commng_create(COMCREATE_PRINTER);
                   cm_prt = prt;
           }
           prt->write(prt, (UINT8)dat);
   //      TRACEOUT(("prt - %.2x", dat));
   }
   
 static REG8 IOINPCALL prt_i42(UINT port) {  static REG8 IOINPCALL prt_i42(UINT port) {
   
         REG8    ret;          REG8    ret;
Line 20  static REG8 IOINPCALL prt_i42(UINT port) Line 37  static REG8 IOINPCALL prt_i42(UINT port)
         if (np2cfg.dipsw[0] & 0x80) {          if (np2cfg.dipsw[0] & 0x80) {
                 ret |= 0x08;                  ret |= 0x08;
         }          }
 #ifndef EPSON_286          if (!(pc.model & PCMODEL_EPSON)) {
         if (CPU_TYPE & CPUTYPE_V30) {                  if (CPU_TYPE & CPUTYPE_V30) {
                 ret |= 0x02;                          ret |= 0x02;
         }                  }
 #else          }
         if (np2cfg.dipsw[2] & 0x80) {          else {
                 ret |= 0x02;                  if (np2cfg.dipsw[2] & 0x80) {
                           ret |= 0x02;
                   }
         }          }
 #endif  
         (void)port;          (void)port;
         return(ret);          return(ret);
 }  }
Line 36  static REG8 IOINPCALL prt_i42(UINT port) Line 54  static REG8 IOINPCALL prt_i42(UINT port)
   
 // ---- I/F  // ---- I/F
   
   static const IOOUT prto40[4] = {
                                           prt_o40,        NULL,           NULL,           NULL};
   
 static const IOINP prti40[4] = {  static const IOINP prti40[4] = {
                                         NULL,           prt_i42,        NULL,           NULL};                                          NULL,           prt_i42,        NULL,           NULL};
   
 void printif_reset(void) {  void printif_reset(void) {
   
           commng_destroy(cm_prt);
           cm_prt = NULL;
 }  }
   
 void printif_bind(void) {  void printif_bind(void) {
   
           iocore_attachsysoutex(0x0040, 0x0cf1, prto40, 4);
         iocore_attachsysinpex(0x0040, 0x0cf1, prti40, 4);          iocore_attachsysinpex(0x0040, 0x0cf1, prti40, 4);
 }  }
   

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


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