Diff for /np2/io/cpuio.c between versions 1.1.1.1 and 1.10

version 1.1.1.1, 2003/10/16 17:57:50 version 1.10, 2004/01/23 15:05:05
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "i286.h"  #include        "cpucore.h"
 #include        "memory.h"  
 #include        "pccore.h"  #include        "pccore.h"
 #include        "iocore.h"  #include        "iocore.h"
 #include        "sound.h"  
 #include        "fmboard.h"  
   
   
 // ---- I/O  // ---- I/O
   
 static void IOOUTCALL cpuio_of0(UINT port, BYTE dat) {  static void IOOUTCALL cpuio_of0(UINT port, REG8 dat) {
   
         cpuio.reset_req = 1;  #if defined(TRACE)
         extmem.adrsmask = 0x0fffff;          if (CPU_MSW & 1) {
         i286_interrupt(0x02);                  TRACEOUT(("80286 ProtectMode Disable"));
           }
   #endif
           epsonio.cpumode = (CPU_MSW & 1)?'P':'R';
           CPU_ADRSMASK = 0x0fffff;
           CPU_RESETREQ = 1;
         nevent_forceexit();          nevent_forceexit();
         (void)port;          (void)port;
         (void)dat;          (void)dat;
 }  }
   
 static void IOOUTCALL cpuio_of2(UINT port, BYTE dat) {  static void IOOUTCALL cpuio_of2(UINT port, REG8 dat) {
   
         extmem.adrsmask = 0x1fffff;          CPU_ADRSMASK = 0xffffffff;
         (void)port;          (void)port;
         (void)dat;          (void)dat;
 }  }
   
 static BYTE IOINPCALL cpuio_if0(UINT port) {  static REG8 IOINPCALL cpuio_if0(UINT port) {
   
         BYTE    ret;          BYTE    ret;
   
         if (!(usesound & 0x80)) {          if (!(pccore.sound & 0x80)) {
                 ret = 0x00;                  ret = 0x00;
         }          }
         else {                          // for AMD-98          else {                          // for AMD-98
Line 40  static BYTE IOINPCALL cpuio_if0(UINT por Line 42  static BYTE IOINPCALL cpuio_if0(UINT por
         return(ret);          return(ret);
 }  }
   
 static BYTE IOINPCALL cpuio_if2(UINT port) {  static REG8 IOINPCALL cpuio_if2(UINT port) {
   
         BYTE    ret;          REG8    ret;
   
         ret = 0xfe;          ret = 0xff;
         if (extmem.adrsmask != 0x1fffff) {          ret -= (REG8)((CPU_ADRSMASK >> 20) & 1);
                 ret++;  
         }  
         (void)port;          (void)port;
         return(ret);          return(ret);
 }  }
   
   
 #ifdef CPU386                                                                                   // defineを変えてね  #if defined(CPUCORE_IA32)
 static void IOOUTCALL cpuio_of6(UINT port, BYTE dat) {  static void IOOUTCALL cpuio_of6(UINT port, REG8 dat) {
   
         switch(dat) {          switch(dat) {
                 case 0x02:                  case 0x02:
                         extmem.adrsmask = 0x1fffff;                          CPU_ADRSMASK = 0xffffffff;
                         break;                          break;
   
                 case 0x03:                  case 0x03:
                         extmem.adrsmask = 0x0fffff;                          CPU_ADRSMASK = 0x0fffff;
                         break;  
         }          }
         (void)port;          (void)port;
 }  }
   
 static BYTE IOINPCALL cpuio_if6(UINT port) {  static REG8 IOINPCALL cpuio_if6(UINT port) {
   
         BYTE    ret;          REG8    ret;
   
         ret = 0x00;          ret = 0x00;
         if (extmem.adrsmask != 0x1fffff) {          if (!(CPU_ADRSMASK & (1 << 20))) {
                 ret |= 0x01;                  ret |= 0x01;
         }          }
         if (nmi.enable) {          if (nmiio.enable) {
                 ret |= 0x02;                  ret |= 0x02;
         }          }
         (void)port;          (void)port;
Line 87  static BYTE IOINPCALL cpuio_if6(UINT por Line 86  static BYTE IOINPCALL cpuio_if6(UINT por
   
 // ---- I/F  // ---- I/F
   
 #ifndef CPU386                                                                                  // defineを変えてね  #if !defined(CPUCORE_IA32)
 static const IOOUT cpuioof0[8] = {  static const IOOUT cpuioof0[8] = {
                                         cpuio_of0,      cpuio_of2,      NULL,           NULL,                                          cpuio_of0,      cpuio_of2,      NULL,           NULL,
                                         NULL,           NULL,           NULL,           NULL};                                          NULL,           NULL,           NULL,           NULL};
Line 105  static const IOINP cpuioif0[8] = { Line 104  static const IOINP cpuioif0[8] = {
                                         NULL,           NULL,           NULL,           NULL};                                          NULL,           NULL,           NULL,           NULL};
 #endif  #endif
   
 void cpuio_reset(void) {  
   
         ZeroMemory(&cpuio, sizeof(cpuio));  
 }  
   
 void cpuio_bind(void) {  void cpuio_bind(void) {
   
         iocore_attachsysoutex(0x00f0, 0x0cf1, cpuioof0, 8);          iocore_attachsysoutex(0x00f0, 0x0cf1, cpuioof0, 8);

Removed from v.1.1.1.1  
changed lines
  Added in v.1.10


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