xeij/DrawingMode.java (43/48)- Source code ソースコード - XEiJ - STUDIO KAMADA
xeij/DrawingMode.java (43/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

                                    (p & 1) == 0 ?
                                    (q = tp & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPal32G8[p] :
                                    (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
      },  //TF2s_XWP

      //================================================================================
      //TF2s_XHCT ($0001,$21xx,$192F)
      //  概要
      //    TF2s  テキスト＞512ドット256色2プレーン＞スプライト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットが0でないとき
      //          1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            1番目のカラーとカラー0を混ぜたカラー(0は黒)
      //          さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            1番目のカラー(0は黒)
      //        さもなくば(1番目のパレットが0のとき)
      //          2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            2番目のカラーとカラー0を混ぜたカラー(0は黒)
      //          さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            2番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      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
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),0):fpc(f1p())):(ls1(fpc(tev(f2p())))!=0?mix(fpc(f2p()),0):fpc(f2p())))):(f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),spc(0)):(fpc(f1p())!=0?fpc(f1p()):spc(0))):(ls1(fpc(tev(f2p())))!=0?mix(fpc(f2p()),spc(0)):(fpc(f2p())!=0?fpc(f2p()):spc(0)))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),0):fpc(f1p()):ls1(fpc(tev(f2p())))!=0?mix(fpc(f2p()),0):fpc(f2p()):f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),spc(0)):fpc(f1p())!=0?fpc(f1p()):spc(0):ls1(fpc(tev(f2p())))!=0?mix(fpc(f2p()),spc(0)):fpc(f2p())!=0?fpc(f2p()):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:(v2=f1p())!=0?ls1(fpc(tev(v2)))!=0?mix(fpc(v2),0):fpc(v2):ls1(fpc(tev(v12=f2p())))!=0?mix(fpc(v12),0):fpc(v12):(v16=f1p())!=0?ls1(fpc(tev(v16)))!=0?mix(fpc(v16),spc(0)):(v23=fpc(v16))!=0?v23:spc(0):ls1(fpc(tev(v28=f2p())))!=0?mix(fpc(v28),spc(0)):(v32=fpc(v28))!=0?v32:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())!=0?ls1(fpc(tev(p)))!=0?mix(fpc(p),0):fpc(p):ls1(fpc(tev(p=f2p())))!=0?mix(fpc(p),0):fpc(p):(p=f1p())!=0?ls1(fpc(tev(p)))!=0?mix(fpc(p),spc(0)):(q=fpc(p))!=0?q:spc(0):ls1(fpc(tev(p=f2p())))!=0?mix(fpc(p),spc(0)):(q=fpc(p))!=0?q:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())!=0?(fpc(p&-2)&1)!=0?mix(fpc(p),0):fpc(p):(fpc((p=f2p())&-2)&1)!=0?mix(fpc(p),0):fpc(p):(p=f1p())!=0?(fpc(p&-2)&1)!=0?mix(fpc(p),spc(0)):(q=fpc(p))!=0?q:spc(0):(fpc((p=f2p())&-2)&1)!=0?mix(fpc(p),spc(0)):(q=fpc(p))!=0?q:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(p=f1p())!=0?(fpc(p&-2)&1)!=0?cto(mix(fpc(p),0)):fpo(p):(fpc((p=f2p())&-2)&1)!=0?cto(mix(fpc(p),0)):fpo(p):(p=f1p())!=0?(fpc(p&-2)&1)!=0?cto(mix(fpc(p),spc(0))):(q=fpc(p))!=0?cto(q):spo(0):(fpc((p=f2p())&-2)&1)!=0?cto(mix(fpc(p),spc(0))):(q=fpc(p))!=0?cto(q):spo(0)
      TF2s_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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (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],
                                    0)] :
                                VideoController.vcnPal32G8[p] :
                                (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    0)] :
                                VideoController.vcnPal32G8[p] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (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],
                                    0)] :
                                VideoController.vcnPal32G8[p] :
                                (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    0)] :
                                VideoController.vcnPal32G8[p] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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
      },  //TF2s_XHCT

      //================================================================================
      //TF2s_XHCG ($0001,$21xx,$1A2F)
      //  概要
      //    TF2s  テキスト＞512ドット256色2プレーン＞スプライト(OFF)
      //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットが0でないとき
      //          1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //          さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            1番目のパレットが奇数のとき
      //              2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
      //            さもなくば(1番目のパレットが偶数のとき)
      //              1番目のカラー(0は黒)
      //        さもなくば(1番目のパレットが0のとき)
      //          2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //          さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            2番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      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
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):(ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p()))):(ls1(fpc(tev(f2p())))!=0?mix(fpc(tev(f2p())),fpc(tod(f2q()))):fpc(f2p())))):(f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):(ls1(f1p())!=0?(fpc(tod(f2q()))!=0?fpc(tod(f2q())):spc(0)):(fpc(f1p())!=0?fpc(f1p()):spc(0)))):(ls1(fpc(tev(f2p())))!=0?mix(fpc(tev(f2p())),fpc(tod(f2q()))):(fpc(f2p())!=0?fpc(f2p()):spc(0)))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p()):ls1(fpc(tev(f2p())))!=0?mix(fpc(tev(f2p())),fpc(tod(f2q()))):fpc(f2p()):f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):ls1(f1p())!=0?fpc(tod(f2q()))!=0?fpc(tod(f2q())):spc(0):fpc(f1p())!=0?fpc(f1p()):spc(0):ls1(fpc(tev(f2p())))!=0?mix(fpc(tev(f2p())),fpc(tod(f2q()))):fpc(f2p())!=0?fpc(f2p()):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:(v2=f1p())!=0?ls1(v4=fpc(tev(v2)))!=0?mix(v4,fpc(tod(f2q()))):ls1(v2)!=0?fpc(tod(f2q())):fpc(v2):ls1(v16=fpc(tev(v18=f2p())))!=0?mix(v16,fpc(tod(f2q()))):fpc(v18):(v24=f1p())!=0?ls1(v26=fpc(tev(v24)))!=0?mix(v26,fpc(tod(f2q()))):ls1(v24)!=0?(v33=fpc(tod(f2q())))!=0?v33:spc(0):(v37=fpc(v24))!=0?v37:spc(0):ls1(v40=fpc(tev(v42=f2p())))!=0?mix(v40,fpc(tod(f2q()))):(v47=fpc(v42))!=0?v47:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())!=0?ls1(q=fpc(tev(p)))!=0?mix(q,fpc(tod(f2q()))):ls1(p)!=0?fpc(tod(f2q())):fpc(p):ls1(p=fpc(tev(q=f2p())))!=0?mix(p,fpc(tod(f2q()))):fpc(q):(p=f1p())!=0?ls1(q=fpc(tev(p)))!=0?mix(q,fpc(tod(f2q()))):ls1(p)!=0?(p=fpc(tod(f2q())))!=0?p:spc(0):(q=fpc(p))!=0?q:spc(0):ls1(p=fpc(tev(q=f2p())))!=0?mix(p,fpc(tod(f2q()))):(p=fpc(q))!=0?p:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())!=0?((q=fpc(p&-2))&1)!=0?mix(q,fpc(f2q()|1)):(p&1)!=0?fpc(f2q()|1):fpc(p):((p=fpc((q=f2p())&-2))&1)!=0?mix(p,fpc(f2q()|1)):fpc(q):(p=f1p())!=0?((q=fpc(p&-2))&1)!=0?mix(q,fpc(f2q()|1)):(p&1)!=0?(p=fpc(f2q()|1))!=0?p:spc(0):(q=fpc(p))!=0?q:spc(0):((p=fpc((q=f2p())&-2))&1)!=0?mix(p,fpc(f2q()|1)):(p=fpc(q))!=0?p:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(p=f1p())!=0?((q=fpc(p&-2))&1)!=0?cto(mix(q,fpc(f2q()|1))):(p&1)!=0?fpo(f2q()|1):fpo(p):((p=fpc((q=f2p())&-2))&1)!=0?cto(mix(p,fpc(f2q()|1))):fpo(q):(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):spo(0):(q=fpc(p))!=0?cto(q):spo(0):((p=fpc((q=f2p())&-2))&1)!=0?cto(mix(p,fpc(f2q()|1))):(p=fpc(q))!=0?cto(p):spo(0)
      TF2s_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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (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 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1] :
                                VideoController.vcnPal32G8[p] :
                                ((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])] :
                                VideoController.vcnPal32G8[q] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (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 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1] :
                                VideoController.vcnPal32G8[p] :
                                ((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])] :
                                VideoController.vcnPal32G8[q] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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])] :
                                    VideoController.vcnPal32G8[q] :
                                    (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
      },  //TF2s_XHCG

      //================================================================================
      //TF2s_XHCGT ($0001,$21xx,$1B2F)
      //  概要
      //    TF2s  テキスト＞512ドット256色2プレーン＞スプライト(OFF)
      //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットが0でないとき
      //          1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
      //          さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            1番目のパレットが奇数のとき
      //              2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
      //            さもなくば(1番目のパレットが偶数のとき)
      //              1番目のカラー(0は黒)
      //        さもなくば(1番目のパレットが0のとき)
      //          2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
      //          さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            2番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      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
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0):(ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p()))):(ls1(fpc(tev(f2p())))!=0?mix(mix(fpc(tev(f2p())),fpc(tod(f2q()))),0):fpc(f2p())))):(f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),spc(0)):(ls1(f1p())!=0?(fpc(tod(f2q()))!=0?fpc(tod(f2q())):spc(0)):(fpc(f1p())!=0?fpc(f1p()):spc(0)))):(ls1(fpc(tev(f2p())))!=0?mix(mix(fpc(tev(f2p())),fpc(tod(f2q()))),spc(0)):(fpc(f2p())!=0?fpc(f2p()):spc(0)))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0):ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p()):ls1(fpc(tev(f2p())))!=0?mix(mix(fpc(tev(f2p())),fpc(tod(f2q()))),0):fpc(f2p()):f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),spc(0)):ls1(f1p())!=0?fpc(tod(f2q()))!=0?fpc(tod(f2q())):spc(0):fpc(f1p())!=0?fpc(f1p()):spc(0):ls1(fpc(tev(f2p())))!=0?mix(mix(fpc(tev(f2p())),fpc(tod(f2q()))),spc(0)):fpc(f2p())!=0?fpc(f2p()):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:(v2=f1p())!=0?ls1(v4=fpc(tev(v2)))!=0?mix(mix(v4,fpc(tod(f2q()))),0):ls1(v2)!=0?fpc(tod(f2q())):fpc(v2):ls1(v17=fpc(tev(v19=f2p())))!=0?mix(mix(v17,fpc(tod(f2q()))),0):fpc(v19):(v26=f1p())!=0?ls1(v28=fpc(tev(v26)))!=0?mix(mix(v28,fpc(tod(f2q()))),spc(0)):ls1(v26)!=0?(v37=fpc(tod(f2q())))!=0?v37:spc(0):(v41=fpc(v26))!=0?v41:spc(0):ls1(v44=fpc(tev(v46=f2p())))!=0?mix(mix(v44,fpc(tod(f2q()))),spc(0)):(v53=fpc(v46))!=0?v53:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())!=0?ls1(q=fpc(tev(p)))!=0?mix(mix(q,fpc(tod(f2q()))),0):ls1(p)!=0?fpc(tod(f2q())):fpc(p):ls1(p=fpc(tev(q=f2p())))!=0?mix(mix(p,fpc(tod(f2q()))),0):fpc(q):(p=f1p())!=0?ls1(q=fpc(tev(p)))!=0?mix(mix(q,fpc(tod(f2q()))),spc(0)):ls1(p)!=0?(p=fpc(tod(f2q())))!=0?p:spc(0):(q=fpc(p))!=0?q:spc(0):ls1(p=fpc(tev(q=f2p())))!=0?mix(mix(p,fpc(tod(f2q()))),spc(0)):(p=fpc(q))!=0?p:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())!=0?((q=fpc(p&-2))&1)!=0?mix(mix(q,fpc(f2q()|1)),0):(p&1)!=0?fpc(f2q()|1):fpc(p):((p=fpc((q=f2p())&-2))&1)!=0?mix(mix(p,fpc(f2q()|1)),0):fpc(q):(p=f1p())!=0?((q=fpc(p&-2))&1)!=0?mix(mix(q,fpc(f2q()|1)),spc(0)):(p&1)!=0?(p=fpc(f2q()|1))!=0?p:spc(0):(q=fpc(p))!=0?q:spc(0):((p=fpc((q=f2p())&-2))&1)!=0?mix(mix(p,fpc(f2q()|1)),spc(0)):(p=fpc(q))!=0?p:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(p=f1p())!=0?((q=fpc(p&-2))&1)!=0?cto(mix(mix(q,fpc(f2q()|1)),0)):(p&1)!=0?fpo(f2q()|1):fpo(p):((p=fpc((q=f2p())&-2))&1)!=0?cto(mix(mix(p,fpc(f2q()|1)),0)):fpo(q):(p=f1p())!=0?((q=fpc(p&-2))&1)!=0?cto(mix(mix(q,fpc(f2q()|1)),spc(0))):(p&1)!=0?(p=fpc(f2q()|1))!=0?cto(p):spo(0):(q=fpc(p))!=0?cto(q):spo(0):((p=fpc((q=f2p())&-2))&1)!=0?cto(mix(mix(p,fpc(f2q()|1)),spc(0))):(p=fpc(q))!=0?cto(p):spo(0)
      TF2s_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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (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]),
                                    0)] :
                                (p & 1) != 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1] :
                                VideoController.vcnPal32G8[p] :
                                ((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]),
                                    0)] :
                                VideoController.vcnPal32G8[q] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (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]),
                                    0)] :
                                (p & 1) != 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1] :
                                VideoController.vcnPal32G8[p] :
                                ((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]),
                                    0)] :
                                VideoController.vcnPal32G8[q] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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]),
                                        0)] :
                                    (p & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1] :
                                    VideoController.vcnPal32G8[p] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPal32G8[q] :
                                    (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
      },  //TF2s_XHCGT

      //================================================================================
      //TF2s_XHPT ($0001,$21xx,$1D2F)
      //  概要
      //    TF2s  テキスト＞512ドット256色2プレーン＞スプライト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットが0のとき
      //          2番目のパレットを偶数化したパレットのカラー(0は黒)
      //        1番目のパレットが1のとき
      //          グラフィックパレット0のカラー(0は黒)
      //        1番目のパレットが2以上の偶数のとき
      //          1番目のカラー(0は黒)
      //        さもなくば(1番目のパレットが3以上の奇数のとき)
      //          1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      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
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(f1p()==0?fpc(tev(f2p())):f1p()==1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),0))):(f1p()==0?(fpc(tev(f2p()))!=0?fpc(tev(f2p())):spc(0)):f1p()==1?(fpc(0)!=0?fpc(0):spc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):spc(0)):mix(fpc(tev(f1p())),spc(0))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):f1p()==0?fpc(tev(f2p())):f1p()==1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),0):f1p()==0?fpc(tev(f2p()))!=0?fpc(tev(f2p())):spc(0):f1p()==1?fpc(0)!=0?fpc(0):spc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):spc(0):mix(fpc(tev(f1p())),spc(0))
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:(v2=f1p())==0?fpc(tev(f2p())):v2==1?fpc(0):ls1(v2)==0?fpc(v2):mix(fpc(tev(v2)),0):(v12=f1p())==0?(v13=fpc(tev(f2p())))!=0?v13:spc(0):v12==1?(v17=fpc(0))!=0?v17:spc(0):ls1(v12)==0?(v20=fpc(v12))!=0?v20:spc(0):mix(fpc(tev(v12)),spc(0))
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())==0?fpc(tev(f2p())):p==1?fpc(0):ls1(p)==0?fpc(p):mix(fpc(tev(p)),0):(p=f1p())==0?(p=fpc(tev(f2p())))!=0?p:spc(0):p==1?(p=fpc(0))!=0?p:spc(0):ls1(p)==0?(q=fpc(p))!=0?q:spc(0):mix(fpc(tev(p)),spc(0))
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())==0?fpc(f2p()&-2):p==1?fpc(0):(p&1)==0?fpc(p):mix(fpc(p&-2),0):(p=f1p())==0?(p=fpc(f2p()&-2))!=0?p:spc(0):p==1?(p=fpc(0))!=0?p:spc(0):(p&1)==0?(q=fpc(p))!=0?q:spc(0):mix(fpc(p&-2),spc(0))
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(p=f1p())==0?fpo(f2p()&-2):p==1?fpo(0):(p&1)==0?fpo(p):cto(mix(fpc(p&-2),0)):(p=f1p())==0?(p=fpc(f2p()&-2))!=0?cto(p):spo(0):p==1?(p=fpc(0))!=0?cto(p):spo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):spo(0):cto(mix(fpc(p&-2),spc(0)))
      TF2s_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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2] :
                                p == 1 ?
                                VideoController.vcnPal32G8[0] :
                                (p & 1) == 0 ?
                                VideoController.vcnPal32G8[p] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    0)] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2] :
                                p == 1 ?
                                VideoController.vcnPal32G8[0] :
                                (p & 1) == 0 ?
                                VideoController.vcnPal32G8[p] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    0)] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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
      },  //TF2s_XHPT

      //================================================================================
      //TF2s_XHPG ($0001,$21xx,$1E2F)
      //  概要
      //    TF2s  テキスト＞512ドット256色2プレーン＞スプライト(OFF)
      //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットが0のとき
      //          2番目のパレットを偶数化したパレットのカラー(0は黒)
      //        1番目のパレットが1のとき
      //          グラフィックパレット0のカラー(0は黒)
      //        1番目のパレットが2以上の偶数のとき
      //          1番目のカラー(0は黒)
      //        さもなくば(1番目のパレットが3以上の奇数のとき)
      //          1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      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
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(f1p()==0?fpc(tev(f2p())):f1p()==1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),fpc(tod(f2p()))))):(f1p()==0?(fpc(tev(f2p()))!=0?fpc(tev(f2p())):spc(0)):f1p()==1?(fpc(0)!=0?fpc(0):spc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):spc(0)):(mix(fpc(tev(f1p())),fpc(tod(f2p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2p()))):spc(0))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):f1p()==0?fpc(tev(f2p())):f1p()==1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),fpc(tod(f2p()))):f1p()==0?fpc(tev(f2p()))!=0?fpc(tev(f2p())):spc(0):f1p()==1?fpc(0)!=0?fpc(0):spc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):spc(0):mix(fpc(tev(f1p())),fpc(tod(f2p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2p()))):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:(v2=f1p())==0?fpc(tev(f2p())):v2==1?fpc(0):ls1(v2)==0?fpc(v2):mix(fpc(tev(v2)),fpc(tod(f2p()))):(v15=f1p())==0?(v16=fpc(tev(f2p())))!=0?v16:spc(0):v15==1?(v20=fpc(0))!=0?v20:spc(0):ls1(v15)==0?(v23=fpc(v15))!=0?v23:spc(0):(v25=mix(fpc(tev(v15)),fpc(tod(f2p()))))!=0?v25:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())==0?fpc(tev(f2p())):p==1?fpc(0):ls1(p)==0?fpc(p):mix(fpc(tev(p)),fpc(tod(f2p()))):(p=f1p())==0?(p=fpc(tev(f2p())))!=0?p:spc(0):p==1?(p=fpc(0))!=0?p:spc(0):ls1(p)==0?(q=fpc(p))!=0?q:spc(0):(q=mix(fpc(tev(p)),fpc(tod(f2p()))))!=0?q:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())==0?fpc(f2p()&-2):p==1?fpc(0):(p&1)==0?fpc(p):mix(fpc(p&-2),fpc(f2p()|1)):(p=f1p())==0?(p=fpc(f2p()&-2))!=0?p:spc(0):p==1?(p=fpc(0))!=0?p:spc(0):(p&1)==0?(q=fpc(p))!=0?q:spc(0):(q=mix(fpc(p&-2),fpc(f2p()|1)))!=0?q:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(p=f1p())==0?fpo(f2p()&-2):p==1?fpo(0):(p&1)==0?fpo(p):cto(mix(fpc(p&-2),fpc(f2p()|1))):(p=f1p())==0?(p=fpc(f2p()&-2))!=0?cto(p):spo(0):p==1?(p=fpc(0))!=0?cto(p):spo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):spo(0):(q=mix(fpc(p&-2),fpc(f2p()|1)))!=0?cto(q):spo(0)
      TF2s_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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2] :
                                p == 1 ?
                                VideoController.vcnPal32G8[0] :
                                (p & 1) == 0 ?
                                VideoController.vcnPal32G8[p] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd & 511]) | 1])] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) | 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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) | 1])] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) | 1])] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) | 1])] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) | 1])] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) | 1])] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) | 1])] :
                                    (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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2] :
                                p == 1 ?
                                VideoController.vcnPal32G8[0] :
                                (p & 1) == 0 ?
                                VideoController.vcnPal32G8[p] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd & 511]) | 1])] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) | 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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) | 1])] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) | 1])] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) | 1])] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) | 1])] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) | 1])] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) | 1])] :
                                    (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
      },  //TF2s_XHPG

      //================================================================================
      //TF2s_XHPGT ($0001,$21xx,$1F2F)
      //  概要
      //    TF2s  テキスト＞512ドット256色2プレーン＞スプライト(OFF)
      //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットが0のとき
      //          2番目のパレットを偶数化したパレットのカラー(0は黒)
      //        1番目のパレットが1のとき
      //          グラフィックパレット0のカラー(0は黒)
      //        1番目のパレットが2以上の偶数のとき
      //          1番目のカラー(0は黒)
      //        さもなくば(1番目のパレットが3以上の奇数のとき)
      //          1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      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
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(f1p()==0?fpc(tev(f2p())):f1p()==1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(mix(fpc(tev(f1p())),fpc(tod(f2p()))),0))):(f1p()==0?(fpc(tev(f2p()))!=0?fpc(tev(f2p())):spc(0)):f1p()==1?(fpc(0)!=0?fpc(0):spc(0)):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):spc(0)):mix(mix(fpc(tev(f1p())),fpc(tod(f2p()))),spc(0))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):f1p()==0?fpc(tev(f2p())):f1p()==1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(mix(fpc(tev(f1p())),fpc(tod(f2p()))),0):f1p()==0?fpc(tev(f2p()))!=0?fpc(tev(f2p())):spc(0):f1p()==1?fpc(0)!=0?fpc(0):spc(0):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):spc(0):mix(mix(fpc(tev(f1p())),fpc(tod(f2p()))),spc(0))
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:(v2=f1p())==0?fpc(tev(f2p())):v2==1?fpc(0):ls1(v2)==0?fpc(v2):mix(mix(fpc(tev(v2)),fpc(tod(f2p()))),0):(v16=f1p())==0?(v17=fpc(tev(f2p())))!=0?v17:spc(0):v16==1?(v21=fpc(0))!=0?v21:spc(0):ls1(v16)==0?(v24=fpc(v16))!=0?v24:spc(0):mix(mix(fpc(tev(v16)),fpc(tod(f2p()))),spc(0))
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())==0?fpc(tev(f2p())):p==1?fpc(0):ls1(p)==0?fpc(p):mix(mix(fpc(tev(p)),fpc(tod(f2p()))),0):(p=f1p())==0?(p=fpc(tev(f2p())))!=0?p:spc(0):p==1?(p=fpc(0))!=0?p:spc(0):ls1(p)==0?(q=fpc(p))!=0?q:spc(0):mix(mix(fpc(tev(p)),fpc(tod(f2p()))),spc(0))
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=f1p())==0?fpc(f2p()&-2):p==1?fpc(0):(p&1)==0?fpc(p):mix(mix(fpc(p&-2),fpc(f2p()|1)),0):(p=f1p())==0?(p=fpc(f2p()&-2))!=0?p:spc(0):p==1?(p=fpc(0))!=0?p:spc(0):(p&1)==0?(q=fpc(p))!=0?q:spc(0):mix(mix(fpc(p&-2),fpc(f2p()|1)),spc(0))
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(p=f1p())==0?fpo(f2p()&-2):p==1?fpo(0):(p&1)==0?fpo(p):cto(mix(mix(fpc(p&-2),fpc(f2p()|1)),0)):(p=f1p())==0?(p=fpc(f2p()&-2))!=0?cto(p):spo(0):p==1?(p=fpc(0))!=0?cto(p):spo(0):(p&1)==0?(q=fpc(p))!=0?cto(q):spo(0):cto(mix(mix(fpc(p&-2),fpc(f2p()|1)),spc(0)))
      TF2s_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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2] :
                                p == 1 ?
                                VideoController.vcnPal32G8[0] :
                                (p & 1) == 0 ?
                                VideoController.vcnPal32G8[p] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511]) | 1]),
                                    0)] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2] :
                                p == 1 ?
                                VideoController.vcnPal32G8[0] :
                                (p & 1) == 0 ?
                                VideoController.vcnPal32G8[p] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511]) | 1]),
                                    0)] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2] :
                                    p == 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    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]),
                                        0)] :
                                    (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
      },  //TF2s_XHPGT

      //================================================================================
      //TGs ($0003,$21xx,$002F)
      //  概要
      //    TGs  テキスト＞512ドット65536色1プレーン＞スプライト(OFF)
      //    拡張なし
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        スプライトパレット0のカラー(0は黒)
      //  中間コード1
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):gpc(g1p(),g1p())):(gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0)))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):gpc(g1p(),g1p()):gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:gpc(v3=g1p(),v3):(v4=gpc(v5=g1p(),v5))!=0?v4:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:gpc(p=g1p(),p):(p=gpc(q=g1p(),q))!=0?p:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:gpc(p=g1p(),p):(p=gpc(q=g1p(),q))!=0?p:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):gpo(p=g1p(),p):(p=gpc(q=g1p(),q))!=0?cto(p):spo(0)
      TGs {
        @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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPalTbl[
                                  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]] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPalTbl[
                                  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]] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      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]] :
                                    (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
      },  //TGs

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

      //================================================================================
      //TGs_XWC ($0003,$21xx,$102F)
      //  概要
      //    TGs  テキスト＞512ドット65536色1プレーン＞スプライト(OFF)
      //    XWC  優先順位に関わらず0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //      1番目のカラー(0は黒)
      //    さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //      テキストパレットが0でないとき
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          1番目のカラー(0は黒)
      //      さもなくば(テキストパレットが0のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          スプライトパレット0のカラー(0は黒)
      //  中間コード1
      //    (ls1(gpc(tod(g1p()),tod(g1p())))!=0?gpc(g1p(),g1p()):(txp()!=0?(tpc(txp())!=0?tpc(txp()):gpc(g1p(),g1p())):(gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0))))
      //  中間コード2
      //    ls1(gpc(tod(g1p()),tod(g1p())))!=0?gpc(g1p(),g1p()):txp()!=0?tpc(txp())!=0?tpc(txp()):gpc(g1p(),g1p()):gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0)
      //  中間コード3
      //    ls1(gpc(v2=tod(v3=g1p()),v2))!=0?gpc(v3,v3):(v5=txp())!=0?(v6=tpc(v5))!=0?v6:gpc(v3,v3):(v8=gpc(v3,v3))!=0?v8:spc(0)
      //  中間コード4
      //    ls1(gpc(p=tod(q=g1p()),p))!=0?gpc(q,q):(p=txp())!=0?(r=tpc(p))!=0?r:gpc(q,q):(p=gpc(q,q))!=0?p:spc(0)
      //  中間コード5
      //    (gpc(p=(q=g1p())|1,p)&1)!=0?gpc(q,q):(p=txp())!=0?(r=tpc(p))!=0?r:gpc(q,q):(p=gpc(q,q))!=0?p:spc(0)
      //  中間コード6
      //    (gpc(p=(q=g1p())|1,p)&1)!=0?gpo(q,q):(p=txp())!=0?(r=tpc(p))!=0?cto(r):gpo(q,q):(p=gpc(q,q))!=0?cto(p):spo(0)
      TGs_XWC {
        @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, r;
              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.vcnPal8G16H[q >> 8] |
                                  VideoController.vcnPal8G16L[q & 255]] :
                                (p = tp >>> 28) != 0 ?
                                (r = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[r] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[q >> 8] |
                                  VideoController.vcnPal8G16L[q & 255]] :
                                (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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, r;
              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.vcnPal8G16H[q >> 8] |
                                  VideoController.vcnPal8G16L[q & 255]] :
                                (p = tp >>> 28) != 0 ?
                                (r = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[r] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[q >> 8] |
                                  VideoController.vcnPal8G16L[q & 255]] :
                                (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = tp & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (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
      },  //TGs_XWC

      //================================================================================
      //TGs_XWP ($0003,$21xx,$142F)
      //  概要
      //    TGs  テキスト＞512ドット65536色1プレーン＞スプライト(OFF)
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが1以下のとき
      //      テキストパレットが0でないとき
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          グラフィックパレット0のカラー(0は黒)
      //      さもなくば(テキストパレットが0のとき)
      //        グラフィックパレット0のカラーが0でないとき
      //          グラフィックパレット0のカラー
      //        さもなくば(グラフィックパレット0のカラーが0のとき)
      //          スプライトパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      テキストパレットが0でないとき
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          1番目のカラー(0は黒)
      //      さもなくば(テキストパレットが0のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          スプライトパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (g1p()<=1?(txp()!=0?(tpc(txp())!=0?tpc(txp()):gpc(0,0)):(gpc(0,0)!=0?gpc(0,0):spc(0))):ls1(g1p())==0?(txp()!=0?(tpc(txp())!=0?tpc(txp()):gpc(g1p(),g1p())):(gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0))):gpc(tev(g1p()),tev(g1p())))
      //  中間コード2
      //    g1p()<=1?txp()!=0?tpc(txp())!=0?tpc(txp()):gpc(0,0):gpc(0,0)!=0?gpc(0,0):spc(0):ls1(g1p())==0?txp()!=0?tpc(txp())!=0?tpc(txp()):gpc(g1p(),g1p()):gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0):gpc(tev(g1p()),tev(g1p()))
      //  中間コード3
      //    (v0=g1p())<=1?(v1=txp())!=0?(v2=tpc(v1))!=0?v2:gpc(0,0):(v4=gpc(0,0))!=0?v4:spc(0):ls1(v0)==0?(v7=txp())!=0?(v8=tpc(v7))!=0?v8:gpc(v0,v0):(v10=gpc(v0,v0))!=0?v10:spc(0):gpc(v13=tev(v0),v13)
      //  中間コード4
      //    (p=g1p())<=1?(p=txp())!=0?(q=tpc(p))!=0?q:gpc(0,0):(p=gpc(0,0))!=0?p:spc(0):ls1(p)==0?(q=txp())!=0?(r=tpc(q))!=0?r:gpc(p,p):(q=gpc(p,p))!=0?q:spc(0):gpc(q=tev(p),q)
      //  中間コード5
      //    (p=g1p())<=1?(p=txp())!=0?(q=tpc(p))!=0?q:gpc(0,0):(p=gpc(0,0))!=0?p:spc(0):(p&1)==0?(q=txp())!=0?(r=tpc(q))!=0?r:gpc(p,p):(q=gpc(p,p))!=0?q:spc(0):gpc(q=p&-2,q)
      //  中間コード6
      //    (p=g1p())<=1?(p=txp())!=0?(q=tpc(p))!=0?cto(q):gpo(0,0):(p=gpc(0,0))!=0?cto(p):spo(0):(p&1)==0?(q=txp())!=0?(r=tpc(q))!=0?cto(r):gpo(p,p):(q=gpc(p,p))!=0?cto(q):spo(0):gpo(q=p&-2,q)
      TGs_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, r;
              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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[0 >> 8] |
                                  VideoController.vcnPal8G16L[0 & 255]] :
                                (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = tp >>> 28) != 0 ?
                                (r = VideoController.vcnPal16TS[q]) != 0 ?
                                VideoController.vcnPalTbl[r] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[p >> 8] |
                                  VideoController.vcnPal8G16L[p & 255]] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 24 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 20 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 16 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 12 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 8 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 4 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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, r;
              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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[0 >> 8] |
                                  VideoController.vcnPal8G16L[0 & 255]] :
                                (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = tp >>> 28) != 0 ?
                                (r = VideoController.vcnPal16TS[q]) != 0 ?
                                VideoController.vcnPalTbl[r] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[p >> 8] |
                                  VideoController.vcnPal8G16L[p & 255]] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 24 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 20 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 16 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 12 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 8 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 4 & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = (VideoController.vcnPal8G16H[0 >> 8] |
                                          VideoController.vcnPal8G16L[0 & 255])) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp & 15) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (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
      },  //TGs_XWP

      //================================================================================
      //TGs_XHCT ($0003,$21xx,$192F)
      //  概要
      //    TGs  テキスト＞512ドット65536色1プレーン＞スプライト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //          1番目のカラーとカラー0を混ぜたカラー(0は黒)
      //        さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //          1番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //        1番目のカラーと
      //          スプライトパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          スプライトパレット0のカラー(0は黒)
      //  中間コード1
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),0):gpc(g1p(),g1p()))):(ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),spc(0)):(gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),0):gpc(g1p(),g1p()):ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),spc(0)):gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:ls1(gpc(v4=tod(v5=g1p()),v4))!=0?mix(gpc(v5,v5),0):gpc(v5,v5):ls1(gpc(v11=tod(v12=g1p()),v11))!=0?mix(gpc(v12,v12),spc(0)):(v16=gpc(v12,v12))!=0?v16:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:ls1(gpc(p=tod(q=g1p()),p))!=0?mix(gpc(q,q),0):gpc(q,q):ls1(gpc(p=tod(q=g1p()),p))!=0?mix(gpc(q,q),spc(0)):(p=gpc(q,q))!=0?p:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(gpc(p=(q=g1p())|1,p)&1)!=0?mix(gpc(q,q),0):gpc(q,q):(gpc(p=(q=g1p())|1,p)&1)!=0?mix(gpc(q,q),spc(0)):(p=gpc(q,q))!=0?p:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(gpc(p=(q=g1p())|1,p)&1)!=0?cto(mix(gpc(q,q),0)):gpo(q,q):(gpc(p=(q=g1p())|1,p)&1)!=0?cto(mix(gpc(q,q),spc(0))):(p=gpc(q,q))!=0?cto(p):spo(0)
      TGs_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] = ((p = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                ((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]),
                                    0)] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[q >> 8] |
                                  VideoController.vcnPal8G16L[q & 255]] :
                                ((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] = ((p = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                ((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]),
                                    0)] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[q >> 8] |
                                  VideoController.vcnPal8G16L[q & 255]] :
                                ((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] = ((p = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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] = ((p = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((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]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((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
      },  //TGs_XHCT

      //================================================================================
      //TGs_XHPT ($0003,$21xx,$1D2F)
      //  概要
      //    TGs  テキスト＞512ドット65536色1プレーン＞スプライト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットが1以下のとき
      //          グラフィックパレット0のカラー(0は黒)
      //        1番目のパレットが2以上の偶数のとき
      //          1番目のカラー(0は黒)
      //        さもなくば(1番目のパレットが3以上の奇数のとき)
      //          1番目のパレットを偶数化したパレットのカラーとカラー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
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(g1p()<=1?gpc(0,0):ls1(g1p())==0?gpc(g1p(),g1p()):mix(gpc(tev(g1p()),tev(g1p())),0))):(g1p()<=1?(gpc(0,0)!=0?gpc(0,0):spc(0)):ls1(g1p())==0?(gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0)):mix(gpc(tev(g1p()),tev(g1p())),spc(0))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):g1p()<=1?gpc(0,0):ls1(g1p())==0?gpc(g1p(),g1p()):mix(gpc(tev(g1p()),tev(g1p())),0):g1p()<=1?gpc(0,0)!=0?gpc(0,0):spc(0):ls1(g1p())==0?gpc(g1p(),g1p())!=0?gpc(g1p(),g1p()):spc(0):mix(gpc(tev(g1p()),tev(g1p())),spc(0))
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:(v2=g1p())<=1?gpc(0,0):ls1(v2)==0?gpc(v2,v2):mix(gpc(v8=tev(v2),v8),0):(v9=g1p())<=1?(v10=gpc(0,0))!=0?v10:spc(0):ls1(v9)==0?(v13=gpc(v9,v9))!=0?v13:spc(0):mix(gpc(v17=tev(v9),v17),spc(0))
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=g1p())<=1?gpc(0,0):ls1(p)==0?gpc(p,p):mix(gpc(q=tev(p),q),0):(p=g1p())<=1?(p=gpc(0,0))!=0?p:spc(0):ls1(p)==0?(q=gpc(p,p))!=0?q:spc(0):mix(gpc(q=tev(p),q),spc(0))
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=g1p())<=1?gpc(0,0):(p&1)==0?gpc(p,p):mix(gpc(q=p&-2,q),0):(p=g1p())<=1?(p=gpc(0,0))!=0?p:spc(0):(p&1)==0?(q=gpc(p,p))!=0?q:spc(0):mix(gpc(q=p&-2,q),spc(0))
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(p=g1p())<=1?gpo(0,0):(p&1)==0?gpo(p,p):cto(mix(gpc(q=p&-2,q),0)):(p=g1p())<=1?(p=gpc(0,0))!=0?cto(p):spo(0):(p&1)==0?(q=gpc(p,p))!=0?cto(q):spo(0):cto(mix(gpc(q=p&-2,q),spc(0)))
      TGs_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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (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 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[0 >> 8] |
                                  VideoController.vcnPal8G16L[0 & 255]] :
                                (p & 1) == 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[p >> 8] |
                                  VideoController.vcnPal8G16L[p & 255]] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                     VideoController.vcnPal8G16L[q & 255]),
                                    0)] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (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 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[0 >> 8] |
                                  VideoController.vcnPal8G16L[0 & 255]] :
                                (p & 1) == 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnPal8G16H[p >> 8] |
                                  VideoController.vcnPal8G16L[p & 255]] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                     VideoController.vcnPal8G16L[q & 255]),
                                    0)] :
                                (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 = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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 = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (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 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    (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
      },  //TGs_XHPT

      //================================================================================
      //THs ($0004,$21xx,$0030)
      //  概要
      //    THs  テキスト＞1024ドット16色1プレーン＞スプライト(OFF)
      //    拡張なし
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        スプライトパレット0のカラー(0は黒)
      //  中間コード1
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):hpc(h1p())):(hpc(h1p())!=0?hpc(h1p()):spc(0)))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):hpc(h1p()):hpc(h1p())!=0?hpc(h1p()):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:hpc(h1p()):(v4=hpc(h1p()))!=0?v4:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:hpc(h1p()):(p=hpc(h1p()))!=0?p:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:hpc(h1p()):(p=hpc(h1p()))!=0?p:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):hpo(h1p()):(p=hpc(h1p()))!=0?cto(p):spo(0)
      THs {
        @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 = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32G8[GraphicScreen.graM4[ga]] :
                                  (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga]]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 1]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 1]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((p = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 2]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 2]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((p = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 3]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 3]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((p = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 4]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 4]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((p = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 5]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 5]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((p = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 6]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 6]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((p = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 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, q;
                  XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32G8[GraphicScreen.graM4[ga]] :
                                    (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, q;
                XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32G8[GraphicScreen.graM4[ga]] :
                                  (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga]]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 1]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 1]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 2] = ((p = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 2]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 2]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 3] = ((p = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 3]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 3]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 4] = ((p = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 4]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 4]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 5] = ((p = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 5]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 5]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 6] = ((p = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 6]] :
                                      (p = VideoController.vcnPal16G8[GraphicScreen.graM4[ga + 6]]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 7] = ((p = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[GraphicScreen.graM4[ga + 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, q;
                  XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32G8[GraphicScreen.graM4[ga]] :
                                    (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
      },  //THs

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

      //================================================================================
      //THs_XWC ($0004,$21xx,$1030)
      //  概要
      //    THs  テキスト＞1024ドット16色1プレーン＞スプライト(OFF)
      //    XWC  優先順位に関わらず0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //      1番目のカラー(0は黒)
      //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //      テキストパレットが0でないとき
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          1番目のカラー(0は黒)
      //      さもなくば(テキストパレットが0のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          スプライトパレット0のカラー(0は黒)
      //  中間コード1
      //    (ls1(hpc(tev(h1p())))!=0?hpc(h1p()):(txp()!=0?(tpc(txp())!=0?tpc(txp()):hpc(h1p())):(hpc(h1p())!=0?hpc(h1p()):spc(0))))
      //  中間コード2
      //    ls1(hpc(tev(h1p())))!=0?hpc(h1p()):txp()!=0?tpc(txp())!=0?tpc(txp()):hpc(h1p()):hpc(h1p())!=0?hpc(h1p()):spc(0)
      //  中間コード3
      //    ls1(hpc(tev(v3=h1p())))!=0?hpc(v3):(v5=txp())!=0?(v6=tpc(v5))!=0?v6:hpc(v3):(v8=hpc(v3))!=0?v8:spc(0)
      //  中間コード4
      //    ls1(hpc(tev(p=h1p())))!=0?hpc(p):(q=txp())!=0?(r=tpc(q))!=0?r:hpc(p):(q=hpc(p))!=0?q:spc(0)
      //  中間コード5
      //    (hpc((p=h1p())&-2)&1)!=0?hpc(p):(q=txp())!=0?(r=tpc(q))!=0?r:hpc(p):(q=hpc(p))!=0?q:spc(0)
      //  中間コード6
      //    (hpc((p=h1p())&-2)&1)!=0?hpo(p):(q=txp())!=0?(r=tpc(q))!=0?cto(r):hpo(p):(q=hpc(p))!=0?cto(q):spo(0)
      THs_XWC {
        @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, r;
                XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                  VideoController.vcnPal32G8[p] :
                                  (q = tp >>> 28) != 0 ?
                                  (r = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[r] :
                                  VideoController.vcnPal32G8[p] :
                                  (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.vcnPal32G8[p] :
                                      (q = tp >>> 24 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 20 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 16 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 12 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 8 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 4 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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, r;
                  XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = tp >>> 28) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPal32G8[p] :
                                    (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, r;
                XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                  VideoController.vcnPal32G8[p] :
                                  (q = tp >>> 28) != 0 ?
                                  (r = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[r] :
                                  VideoController.vcnPal32G8[p] :
                                  (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.vcnPal32G8[p] :
                                      (q = tp >>> 24 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 20 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 16 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 12 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 8 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp >>> 4 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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.vcnPal32G8[p] :
                                      (q = tp & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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, r;
                  XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = tp >>> 28) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPal32G8[p] :
                                    (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
      },  //THs_XWC

      //================================================================================
      //THs_XWP ($0004,$21xx,$1430)
      //  概要
      //    THs  テキスト＞1024ドット16色1プレーン＞スプライト(OFF)
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが1以下のとき
      //      テキストパレットが0でないとき
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          グラフィックパレット0のカラー(0は黒)
      //      さもなくば(テキストパレットが0のとき)
      //        グラフィックパレット0のカラーが0でないとき
      //          グラフィックパレット0のカラー
      //        さもなくば(グラフィックパレット0のカラーが0のとき)
      //          スプライトパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      テキストパレットが0でないとき
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          1番目のカラー(0は黒)
      //      さもなくば(テキストパレットが0のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          スプライトパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (h1p()<=1?(txp()!=0?(tpc(txp())!=0?tpc(txp()):hpc(0)):(hpc(0)!=0?hpc(0):spc(0))):ls1(h1p())==0?(txp()!=0?(tpc(txp())!=0?tpc(txp()):hpc(h1p())):(hpc(h1p())!=0?hpc(h1p()):spc(0))):hpc(tev(h1p())))
      //  中間コード2
      //    h1p()<=1?txp()!=0?tpc(txp())!=0?tpc(txp()):hpc(0):hpc(0)!=0?hpc(0):spc(0):ls1(h1p())==0?txp()!=0?tpc(txp())!=0?tpc(txp()):hpc(h1p()):hpc(h1p())!=0?hpc(h1p()):spc(0):hpc(tev(h1p()))
      //  中間コード3
      //    (v0=h1p())<=1?(v1=txp())!=0?(v2=tpc(v1))!=0?v2:hpc(0):(v4=hpc(0))!=0?v4:spc(0):ls1(v0)==0?(v7=txp())!=0?(v8=tpc(v7))!=0?v8:hpc(v0):(v10=hpc(v0))!=0?v10:spc(0):hpc(tev(v0))
      //  中間コード4
      //    (p=h1p())<=1?(p=txp())!=0?(q=tpc(p))!=0?q:hpc(0):(p=hpc(0))!=0?p:spc(0):ls1(p)==0?(q=txp())!=0?(r=tpc(q))!=0?r:hpc(p):(q=hpc(p))!=0?q:spc(0):hpc(tev(p))
      //  中間コード5
      //    (p=h1p())<=1?(p=txp())!=0?(q=tpc(p))!=0?q:hpc(0):(p=hpc(0))!=0?p:spc(0):(p&1)==0?(q=txp())!=0?(r=tpc(q))!=0?r:hpc(p):(q=hpc(p))!=0?q:spc(0):hpc(p&-2)
      //  中間コード6
      //    (p=h1p())<=1?(p=txp())!=0?(q=tpc(p))!=0?cto(q):hpo(0):(p=hpc(0))!=0?cto(p):spo(0):(p&1)==0?(q=txp())!=0?(r=tpc(q))!=0?cto(r):hpo(p):(q=hpc(p))!=0?cto(q):spo(0):hpo(p&-2)
      THs_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, r;
                XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                  (p = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32G8[0] :
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = tp >>> 28) != 0 ?
                                  (r = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[r] :
                                  VideoController.vcnPal32G8[p] :
                                  (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 = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 24 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 20 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 16 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 12 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 8 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 4 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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, r;
                  XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                    (p = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32G8[0] :
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 28) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPal32G8[p] :
                                    (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, r;
                XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                  (p = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32G8[0] :
                                  (p = VideoController.vcnPal16G8[0]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0] :
                                  (p & 1) == 0 ?
                                  (q = tp >>> 28) != 0 ?
                                  (r = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[r] :
                                  VideoController.vcnPal32G8[p] :
                                  (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 = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 24 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 20 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 16 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 12 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 8 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp >>> 4 & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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 = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[0] :
                                      (p = VideoController.vcnPal16G8[0]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPal32TS[0] :
                                      (p & 1) == 0 ?
                                      (q = tp & 15) != 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPal32G8[p] :
                                      (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, r;
                  XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[ga]) <= 1 ?
                                    (p = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32G8[0] :
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = tp >>> 28) != 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPal32G8[p] :
                                    (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
      },  //THs_XWP

      //================================================================================
      //THs_XHCT ($0004,$21xx,$1930)
      //  概要
      //    THs  テキスト＞1024ドット16色1プレーン＞スプライト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //          1番目のカラーとカラー0を混ぜたカラー(0は黒)
      //        さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //          1番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のカラーと
      //          スプライトパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          スプライトパレット0のカラー(0は黒)
      //  中間コード1
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(ls1(hpc(tev(h1p())))!=0?mix(hpc(h1p()),0):hpc(h1p()))):(ls1(hpc(tev(h1p())))!=0?mix(hpc(h1p()),spc(0)):(hpc(h1p())!=0?hpc(h1p()):spc(0))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):ls1(hpc(tev(h1p())))!=0?mix(hpc(h1p()),0):hpc(h1p()):ls1(hpc(tev(h1p())))!=0?mix(hpc(h1p()),spc(0)):hpc(h1p())!=0?hpc(h1p()):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:ls1(hpc(tev(v5=h1p())))!=0?mix(hpc(v5),0):hpc(v5):ls1(hpc(tev(v12=h1p())))!=0?mix(hpc(v12),spc(0)):(v16=hpc(v12))!=0?v16:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:ls1(hpc(tev(p=h1p())))!=0?mix(hpc(p),0):hpc(p):ls1(hpc(tev(p=h1p())))!=0?mix(hpc(p),spc(0)):(q=hpc(p))!=0?q:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(hpc((p=h1p())&-2)&1)!=0?mix(hpc(p),0):hpc(p):(hpc((p=h1p())&-2)&1)!=0?mix(hpc(p),spc(0)):(q=hpc(p))!=0?q:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(hpc((p=h1p())&-2)&1)!=0?cto(mix(hpc(p),0)):hpo(p):(hpc((p=h1p())&-2)&1)!=0?cto(mix(hpc(p),spc(0))):(q=hpc(p))!=0?cto(q):spo(0)
      THs_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] = ((p = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p],
                                      0)] :
                                  VideoController.vcnPal32G8[p] :
                                  (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] = ((p = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 1]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 2]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 3]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 4]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 5]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 6]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 7]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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] = ((p = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p],
                                      0)] :
                                  VideoController.vcnPal32G8[p] :
                                  (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] = ((p = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 1]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 2]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 3]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 4]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 5]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 6]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga + 7]) & -2] & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p],
                                          0)] :
                                      VideoController.vcnPal32G8[p] :
                                      (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] = ((p = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[ga]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        0)] :
                                    VideoController.vcnPal32G8[p] :
                                    (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
      },  //THs_XHCT

      //================================================================================
      //THs_XHPT ($0004,$21xx,$1D30)
      //  概要
      //    THs  テキスト＞1024ドット16色1プレーン＞スプライト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットが1以下のとき
      //          グラフィックパレット0のカラー(0は黒)
      //        1番目のパレットが2以上の偶数のとき
      //          1番目のカラー(0は黒)
      //        さもなくば(1番目のパレットが3以上の奇数のとき)
      //          1番目のパレットを偶数化したパレットのカラーとカラー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
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(h1p()<=1?hpc(0):ls1(h1p())==0?hpc(h1p()):mix(hpc(tev(h1p())),0))):(h1p()<=1?(hpc(0)!=0?hpc(0):spc(0)):ls1(h1p())==0?(hpc(h1p())!=0?hpc(h1p()):spc(0)):mix(hpc(tev(h1p())),spc(0))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):h1p()<=1?hpc(0):ls1(h1p())==0?hpc(h1p()):mix(hpc(tev(h1p())),0):h1p()<=1?hpc(0)!=0?hpc(0):spc(0):ls1(h1p())==0?hpc(h1p())!=0?hpc(h1p()):spc(0):mix(hpc(tev(h1p())),spc(0))
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:(v2=h1p())<=1?hpc(0):ls1(v2)==0?hpc(v2):mix(hpc(tev(v2)),0):(v9=h1p())<=1?(v10=hpc(0))!=0?v10:spc(0):ls1(v9)==0?(v13=hpc(v9))!=0?v13:spc(0):mix(hpc(tev(v9)),spc(0))
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=h1p())<=1?hpc(0):ls1(p)==0?hpc(p):mix(hpc(tev(p)),0):(p=h1p())<=1?(p=hpc(0))!=0?p:spc(0):ls1(p)==0?(q=hpc(p))!=0?q:spc(0):mix(hpc(tev(p)),spc(0))
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(p=h1p())<=1?hpc(0):(p&1)==0?hpc(p):mix(hpc(p&-2),0):(p=h1p())<=1?(p=hpc(0))!=0?p:spc(0):(p&1)==0?(q=hpc(p))!=0?q:spc(0):mix(hpc(p&-2),spc(0))
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(p=h1p())<=1?hpo(0):(p&1)==0?hpo(p):cto(mix(hpc(p&-2),0)):(p=h1p())<=1?(p=hpc(0))!=0?cto(p):spo(0):(p&1)==0?(q=hpc(p))!=0?cto(q):spo(0):cto(mix(hpc(p&-2),spc(0)))
      THs_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 = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  (p = GraphicScreen.graM4[ga]) <= 1 ?
                                  VideoController.vcnPal32G8[0] :
                                  (p & 1) == 0 ?
                                  VideoController.vcnPal32G8[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      0)] :
                                  (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 = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 1]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 2]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 3]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 4]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 5]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 6]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 7]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = GraphicScreen.graM4[ga]) <= 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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 = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  (p = GraphicScreen.graM4[ga]) <= 1 ?
                                  VideoController.vcnPal32G8[0] :
                                  (p & 1) == 0 ?
                                  VideoController.vcnPal32G8[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      0)] :
                                  (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 = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 1]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 2]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 3]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 4]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 5]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 6]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = GraphicScreen.graM4[ga + 7]) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (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 = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = GraphicScreen.graM4[ga]) <= 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (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
      },  //THs_XHPT

      //================================================================================
      //TIs ($0005,$21xx,$0030)
      //  概要
      //    TIs  テキスト＞1024ドット256色1プレーン＞スプライト(OFF)
      //    拡張なし
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        スプライトパレット0のカラー(0は黒)
      //  中間コード1
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):ipc(i1p())):(ipc(i1p())!=0?ipc(i1p()):spc(0)))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):ipc(i1p()):ipc(i1p())!=0?ipc(i1p()):spc(0)
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:ipc(i1p()):(v4=ipc(i1p()))!=0?v4:spc(0)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:ipc(i1p()):(p=ipc(i1p()))!=0?p:spc(0)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:ipc(i1p()):(p=ipc(i1p()))!=0?p:spc(0)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):ipo(i1p()):(p=ipc(i1p()))!=0?cto(p):spo(0)
      TIs {
        @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 = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                              GraphicScreen.graM4[ga])] :
                                  (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                   GraphicScreen.graM4[ga])]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                  GraphicScreen.graM4[ga + 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, q;
                  XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                GraphicScreen.graM4[ga])] :
                                    (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, q;
                XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                              GraphicScreen.graM4[ga])] :
                                  (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                   GraphicScreen.graM4[ga])]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPal32TS[0]);
                XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 20 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 16 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 12 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 8 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp >>> 4 & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                  GraphicScreen.graM4[ga + 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 = tp & 15) != 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                  GraphicScreen.graM4[ga + 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, q;
                  XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                GraphicScreen.graM4[ga])] :
                                    (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
      },  //TIs

      //================================================================================
      //XTIs
      //  概要
      //    TIs  テキスト＞1024ドット256色1プレーン＞スプライト(OFF)

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