Diff for /np2/i386c/memory.c between versions 1.1 and 1.3

version 1.1, 2003/12/08 00:55:31 version 1.3, 2003/12/22 07:41:15
Line 11 Line 11
 #include        "font.h"  #include        "font.h"
   
   
           BYTE    mem[0x200000];
   
   
 #define USE_HIMEM  #define USE_HIMEM
   
 // ---- write byte  // ---- write byte
Line 867  REG8 MEMCALL i286_membyte_read(UINT seg, Line 870  REG8 MEMCALL i286_membyte_read(UINT seg,
   
         UINT32  address;          UINT32  address;
   
         address = (seg << 4) + off;          address = (seg << 4) + LOW16(off);
         if (address < I286_MEMREADMAX) {          if (address < I286_MEMREADMAX) {
                 return(mem[address]);                  return(mem[address]);
         }          }
Line 880  REG16 MEMCALL i286_memword_read(UINT seg Line 883  REG16 MEMCALL i286_memword_read(UINT seg
   
         UINT32  address;          UINT32  address;
   
         address = (seg << 4) + off;          address = (seg << 4) + LOW16(off);
         if (address < (I286_MEMREADMAX - 1)) {          if (address < (I286_MEMREADMAX - 1)) {
                 return(LOADINTELWORD(mem + address));                  return(LOADINTELWORD(mem + address));
         }          }
Line 893  void MEMCALL i286_membyte_write(UINT seg Line 896  void MEMCALL i286_membyte_write(UINT seg
   
         UINT32  address;          UINT32  address;
   
         address = (seg << 4) + off;          address = (seg << 4) + LOW16(off);
         if (address < I286_MEMWRITEMAX) {          if (address < I286_MEMWRITEMAX) {
                 mem[address] = (BYTE)value;                  mem[address] = (BYTE)value;
         }          }
Line 906  void MEMCALL i286_memword_write(UINT seg Line 909  void MEMCALL i286_memword_write(UINT seg
   
         UINT32  address;          UINT32  address;
   
         address = (seg << 4) + off;          address = (seg << 4) + LOW16(off);
         if (address < (I286_MEMWRITEMAX - 1)) {          if (address < (I286_MEMWRITEMAX - 1)) {
                 STOREINTELWORD(mem + address, value);                  STOREINTELWORD(mem + address, value);
         }          }
Line 924  void MEMCALL i286_memstr_read(UINT seg,  Line 927  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 962  void MEMCALL i286_memstr_write(UINT seg, Line 966  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.1  
changed lines
  Added in v.1.3


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