Diff for /np2/io/cpuio.c between versions 1.3 and 1.4

version 1.3, 2003/12/01 10:45:46 version 1.4, 2003/12/08 00:55:32
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"
 #include        "sound.h"  #include        "sound.h"
 #include        "fmboard.h"  #include        "fmboard.h"
   
   // 後で調整
   #if defined(CPU386)
   DWORD cpumem_addrmask = 0xfffff;
   #endif
   
   
 // ---- I/O  // ---- I/O
   
 static void IOOUTCALL cpuio_of0(UINT port, BYTE dat) {  static void IOOUTCALL cpuio_of0(UINT port, REG8 dat) {
   
         i286core.s.adrsmask = 0x0fffff;          CPU_ADRSMASK = 0x0fffff;
         i286core.s.resetreq = 1;  #if defined(CPU386)
         i286_interrupt(0x02);          cpumem_addrmask = 0xfffff;
   #endif
           CPU_RESETREQ = 1;
           CPU_INTERRUPT(0x02);
         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) {
   
         i286core.s.adrsmask = 0x1fffff;          CPU_ADRSMASK = 0x1fffff;
   #if defined(CPU386)
           cpumem_addrmask = 0xffffffff;
   #endif
         (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;
   
Line 39  static BYTE IOINPCALL cpuio_if0(UINT por Line 50  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;
   
   #if 1
           ret = 0xff;
           ret -= (REG8)((CPU_ADRSMASK >> 20) & 1);
   #else
         ret = 0xfe;          ret = 0xfe;
         if (i286core.s.adrsmask != 0x1fffff) {          if (CPU_ADRSMASK != 0x1fffff) {
                 ret++;                  ret++;
         }          }
   #endif
         (void)port;          (void)port;
         return(ret);          return(ret);
 }  }
   
   
 #ifdef CPU386                                                                                   // defineを変えてね  #ifdef CPU386                                                                                   // defineを変えてね
 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:
                         i286core.s.adrsmask = 0x1fffff;                          CPU_ADRSMASK = 0x1fffff;
   #if defined(CPU_386)
                           cpumem_addrmask = 0xffffffff;
   #endif
                         break;                          break;
   
                 case 0x03:                  case 0x03:
                         i286core.s.adrsmask = 0x0fffff;                          CPU_ADRSMASK = 0x0fffff;
   #if defined(CPU_386)
                           cpumem_addrmask = 0xfffff;
   #endif
                         break;                          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 (i286core.s.adrsmask != 0x1fffff) {          if (CPU_ADRSMASK != 0x1fffff) {
                 ret |= 0x01;                  ret |= 0x01;
         }          }
         if (nmi.enable) {          if (nmiio.enable) {
                 ret |= 0x02;                  ret |= 0x02;
         }          }
         (void)port;          (void)port;

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


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