xeij/DrawingMode.java (10/48)- Source code ソースコード - XEiJ - STUDIO KAMADA
xeij/DrawingMode.java (10/48)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

      //    ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),tpc(0)):ls1(f1p())!=0?fpc(tod(f2q()))!=0?fpc(tod(f2q())):tpc(0):fpc(f1p())!=0?fpc(f1p()):tpc(0)
      //  中間コード3
      //    ls1(v1=fpc(tev(v3=f1p())))!=0?mix(mix(v1,fpc(tod(f2q()))),tpc(0)):ls1(v3)!=0?(v11=fpc(tod(f2q())))!=0?v11:tpc(0):(v15=fpc(v3))!=0?v15:tpc(0)
      //  中間コード4
      //    ls1(p=fpc(tev(q=f1p())))!=0?mix(mix(p,fpc(tod(f2q()))),tpc(0)):ls1(q)!=0?(p=fpc(tod(f2q())))!=0?p:tpc(0):(p=fpc(q))!=0?p:tpc(0)
      //  中間コード5
      //    ((p=fpc((q=f1p())&-2))&1)!=0?mix(mix(p,fpc(f2q()|1)),tpc(0)):(q&1)!=0?(p=fpc(f2q()|1))!=0?p:tpc(0):(p=fpc(q))!=0?p:tpc(0)
      //  中間コード6
      //    ((p=fpc((q=f1p())&-2))&1)!=0?cto(mix(mix(p,fpc(f2q()|1)),tpc(0))):(q&1)!=0?(p=fpc(f2q()|1))!=0?cto(p):tpo(0):(p=fpc(q))!=0?cto(p):tpo(0)
      F1t_XHCGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                       GraphicScreen.graM4[gy1st | gx1st & 511])) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])] :
                                (q & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                       GraphicScreen.graM4[gy1st | gx1st & 511])) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])] :
                                (q & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F1t_XHCGT

      //================================================================================
      //F1t_XHPT ($0001,$09xx,$1D03)
      //  概要
      //    F1t  512ドット256色1プレーン＞テキスト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (f1p()<=1?(fpc(0)!=0?fpc(0):tpc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):tpc(0)):mix(fpc(tev(f1p())),tpc(0)))
      //  中間コード2
      //    f1p()<=1?fpc(0)!=0?fpc(0):tpc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):tpc(0):mix(fpc(tev(f1p())),tpc(0))
      //  中間コード3
      //    (v0=f1p())<=1?(v1=fpc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=fpc(v0))!=0?v4:tpc(0):mix(fpc(tev(v0)),tpc(0))
      //  中間コード4
      //    (p=f1p())<=1?(p=fpc(0))!=0?p:tpc(0):ls1(p)==0?(q=fpc(p))!=0?q:tpc(0):mix(fpc(tev(p)),tpc(0))
      //  中間コード5
      //    (p=f1p())<=1?(p=fpc(0))!=0?p:tpc(0):(p&1)==0?(q=fpc(p))!=0?q:tpc(0):mix(fpc(p&-2),tpc(0))
      //  中間コード6
      //    (p=f1p())<=1?(p=fpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):tpo(0):cto(mix(fpc(p&-2),tpc(0)))
      F1t_XHPT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F1t_XHPT

      //================================================================================
      //F1t_XHPG ($0001,$09xx,$1E03)
      //  概要
      //    F1t  512ドット256色1プレーン＞テキスト(OFF)
      //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0でないとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (f1p()<=1?(fpc(0)!=0?fpc(0):tpc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):tpc(0)):(mix(fpc(tev(f1p())),fpc(tod(f2q())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):tpc(0)))
      //  中間コード2
      //    f1p()<=1?fpc(0)!=0?fpc(0):tpc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):tpc(0):mix(fpc(tev(f1p())),fpc(tod(f2q())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):tpc(0)
      //  中間コード3
      //    (v0=f1p())<=1?(v1=fpc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=fpc(v0))!=0?v4:tpc(0):(v6=mix(fpc(tev(v0)),fpc(tod(f2q()))))!=0?v6:tpc(0)
      //  中間コード4
      //    (p=f1p())<=1?(p=fpc(0))!=0?p:tpc(0):ls1(p)==0?(q=fpc(p))!=0?q:tpc(0):(q=mix(fpc(tev(p)),fpc(tod(f2q()))))!=0?q:tpc(0)
      //  中間コード5
      //    (p=f1p())<=1?(p=fpc(0))!=0?p:tpc(0):(p&1)==0?(q=fpc(p))!=0?q:tpc(0):(q=mix(fpc(p&-2),fpc(f2q()|1)))!=0?q:tpc(0)
      //  中間コード6
      //    (p=f1p())<=1?(p=fpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):tpo(0):(q=mix(fpc(p&-2),fpc(f2q()|1)))!=0?cto(q):tpo(0)
      F1t_XHPG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                               GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                               GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                   GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F1t_XHPG

      //================================================================================
      //F1t_XHPGT ($0001,$09xx,$1F03)
      //  概要
      //    F1t  512ドット256色1プレーン＞テキスト(OFF)
      //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (f1p()<=1?(fpc(0)!=0?fpc(0):tpc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):tpc(0)):mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),tpc(0)))
      //  中間コード2
      //    f1p()<=1?fpc(0)!=0?fpc(0):tpc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):tpc(0):mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),tpc(0))
      //  中間コード3
      //    (v0=f1p())<=1?(v1=fpc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=fpc(v0))!=0?v4:tpc(0):mix(mix(fpc(tev(v0)),fpc(tod(f2q()))),tpc(0))
      //  中間コード4
      //    (p=f1p())<=1?(p=fpc(0))!=0?p:tpc(0):ls1(p)==0?(q=fpc(p))!=0?q:tpc(0):mix(mix(fpc(tev(p)),fpc(tod(f2q()))),tpc(0))
      //  中間コード5
      //    (p=f1p())<=1?(p=fpc(0))!=0?p:tpc(0):(p&1)==0?(q=fpc(p))!=0?q:tpc(0):mix(mix(fpc(p&-2),fpc(f2q()|1)),tpc(0))
      //  中間コード6
      //    (p=f1p())<=1?(p=fpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):tpo(0):cto(mix(mix(fpc(p&-2),fpc(f2q()|1)),tpc(0)))
      F1t_XHPGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F1t_XHPGT

      //================================================================================
      //F1t_A ($0001,$09xx,$4003)
      //  概要
      //    F1t  512ドット256色1プレーン＞テキスト(OFF)
      //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
      //  手順
      //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //  中間コード1
      //    mix(fpc(f1p()),tpc(0))
      //  中間コード2
      //    mix(fpc(f1p()),tpc(0))
      //  中間コード3
      //    mix(fpc(f1p()),tpc(0))
      //  中間コード4
      //    mix(fpc(f1p()),tpc(0))
      //  中間コード5
      //    mix(fpc(f1p()),tpc(0))
      //  中間コード6
      //    cto(mix(fpc(f1p()),tpc(0)))
      F1t_A {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                GraphicScreen.graM4[gy1st | gx1st & 511])],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 1 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 2 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 3 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 4 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 5 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 6 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 7 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                GraphicScreen.graM4[gy1st | gx1st & 511])],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 1 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 2 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 3 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 4 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 5 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 6 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy1st | gx1st + 7 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F1t_A

      //================================================================================
      //F2t ($0001,$09xx,$000F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    拡張なし
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のカラーが0でないとき
      //        2番目のカラー
      //      さもなくば(2番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (f1p()!=0?(fpc(f1p())!=0?fpc(f1p()):tpc(0)):(fpc(f2p())!=0?fpc(f2p()):tpc(0)))
      //  中間コード2
      //    f1p()!=0?fpc(f1p())!=0?fpc(f1p()):tpc(0):fpc(f2p())!=0?fpc(f2p()):tpc(0)
      //  中間コード3
      //    (v0=f1p())!=0?(v1=fpc(v0))!=0?v1:tpc(0):(v3=fpc(f2p()))!=0?v3:tpc(0)
      //  中間コード4
      //    (p=f1p())!=0?(q=fpc(p))!=0?q:tpc(0):(p=fpc(f2p()))!=0?p:tpc(0)
      //  中間コード5
      //    (p=f1p())!=0?(q=fpc(p))!=0?q:tpc(0):(p=fpc(f2p()))!=0?p:tpc(0)
      //  中間コード6
      //    (p=f1p())!=0?(q=fpc(p))!=0?cto(q):tpo(0):(p=fpc(f2p()))!=0?cto(p):tpo(0)
      F2t {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511])]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511])]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t

      //================================================================================
      //XF2t
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    拡張あり
      XF2t {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //F2t_XWC
          case 0b00010001:  //F2t_XWC
          case 0b00010010:  //F2t_XWC
          case 0b00010011:  //F2t_XWC
            F2t.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //F2t_XWP
          case 0b00010101:  //F2t_XWP
          case 0b00010110:  //F2t_XWP
          case 0b00010111:  //F2t_XWP
            F2t_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //F2t_XHC
            F2t.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //F2t_XHCT
            F2t_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011010:  //F2t_XHCG
            F2t_XHCG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011011:  //F2t_XHCGT
            F2t_XHCGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //F2t_XHPT
            F2t_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011110:  //F2t_XHPG
            F2t_XHPG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011111:  //F2t_XHPGT
            F2t_XHPGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //F2t_A
          case 0b01000001:  //F2t_A
          case 0b01000010:  //F2t_A
          case 0b01000011:  //F2t_A
          case 0b01000100:  //F2t_A
          case 0b01000101:  //F2t_A
          case 0b01000110:  //F2t_A
          case 0b01000111:  //F2t_A
          case 0b01001000:  //F2t_A
          case 0b01001001:  //F2t_A
          case 0b01001010:  //F2t_A
          case 0b01001011:  //F2t_A
          case 0b01001100:  //F2t_A
          case 0b01001101:  //F2t_A
          case 0b01001110:  //F2t_A
          case 0b01001111:  //F2t_A
          case 0b01010000:  //F2t_A
          case 0b01010001:  //F2t_A
          case 0b01010010:  //F2t_A
          case 0b01010011:  //F2t_A
          case 0b01010100:  //F2t_A
          case 0b01010101:  //F2t_A
          case 0b01010110:  //F2t_A
          case 0b01010111:  //F2t_A
          case 0b01011000:  //F2t_A
          case 0b01011001:  //F2t_A
          case 0b01011010:  //F2t_A
          case 0b01011011:  //F2t_A
          case 0b01011100:  //F2t_A
          case 0b01011101:  //F2t_A
          case 0b01011110:  //F2t_A
          case 0b01011111:  //F2t_A
            F2t_A.drawRaster (src, dst, rh);
            break;
          default:
            F2t.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XF2t);
          }  //switch
        }  //drawRaster
      },  //XF2t

      //================================================================================
      //F2t_XWP ($0001,$09xx,$140F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (f1p()==0?(fpc(tev(f2p()))!=0?fpc(tev(f2p())):tpc(0)):f1p()==1?(fpc(0)!=0?fpc(0):tpc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):tpc(0)):fpc(tev(f1p())))
      //  中間コード2
      //    f1p()==0?fpc(tev(f2p()))!=0?fpc(tev(f2p())):tpc(0):f1p()==1?fpc(0)!=0?fpc(0):tpc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):tpc(0):fpc(tev(f1p()))
      //  中間コード3
      //    (v0=f1p())==0?(v1=fpc(tev(f2p())))!=0?v1:tpc(0):v0==1?(v5=fpc(0))!=0?v5:tpc(0):ls1(v0)==0?(v8=fpc(v0))!=0?v8:tpc(0):fpc(tev(v0))
      //  中間コード4
      //    (p=f1p())==0?(p=fpc(tev(f2p())))!=0?p:tpc(0):p==1?(p=fpc(0))!=0?p:tpc(0):ls1(p)==0?(q=fpc(p))!=0?q:tpc(0):fpc(tev(p))
      //  中間コード5
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?p:tpc(0):p==1?(p=fpc(0))!=0?p:tpc(0):(p&1)==0?(q=fpc(p))!=0?q:tpc(0):fpc(p&-2)
      //  中間コード6
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?cto(p):tpo(0):p==1?(p=fpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):tpo(0):fpo(p&-2)
      F2t_XWP {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t_XWP

      //================================================================================
      //F2t_XHCT ($0001,$09xx,$190F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のカラーと
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のカラーと
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),tpc(0)):(fpc(f1p())!=0?fpc(f1p()):tpc(0))):(ls1(fpc(tev(f2p())))!=0?mix(fpc(f2p()),tpc(0)):(fpc(f2p())!=0?fpc(f2p()):tpc(0))))
      //  中間コード2
      //    f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),tpc(0)):fpc(f1p())!=0?fpc(f1p()):tpc(0):ls1(fpc(tev(f2p())))!=0?mix(fpc(f2p()),tpc(0)):fpc(f2p())!=0?fpc(f2p()):tpc(0)
      //  中間コード3
      //    (v0=f1p())!=0?ls1(fpc(tev(v0)))!=0?mix(fpc(v0),tpc(0)):(v7=fpc(v0))!=0?v7:tpc(0):ls1(fpc(tev(v12=f2p())))!=0?mix(fpc(v12),tpc(0)):(v16=fpc(v12))!=0?v16:tpc(0)
      //  中間コード4
      //    (p=f1p())!=0?ls1(fpc(tev(p)))!=0?mix(fpc(p),tpc(0)):(q=fpc(p))!=0?q:tpc(0):ls1(fpc(tev(p=f2p())))!=0?mix(fpc(p),tpc(0)):(q=fpc(p))!=0?q:tpc(0)
      //  中間コード5
      //    (p=f1p())!=0?(fpc(p&-2)&1)!=0?mix(fpc(p),tpc(0)):(q=fpc(p))!=0?q:tpc(0):(fpc((p=f2p())&-2)&1)!=0?mix(fpc(p),tpc(0)):(q=fpc(p))!=0?q:tpc(0)
      //  中間コード6
      //    (p=f1p())!=0?(fpc(p&-2)&1)!=0?cto(mix(fpc(p),tpc(0))):(q=fpc(p))!=0?cto(q):tpo(0):(fpc((p=f2p())&-2)&1)!=0?cto(mix(fpc(p),tpc(0))):(q=fpc(p))!=0?cto(q):tpo(0)
      F2t_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t_XHCT

      //================================================================================
      //F2t_XHCG ($0001,$09xx,$1A0F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のパレットが奇数のとき
      //          2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0でないとき
      //            2番目(ONとみなす)のパレットを奇数化したパレットのカラー
      //          さもなくば(2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //        さもなくば(1番目のパレットが偶数のとき)
      //          1番目のカラーが0でないとき
      //            1番目のカラー
      //          さもなくば(1番目のカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):(ls1(f1p())!=0?(fpc(tod(f2q()))!=0?fpc(tod(f2q())):tpc(0)):(fpc(f1p())!=0?fpc(f1p()):tpc(0)))):(ls1(fpc(tev(f2p())))!=0?mix(fpc(tev(f2p())),fpc(tod(f2q()))):(fpc(f2p())!=0?fpc(f2p()):tpc(0))))
      //  中間コード2
      //    f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):ls1(f1p())!=0?fpc(tod(f2q()))!=0?fpc(tod(f2q())):tpc(0):fpc(f1p())!=0?fpc(f1p()):tpc(0):ls1(fpc(tev(f2p())))!=0?mix(fpc(tev(f2p())),fpc(tod(f2q()))):fpc(f2p())!=0?fpc(f2p()):tpc(0)
      //  中間コード3
      //    (v0=f1p())!=0?ls1(v2=fpc(tev(v0)))!=0?mix(v2,fpc(tod(f2q()))):ls1(v0)!=0?(v9=fpc(tod(f2q())))!=0?v9:tpc(0):(v13=fpc(v0))!=0?v13:tpc(0):ls1(v16=fpc(tev(v18=f2p())))!=0?mix(v16,fpc(tod(f2q()))):(v23=fpc(v18))!=0?v23:tpc(0)
      //  中間コード4
      //    (p=f1p())!=0?ls1(q=fpc(tev(p)))!=0?mix(q,fpc(tod(f2q()))):ls1(p)!=0?(p=fpc(tod(f2q())))!=0?p:tpc(0):(q=fpc(p))!=0?q:tpc(0):ls1(p=fpc(tev(q=f2p())))!=0?mix(p,fpc(tod(f2q()))):(p=fpc(q))!=0?p:tpc(0)
      //  中間コード5
      //    (p=f1p())!=0?((q=fpc(p&-2))&1)!=0?mix(q,fpc(f2q()|1)):(p&1)!=0?(p=fpc(f2q()|1))!=0?p:tpc(0):(q=fpc(p))!=0?q:tpc(0):((p=fpc((q=f2p())&-2))&1)!=0?mix(p,fpc(f2q()|1)):(p=fpc(q))!=0?p:tpc(0)
      //  中間コード6
      //    (p=f1p())!=0?((q=fpc(p&-2))&1)!=0?cto(mix(q,fpc(f2q()|1))):(p&1)!=0?(p=fpc(f2q()|1))!=0?cto(p):tpo(0):(q=fpc(p))!=0?cto(q):tpo(0):((p=fpc((q=f2p())&-2))&1)!=0?cto(mix(p,fpc(f2q()|1))):(p=fpc(q))!=0?cto(p):tpo(0)
      F2t_XHCG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    q,
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                       GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1])] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    q,
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                       GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1])] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t_XHCG

      //================================================================================
      //F2t_XHCGT ($0001,$09xx,$1B0F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のパレットが奇数のとき
      //          2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0でないとき
      //            2番目(ONとみなす)のパレットを奇数化したパレットのカラー
      //          さもなくば(2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //        さもなくば(1番目のパレットが偶数のとき)
      //          1番目のカラーが0でないとき
      //            1番目のカラー
      //          さもなくば(1番目のカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),tpc(0)):(ls1(f1p())!=0?(fpc(tod(f2q()))!=0?fpc(tod(f2q())):tpc(0)):(fpc(f1p())!=0?fpc(f1p()):tpc(0)))):(ls1(fpc(tev(f2p())))!=0?mix(mix(fpc(tev(f2p())),fpc(tod(f2q()))),tpc(0)):(fpc(f2p())!=0?fpc(f2p()):tpc(0))))
      //  中間コード2
      //    f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),tpc(0)):ls1(f1p())!=0?fpc(tod(f2q()))!=0?fpc(tod(f2q())):tpc(0):fpc(f1p())!=0?fpc(f1p()):tpc(0):ls1(fpc(tev(f2p())))!=0?mix(mix(fpc(tev(f2p())),fpc(tod(f2q()))),tpc(0)):fpc(f2p())!=0?fpc(f2p()):tpc(0)
      //  中間コード3
      //    (v0=f1p())!=0?ls1(v2=fpc(tev(v0)))!=0?mix(mix(v2,fpc(tod(f2q()))),tpc(0)):ls1(v0)!=0?(v11=fpc(tod(f2q())))!=0?v11:tpc(0):(v15=fpc(v0))!=0?v15:tpc(0):ls1(v18=fpc(tev(v20=f2p())))!=0?mix(mix(v18,fpc(tod(f2q()))),tpc(0)):(v27=fpc(v20))!=0?v27:tpc(0)
      //  中間コード4
      //    (p=f1p())!=0?ls1(q=fpc(tev(p)))!=0?mix(mix(q,fpc(tod(f2q()))),tpc(0)):ls1(p)!=0?(p=fpc(tod(f2q())))!=0?p:tpc(0):(q=fpc(p))!=0?q:tpc(0):ls1(p=fpc(tev(q=f2p())))!=0?mix(mix(p,fpc(tod(f2q()))),tpc(0)):(p=fpc(q))!=0?p:tpc(0)
      //  中間コード5
      //    (p=f1p())!=0?((q=fpc(p&-2))&1)!=0?mix(mix(q,fpc(f2q()|1)),tpc(0)):(p&1)!=0?(p=fpc(f2q()|1))!=0?p:tpc(0):(q=fpc(p))!=0?q:tpc(0):((p=fpc((q=f2p())&-2))&1)!=0?mix(mix(p,fpc(f2q()|1)),tpc(0)):(p=fpc(q))!=0?p:tpc(0)
      //  中間コード6
      //    (p=f1p())!=0?((q=fpc(p&-2))&1)!=0?cto(mix(mix(q,fpc(f2q()|1)),tpc(0))):(p&1)!=0?(p=fpc(f2q()|1))!=0?cto(p):tpo(0):(q=fpc(p))!=0?cto(q):tpo(0):((p=fpc((q=f2p())&-2))&1)!=0?cto(mix(mix(p,fpc(f2q()|1)),tpc(0))):(p=fpc(q))!=0?cto(p):tpo(0)
      F2t_XHCGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      q,
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                       GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      q,
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                       GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t_XHCGT

      //================================================================================
      //F2t_XHPT ($0001,$09xx,$1D0F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (f1p()==0?(fpc(tev(f2p()))!=0?fpc(tev(f2p())):tpc(0)):f1p()==1?(fpc(0)!=0?fpc(0):tpc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):tpc(0)):mix(fpc(tev(f1p())),tpc(0)))
      //  中間コード2
      //    f1p()==0?fpc(tev(f2p()))!=0?fpc(tev(f2p())):tpc(0):f1p()==1?fpc(0)!=0?fpc(0):tpc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):tpc(0):mix(fpc(tev(f1p())),tpc(0))
      //  中間コード3
      //    (v0=f1p())==0?(v1=fpc(tev(f2p())))!=0?v1:tpc(0):v0==1?(v5=fpc(0))!=0?v5:tpc(0):ls1(v0)==0?(v8=fpc(v0))!=0?v8:tpc(0):mix(fpc(tev(v0)),tpc(0))
      //  中間コード4
      //    (p=f1p())==0?(p=fpc(tev(f2p())))!=0?p:tpc(0):p==1?(p=fpc(0))!=0?p:tpc(0):ls1(p)==0?(q=fpc(p))!=0?q:tpc(0):mix(fpc(tev(p)),tpc(0))
      //  中間コード5
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?p:tpc(0):p==1?(p=fpc(0))!=0?p:tpc(0):(p&1)==0?(q=fpc(p))!=0?q:tpc(0):mix(fpc(p&-2),tpc(0))
      //  中間コード6
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?cto(p):tpo(0):p==1?(p=fpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):tpo(0):cto(mix(fpc(p&-2),tpc(0)))
      F2t_XHPT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t_XHPT

      //================================================================================
      //F2t_XHPG ($0001,$09xx,$1E0F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0でないとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (f1p()==0?(fpc(tev(f2p()))!=0?fpc(tev(f2p())):tpc(0)):f1p()==1?(fpc(0)!=0?fpc(0):tpc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):tpc(0)):(mix(fpc(tev(f1p())),fpc(tod(f2p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2p()))):tpc(0)))
      //  中間コード2
      //    f1p()==0?fpc(tev(f2p()))!=0?fpc(tev(f2p())):tpc(0):f1p()==1?fpc(0)!=0?fpc(0):tpc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):tpc(0):mix(fpc(tev(f1p())),fpc(tod(f2p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2p()))):tpc(0)
      //  中間コード3
      //    (v0=f1p())==0?(v1=fpc(tev(f2p())))!=0?v1:tpc(0):v0==1?(v5=fpc(0))!=0?v5:tpc(0):ls1(v0)==0?(v8=fpc(v0))!=0?v8:tpc(0):(v10=mix(fpc(tev(v0)),fpc(tod(f2p()))))!=0?v10:tpc(0)
      //  中間コード4
      //    (p=f1p())==0?(p=fpc(tev(f2p())))!=0?p:tpc(0):p==1?(p=fpc(0))!=0?p:tpc(0):ls1(p)==0?(q=fpc(p))!=0?q:tpc(0):(q=mix(fpc(tev(p)),fpc(tod(f2p()))))!=0?q:tpc(0)
      //  中間コード5
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?p:tpc(0):p==1?(p=fpc(0))!=0?p:tpc(0):(p&1)==0?(q=fpc(p))!=0?q:tpc(0):(q=mix(fpc(p&-2),fpc(f2p()|1)))!=0?q:tpc(0)
      //  中間コード6
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?cto(p):tpo(0):p==1?(p=fpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):tpo(0):(q=mix(fpc(p&-2),fpc(f2p()|1)))!=0?cto(q):tpo(0)
      F2t_XHPG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                               GraphicScreen.graM4[gy3rd | gx3rd & 511]) | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                               GraphicScreen.graM4[gy3rd | gx3rd & 511]) | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                   GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t_XHPG

      //================================================================================
      //F2t_XHPGT ($0001,$09xx,$1F0F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (f1p()==0?(fpc(tev(f2p()))!=0?fpc(tev(f2p())):tpc(0)):f1p()==1?(fpc(0)!=0?fpc(0):tpc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):tpc(0)):mix(mix(fpc(tev(f1p())),fpc(tod(f2p()))),tpc(0)))
      //  中間コード2
      //    f1p()==0?fpc(tev(f2p()))!=0?fpc(tev(f2p())):tpc(0):f1p()==1?fpc(0)!=0?fpc(0):tpc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):tpc(0):mix(mix(fpc(tev(f1p())),fpc(tod(f2p()))),tpc(0))
      //  中間コード3
      //    (v0=f1p())==0?(v1=fpc(tev(f2p())))!=0?v1:tpc(0):v0==1?(v5=fpc(0))!=0?v5:tpc(0):ls1(v0)==0?(v8=fpc(v0))!=0?v8:tpc(0):mix(mix(fpc(tev(v0)),fpc(tod(f2p()))),tpc(0))
      //  中間コード4
      //    (p=f1p())==0?(p=fpc(tev(f2p())))!=0?p:tpc(0):p==1?(p=fpc(0))!=0?p:tpc(0):ls1(p)==0?(q=fpc(p))!=0?q:tpc(0):mix(mix(fpc(tev(p)),fpc(tod(f2p()))),tpc(0))
      //  中間コード5
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?p:tpc(0):p==1?(p=fpc(0))!=0?p:tpc(0):(p&1)==0?(q=fpc(p))!=0?q:tpc(0):mix(mix(fpc(p&-2),fpc(f2p()|1)),tpc(0))
      //  中間コード6
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?cto(p):tpo(0):p==1?(p=fpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):tpo(0):cto(mix(mix(fpc(p&-2),fpc(f2p()|1)),tpc(0)))
      F2t_XHPGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511]) | 1]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) | 1]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t_XHPGT

      //================================================================================
      //F2t_A ($0001,$09xx,$400F)
      //  概要
      //    F2t  512ドット256色2プレーン＞テキスト(OFF)
      //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //  中間コード1
      //    (f1p()!=0?mix(fpc(f1p()),tpc(0)):mix(fpc(f2p()),tpc(0)))
      //  中間コード2
      //    f1p()!=0?mix(fpc(f1p()),tpc(0)):mix(fpc(f2p()),tpc(0))
      //  中間コード3
      //    (v0=f1p())!=0?mix(fpc(v0),tpc(0)):mix(fpc(f2p()),tpc(0))
      //  中間コード4
      //    (p=f1p())!=0?mix(fpc(p),tpc(0)):mix(fpc(f2p()),tpc(0))
      //  中間コード5
      //    (p=f1p())!=0?mix(fpc(p),tpc(0)):mix(fpc(f2p()),tpc(0))
      //  中間コード6
      //    cto((p=f1p())!=0?mix(fpc(p),tpc(0)):mix(fpc(f2p()),tpc(0)))
      F2t_A {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p;
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  (p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                        GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0]) :
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd & 511])],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p;
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  (p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                        GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0]) :
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd & 511])],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      (p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                            GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2t_A

      //================================================================================
      //Gt ($0003,$09xx,$000F)
      //  概要
      //    Gt  512ドット65536色1プレーン＞テキスト(OFF)
      //    拡張なし
      //  手順
      //    1番目のカラーが0でないとき
      //      1番目のカラー
      //    さもなくば(1番目のカラーが0のとき)
      //      テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):tpc(0))
      //  中間コード2
      //    gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):tpc(0)
      //  中間コード3
      //    (v0=gpc(v1=g1p(),v1))!=0?v0:tpc(0)
      //  中間コード4
      //    (p=gpc(q=g1p(),q))!=0?p:tpc(0)
      //  中間コード5
      //    (p=gpc(q=g1p(),q))!=0?p:tpc(0)
      //  中間コード6
      //    (p=gpc(q=g1p(),q))!=0?cto(p):tpo(0)
      Gt {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //1番目のパレットのbit11-8のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //1番目のパレットのbit15-12のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                                                        GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                                                        GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                        GraphicScreen.graM4[gy1st | gx1st & 511])) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                                                        GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                                                        GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                        GraphicScreen.graM4[gy1st | gx1st & 511])) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                                                            GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                                                            GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                            GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //Gt

      //================================================================================
      //XGt
      //  概要
      //    Gt  512ドット65536色1プレーン＞テキスト(OFF)
      //    拡張あり
      XGt {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //Gt_XWC
          case 0b00010001:  //Gt_XWC
          case 0b00010010:  //Gt_XWC
          case 0b00010011:  //Gt_XWC
            Gt.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //Gt_XWP
          case 0b00010101:  //Gt_XWP
          case 0b00010110:  //Gt_XWP
          case 0b00010111:  //Gt_XWP
            Gt_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //Gt_XHC
            Gt.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //Gt_XHCT
            Gt_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //Gt_XHPT
            Gt_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //Gt_A
          case 0b01000001:  //Gt_A
          case 0b01000010:  //Gt_A
          case 0b01000011:  //Gt_A
          case 0b01000100:  //Gt_A
          case 0b01000101:  //Gt_A
          case 0b01000110:  //Gt_A
          case 0b01000111:  //Gt_A
          case 0b01001000:  //Gt_A
          case 0b01001001:  //Gt_A
          case 0b01001010:  //Gt_A
          case 0b01001011:  //Gt_A
          case 0b01001100:  //Gt_A
          case 0b01001101:  //Gt_A
          case 0b01001110:  //Gt_A
          case 0b01001111:  //Gt_A
          case 0b01010000:  //Gt_A
          case 0b01010001:  //Gt_A
          case 0b01010010:  //Gt_A
          case 0b01010011:  //Gt_A
          case 0b01010100:  //Gt_A
          case 0b01010101:  //Gt_A
          case 0b01010110:  //Gt_A
          case 0b01010111:  //Gt_A
          case 0b01011000:  //Gt_A
          case 0b01011001:  //Gt_A
          case 0b01011010:  //Gt_A
          case 0b01011011:  //Gt_A
          case 0b01011100:  //Gt_A
          case 0b01011101:  //Gt_A
          case 0b01011110:  //Gt_A
          case 0b01011111:  //Gt_A
            Gt_A.drawRaster (src, dst, rh);
            break;
          default:
            Gt.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XGt);
          }  //switch
        }  //drawRaster
      },  //XGt

      //================================================================================
      //Gt_XWP ($0003,$09xx,$140F)
      //  概要
      //    Gt  512ドット65536色1プレーン＞テキスト(OFF)
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (g1p()<=1?(gpc(0,0)!=0?gpc(0,0):tpc(0)):ls1(g1p())==0?(gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):tpc(0)):gpc(tev(g1p()),tev(g1p())))
      //  中間コード2
      //    g1p()<=1?gpc(0,0)!=0?gpc(0,0):tpc(0):ls1(g1p())==0?gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):tpc(0):gpc(tev(g1p()),tev(g1p()))
      //  中間コード3
      //    (v0=g1p())<=1?(v1=gpc(0,0))!=0?v1:tpc(0):ls1(v0)==0?(v4=gpc(v0,v0))!=0?v4:tpc(0):gpc(v7=tev(v0),v7)
      //  中間コード4
      //    (p=g1p())<=1?(p=gpc(0,0))!=0?p:tpc(0):ls1(p)==0?(q=gpc(p,p))!=0?q:tpc(0):gpc(q=tev(p),q)
      //  中間コード5
      //    (p=g1p())<=1?(p=gpc(0,0))!=0?p:tpc(0):(p&1)==0?(q=gpc(p,p))!=0?q:tpc(0):gpc(q=p&-2,q)
      //  中間コード6
      //    (p=g1p())<=1?(p=gpc(0,0))!=0?cto(p):tpo(0):(p&1)==0?(q=gpc(p,p))!=0?cto(q):tpo(0):gpo(q=p&-2,q)
      Gt_XWP {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //1番目のパレットのbit11-8のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //1番目のパレットのbit15-12のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                      GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                      GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = (VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                  VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                      GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                      GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = (VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                  VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //Gt_XWP

      //================================================================================
      //Gt_XHCT ($0003,$09xx,$190F)
      //  概要
      //    Gt  512ドット65536色1プレーン＞テキスト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //      1番目のカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //    さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),tpc(0)):(gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):tpc(0)))
      //  中間コード2
      //    ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),tpc(0)):gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):tpc(0)
      //  中間コード3
      //    ls1(gpc(v2=tod(v3=g1p()),v2))!=0?mix(gpc(v3,v3),tpc(0)):(v7=gpc(v3,v3))!=0?v7:tpc(0)
      //  中間コード4
      //    ls1(gpc(p=tod(q=g1p()),p))!=0?mix(gpc(q,q),tpc(0)):(p=gpc(q,q))!=0?p:tpc(0)
      //  中間コード5
      //    (gpc(p=(q=g1p())|1,p)&1)!=0?mix(gpc(q,q),tpc(0)):(p=gpc(q,q))!=0?p:tpc(0)
      //  中間コード6
      //    (gpc(p=(q=g1p())|1,p)&1)!=0?cto(mix(gpc(q,q),tpc(0))):(p=gpc(q,q))!=0?cto(p):tpo(0)
      Gt_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //1番目のパレットのbit11-8のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //1番目のパレットのbit15-12のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                                                         GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                                                         GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                         GraphicScreen.graM4[gy1st | gx1st & 511])) | 1) >> 8] |
                                  VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    (VideoController.vcnPal8G16H[q >> 8] |
                                     VideoController.vcnPal8G16L[q & 255]),
                                    VideoController.vcnPal16TS[0])] :
                                (p = (VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                                                         GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                                                         GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                         GraphicScreen.graM4[gy1st | gx1st & 511])) | 1) >> 8] |
                                  VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    (VideoController.vcnPal8G16H[q >> 8] |
                                     VideoController.vcnPal8G16L[q & 255]),
                                    VideoController.vcnPal16TS[0])] :
                                (p = (VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                                                             GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                                                             GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                             GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = (VideoController.vcnPal8G16H[q >> 8] |
                                          VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //Gt_XHCT

      //================================================================================
      //Gt_XHPT ($0003,$09xx,$1D0F)
      //  概要
      //    Gt  512ドット65536色1プレーン＞テキスト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (g1p()<=1?(gpc(0,0)!=0?gpc(0,0):tpc(0)):ls1(g1p())==0?(gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):tpc(0)):mix(gpc(tev(g1p()),tev(g1p())),tpc(0)))
      //  中間コード2
      //    g1p()<=1?gpc(0,0)!=0?gpc(0,0):tpc(0):ls1(g1p())==0?gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):tpc(0):mix(gpc(tev(g1p()),tev(g1p())),tpc(0))
      //  中間コード3
      //    (v0=g1p())<=1?(v1=gpc(0,0))!=0?v1:tpc(0):ls1(v0)==0?(v4=gpc(v0,v0))!=0?v4:tpc(0):mix(gpc(v8=tev(v0),v8),tpc(0))
      //  中間コード4
      //    (p=g1p())<=1?(p=gpc(0,0))!=0?p:tpc(0):ls1(p)==0?(q=gpc(p,p))!=0?q:tpc(0):mix(gpc(q=tev(p),q),tpc(0))
      //  中間コード5
      //    (p=g1p())<=1?(p=gpc(0,0))!=0?p:tpc(0):(p&1)==0?(q=gpc(p,p))!=0?q:tpc(0):mix(gpc(q=p&-2,q),tpc(0))
      //  中間コード6
      //    (p=g1p())<=1?(p=gpc(0,0))!=0?cto(p):tpo(0):(p&1)==0?(q=gpc(p,p))!=0?cto(q):tpo(0):cto(mix(gpc(q=p&-2,q),tpc(0)))
      Gt_XHPT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //1番目のパレットのbit11-8のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //1番目のパレットのbit15-12のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                      GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                      GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = (VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                     VideoController.vcnPal8G16L[q & 255]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                      GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                      GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) <= 1 ?
                                (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = (VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                     VideoController.vcnPal8G16L[q & 255]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                          GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                          GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) <= 1 ?
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = (VideoController.vcnPal8G16H[p >> 8] |
                                          VideoController.vcnPal8G16L[p & 255])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //Gt_XHPT

      //================================================================================
      //Gt_A ($0003,$09xx,$400F)
      //  概要
      //    Gt  512ドット65536色1プレーン＞テキスト(OFF)
      //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
      //  手順
      //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //  中間コード1
      //    mix(gpc(g1p(),g1p()),tpc(0))
      //  中間コード2
      //    mix(gpc(g1p(),g1p()),tpc(0))
      //  中間コード3
      //    mix(gpc(v2=g1p(),v2),tpc(0))
      //  中間コード4
      //    mix(gpc(p=g1p(),p),tpc(0))
      //  中間コード5
      //    mix(gpc(p=g1p(),p),tpc(0))
      //  中間コード6
      //    cto(mix(gpc(p=g1p(),p),tpc(0)))
      Gt_A {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //1番目のパレットのbit11-8のGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //1番目のパレットのbit15-12のGVRAMページ番号
          int gx4th = CRTC.crtR12GrXCurr[pn];
          int gy4th = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p;
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                                                       GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                                                       GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                       GraphicScreen.graM4[gy1st | gx1st & 511])) >> 8] |
                                     VideoController.vcnPal8G16L[p & 255]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p;
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 12 |
                                                                       GraphicScreen.graM4[gy3rd | gx3rd & 511] << 8 |
                                                                       GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                       GraphicScreen.graM4[gy1st | gx1st & 511])) >> 8] |
                                     VideoController.vcnPal8G16L[p & 255]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 12 |
                                                                           GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] << 8 |
                                                                           GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) >> 8] |
                                         VideoController.vcnPal8G16L[p & 255]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //Gt_A

      //================================================================================
      //Ht ($0004,$09xx,$0010)
      //  概要
      //    Ht  1024ドット16色1プレーン＞テキスト(OFF)
      //    拡張なし
      //  手順
      //    1番目のカラーが0でないとき
      //      1番目のカラー
      //    さもなくば(1番目のカラーが0のとき)
      //      テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (hpc(h1p())!=0?hpc(h1p()):tpc(0))
      //  中間コード2
      //    hpc(h1p())!=0?hpc(h1p()):tpc(0)
      //  中間コード3
      //    (v0=hpc(h1p()))!=0?v0:tpc(0)
      //  中間コード4
      //    (p=hpc(h1p()))!=0?p:tpc(0)
      //  中間コード5
      //    (p=hpc(h1p()))!=0?p:tpc(0)
      //  中間コード6
      //    (p=hpc(h1p()))!=0?cto(p):tpo(0)
      Ht {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p;
                XEiJ.pnlBM[da] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga]]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 1]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 2]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 3]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 4]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 5]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 6]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 7]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p;
                  XEiJ.pnlBM[da] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p;
                XEiJ.pnlBM[da] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga]]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 1]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 2]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 3]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 4]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 5]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 6]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 7]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p;
                  XEiJ.pnlBM[da] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //Ht

      //================================================================================
      //XHt
      //  概要
      //    Ht  1024ドット16色1プレーン＞テキスト(OFF)
      //    拡張あり
      XHt {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //Ht_XWC
          case 0b00010001:  //Ht_XWC
          case 0b00010010:  //Ht_XWC
          case 0b00010011:  //Ht_XWC
            Ht.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //Ht_XWP
          case 0b00010101:  //Ht_XWP
          case 0b00010110:  //Ht_XWP
          case 0b00010111:  //Ht_XWP
            Ht_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //Ht_XHC
            Ht.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //Ht_XHCT
            Ht_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //Ht_XHPT
            Ht_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //Ht_A
          case 0b01000001:  //Ht_A
          case 0b01000010:  //Ht_A
          case 0b01000011:  //Ht_A
          case 0b01000100:  //Ht_A
          case 0b01000101:  //Ht_A
          case 0b01000110:  //Ht_A
          case 0b01000111:  //Ht_A
          case 0b01001000:  //Ht_A
          case 0b01001001:  //Ht_A
          case 0b01001010:  //Ht_A
          case 0b01001011:  //Ht_A
          case 0b01001100:  //Ht_A
          case 0b01001101:  //Ht_A
          case 0b01001110:  //Ht_A
          case 0b01001111:  //Ht_A
          case 0b01010000:  //Ht_A
          case 0b01010001:  //Ht_A
          case 0b01010010:  //Ht_A
          case 0b01010011:  //Ht_A
          case 0b01010100:  //Ht_A
          case 0b01010101:  //Ht_A
          case 0b01010110:  //Ht_A
          case 0b01010111:  //Ht_A
          case 0b01011000:  //Ht_A
          case 0b01011001:  //Ht_A
          case 0b01011010:  //Ht_A
          case 0b01011011:  //Ht_A
          case 0b01011100:  //Ht_A
          case 0b01011101:  //Ht_A
          case 0b01011110:  //Ht_A
          case 0b01011111:  //Ht_A
            Ht_A.drawRaster (src, dst, rh);
            break;
          default:
            Ht.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XHt);
          }  //switch
        }  //drawRaster
      },  //XHt

      //================================================================================
      //Ht_XWP ($0004,$09xx,$1410)
      //  概要
      //    Ht  1024ドット16色1プレーン＞テキスト(OFF)
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (h1p()<=1?(hpc(0)!=0?hpc(0):tpc(0)):ls1(h1p())==0?(hpc(h1p())!=0?hpc(h1p()):tpc(0)):hpc(tev(h1p())))
      //  中間コード2
      //    h1p()<=1?hpc(0)!=0?hpc(0):tpc(0):ls1(h1p())==0?hpc(h1p())!=0?hpc(h1p()):tpc(0):hpc(tev(h1p()))
      //  中間コード3
      //    (v0=h1p())<=1?(v1=hpc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=hpc(v0))!=0?v4:tpc(0):hpc(tev(v0))
      //  中間コード4
      //    (p=h1p())<=1?(p=hpc(0))!=0?p:tpc(0):ls1(p)==0?(q=hpc(p))!=0?q:tpc(0):hpc(tev(p))
      //  中間コード5
      //    (p=h1p())<=1?(p=hpc(0))!=0?p:tpc(0):(p&1)==0?(q=hpc(p))!=0?q:tpc(0):hpc(p&-2)
      //  中間コード6
      //    (p=h1p())<=1?(p=hpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=hpc(p))!=0?cto(q):tpo(0):hpo(p&-2)
      Ht_XWP {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0] :
                                  VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[ga + 1]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[ga + 2]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[ga + 3]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[ga + 4]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[ga + 5]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[ga + 6]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[ga + 7]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0] :
                                  VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[ga + 1]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[ga + 2]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[ga + 3]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[ga + 4]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[ga + 5]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[ga + 6]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[ga + 7]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //Ht_XWP

      //================================================================================
      //Ht_XHCT ($0004,$09xx,$1910)
      //  概要
      //    Ht  1024ドット16色1プレーン＞テキスト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //      1番目のカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (ls1(hpc(tev(h1p())))!=0?mix(hpc(h1p()),tpc(0)):(hpc(h1p())!=0?hpc(h1p()):tpc(0)))
      //  中間コード2
      //    ls1(hpc(tev(h1p())))!=0?mix(hpc(h1p()),tpc(0)):hpc(h1p())!=0?hpc(h1p()):tpc(0)
      //  中間コード3
      //    ls1(hpc(tev(v3=h1p())))!=0?mix(hpc(v3),tpc(0)):(v7=hpc(v3))!=0?v7:tpc(0)
      //  中間コード4
      //    ls1(hpc(tev(p=h1p())))!=0?mix(hpc(p),tpc(0)):(q=hpc(p))!=0?q:tpc(0)
      //  中間コード5
      //    (hpc((p=h1p())&-2)&1)!=0?mix(hpc(p),tpc(0)):(q=hpc(p))!=0?q:tpc(0)
      //  中間コード6
      //    (hpc((p=h1p())&-2)&1)!=0?cto(mix(hpc(p),tpc(0))):(q=hpc(p))!=0?cto(q):tpo(0)
      Ht_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p],
                                      VideoController.vcnPal16TS[0])] :
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 1]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 2]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 3]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 4]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 5]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 6]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 7]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p],
                                      VideoController.vcnPal16TS[0])] :
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 1]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 2]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 3]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 4]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 5]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 6]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 7]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //Ht_XHCT

      //================================================================================
      //Ht_XHPT ($0004,$09xx,$1D10)
      //  概要
      //    Ht  1024ドット16色1プレーン＞テキスト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (h1p()<=1?(hpc(0)!=0?hpc(0):tpc(0)):ls1(h1p())==0?(hpc(h1p())!=0?hpc(h1p()):tpc(0)):mix(hpc(tev(h1p())),tpc(0)))
      //  中間コード2
      //    h1p()<=1?hpc(0)!=0?hpc(0):tpc(0):ls1(h1p())==0?hpc(h1p())!=0?hpc(h1p()):tpc(0):mix(hpc(tev(h1p())),tpc(0))
      //  中間コード3
      //    (v0=h1p())<=1?(v1=hpc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=hpc(v0))!=0?v4:tpc(0):mix(hpc(tev(v0)),tpc(0))
      //  中間コード4
      //    (p=h1p())<=1?(p=hpc(0))!=0?p:tpc(0):ls1(p)==0?(q=hpc(p))!=0?q:tpc(0):mix(hpc(tev(p)),tpc(0))
      //  中間コード5
      //    (p=h1p())<=1?(p=hpc(0))!=0?p:tpc(0):(p&1)==0?(q=hpc(p))!=0?q:tpc(0):mix(hpc(p&-2),tpc(0))
      //  中間コード6
      //    (p=h1p())<=1?(p=hpc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=hpc(p))!=0?cto(q):tpo(0):cto(mix(hpc(p&-2),tpc(0)))
      Ht_XHPT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[ga + 1]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[ga + 2]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[ga + 3]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[ga + 4]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[ga + 5]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[ga + 6]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[ga + 7]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[ga + 1]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[ga + 2]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[ga + 3]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[ga + 4]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[ga + 5]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[ga + 6]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[ga + 7]) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //Ht_XHPT

      //================================================================================
      //Ht_A ($0004,$09xx,$4010)
      //  概要
      //    Ht  1024ドット16色1プレーン＞テキスト(OFF)
      //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
      //  手順
      //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //  中間コード1
      //    mix(hpc(h1p()),tpc(0))
      //  中間コード2
      //    mix(hpc(h1p()),tpc(0))
      //  中間コード3
      //    mix(hpc(h1p()),tpc(0))
      //  中間コード4
      //    mix(hpc(h1p()),tpc(0))
      //  中間コード5
      //    mix(hpc(h1p()),tpc(0))
      //  中間コード6
      //    cto(mix(hpc(h1p()),tpc(0)))
      Ht_A {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[ga]],
                                      VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 1]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 2]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 3]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 4]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 5]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 6]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 7]],
                                          VideoController.vcnPal16TS[0])]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[ga]],
                                        VideoController.vcnPal16TS[0])]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[ga]],
                                      VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 1]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 2]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 3]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 4]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 5]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 6]],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 7]],
                                          VideoController.vcnPal16TS[0])]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[ga]],
                                        VideoController.vcnPal16TS[0])]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //Ht_A

      //================================================================================
      //It ($0005,$09xx,$0010)
      //  概要
      //    It  1024ドット256色1プレーン＞テキスト(OFF)
      //    拡張なし
      //  手順
      //    1番目のカラーが0でないとき
      //      1番目のカラー
      //    さもなくば(1番目のカラーが0のとき)
      //      テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (ipc(i1p())!=0?ipc(i1p()):tpc(0))
      //  中間コード2
      //    ipc(i1p())!=0?ipc(i1p()):tpc(0)
      //  中間コード3
      //    (v0=ipc(i1p()))!=0?v0:tpc(0)
      //  中間コード4
      //    (p=ipc(i1p()))!=0?p:tpc(0)
      //  中間コード5
      //    (p=ipc(i1p()))!=0?p:tpc(0)
      //  中間コード6
      //    (p=ipc(i1p()))!=0?cto(p):tpo(0)
      It {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p;
                XEiJ.pnlBM[da] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                   GraphicScreen.graM4[ga])]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                       GraphicScreen.graM4[ga + 1])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                       GraphicScreen.graM4[ga + 2])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                       GraphicScreen.graM4[ga + 3])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                       GraphicScreen.graM4[ga + 4])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                       GraphicScreen.graM4[ga + 5])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                       GraphicScreen.graM4[ga + 6])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                       GraphicScreen.graM4[ga + 7])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p;
                  XEiJ.pnlBM[da] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                     GraphicScreen.graM4[ga])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p;
                XEiJ.pnlBM[da] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                   GraphicScreen.graM4[ga])]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                       GraphicScreen.graM4[ga + 1])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                       GraphicScreen.graM4[ga + 2])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                       GraphicScreen.graM4[ga + 3])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                       GraphicScreen.graM4[ga + 4])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                       GraphicScreen.graM4[ga + 5])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                       GraphicScreen.graM4[ga + 6])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                       GraphicScreen.graM4[ga + 7])]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p;
                  XEiJ.pnlBM[da] = ((p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                     GraphicScreen.graM4[ga])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //It

      //================================================================================
      //XIt
      //  概要
      //    It  1024ドット256色1プレーン＞テキスト(OFF)
      //    拡張あり
      XIt {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //It_XWC
          case 0b00010001:  //It_XWC
          case 0b00010010:  //It_XWC
          case 0b00010011:  //It_XWC
            It.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //It_XWP
          case 0b00010101:  //It_XWP
          case 0b00010110:  //It_XWP
          case 0b00010111:  //It_XWP
            It_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //It_XHC
            It.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //It_XHCT
            It_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //It_XHPT
            It_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //It_A
          case 0b01000001:  //It_A
          case 0b01000010:  //It_A
          case 0b01000011:  //It_A
          case 0b01000100:  //It_A
          case 0b01000101:  //It_A
          case 0b01000110:  //It_A
          case 0b01000111:  //It_A
          case 0b01001000:  //It_A
          case 0b01001001:  //It_A
          case 0b01001010:  //It_A
          case 0b01001011:  //It_A
          case 0b01001100:  //It_A
          case 0b01001101:  //It_A
          case 0b01001110:  //It_A
          case 0b01001111:  //It_A
          case 0b01010000:  //It_A
          case 0b01010001:  //It_A
          case 0b01010010:  //It_A
          case 0b01010011:  //It_A
          case 0b01010100:  //It_A
          case 0b01010101:  //It_A
          case 0b01010110:  //It_A
          case 0b01010111:  //It_A
          case 0b01011000:  //It_A
          case 0b01011001:  //It_A
          case 0b01011010:  //It_A
          case 0b01011011:  //It_A
          case 0b01011100:  //It_A
          case 0b01011101:  //It_A
          case 0b01011110:  //It_A
          case 0b01011111:  //It_A
            It_A.drawRaster (src, dst, rh);
            break;
          default:
            It.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XIt);
          }  //switch
        }  //drawRaster
      },  //XIt

      //================================================================================
      //It_XWP ($0005,$09xx,$1410)
      //  概要
      //    It  1024ドット256色1プレーン＞テキスト(OFF)
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (i1p()<=1?(ipc(0)!=0?ipc(0):tpc(0)):ls1(i1p())==0?(ipc(i1p())!=0?ipc(i1p()):tpc(0)):ipc(tev(i1p())))
      //  中間コード2
      //    i1p()<=1?ipc(0)!=0?ipc(0):tpc(0):ls1(i1p())==0?ipc(i1p())!=0?ipc(i1p()):tpc(0):ipc(tev(i1p()))
      //  中間コード3
      //    (v0=i1p())<=1?(v1=ipc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=ipc(v0))!=0?v4:tpc(0):ipc(tev(v0))
      //  中間コード4
      //    (p=i1p())<=1?(p=ipc(0))!=0?p:tpc(0):ls1(p)==0?(q=ipc(p))!=0?q:tpc(0):ipc(tev(p))
      //  中間コード5
      //    (p=i1p())<=1?(p=ipc(0))!=0?p:tpc(0):(p&1)==0?(q=ipc(p))!=0?q:tpc(0):ipc(p&-2)
      //  中間コード6
      //    (p=i1p())<=1?(p=ipc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=ipc(p))!=0?cto(q):tpo(0):ipo(p&-2)
      It_XWP {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                        GraphicScreen.graM4[ga])) <= 1 ?
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0] :
                                  VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[ga + 1048577] << 4 |
                                            GraphicScreen.graM4[ga + 1])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[ga + 1048578] << 4 |
                                            GraphicScreen.graM4[ga + 2])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[ga + 1048579] << 4 |
                                            GraphicScreen.graM4[ga + 3])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[ga + 1048580] << 4 |
                                            GraphicScreen.graM4[ga + 4])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[ga + 1048581] << 4 |
                                            GraphicScreen.graM4[ga + 5])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[ga + 1048582] << 4 |
                                            GraphicScreen.graM4[ga + 6])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[ga + 1048583] << 4 |
                                            GraphicScreen.graM4[ga + 7])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                          GraphicScreen.graM4[ga])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                        GraphicScreen.graM4[ga])) <= 1 ?
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0] :
                                  VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[ga + 1048577] << 4 |
                                            GraphicScreen.graM4[ga + 1])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[ga + 1048578] << 4 |
                                            GraphicScreen.graM4[ga + 2])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[ga + 1048579] << 4 |
                                            GraphicScreen.graM4[ga + 3])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[ga + 1048580] << 4 |
                                            GraphicScreen.graM4[ga + 4])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[ga + 1048581] << 4 |
                                            GraphicScreen.graM4[ga + 5])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[ga + 1048582] << 4 |
                                            GraphicScreen.graM4[ga + 6])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[ga + 1048583] << 4 |
                                            GraphicScreen.graM4[ga + 7])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPal32G8[p & -2]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                          GraphicScreen.graM4[ga])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //It_XWP

      //================================================================================
      //It_XHCT ($0005,$09xx,$1910)
      //  概要
      //    It  1024ドット256色1プレーン＞テキスト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //      1番目のカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (ls1(ipc(tev(i1p())))!=0?mix(ipc(i1p()),tpc(0)):(ipc(i1p())!=0?ipc(i1p()):tpc(0)))
      //  中間コード2
      //    ls1(ipc(tev(i1p())))!=0?mix(ipc(i1p()),tpc(0)):ipc(i1p())!=0?ipc(i1p()):tpc(0)
      //  中間コード3
      //    ls1(ipc(tev(v3=i1p())))!=0?mix(ipc(v3),tpc(0)):(v7=ipc(v3))!=0?v7:tpc(0)
      //  中間コード4
      //    ls1(ipc(tev(p=i1p())))!=0?mix(ipc(p),tpc(0)):(q=ipc(p))!=0?q:tpc(0)
      //  中間コード5
      //    (ipc((p=i1p())&-2)&1)!=0?mix(ipc(p),tpc(0)):(q=ipc(p))!=0?q:tpc(0)
      //  中間コード6
      //    (ipc((p=i1p())&-2)&1)!=0?cto(mix(ipc(p),tpc(0))):(q=ipc(p))!=0?cto(q):tpo(0)
      It_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                    GraphicScreen.graM4[ga])) & -2] & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p],
                                      VideoController.vcnPal16TS[0])] :
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                        GraphicScreen.graM4[ga + 1])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                        GraphicScreen.graM4[ga + 2])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                        GraphicScreen.graM4[ga + 3])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                        GraphicScreen.graM4[ga + 4])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                        GraphicScreen.graM4[ga + 5])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                        GraphicScreen.graM4[ga + 6])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                        GraphicScreen.graM4[ga + 7])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                      GraphicScreen.graM4[ga])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                    GraphicScreen.graM4[ga])) & -2] & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p],
                                      VideoController.vcnPal16TS[0])] :
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                        GraphicScreen.graM4[ga + 1])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                        GraphicScreen.graM4[ga + 2])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                        GraphicScreen.graM4[ga + 3])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                        GraphicScreen.graM4[ga + 4])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                        GraphicScreen.graM4[ga + 5])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                        GraphicScreen.graM4[ga + 6])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                        GraphicScreen.graM4[ga + 7])) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          VideoController.vcnPal16TS[0])] :
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                      GraphicScreen.graM4[ga])) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //It_XHCT

      //================================================================================
      //It_XHPT ($0005,$09xx,$1D10)
      //  概要
      //    It  1024ドット256色1プレーン＞テキスト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (i1p()<=1?(ipc(0)!=0?ipc(0):tpc(0)):ls1(i1p())==0?(ipc(i1p())!=0?ipc(i1p()):tpc(0)):mix(ipc(tev(i1p())),tpc(0)))
      //  中間コード2
      //    i1p()<=1?ipc(0)!=0?ipc(0):tpc(0):ls1(i1p())==0?ipc(i1p())!=0?ipc(i1p()):tpc(0):mix(ipc(tev(i1p())),tpc(0))
      //  中間コード3
      //    (v0=i1p())<=1?(v1=ipc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=ipc(v0))!=0?v4:tpc(0):mix(ipc(tev(v0)),tpc(0))
      //  中間コード4
      //    (p=i1p())<=1?(p=ipc(0))!=0?p:tpc(0):ls1(p)==0?(q=ipc(p))!=0?q:tpc(0):mix(ipc(tev(p)),tpc(0))
      //  中間コード5
      //    (p=i1p())<=1?(p=ipc(0))!=0?p:tpc(0):(p&1)==0?(q=ipc(p))!=0?q:tpc(0):mix(ipc(p&-2),tpc(0))
      //  中間コード6
      //    (p=i1p())<=1?(p=ipc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=ipc(p))!=0?cto(q):tpo(0):cto(mix(ipc(p&-2),tpc(0)))
      It_XHPT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                        GraphicScreen.graM4[ga])) <= 1 ?
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[ga + 1048577] << 4 |
                                            GraphicScreen.graM4[ga + 1])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[ga + 1048578] << 4 |
                                            GraphicScreen.graM4[ga + 2])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[ga + 1048579] << 4 |
                                            GraphicScreen.graM4[ga + 3])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[ga + 1048580] << 4 |
                                            GraphicScreen.graM4[ga + 4])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[ga + 1048581] << 4 |
                                            GraphicScreen.graM4[ga + 5])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[ga + 1048582] << 4 |
                                            GraphicScreen.graM4[ga + 6])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[ga + 1048583] << 4 |
                                            GraphicScreen.graM4[ga + 7])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                          GraphicScreen.graM4[ga])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                        GraphicScreen.graM4[ga])) <= 1 ?
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = VideoController.vcnPal16G8[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32TS[0] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[ga + 1048577] << 4 |
                                            GraphicScreen.graM4[ga + 1])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[ga + 1048578] << 4 |
                                            GraphicScreen.graM4[ga + 2])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[ga + 1048579] << 4 |
                                            GraphicScreen.graM4[ga + 3])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[ga + 1048580] << 4 |
                                            GraphicScreen.graM4[ga + 4])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[ga + 1048581] << 4 |
                                            GraphicScreen.graM4[ga + 5])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[ga + 1048582] << 4 |
                                            GraphicScreen.graM4[ga + 6])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[ga + 1048583] << 4 |
                                            GraphicScreen.graM4[ga + 7])) <= 1 ?
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = VideoController.vcnPal16G8[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32TS[0] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16TS[0])]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                          GraphicScreen.graM4[ga])) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //It_XHPT

      //================================================================================
      //It_A ($0005,$09xx,$4010)
      //  概要
      //    It  1024ドット256色1プレーン＞テキスト(OFF)
      //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
      //  手順
      //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //  中間コード1
      //    mix(ipc(i1p()),tpc(0))
      //  中間コード2
      //    mix(ipc(i1p()),tpc(0))
      //  中間コード3
      //    mix(ipc(i1p()),tpc(0))
      //  中間コード4
      //    mix(ipc(i1p()),tpc(0))
      //  中間コード5
      //    mix(ipc(i1p()),tpc(0))
      //  中間コード6
      //    cto(mix(ipc(i1p()),tpc(0)))
      It_A {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                  GraphicScreen.graM4[ga])],
                                      VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                      GraphicScreen.graM4[ga + 1])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                      GraphicScreen.graM4[ga + 2])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                      GraphicScreen.graM4[ga + 3])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                      GraphicScreen.graM4[ga + 4])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                      GraphicScreen.graM4[ga + 5])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                      GraphicScreen.graM4[ga + 6])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                      GraphicScreen.graM4[ga + 7])],
                                          VideoController.vcnPal16TS[0])]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                    GraphicScreen.graM4[ga])],
                                        VideoController.vcnPal16TS[0])]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                  GraphicScreen.graM4[ga])],
                                      VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                      GraphicScreen.graM4[ga + 1])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                      GraphicScreen.graM4[ga + 2])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                      GraphicScreen.graM4[ga + 3])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                      GraphicScreen.graM4[ga + 4])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                      GraphicScreen.graM4[ga + 5])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                      GraphicScreen.graM4[ga + 6])],
                                          VideoController.vcnPal16TS[0])]);
                XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                      GraphicScreen.graM4[ga + 7])],
                                          VideoController.vcnPal16TS[0])]);
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                    GraphicScreen.graM4[ga])],
                                        VideoController.vcnPal16TS[0])]);
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //It_A

      //================================================================================
      //Jt ($0007,$09xx,$0010)
      //  概要
      //    Jt  1024ドット65536色1プレーン＞テキスト(OFF)
      //    拡張なし
      //  手順
      //    1番目のカラーが0でないとき
      //      1番目のカラー
      //    さもなくば(1番目のカラーが0のとき)
      //      テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (jpc(j1p(),j1p())!=0?jpc(j1p(),j1p()):tpc(0))
      //  中間コード2
      //    jpc(j1p(),j1p())!=0?jpc(j1p(),j1p()):tpc(0)
      //  中間コード3
      //    (v0=jpc(v1=j1p(),v1))!=0?v0:tpc(0)
      //  中間コード4
      //    (p=jpc(q=j1p(),q))!=0?p:tpc(0)
      //  中間コード5
      //    (p=jpc(q=j1p(),q))!=0?p:tpc(0)
      //  中間コード6
      //    (p=jpc(q=j1p(),q))!=0?cto(p):tpo(0)
      Jt {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                          GraphicScreen.graM4[ga])) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                              GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                              GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                              GraphicScreen.graM4[ga + 1])) >> 8] |
                                            VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                              GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                              GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                              GraphicScreen.graM4[ga + 2])) >> 8] |
                                            VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                              GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                              GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                              GraphicScreen.graM4[ga + 3])) >> 8] |
                                            VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                              GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                              GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                              GraphicScreen.graM4[ga + 4])) >> 8] |
                                            VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((p = (VideoController.vcnPal8G16H[(q = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                              GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                              GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                              GraphicScreen.graM4[ga + 5])) >> 8] |
                                            VideoController.vcnPal8G16L[q & 255])) != 0 ?
                                      VideoController.vcnPalTbl[p] :

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
STUDIO KAMADA
Copyright © 1999-2026 Makoto Kamada