Diff for /np2/vram/maketext.c between versions 1.1 and 1.4

version 1.1, 2003/10/16 17:58:17 version 1.4, 2003/11/28 08:01:33
Line 2 Line 2
 #include        "memory.h"  #include        "memory.h"
 #include        "pccore.h"  #include        "pccore.h"
 #include        "iocore.h"  #include        "iocore.h"
 #include        "scrndraw.h"  
 #include        "vram.h"  #include        "vram.h"
   #include        "scrndraw.h"
   #include        "dispsync.h"
 #include        "maketext.h"  #include        "maketext.h"
 #include        "font.h"  #include        "font.h"
 #include        "dispsync.h"  
   
   
                 TRAM_T  tramflag;                  TRAM_T  tramflag;
Line 148  void maketext(int text_renewal) { Line 148  void maketext(int text_renewal) {
         int             linecnt;          int             linecnt;
         BYTE    *q;          BYTE    *q;
         UINT    y;          UINT    y;
         BYTE    line_effect;          BYTE    line_effect = 0;                // for gcc
         int             x;          int             x;
         UINT32  bitmap[TEXTXMAX];          UINT32  bitmap[TEXTXMAX];
         BYTE    curx[TEXTXMAX+1];          BYTE    curx[TEXTXMAX+1];
Line 191  void maketext(int text_renewal) { Line 191  void maketext(int text_renewal) {
   
         pitch = gdc.m.para[GDC_PITCH] & 0xfe;          pitch = gdc.m.para[GDC_PITCH] & 0xfe;
         csrw = LOADINTELWORD(gdc.m.para + GDC_CSRW);          csrw = LOADINTELWORD(gdc.m.para + GDC_CSRW);
         esi = LOADINTELWORD(gdc.m.para + GDC_SCROLL);          esi = LOW12(LOADINTELWORD(gdc.m.para + GDC_SCROLL));
         esi &= 0xfff;  
         scroll = LOADINTELWORD(gdc.m.para + GDC_SCROLL + 2);          scroll = LOADINTELWORD(gdc.m.para + GDC_SCROLL + 2);
         scroll = (scroll >> 4) & 0x3ff;          scroll = LOW14(scroll) >> 4;
         scrp = 0;          scrp = 0;
   
         wait1 = 0;          wait1 = 0;
Line 227  void maketext(int text_renewal) { Line 226  void maketext(int text_renewal) {
                                                 new_flag = 1;                                                  new_flag = 1;
                                                 break;                                                  break;
                                         }                                          }
                                         edi = (edi + 1) & 0xfff;                                          edi = LOW12(edi + 1);
                                 }                                  }
                         }                          }
                         if (new_flag) {                          if (new_flag) {
Line 312  void maketext(int text_renewal) { Line 311  void maketext(int text_renewal) {
                                                         bitmap[x] = 0;                                                          bitmap[x] = 0;
                                                 }                                                  }
                                         }                                          }
                                         edi = (edi+1) & 0x0fff;                                                 // width80                                          edi = LOW12(edi + 1);
                                 }                                  }
                                 if (!tramflag.curdisp) {                                  if (!tramflag.curdisp) {
                                         cur_line = -1;                                          cur_line = -1;
                                 }                                  }
                         }                          }
                         esi = (esi + pitch) & 0x0fff;                                                   // ver0.26                          esi = LOW12(esi + pitch);
                 }                  }
   
                 if ((!TEXT_SDR) && (nowline >= topline + crtc.reg.ssl)) {                  if ((!TEXT_SDR) && (nowline >= topline + crtc.reg.ssl)) {
Line 354  void maketext(int text_renewal) { Line 353  void maketext(int text_renewal) {
                                                 if (curx[x] & 0x20) {                                                  if (curx[x] & 0x20) {
                                                         fntline >>= 1;                                                          fntline >>= 1;
                                                 }                                                  }
                                                 data = font[bitmap[x] + fntline];                                                  data = fontrom[bitmap[x] + fntline];
                                                 *(UINT32 *)(q+0) = text_table[color[x] + (data >> 4)];                                                  *(UINT32 *)(q+0) = text_table[color[x] + (data >> 4)];
                                                 *(UINT32 *)(q+4) = text_table[color[x] + (data & 15)];                                                  *(UINT32 *)(q+4) = text_table[color[x] + (data & 15)];
                                                 q += 8;                                                  q += 8;
Line 410  void maketext(int text_renewal) { Line 409  void maketext(int text_renewal) {
                         y++;                          y++;
                         if (!(--scroll)) {                          if (!(--scroll)) {
                                 scrp = (scrp + 4) & 0x0c;                                  scrp = (scrp + 4) & 0x0c;
                                 esi = LOADINTELWORD(gdc.m.para + GDC_SCROLL + scrp);                                  esi = LOW12(LOADINTELWORD(gdc.m.para + GDC_SCROLL + scrp));
                                 esi &= 0xfff;  
                                 scroll = LOADINTELWORD(gdc.m.para + GDC_SCROLL + scrp + 2);                                  scroll = LOADINTELWORD(gdc.m.para + GDC_SCROLL + scrp + 2);
                                 scroll = (scroll >> 4) & 0x3ff;                                  scroll = LOW14(scroll) >> 4;
                                 reloadline = TRUE;                                  reloadline = TRUE;
                         }                          }
                 }                  }
Line 459  void maketext40(int text_renewal) { Line 457  void maketext40(int text_renewal) {
         int             linecnt;          int             linecnt;
         BYTE    *q;          BYTE    *q;
         UINT    y;          UINT    y;
         BYTE    line_effect;          BYTE    line_effect = 0;                // for gcc
         int             x;          int             x;
         UINT32  bitmap[TEXTXMAX];          UINT32  bitmap[TEXTXMAX];
         BYTE    curx[TEXTXMAX+1];          BYTE    curx[TEXTXMAX+1];
Line 502  void maketext40(int text_renewal) { Line 500  void maketext40(int text_renewal) {
   
         pitch = gdc.m.para[GDC_PITCH] & 0xfe;          pitch = gdc.m.para[GDC_PITCH] & 0xfe;
         csrw = LOADINTELWORD(gdc.m.para + GDC_CSRW);          csrw = LOADINTELWORD(gdc.m.para + GDC_CSRW);
         esi = LOADINTELWORD(gdc.m.para + GDC_SCROLL);          esi = LOW12(LOADINTELWORD(gdc.m.para + GDC_SCROLL));
         esi &= 0xfff;  
         scroll = LOADINTELWORD(gdc.m.para + GDC_SCROLL + 2);          scroll = LOADINTELWORD(gdc.m.para + GDC_SCROLL + 2);
         scroll = (scroll >> 4) & 0x3ff;          scroll = LOW14(scroll) >> 4;
         scrp = 0;          scrp = 0;
   
         wait1 = 0;          wait1 = 0;
Line 538  void maketext40(int text_renewal) { Line 535  void maketext40(int text_renewal) {
                                                 new_flag = 1;                                                  new_flag = 1;
                                                 break;                                                  break;
                                         }                                          }
                                         edi = (edi + 1) & 0xfff;                                          edi = LOW12(edi + 1);
                                 }                                  }
                         }                          }
                         if (new_flag) {                          if (new_flag) {
Line 623  void maketext40(int text_renewal) { Line 620  void maketext40(int text_renewal) {
                                                         bitmap[x] = 0;                                                          bitmap[x] = 0;
                                                 }                                                  }
                                         }                                          }
                                         edi = (edi+2) & 0x0fff;                                                 // width40                                          edi = LOW12(edi + 2);                                                   // width40
                                 }                                  }
                                 if (!tramflag.curdisp) {                                  if (!tramflag.curdisp) {
                                         cur_line = -1;                                          cur_line = -1;
                                 }                                  }
                         }                          }
                         esi = (esi + pitch) & 0x0fff;                                                   // ver0.26                          esi = LOW12(esi + pitch);
                 }                  }
   
                 if ((!TEXT_SDR) && (nowline >= topline + crtc.reg.ssl)) {                  if ((!TEXT_SDR) && (nowline >= topline + crtc.reg.ssl)) {
Line 665  void maketext40(int text_renewal) { Line 662  void maketext40(int text_renewal) {
                                                 if (curx[x] & 0x20) {                                                  if (curx[x] & 0x20) {
                                                         fntline >>= 1;                                                          fntline >>= 1;
                                                 }                                                  }
                                                 data = font[bitmap[x] + fntline];                                                  data = fontrom[bitmap[x] + fntline];
                                                 *(UINT32 *)(q+ 0) = text_tblx2[color[x] +                                                  *(UINT32 *)(q+ 0) = text_tblx2[color[x] +
                                                                                                                         (data>>4)][0];                                                                                                                          (data>>4)][0];
                                                 *(UINT32 *)(q+ 4) = text_tblx2[color[x] +                                                  *(UINT32 *)(q+ 4) = text_tblx2[color[x] +
Line 735  void maketext40(int text_renewal) { Line 732  void maketext40(int text_renewal) {
                         y++;                          y++;
                         if (!(--scroll)) {                          if (!(--scroll)) {
                                 scrp = (scrp + 4) & 0x0c;                                  scrp = (scrp + 4) & 0x0c;
                                 esi = LOADINTELWORD(gdc.m.para + GDC_SCROLL + scrp);                                  esi = LOW12(LOADINTELWORD(gdc.m.para + GDC_SCROLL + scrp));
                                 esi &= 0xfff;  
                                 scroll = LOADINTELWORD(gdc.m.para + GDC_SCROLL + scrp + 2);                                  scroll = LOADINTELWORD(gdc.m.para + GDC_SCROLL + scrp + 2);
                                 scroll = (scroll >> 4) & 0x3ff;                                  scroll = LOW14(scroll) >> 4;
                                 reloadline = TRUE;                                  reloadline = TRUE;
                         }                          }
                 }                  }

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


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