Diff for /np2/i286a/memory.c between versions 1.6 and 1.8

version 1.6, 2003/12/21 23:27:08 version 1.8, 2003/12/22 07:41:15
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "cpucore.h"  #include        "cpucore.h"
 #include        "egcmem.h"  
 #include        "pccore.h"  
 #include        "iocore.h"  
 #include        "vram.h"  
 #include        "font.h"  
   
 #define USE_HIMEM               0x110000  #define USE_HIMEM               0x110000
   
   
 REG8 MEMCALL i286_membyte_read(UINT seg, UINT off) {  
   
         UINT32  address;  
   
         address = (seg << 4) + off;  
         if (address < I286_MEMREADMAX) {  
                 return(mem[address]);  
         }  
         else {  
                 return(i286_memoryread(address));  
         }  
 }  
   
 REG16 MEMCALL i286_memword_read(UINT seg, UINT off) {  
   
         UINT32  address;  
   
         address = (seg << 4) + off;  
         if (address < (I286_MEMREADMAX - 1)) {  
                 return(LOADINTELWORD(mem + address));  
         }  
         else {  
                 return(i286_memoryread_w(address));  
         }  
 }  
   
 void MEMCALL i286_membyte_write(UINT seg, UINT off, REG8 value) {  
   
         UINT32  address;  
   
         address = (seg << 4) + off;  
         if (address < I286_MEMWRITEMAX) {  
                 mem[address] = (BYTE)value;  
         }  
         else {  
                 i286_memorywrite(address, value);  
         }  
 }  
   
 void MEMCALL i286_memword_write(UINT seg, UINT off, REG16 value) {  
   
         UINT32  address;  
   
         address = (seg << 4) + off;  
         if (address < (I286_MEMWRITEMAX - 1)) {  
                 STOREINTELWORD(mem + address, value);  
         }  
         else {  
                 i286_memorywrite_w(address, value);  
         }  
 }  
   
 void MEMCALL i286_memstr_read(UINT seg, UINT off, void *dat, UINT leng) {  void MEMCALL i286_memstr_read(UINT seg, UINT off, void *dat, UINT leng) {
   
         BYTE    *out;          BYTE    *out;
Line 69  void MEMCALL i286_memstr_read(UINT seg,  Line 11  void MEMCALL i286_memstr_read(UINT seg, 
   
         out = (BYTE *)dat;          out = (BYTE *)dat;
         adrs = seg << 4;          adrs = seg << 4;
           off = LOW16(off);
         if ((I286_MEMREADMAX >= 0x10000) &&          if ((I286_MEMREADMAX >= 0x10000) &&
                 (adrs < (I286_MEMREADMAX - 0x10000))) {                  (adrs < (I286_MEMREADMAX - 0x10000))) {
                 if (leng) {                  if (leng) {
Line 107  void MEMCALL i286_memstr_write(UINT seg, Line 50  void MEMCALL i286_memstr_write(UINT seg,
   
         out = (BYTE *)dat;          out = (BYTE *)dat;
         adrs = seg << 4;          adrs = seg << 4;
           off = LOW16(off);
         if ((I286_MEMWRITEMAX >= 0x10000) &&          if ((I286_MEMWRITEMAX >= 0x10000) &&
                 (adrs < (I286_MEMWRITEMAX - 0x10000))) {                  (adrs < (I286_MEMWRITEMAX - 0x10000))) {
                 if (leng) {                  if (leng) {

Removed from v.1.6  
changed lines
  Added in v.1.8


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