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

version 1.1.1.1, 2003/10/16 17:57:50 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        "memory.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) {
   
         cpuio.reset_req = 1;          CPU_ADRSMASK = 0x0fffff;
         extmem.adrsmask = 0x0fffff;  #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) {
   
         extmem.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 40  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 (extmem.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:
                         extmem.adrsmask = 0x1fffff;                          CPU_ADRSMASK = 0x1fffff;
   #if defined(CPU_386)
                           cpumem_addrmask = 0xffffffff;
   #endif
                         break;                          break;
   
                 case 0x03:                  case 0x03:
                         extmem.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 (extmem.adrsmask != 0x1fffff) {          if (CPU_ADRSMASK != 0x1fffff) {
                 ret |= 0x01;                  ret |= 0x01;
         }          }
         if (nmi.enable) {          if (nmiio.enable) {
                 ret |= 0x02;                  ret |= 0x02;
         }          }
         (void)port;          (void)port;
Line 105  static const IOINP cpuioif0[8] = { Line 126  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.4


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