Diff for /np2/i286c/memory.c between versions 1.1 and 1.2

version 1.1, 2003/10/16 17:57:47 version 1.2, 2003/10/19 14:56:15
Line 19  static void MEMCALL i286_wt(UINT32 addre Line 19  static void MEMCALL i286_wt(UINT32 addre
   
 static void MEMCALL tram_wt(UINT32 address, BYTE value) {  static void MEMCALL tram_wt(UINT32 address, BYTE value) {
   
         nevent.remainclock -= vramop.tramwait;          I286_REMCLOCK -= vramop.tramwait;
         if (address < 0xa2000) {          if (address < 0xa2000) {
                 mem[address] = value;                  mem[address] = value;
                 tramupdate[(address >> 1) & 0x0fff] = 1;                  tramupdate[(address >> 1) & 0x0fff] = 1;
Line 51  static void MEMCALL tram_wt(UINT32 addre Line 51  static void MEMCALL tram_wt(UINT32 addre
   
 static void MEMCALL vram_w0(UINT32 address, BYTE value) {  static void MEMCALL vram_w0(UINT32 address, BYTE value) {
   
         nevent.remainclock -= vramop.vramwait;          I286_REMCLOCK -= vramop.vramwait;
         mem[address] = value;          mem[address] = value;
         vramupdate[address & 0x7fff] |= 1;          vramupdate[address & 0x7fff] |= 1;
         gdcs.grphdisp |= 1;          gdcs.grphdisp |= 1;
Line 59  static void MEMCALL vram_w0(UINT32 addre Line 59  static void MEMCALL vram_w0(UINT32 addre
   
 static void MEMCALL vram_w1(UINT32 address, BYTE value) {  static void MEMCALL vram_w1(UINT32 address, BYTE value) {
   
         nevent.remainclock -= vramop.vramwait;          I286_REMCLOCK -= vramop.vramwait;
         mem[address + VRAM_STEP] = value;          mem[address + VRAM_STEP] = value;
         vramupdate[address & 0x7fff] |= 2;          vramupdate[address & 0x7fff] |= 2;
         gdcs.grphdisp |= 2;          gdcs.grphdisp |= 2;
Line 70  static void MEMCALL grcg_rmw0(UINT32 add Line 70  static void MEMCALL grcg_rmw0(UINT32 add
         BYTE    mask;          BYTE    mask;
         BYTE    *vram;          BYTE    *vram;
   
         nevent.remainclock -= vramop.grcgwait;          I286_REMCLOCK -= vramop.grcgwait;
         mask = ~value;          mask = ~value;
         address &= 0x7fff;          address &= 0x7fff;
         vramupdate[address] |= 1;          vramupdate[address] |= 1;
Line 99  static void MEMCALL grcg_rmw1(UINT32 add Line 99  static void MEMCALL grcg_rmw1(UINT32 add
         BYTE    mask;          BYTE    mask;
         BYTE    *vram;          BYTE    *vram;
   
         nevent.remainclock -= vramop.grcgwait;          I286_REMCLOCK -= vramop.grcgwait;
         mask = ~value;          mask = ~value;
         address &= 0x7fff;          address &= 0x7fff;
         vramupdate[address] |= 2;          vramupdate[address] |= 2;
Line 127  static void MEMCALL grcg_tdw0(UINT32 add Line 127  static void MEMCALL grcg_tdw0(UINT32 add
   
         BYTE    *vram;          BYTE    *vram;
   
         nevent.remainclock -= vramop.grcgwait;          I286_REMCLOCK -= vramop.grcgwait;
         address &= 0x7fff;          address &= 0x7fff;
         vramupdate[address] |= 1;          vramupdate[address] |= 1;
         gdcs.grphdisp |= 1;          gdcs.grphdisp |= 1;
Line 151  static void MEMCALL grcg_tdw1(UINT32 add Line 151  static void MEMCALL grcg_tdw1(UINT32 add
   
         BYTE    *vram;          BYTE    *vram;
   
         nevent.remainclock -= vramop.grcgwait;          I286_REMCLOCK -= vramop.grcgwait;
         address &= 0x7fff;          address &= 0x7fff;
         vramupdate[address] |= 2;          vramupdate[address] |= 2;
         gdcs.grphdisp |= 2;          gdcs.grphdisp |= 2;
Line 197  static BYTE MEMCALL i286_rd(UINT32 addre Line 197  static BYTE MEMCALL i286_rd(UINT32 addre
   
 static BYTE MEMCALL tram_rd(UINT32 address) {  static BYTE MEMCALL tram_rd(UINT32 address) {
   
         nevent.remainclock -= vramop.tramwait;          I286_REMCLOCK -= vramop.tramwait;
         if (address < 0xa4000) {          if (address < 0xa4000) {
                 return(mem[address]);                  return(mem[address]);
         }          }
Line 214  static BYTE MEMCALL tram_rd(UINT32 addre Line 214  static BYTE MEMCALL tram_rd(UINT32 addre
   
 static BYTE MEMCALL vram_r0(UINT32 address) {  static BYTE MEMCALL vram_r0(UINT32 address) {
   
         nevent.remainclock -= vramop.vramwait;          I286_REMCLOCK -= vramop.vramwait;
         return(mem[address]);          return(mem[address]);
 }  }
   
 static BYTE MEMCALL vram_r1(UINT32 address) {  static BYTE MEMCALL vram_r1(UINT32 address) {
   
         nevent.remainclock -= vramop.vramwait;          I286_REMCLOCK -= vramop.vramwait;
         return(mem[address + VRAM_STEP]);          return(mem[address + VRAM_STEP]);
 }  }
   
Line 229  static BYTE MEMCALL grcg_tcr0(UINT32 add Line 229  static BYTE MEMCALL grcg_tcr0(UINT32 add
 const BYTE      *vram;  const BYTE      *vram;
         BYTE    ret;          BYTE    ret;
   
         nevent.remainclock -= vramop.grcgwait;          I286_REMCLOCK -= vramop.grcgwait;
         vram = mem + (address & 0x7fff);          vram = mem + (address & 0x7fff);
         ret = 0;          ret = 0;
         if (!(grcg.modereg & 1)) {          if (!(grcg.modereg & 1)) {
Line 252  static BYTE MEMCALL grcg_tcr1(UINT32 add Line 252  static BYTE MEMCALL grcg_tcr1(UINT32 add
         BYTE    *vram;          BYTE    *vram;
         BYTE    ret;          BYTE    ret;
   
         nevent.remainclock -= vramop.grcgwait;          I286_REMCLOCK -= vramop.grcgwait;
         ret = 0;          ret = 0;
         vram = mem + (address & 0x7fff);          vram = mem + (address & 0x7fff);
         if (!(grcg.modereg & 1)) {          if (!(grcg.modereg & 1)) {
Line 346  static void MEMCALL tramw_wt(UINT32 addr Line 346  static void MEMCALL tramw_wt(UINT32 addr
   
   
 #define GRCGW_NON(page) {                                                                                       \  #define GRCGW_NON(page) {                                                                                       \
         nevent.remainclock -= vramop.vramwait;                                                  \          I286_REMCLOCK -= vramop.vramwait;                                                               \
         STOREINTELWORD(mem + address + VRAM_STEP*(page), value);                \          STOREINTELWORD(mem + address + VRAM_STEP*(page), value);                \
         vramupdate[address & 0x7fff] |= (1 << page);                                    \          vramupdate[address & 0x7fff] |= (1 << page);                                    \
         vramupdate[(address + 1) & 0x7fff] |= (1 << page);                              \          vramupdate[(address + 1) & 0x7fff] |= (1 << page);                              \
Line 355  static void MEMCALL tramw_wt(UINT32 addr Line 355  static void MEMCALL tramw_wt(UINT32 addr
   
 #define GRCGW_RMW(page) {                                                                                       \  #define GRCGW_RMW(page) {                                                                                       \
         BYTE    *vram;                                                                                                  \          BYTE    *vram;                                                                                                  \
         nevent.remainclock -= vramop.grcgwait;                                                  \          I286_REMCLOCK -= vramop.grcgwait;                                                               \
         address &= 0x7fff;                                                                                              \          address &= 0x7fff;                                                                                              \
         vramupdate[address] |= (1 << page);                                                             \          vramupdate[address] |= (1 << page);                                                             \
         vramupdate[address + 1] |= (1 << page);                                                 \          vramupdate[address + 1] |= (1 << page);                                                 \
Line 401  static void MEMCALL tramw_wt(UINT32 addr Line 401  static void MEMCALL tramw_wt(UINT32 addr
   
 #define GRCGW_TDW(page) {                                                                                       \  #define GRCGW_TDW(page) {                                                                                       \
         BYTE    *vram;                                                                                                  \          BYTE    *vram;                                                                                                  \
         nevent.remainclock -= vramop.grcgwait;                                                  \          I286_REMCLOCK -= vramop.grcgwait;                                                               \
         address &= 0x7fff;                                                                                              \          address &= 0x7fff;                                                                                              \
         vramupdate[address] |= (1 << page);                                                             \          vramupdate[address] |= (1 << page);                                                             \
         vramupdate[address + 1] |= (1 << page);                                                 \          vramupdate[address + 1] |= (1 << page);                                                 \
Line 483  static UINT16 MEMCALL i286w_rd(UINT32 ad Line 483  static UINT16 MEMCALL i286w_rd(UINT32 ad
   
 static UINT16 MEMCALL tramw_rd(UINT32 address) {  static UINT16 MEMCALL tramw_rd(UINT32 address) {
   
         nevent.remainclock -= vramop.tramwait;          I286_REMCLOCK -= vramop.tramwait;
         if (address < (0xa4000 - 1)) {          if (address < (0xa4000 - 1)) {
                 return(LOADINTELWORD(mem + address));                  return(LOADINTELWORD(mem + address));
         }          }
Line 512  static UINT16 MEMCALL tramw_rd(UINT32 ad Line 512  static UINT16 MEMCALL tramw_rd(UINT32 ad
   
 static UINT16 MEMCALL vramw_r0(UINT32 address) {  static UINT16 MEMCALL vramw_r0(UINT32 address) {
   
         nevent.remainclock -= vramop.vramwait;          I286_REMCLOCK -= vramop.vramwait;
         return(LOADINTELWORD(mem + address));          return(LOADINTELWORD(mem + address));
 }  }
   
 static UINT16 MEMCALL vramw_r1(UINT32 address) {  static UINT16 MEMCALL vramw_r1(UINT32 address) {
   
         nevent.remainclock -= vramop.vramwait;          I286_REMCLOCK -= vramop.vramwait;
         return(LOADINTELWORD(mem + address + VRAM_STEP));          return(LOADINTELWORD(mem + address + VRAM_STEP));
 }  }
   
Line 527  static UINT16 MEMCALL grcgw_tcr0(UINT32  Line 527  static UINT16 MEMCALL grcgw_tcr0(UINT32 
         BYTE    *vram;          BYTE    *vram;
         UINT16  ret;          UINT16  ret;
   
         nevent.remainclock -= vramop.grcgwait;          I286_REMCLOCK -= vramop.grcgwait;
         ret = 0;          ret = 0;
         vram = mem + (address & 0x7fff);          vram = mem + (address & 0x7fff);
         if (!(grcg.modereg & 1)) {          if (!(grcg.modereg & 1)) {
Line 550  static UINT16 MEMCALL grcgw_tcr1(UINT32  Line 550  static UINT16 MEMCALL grcgw_tcr1(UINT32 
         BYTE    *vram;          BYTE    *vram;
         UINT16  ret;          UINT16  ret;
   
         nevent.remainclock -= vramop.grcgwait;          I286_REMCLOCK -= vramop.grcgwait;
         ret = 0;          ret = 0;
         vram = mem + (address & 0x7fff);          vram = mem + (address & 0x7fff);
         if (!(grcg.modereg & 1)) {          if (!(grcg.modereg & 1)) {

Removed from v.1.1  
changed lines
  Added in v.1.2


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