Diff for /np2/i386c/Attic/mem9821.c between versions 1.3 and 1.5

version 1.3, 2004/04/02 19:31:26 version 1.5, 2004/04/08 13:08:22
Line 53  void MEMCALL mem9821_b0w(UINT32 address, Line 53  void MEMCALL mem9821_b0w(UINT32 address,
         UINT32  addr;          UINT32  addr;
   
         address -= 0xa8000;          address -= 0xa8000;
         addr = (vramop.bank2[((address >> 14) & 2)] & 15) << 15;          addr = (vramop.mio1[((address >> 14) & 2)] & 15) << 15;
         addr += LOW15(address);          addr += LOW15(address);
         vramex[addr] = value;          vramex[addr] = value;
         vramupdate[LOW15(addr >> 3)] |= (addr & 0x40000)?2:1;          vramupdate[LOW15(addr >> 3)] |= (addr & 0x40000)?2:1;
Line 65  REG8 MEMCALL mem9821_b0r(UINT32 address) Line 65  REG8 MEMCALL mem9821_b0r(UINT32 address)
         UINT32  addr;          UINT32  addr;
   
         address -= 0xa8000;          address -= 0xa8000;
         addr = (vramop.bank2[((address >> 14) & 2)] & 15) << 15;          addr = (vramop.mio1[((address >> 14) & 2)] & 15) << 15;
         addr += LOW15(address);          addr += LOW15(address);
         return(vramex[addr]);          return(vramex[addr]);
 }  }
   
 void MEMCALL mem9821_b0ww(UINT32 address, REG16 value) {  void MEMCALL mem9821_b0ww(UINT32 address, REG16 value) {
   
         mem9821_b0w(address + 0, value);          mem9821_b0w(address + 0, (REG8)value);
         mem9821_b0w(address + 1, value >> 8);          mem9821_b0w(address + 1, (REG8)(value >> 8));
 }  }
   
 REG16 MEMCALL mem9821_b0rw(UINT32 address) {  REG16 MEMCALL mem9821_b0rw(UINT32 address) {
Line 86  REG16 MEMCALL mem9821_b0rw(UINT32 addres Line 86  REG16 MEMCALL mem9821_b0rw(UINT32 addres
 }  }
   
   
 void MEMCALL mem9821_b2w(UINT32 address, REG8 value) {  void MEMCALL mem9821_b2w(UINT32 addr, REG8 value) {
   
         address -= 0xe0004;          UINT    pos;
         if (address < 4) {  
                 vramop.bank2[address] = value;          addr -= 0xe0000;
 //              TRACEOUT(("bank2[%d] = %.2x", address, value));          pos = addr - 0x0004;
           if (pos < 4) {
                   vramop.mio1[pos] = value;
                   return;
           }
           pos = addr - 0x0100;
           if (pos < 0x40) {
                   vramop.mio2[pos] = value;
                   TRACEOUT(("mem9821_b2w(%.5x, %.2x)", addr, value));
                   return;
         }          }
 }  }
   
 REG8 MEMCALL mem9821_b2r(UINT32 address) {  REG8 MEMCALL mem9821_b2r(UINT32 addr) {
   
         address -= 0xe0004;          UINT    pos;
         if (address < 4) {  
                 return(vramop.bank2[address]);          addr -= 0xe0000;
           pos = addr - 0x0004;
           if (pos < 4) {
                   return(vramop.mio1[pos]);
           }
           pos = addr - 0x0100;
           if (pos < 0x40) {
                   return(vramop.mio2[pos]);
         }          }
         return(0xff);          return(0x00);
 }  }
   
 void MEMCALL mem9821_b2ww(UINT32 address, REG16 value) {  void MEMCALL mem9821_b2ww(UINT32 address, REG16 value) {
   
         mem9821_b2w(address + 0, value);          mem9821_b2w(address + 0, (REG8)value);
         mem9821_b2w(address + 1, value >> 8);          mem9821_b2w(address + 1, (REG8)(value >> 8));
 }  }
   
 REG16 MEMCALL mem9821_b2rw(UINT32 address) {  REG16 MEMCALL mem9821_b2rw(UINT32 address) {

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


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