Diff for /np2/lio/gput1.c between versions 1.5 and 1.6

version 1.5, 2004/02/20 15:20:30 version 1.6, 2004/02/20 16:20:41
Line 8 Line 8
   
   
 typedef struct {  typedef struct {
           BYTE    x1[2];
           BYTE    y1[2];
           BYTE    x2[2];
           BYTE    y2[2];
           BYTE    off[2];
           BYTE    seg[2];
           BYTE    leng[2];
   } GGET;
   
   typedef struct {
         BYTE    x[2];          BYTE    x[2];
         BYTE    y[2];          BYTE    y[2];
         BYTE    off[2];          BYTE    off[2];
Line 306  const BYTE *src; Line 316  const BYTE *src;
   
 // ----  // ----
   
 static REG8 putsub(const _LIOWORK *lio, const LIOPUT *lput) {  static REG8 putsub(LIOWORK lio, const LIOPUT *lput) {
   
         UINT    addr;          UINT    addr;
         UINT8   sbit;          UINT8   sbit;
Line 316  static REG8 putsub(const _LIOWORK *lio,  Line 326  static REG8 putsub(const _LIOWORK *lio, 
         UINT    height;          UINT    height;
         UINT    flag;          UINT    flag;
         UINT    pl;          UINT    pl;
           UINT    writecnt;
   
         if ((lput->x < lio->range.x1) ||          if ((lput->x < lio->range.x1) ||
                 (lput->y < lio->range.y1) ||                  (lput->y < lio->range.y1) ||
Line 345  static REG8 putsub(const _LIOWORK *lio,  Line 356  static REG8 putsub(const _LIOWORK *lio, 
         pt.maskl = (UINT8)(0xff >> pt.sft);          pt.maskl = (UINT8)(0xff >> pt.sft);
         pt.maskr = (UINT8)((~0x7f) >> ((pt.width + pt.sft - 1) & 7));          pt.maskr = (UINT8)((~0x7f) >> ((pt.width + pt.sft - 1) & 7));
         pt.masklr = (UINT8)(pt.maskl >> pt.sft);          pt.masklr = (UINT8)(pt.maskl >> pt.sft);
         TRACEOUT(("mask - %.2x %.2x %.2x", pt.maskl, pt.maskr, pt.masklr));  
   
         datacnt = (lput->width + 7) >> 3;          datacnt = (lput->width + 7) >> 3;
         off = lput->off;          off = lput->off;
         TRACEOUT(("datacnt %d - %.4x %.4x", datacnt, lput->seg, lput->off));  
   
         flag = (lio->gcolor1.palmode == 2)?0x0f:0x07;          flag = (lio->gcolor1.palmode == 2)?0x0f:0x07;
         flag |= (lput->fg & 15) << 4;          flag |= (lput->fg & 15) << 4;
         flag |= (lput->bg & 15) << 8;          flag |= (lput->bg & 15) << 8;
   
           TRACEOUT(("mode = %d [%.x]", lput->mode, flag));
   
         // さて表示。          // さて表示。
         TRACEOUT(("gput mode = %d", lput->mode));          writecnt = 0;
         for (pl=0; pl<4; pl++) {          for (pl=0; pl<4; pl++) {
                 if (flag & 1) {                  if (flag & 1) {
                         pt.baseptr = mem + lioplaneadrs[pl];                          pt.baseptr = mem + lioplaneadrs[pl];
Line 379  static REG8 putsub(const _LIOWORK *lio,  Line 390  static REG8 putsub(const _LIOWORK *lio, 
                                                 else {                                                  else {
                                                         putand(&pt);                                                          putand(&pt);
                                                 }                                                  }
                                                   writecnt += 2;
                                                 break;                                                  break;
   
                                         case 1:         // NOT                                          case 1:         // NOT
Line 394  static REG8 putsub(const _LIOWORK *lio,  Line 406  static REG8 putsub(const _LIOWORK *lio, 
                                                 else {                                                  else {
                                                         putand(&pt);                                                          putand(&pt);
                                                 }                                                  }
                                                   writecnt += 2;
                                                 break;                                                  break;
   
                                         case 2:         // OR                                          case 2:         // OR
                                                 if (flag & (1 << 4)) {                                                  if (flag & (1 << 4)) {
                                                         putor(&pt);                                                          putor(&pt);
                                                           writecnt++;
                                                 }                                                  }
                                                 if (flag & (1 << 8)) {                                                  if (flag & (1 << 8)) {
                                                         putorn(&pt);                                                          putorn(&pt);
                                                           writecnt++;
                                                 }                                                  }
                                                 break;                                                  break;
   
                                         case 3:         // AND                                          case 3:         // AND
                                                 if (flag & (1 << 4)) {                                                  if (!(flag & (1 << 4))) {
                                                         putand(&pt);  
                                                 }  
                                                 if (flag & (1 << 8)) {  
                                                         putandn(&pt);                                                          putandn(&pt);
                                                           writecnt++;
                                                   }
                                                   if (!(flag & (1 << 8))) {
                                                           putand(&pt);
                                                           writecnt++;
                                                 }                                                  }
                                                 break;                                                  break;
   
                                         case 4:         // XOR                                          case 4:         // XOR
                                                 if (flag & (1 << 4)) {                                                  if (flag & (1 << 4)) {
                                                         putxor(&pt);                                                          putxor(&pt);
                                                           writecnt++;
                                                 }                                                  }
                                                 if (flag & (1 << 8)) {                                                  if (flag & (1 << 8)) {
                                                         putxorn(&pt);                                                          putxorn(&pt);
                                                           writecnt++;
                                                 }                                                  }
                                                 break;                                                  break;
                                 }                                  }
Line 431  static REG8 putsub(const _LIOWORK *lio,  Line 450  static REG8 putsub(const _LIOWORK *lio, 
                 }                  }
                 flag >>= 1;                  flag >>= 1;
         }          }
           lio->wait += writecnt * datacnt * (10 + 10 + 10);
         return(LIO_SUCCESS);          return(LIO_SUCCESS);
 }  }
   
Line 439  static REG8 putsub(const _LIOWORK *lio,  Line 459  static REG8 putsub(const _LIOWORK *lio, 
   
 REG8 lio_gget(LIOWORK lio) {  REG8 lio_gget(LIOWORK lio) {
   
           GGET    dat;
   
         lio_updaterange(lio);          lio_updaterange(lio);
           i286_memstr_read(CPU_DS, CPU_BX, &dat, sizeof(dat));
   
         return(0);          return(0);
 }  }

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


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