Diff for /np2/io/gdc_pset.c between versions 1.5 and 1.12

version 1.5, 2004/02/05 11:34:43 version 1.12, 2005/03/11 15:12:57
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        "cpucore.h"  #include        "cpucore.h"
 #include        "egcmem.h"  
 #include        "pccore.h"  #include        "pccore.h"
 #include        "iocore.h"  #include        "iocore.h"
   #include        "memegc.h"
   #include        "gdc_sub.h"
 #include        "gdc_pset.h"  #include        "gdc_pset.h"
 #include        "vram.h"  #include        "vram.h"
   
   
 static void MEMCALL _nop(GDCPSET pset, UINT addr, UINT bit) {  static void MEMCALL _nop(GDCPSET pset, UINT addr, UINT bit) {
   
           (void)pset;
           (void)addr;
           (void)bit;
 }  }
   
 static void MEMCALL _replace0(GDCPSET pset, UINT addr, UINT bit) {  static void MEMCALL _replace0(GDCPSET pset, UINT addr, UINT bit) {
Line 45  static void MEMCALL _set(GDCPSET pset, U Line 50  static void MEMCALL _set(GDCPSET pset, U
   
 static void MEMCALL withtdw(GDCPSET pset, UINT addr, UINT bit) {  static void MEMCALL withtdw(GDCPSET pset, UINT addr, UINT bit) {
   
         BYTE    *ptr;          UINT8   *ptr;
   
         addr &= ~1;          addr &= ~1;
         *(UINT16 *)(vramupdate + addr) |= pset->update.w;          *(UINT16 *)(vramupdate + addr) |= pset->update.w;
Line 59  static void MEMCALL withtdw(GDCPSET pset Line 64  static void MEMCALL withtdw(GDCPSET pset
   
 static void MEMCALL withrmw(GDCPSET pset, UINT addr, UINT bit) {  static void MEMCALL withrmw(GDCPSET pset, UINT addr, UINT bit) {
   
         BYTE    *ptr;          UINT8   *ptr;
         BYTE    data;          UINT8   data;
         BYTE    mask;          UINT8   mask;
   
         vramupdate[addr] |= pset->update.b[0];          vramupdate[addr] |= pset->update.b[0];
         ptr = pset->base.ptr + addr;          ptr = pset->base.ptr + addr;
Line 89  static void MEMCALL withegc(GDCPSET pset Line 94  static void MEMCALL withegc(GDCPSET pset
                 addr &= ~1;                  addr &= ~1;
                 data <<= 8;                  data <<= 8;
         }          }
         egc_write_w(pset->base.addr + addr, data);          egc_writeword(pset->base.addr + addr, data);
 }  }
   
   
 static const GDCPSFN psettbl[4][2] = {  static const GDCPFN psettbl[4][2] = {
                                 {_replace0,     _replace1},                                  {_replace0,     _replace1},
                                 {_nop,          _complemnt},                                  {_nop,          _complemnt},
                                 {_nop,          _clear},                                  {_nop,          _clear},
Line 104  static const GDCPSFN psettbl[4][2] = { Line 109  static const GDCPSFN psettbl[4][2] = {
   
 void MEMCALL gdcpset_prepare(GDCPSET pset, UINT32 csrw, REG16 pat, REG8 op) {  void MEMCALL gdcpset_prepare(GDCPSET pset, UINT32 csrw, REG16 pat, REG8 op) {
   
         BYTE    *base;          UINT8   *base;
         BYTE    update;          UINT8   update;
   
         if (vramop.operate & VOP_EGCBIT) {          if (vramop.operate & (1 << VOPBIT_EGC)) {
                 pset->func[0] = _nop;                  pset->func[0] = _nop;
                 pset->func[1] = withegc;                  pset->func[1] = withegc;
                 pset->base.addr = vramplaneseg[(csrw >> 14) & 3];                  pset->base.addr = gdcplaneseg[(csrw >> 14) & 3];
         }          }
         else {          else {
                 base = mem;                  base = mem;
Line 125  void MEMCALL gdcpset_prepare(GDCPSET pse Line 130  void MEMCALL gdcpset_prepare(GDCPSET pse
                 if (!(grcg.gdcwithgrcg & 0x8)) {                  if (!(grcg.gdcwithgrcg & 0x8)) {
                         pset->func[0] = psettbl[op][0];                          pset->func[0] = psettbl[op][0];
                         pset->func[1] = psettbl[op][1];                          pset->func[1] = psettbl[op][1];
                         pset->base.ptr = base + vramplaneseg[(csrw >> 14) & 3];                          pset->base.ptr = base + gdcplaneseg[(csrw >> 14) & 3];
                 }                  }
                 else {                  else {
                         pset->func[0] = _nop;                          pset->func[0] = _nop;
Line 142  void MEMCALL gdcpset_prepare(GDCPSET pse Line 147  void MEMCALL gdcpset_prepare(GDCPSET pse
         pset->dots = 0;          pset->dots = 0;
 }  }
   
 void MEMCALL gdcpset(GDCPSET pset, UINT16 x, UINT16 y) {  void MEMCALL gdcpset(GDCPSET pset, REG16 x, REG16 y) {
   
         UINT    dot;          UINT    dot;
   
         dot = pset->pattern & 1;          dot = pset->pattern & 1;
         pset->pattern = (pset->pattern >> 1) + (dot << 15);          pset->pattern = (pset->pattern >> 1) + (dot << 15);
         pset->dots++;          pset->dots++;
           x = LOW16(x);
           y = LOW16(y);
         if (y > 409) {          if (y > 409) {
                 return;                  return;
         }          }

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


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