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

                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy4th | gx4th + 7 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E4TS_XHCT

      //================================================================================
      //E4TS_XHCG ($0000,$24xx,$1A6F)
      //  概要
      //    E4TS  512ドット16色4プレーン＞テキスト＞スプライト
      //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のパレットが奇数のとき
      //          2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0でないとき
      //            2番目(ONとみなす)のパレットを奇数化したパレットのカラー
      //          さもなくば(2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //        さもなくば(1番目のパレットが偶数のとき)
      //          1番目のカラーが0でないとき
      //            1番目のカラー
      //          さもなくば(1番目のカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットが0でないとき
      //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //          2番目のカラーが0でないとき
      //            2番目のカラー
      //          さもなくば(2番目のカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //      さもなくば(2番目のパレットが0のとき)
      //        3番目のパレットが0でないとき
      //          3番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラー(0は黒)
      //          さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            3番目のパレットが奇数のとき
      //              パレット1のカラーが0でないとき
      //                パレット1のカラー
      //              さもなくば(パレット1のカラーが0のとき)
      //                テキストパレットが0でないとき
      //                  テキストカラー(0は黒)
      //                さもなくば(テキストパレットが0のとき)
      //                  スプライトカラー(0は黒)
      //            さもなくば(3番目のパレットが偶数のとき)
      //              3番目のカラーが0でないとき
      //                3番目のカラー
      //              さもなくば(3番目のカラーが0のとき)
      //                テキストパレットが0でないとき
      //                  テキストカラー(0は黒)
      //                さもなくば(テキストパレットが0のとき)
      //                  スプライトカラー(0は黒)
      //        さもなくば(3番目のパレットが0のとき)
      //          4番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            4番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラー(0は黒)
      //          さもなくば(4番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            4番目のパレットが奇数のとき
      //              パレット1のカラーが0でないとき
      //                パレット1のカラー
      //              さもなくば(パレット1のカラーが0のとき)
      //                テキストパレットが0でないとき
      //                  テキストカラー(0は黒)
      //                さもなくば(テキストパレットが0のとき)
      //                  スプライトカラー(0は黒)
      //            さもなくば(4番目のパレットが偶数のとき)
      //              4番目のカラーが0でないとき
      //                4番目のカラー
      //              さもなくば(4番目のカラーが0のとき)
      //                テキストパレットが0でないとき
      //                  テキストカラー(0は黒)
      //                さもなくば(テキストパレットが0のとき)
      //                  スプライトカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(ls1(e1p())!=0?(epc(tod(e2q()))!=0?epc(tod(e2q())):(txp()!=0?tpc(txp()):spc(spp()))):(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp()))))):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):(epc(e2p())!=0?epc(e2p()):(txp()!=0?tpc(txp()):spc(spp())))):(e3p()!=0?(ls1(epc(tev(e3p())))!=0?mix(epc(tev(e3p())),epc(1)):(ls1(e3p())!=0?(epc(1)!=0?epc(1):(txp()!=0?tpc(txp()):spc(spp()))):(epc(e3p())!=0?epc(e3p()):(txp()!=0?tpc(txp()):spc(spp()))))):(ls1(epc(tev(e4p())))!=0?mix(epc(tev(e4p())),epc(1)):(ls1(e4p())!=0?(epc(1)!=0?epc(1):(txp()!=0?tpc(txp()):spc(spp()))):(epc(e4p())!=0?epc(e4p()):(txp()!=0?tpc(txp()):spc(spp()))))))))
      //  中間コード2
      //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):ls1(e1p())!=0?epc(tod(e2q()))!=0?epc(tod(e2q())):txp()!=0?tpc(txp()):spc(spp()):epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp()):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p())!=0?epc(e2p()):txp()!=0?tpc(txp()):spc(spp()):e3p()!=0?ls1(epc(tev(e3p())))!=0?mix(epc(tev(e3p())),epc(1)):ls1(e3p())!=0?epc(1)!=0?epc(1):txp()!=0?tpc(txp()):spc(spp()):epc(e3p())!=0?epc(e3p()):txp()!=0?tpc(txp()):spc(spp()):ls1(epc(tev(e4p())))!=0?mix(epc(tev(e4p())),epc(1)):ls1(e4p())!=0?epc(1)!=0?epc(1):txp()!=0?tpc(txp()):spc(spp()):epc(e4p())!=0?epc(e4p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(v2,epc(tod(e2q()))):ls1(v0)!=0?(v9=epc(tod(e2q())))!=0?v9:(v12=txp())!=0?tpc(v12):spc(spp()):(v16=epc(v0))!=0?v16:(v17=txp())!=0?tpc(v17):spc(spp()):(v21=e2p())!=0?ls1(v23=epc(tev(v21)))!=0?mix(v23,epc(tod(e2q()))):(v29=epc(v21))!=0?v29:(v30=txp())!=0?tpc(v30):spc(spp()):(v34=e3p())!=0?ls1(v36=epc(tev(v34)))!=0?mix(v36,epc(1)):ls1(v34)!=0?(v41=epc(1))!=0?v41:(v42=txp())!=0?tpc(v42):spc(spp()):(v46=epc(v34))!=0?v46:(v47=txp())!=0?tpc(v47):spc(spp()):ls1(v52=epc(tev(v54=e4p())))!=0?mix(v52,epc(1)):ls1(v54)!=0?(v58=epc(1))!=0?v58:(v59=txp())!=0?tpc(v59):spc(spp()):(v63=epc(v54))!=0?v63:(v64=txp())!=0?tpc(v64):spc(spp())
      //  中間コード4
      //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(tod(e2q()))):ls1(p)!=0?(p=epc(tod(e2q())))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e2p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(tod(e2q()))):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e3p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(1)):ls1(p)!=0?(p=epc(1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):ls1(p=epc(tev(q=e4p())))!=0?mix(p,epc(1)):ls1(q)!=0?(p=epc(1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(q))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(e2q()|1)):(p&1)!=0?(p=epc(e2q()|1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(e2q()|1)):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e3p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(1)):(p&1)!=0?(p=epc(1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):((p=epc((q=e4p())&-2))&1)!=0?mix(p,epc(1)):(q&1)!=0?(p=epc(1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(q))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(e2q()|1))):(p&1)!=0?(p=epc(e2q()|1))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(e2q()|1))):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=e3p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(1))):(p&1)!=0?(p=epc(1))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):((p=epc((q=e4p())&-2))&1)!=0?cto(mix(p,epc(1))):(q&1)!=0?(p=epc(1))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(p=epc(q))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      E4TS_XHCG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);  //ONとみなす
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    q,
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    q,
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    q,
                                    VideoController.vcnPal16G8[1])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[1])] :
                                (q & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    q,
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    q,
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    q,
                                    VideoController.vcnPal16G8[1])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[1])] :
                                (q & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        q,
                                        VideoController.vcnPal16G8[1])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[1])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E4TS_XHCG

      //================================================================================
      //E4TS_XHCGT ($0000,$24xx,$1B6F)
      //  概要
      //    E4TS  512ドット16色4プレーン＞テキスト＞スプライト
      //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のパレットが奇数のとき
      //          2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0でないとき
      //            2番目(ONとみなす)のパレットを奇数化したパレットのカラー
      //          さもなくば(2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //        さもなくば(1番目のパレットが偶数のとき)
      //          1番目のカラーが0でないとき
      //            1番目のカラー
      //          さもなくば(1番目のカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットが0でないとき
      //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //          を混ぜたカラー(0は黒)
      //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //          2番目のカラーが0でないとき
      //            2番目のカラー
      //          さもなくば(2番目のカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //      さもなくば(2番目のパレットが0のとき)
      //        3番目のパレットが0でないとき
      //          3番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラーにさらに
      //              テキストパレットが0でないとき
      //                テキストカラー(0は黒)
      //              さもなくば(テキストパレットが0のとき)
      //                スプライトカラー(0は黒)
      //            を混ぜたカラー(0は黒)
      //          さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            3番目のパレットが奇数のとき
      //              パレット1のカラーが0でないとき
      //                パレット1のカラー
      //              さもなくば(パレット1のカラーが0のとき)
      //                テキストパレットが0でないとき
      //                  テキストカラー(0は黒)
      //                さもなくば(テキストパレットが0のとき)
      //                  スプライトカラー(0は黒)
      //            さもなくば(3番目のパレットが偶数のとき)
      //              3番目のカラーが0でないとき
      //                3番目のカラー
      //              さもなくば(3番目のカラーが0のとき)
      //                テキストパレットが0でないとき
      //                  テキストカラー(0は黒)
      //                さもなくば(テキストパレットが0のとき)
      //                  スプライトカラー(0は黒)
      //        さもなくば(3番目のパレットが0のとき)
      //          4番目のパレットを偶数化したパレットのカラーが奇数のとき
      //            4番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラーにさらに
      //              テキストパレットが0でないとき
      //                テキストカラー(0は黒)
      //              さもなくば(テキストパレットが0のとき)
      //                スプライトカラー(0は黒)
      //            を混ぜたカラー(0は黒)
      //          さもなくば(4番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //            4番目のパレットが奇数のとき
      //              パレット1のカラーが0でないとき
      //                パレット1のカラー
      //              さもなくば(パレット1のカラーが0のとき)
      //                テキストパレットが0でないとき
      //                  テキストカラー(0は黒)
      //                さもなくば(テキストパレットが0のとき)
      //                  スプライトカラー(0は黒)
      //            さもなくば(4番目のパレットが偶数のとき)
      //              4番目のカラーが0でないとき
      //                4番目のカラー
      //              さもなくば(4番目のカラーが0のとき)
      //                テキストパレットが0でないとき
      //                  テキストカラー(0は黒)
      //                さもなくば(テキストパレットが0のとき)
      //                  スプライトカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),(txp()!=0?tpc(txp()):spc(spp()))):(ls1(e1p())!=0?(epc(tod(e2q()))!=0?epc(tod(e2q())):(txp()!=0?tpc(txp()):spc(spp()))):(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp()))))):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),(txp()!=0?tpc(txp()):spc(spp()))):(epc(e2p())!=0?epc(e2p()):(txp()!=0?tpc(txp()):spc(spp())))):(e3p()!=0?(ls1(epc(tev(e3p())))!=0?mix(mix(epc(tev(e3p())),epc(1)),(txp()!=0?tpc(txp()):spc(spp()))):(ls1(e3p())!=0?(epc(1)!=0?epc(1):(txp()!=0?tpc(txp()):spc(spp()))):(epc(e3p())!=0?epc(e3p()):(txp()!=0?tpc(txp()):spc(spp()))))):(ls1(epc(tev(e4p())))!=0?mix(mix(epc(tev(e4p())),epc(1)),(txp()!=0?tpc(txp()):spc(spp()))):(ls1(e4p())!=0?(epc(1)!=0?epc(1):(txp()!=0?tpc(txp()):spc(spp()))):(epc(e4p())!=0?epc(e4p()):(txp()!=0?tpc(txp()):spc(spp()))))))))
      //  中間コード2
      //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),txp()!=0?tpc(txp()):spc(spp())):ls1(e1p())!=0?epc(tod(e2q()))!=0?epc(tod(e2q())):txp()!=0?tpc(txp()):spc(spp()):epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp()):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),txp()!=0?tpc(txp()):spc(spp())):epc(e2p())!=0?epc(e2p()):txp()!=0?tpc(txp()):spc(spp()):e3p()!=0?ls1(epc(tev(e3p())))!=0?mix(mix(epc(tev(e3p())),epc(1)),txp()!=0?tpc(txp()):spc(spp())):ls1(e3p())!=0?epc(1)!=0?epc(1):txp()!=0?tpc(txp()):spc(spp()):epc(e3p())!=0?epc(e3p()):txp()!=0?tpc(txp()):spc(spp()):ls1(epc(tev(e4p())))!=0?mix(mix(epc(tev(e4p())),epc(1)),txp()!=0?tpc(txp()):spc(spp())):ls1(e4p())!=0?epc(1)!=0?epc(1):txp()!=0?tpc(txp()):spc(spp()):epc(e4p())!=0?epc(e4p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(mix(v2,epc(tod(e2q()))),(v9=txp())!=0?tpc(v9):spc(spp())):ls1(v0)!=0?(v14=epc(tod(e2q())))!=0?v14:(v17=txp())!=0?tpc(v17):spc(spp()):(v21=epc(v0))!=0?v21:(v22=txp())!=0?tpc(v22):spc(spp()):(v26=e2p())!=0?ls1(v28=epc(tev(v26)))!=0?mix(mix(v28,epc(tod(e2q()))),(v35=txp())!=0?tpc(v35):spc(spp())):(v39=epc(v26))!=0?v39:(v40=txp())!=0?tpc(v40):spc(spp()):(v44=e3p())!=0?ls1(v46=epc(tev(v44)))!=0?mix(mix(v46,epc(1)),(v51=txp())!=0?tpc(v51):spc(spp())):ls1(v44)!=0?(v56=epc(1))!=0?v56:(v57=txp())!=0?tpc(v57):spc(spp()):(v61=epc(v44))!=0?v61:(v62=txp())!=0?tpc(v62):spc(spp()):ls1(v67=epc(tev(v69=e4p())))!=0?mix(mix(v67,epc(1)),(v73=txp())!=0?tpc(v73):spc(spp())):ls1(v69)!=0?(v78=epc(1))!=0?v78:(v79=txp())!=0?tpc(v79):spc(spp()):(v83=epc(v69))!=0?v83:(v84=txp())!=0?tpc(v84):spc(spp())
      //  中間コード4
      //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(tod(e2q()))),(p=txp())!=0?tpc(p):spc(spp())):ls1(p)!=0?(p=epc(tod(e2q())))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e2p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(tod(e2q()))),(p=txp())!=0?tpc(p):spc(spp())):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e3p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(1)),(p=txp())!=0?tpc(p):spc(spp())):ls1(p)!=0?(p=epc(1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):ls1(p=epc(tev(q=e4p())))!=0?mix(mix(p,epc(1)),(p=txp())!=0?tpc(p):spc(spp())):ls1(q)!=0?(p=epc(1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(q))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp())):(p&1)!=0?(p=epc(e2q()|1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp())):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e3p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(1)),(p=txp())!=0?tpc(p):spc(spp())):(p&1)!=0?(p=epc(1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):((p=epc((q=e4p())&-2))&1)!=0?mix(mix(p,epc(1)),(p=txp())!=0?tpc(p):spc(spp())):(q&1)!=0?(p=epc(1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(q))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp()))):(p&1)!=0?(p=epc(e2q()|1))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp()))):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=e3p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(1)),(p=txp())!=0?tpc(p):spc(spp()))):(p&1)!=0?(p=epc(1))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):((p=epc((q=e4p())&-2))&1)!=0?cto(mix(mix(p,epc(1)),(p=txp())!=0?tpc(p):spc(spp()))):(q&1)!=0?(p=epc(1))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(p=epc(q))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      E4TS_XHCGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);  //ONとみなす
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      q,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      q,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      q,
                                      VideoController.vcnPal16G8[1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = 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[gz2nd | gx2nd + 1 & 511] | 1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = 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[gz2nd | gx2nd + 2 & 511] | 1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = 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[gz2nd | gx2nd + 3 & 511] | 1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = 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[gz2nd | gx2nd + 4 & 511] | 1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = 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[gz2nd | gx2nd + 5 & 511] | 1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = 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[gz2nd | gx2nd + 6 & 511] | 1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = 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[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      q,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      q,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511]) != 0 ?
                                ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      q,
                                      VideoController.vcnPal16G8[1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = 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[gz2nd | gx2nd + 1 & 511] | 1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = 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[gz2nd | gx2nd + 2 & 511] | 1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = 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[gz2nd | gx2nd + 3 & 511] | 1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = 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[gz2nd | gx2nd + 4 & 511] | 1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = 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[gz2nd | gx2nd + 5 & 511] | 1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = 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[gz2nd | gx2nd + 6 & 511] | 1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = 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[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) != 0 ?
                                    ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          q,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy4th | gx4th + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E4TS_XHCGT

      //================================================================================
      //E4TS_XHPT ($0000,$24xx,$1D6F)
      //  概要
      //    E4TS  512ドット16色4プレーン＞テキスト＞スプライト
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットが0でないとき
      //        2番目のパレットを偶数化したパレットのカラーが0でないとき
      //          2番目のパレットを偶数化したパレットのカラー
      //        さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
      //        3番目のパレットを偶数化したパレットが0でないとき
      //          3番目のパレットを偶数化したパレットのカラーが0でないとき
      //            3番目のパレットを偶数化したパレットのカラー
      //          さもなくば(3番目のパレットを偶数化したパレットのカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
      //          4番目のパレットを偶数化したパレットのカラーが0でないとき
      //            4番目のパレットを偶数化したパレットのカラー
      //          さもなくば(4番目のパレットを偶数化したパレットのカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (e1p()==0?((tev(e2p()))!=0?(epc(tev(e2p()))!=0?epc(tev(e2p())):(txp()!=0?tpc(txp()):spc(spp()))):((tev(e3p()))!=0?(epc(tev(e3p()))!=0?epc(tev(e3p())):(txp()!=0?tpc(txp()):spc(spp()))):(epc(tev(e4p()))!=0?epc(tev(e4p())):(txp()!=0?tpc(txp()):spc(spp()))))):e1p()==1?(epc(0)!=0?epc(0):(txp()!=0?tpc(txp()):spc(spp()))):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp()))):mix(epc(tev(e1p())),(txp()!=0?tpc(txp()):spc(spp()))))
      //  中間コード2
      //    e1p()==0?tev(e2p())!=0?epc(tev(e2p()))!=0?epc(tev(e2p())):txp()!=0?tpc(txp()):spc(spp()):tev(e3p())!=0?epc(tev(e3p()))!=0?epc(tev(e3p())):txp()!=0?tpc(txp()):spc(spp()):epc(tev(e4p()))!=0?epc(tev(e4p())):txp()!=0?tpc(txp()):spc(spp()):e1p()==1?epc(0)!=0?epc(0):txp()!=0?tpc(txp()):spc(spp()):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp()):mix(epc(tev(e1p())),txp()!=0?tpc(txp()):spc(spp()))
      //  中間コード3
      //    (v0=e1p())==0?(v1=tev(e2p()))!=0?(v3=epc(v1))!=0?v3:(v4=txp())!=0?tpc(v4):spc(spp()):(v8=tev(e3p()))!=0?(v10=epc(v8))!=0?v10:(v11=txp())!=0?tpc(v11):spc(spp()):(v15=epc(tev(e4p())))!=0?v15:(v18=txp())!=0?tpc(v18):spc(spp()):v0==1?(v22=epc(0))!=0?v22:(v23=txp())!=0?tpc(v23):spc(spp()):ls1(v0)==0?(v28=epc(v0))!=0?v28:(v29=txp())!=0?tpc(v29):spc(spp()):mix(epc(tev(v0)),(v36=txp())!=0?tpc(v36):spc(spp()))
      //  中間コード4
      //    (p=e1p())==0?(p=tev(e2p()))!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=tev(e3p()))!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(tev(e4p())))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):p==1?(p=epc(0))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):ls1(p)==0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):mix(epc(tev(p)),(p=txp())!=0?tpc(p):spc(spp()))
      //  中間コード5
      //    (p=e1p())==0?(p=e2p()&-2)!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e3p()&-2)!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(e4p()&-2))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):p==1?(p=epc(0))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p&1)==0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):mix(epc(p&-2),(p=txp())!=0?tpc(p):spc(spp()))
      //  中間コード6
      //    (p=e1p())==0?(p=e2p()&-2)!=0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=e3p()&-2)!=0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=epc(e4p()&-2))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):p==1?(p=epc(0))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(p&1)==0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):cto(mix(epc(p&-2),(p=txp())!=0?tpc(p):spc(spp())))
      E4TS_XHPT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) == 0 ?
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th & 511] & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) == 0 ?
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th & 511] & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E4TS_XHPT

      //================================================================================
      //E4TS_XHPG ($0000,$24xx,$1E6F)
      //  概要
      //    E4TS  512ドット16色4プレーン＞テキスト＞スプライト
      //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットが0でないとき
      //        2番目のパレットを偶数化したパレットのカラーが0でないとき
      //          2番目のパレットを偶数化したパレットのカラー
      //        さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
      //        3番目のパレットを偶数化したパレットが0でないとき
      //          3番目のパレットを偶数化したパレットのカラーが0でないとき
      //            3番目のパレットを偶数化したパレットのカラー
      //          さもなくば(3番目のパレットを偶数化したパレットのカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
      //          4番目のパレットを偶数化したパレットのカラーが0でないとき
      //            4番目のパレットを偶数化したパレットのカラー
      //          さもなくば(4番目のパレットを偶数化したパレットのカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0でないとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //  中間コード1
      //    (e1p()==0?((tev(e2p()))!=0?(epc(tev(e2p()))!=0?epc(tev(e2p())):(txp()!=0?tpc(txp()):spc(spp()))):((tev(e3p()))!=0?(epc(tev(e3p()))!=0?epc(tev(e3p())):(txp()!=0?tpc(txp()):spc(spp()))):(epc(tev(e4p()))!=0?epc(tev(e4p())):(txp()!=0?tpc(txp()):spc(spp()))))):e1p()==1?(epc(0)!=0?epc(0):(txp()!=0?tpc(txp()):spc(spp()))):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp()))):(mix(epc(tev(e1p())),epc(tod(e2q())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(txp()!=0?tpc(txp()):spc(spp()))))
      //  中間コード2
      //    e1p()==0?tev(e2p())!=0?epc(tev(e2p()))!=0?epc(tev(e2p())):txp()!=0?tpc(txp()):spc(spp()):tev(e3p())!=0?epc(tev(e3p()))!=0?epc(tev(e3p())):txp()!=0?tpc(txp()):spc(spp()):epc(tev(e4p()))!=0?epc(tev(e4p())):txp()!=0?tpc(txp()):spc(spp()):e1p()==1?epc(0)!=0?epc(0):txp()!=0?tpc(txp()):spc(spp()):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp()):mix(epc(tev(e1p())),epc(tod(e2q())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=e1p())==0?(v1=tev(e2p()))!=0?(v3=epc(v1))!=0?v3:(v4=txp())!=0?tpc(v4):spc(spp()):(v8=tev(e3p()))!=0?(v10=epc(v8))!=0?v10:(v11=txp())!=0?tpc(v11):spc(spp()):(v15=epc(tev(e4p())))!=0?v15:(v18=txp())!=0?tpc(v18):spc(spp()):v0==1?(v22=epc(0))!=0?v22:(v23=txp())!=0?tpc(v23):spc(spp()):ls1(v0)==0?(v28=epc(v0))!=0?v28:(v29=txp())!=0?tpc(v29):spc(spp()):(v33=mix(epc(tev(v0)),epc(tod(e2q()))))!=0?v33:(v39=txp())!=0?tpc(v39):spc(spp())
      //  中間コード4
      //    (p=e1p())==0?(p=tev(e2p()))!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=tev(e3p()))!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(tev(e4p())))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):p==1?(p=epc(0))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):ls1(p)==0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(q=mix(epc(tev(p)),epc(tod(e2q()))))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=e1p())==0?(p=e2p()&-2)!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e3p()&-2)!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(e4p()&-2))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):p==1?(p=epc(0))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p&1)==0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(q=mix(epc(p&-2),epc(e2q()|1)))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=e1p())==0?(p=e2p()&-2)!=0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=e3p()&-2)!=0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=epc(e4p()&-2))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):p==1?(p=epc(0))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(p&1)==0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(q=mix(epc(p&-2),epc(e2q()|1)))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp())
      E4TS_XHPG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);  //ONとみなす
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) == 0 ?
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th & 511] & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) == 0 ?
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th & 511] & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E4TS_XHPG

      //================================================================================
      //E4TS_XHPGT ($0000,$24xx,$1F6F)
      //  概要
      //    E4TS  512ドット16色4プレーン＞テキスト＞スプライト
      //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットが0でないとき
      //        2番目のパレットを偶数化したパレットのカラーが0でないとき
      //          2番目のパレットを偶数化したパレットのカラー
      //        さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
      //        3番目のパレットを偶数化したパレットが0でないとき
      //          3番目のパレットを偶数化したパレットのカラーが0でないとき
      //            3番目のパレットを偶数化したパレットのカラー
      //          さもなくば(3番目のパレットを偶数化したパレットのカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
      //          4番目のパレットを偶数化したパレットのカラーが0でないとき
      //            4番目のパレットを偶数化したパレットのカラー
      //          さもなくば(4番目のパレットを偶数化したパレットのカラーが0のとき)
      //            テキストパレットが0でないとき
      //              テキストカラー(0は黒)
      //            さもなくば(テキストパレットが0のとき)
      //              スプライトカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (e1p()==0?((tev(e2p()))!=0?(epc(tev(e2p()))!=0?epc(tev(e2p())):(txp()!=0?tpc(txp()):spc(spp()))):((tev(e3p()))!=0?(epc(tev(e3p()))!=0?epc(tev(e3p())):(txp()!=0?tpc(txp()):spc(spp()))):(epc(tev(e4p()))!=0?epc(tev(e4p())):(txp()!=0?tpc(txp()):spc(spp()))))):e1p()==1?(epc(0)!=0?epc(0):(txp()!=0?tpc(txp()):spc(spp()))):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp()))):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),(txp()!=0?tpc(txp()):spc(spp()))))
      //  中間コード2
      //    e1p()==0?tev(e2p())!=0?epc(tev(e2p()))!=0?epc(tev(e2p())):txp()!=0?tpc(txp()):spc(spp()):tev(e3p())!=0?epc(tev(e3p()))!=0?epc(tev(e3p())):txp()!=0?tpc(txp()):spc(spp()):epc(tev(e4p()))!=0?epc(tev(e4p())):txp()!=0?tpc(txp()):spc(spp()):e1p()==1?epc(0)!=0?epc(0):txp()!=0?tpc(txp()):spc(spp()):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),txp()!=0?tpc(txp()):spc(spp()))
      //  中間コード3
      //    (v0=e1p())==0?(v1=tev(e2p()))!=0?(v3=epc(v1))!=0?v3:(v4=txp())!=0?tpc(v4):spc(spp()):(v8=tev(e3p()))!=0?(v10=epc(v8))!=0?v10:(v11=txp())!=0?tpc(v11):spc(spp()):(v15=epc(tev(e4p())))!=0?v15:(v18=txp())!=0?tpc(v18):spc(spp()):v0==1?(v22=epc(0))!=0?v22:(v23=txp())!=0?tpc(v23):spc(spp()):ls1(v0)==0?(v28=epc(v0))!=0?v28:(v29=txp())!=0?tpc(v29):spc(spp()):mix(mix(epc(tev(v0)),epc(tod(e2q()))),(v40=txp())!=0?tpc(v40):spc(spp()))
      //  中間コード4
      //    (p=e1p())==0?(p=tev(e2p()))!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=tev(e3p()))!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(tev(e4p())))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):p==1?(p=epc(0))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):ls1(p)==0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):mix(mix(epc(tev(p)),epc(tod(e2q()))),(p=txp())!=0?tpc(p):spc(spp()))
      //  中間コード5
      //    (p=e1p())==0?(p=e2p()&-2)!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=e3p()&-2)!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(e4p()&-2))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):p==1?(p=epc(0))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p&1)==0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):mix(mix(epc(p&-2),epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp()))
      //  中間コード6
      //    (p=e1p())==0?(p=e2p()&-2)!=0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=e3p()&-2)!=0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=epc(e4p()&-2))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):p==1?(p=epc(0))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(p&1)==0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):cto(mix(mix(epc(p&-2),epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp())))
      E4TS_XHPGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);  //ONとみなす
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 6 & 3;  //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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) == 0 ?
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th & 511] & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) == 0 ?
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = GraphicScreen.graM4[gy3rd | gx3rd & 511] & -2) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th & 511] & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511] & -2) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy4th | gx4th + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E4TS_XHPGT

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

      //================================================================================
      //XF1TS
      //  概要
      //    F1TS  512ドット256色1プレーン＞テキスト＞スプライト
      //    拡張あり
      XF1TS {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //F1TS_XWC
          case 0b00010001:  //F1TS_XWC
          case 0b00010010:  //F1TS_XWC
          case 0b00010011:  //F1TS_XWC
            F1TS_XWC.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //F1TS_XWP
          case 0b00010101:  //F1TS_XWP
          case 0b00010110:  //F1TS_XWP
          case 0b00010111:  //F1TS_XWP
            F1TS_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //F1TS_XHC
            F1TS.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //F1TS_XHCT
            F1TS_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011010:  //F1TS_XHCG
            F1TS_XHCG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011011:  //F1TS_XHCGT
            F1TS_XHCGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //F1TS_XHPT
            F1TS_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011110:  //F1TS_XHPG
            F1TS_XHPG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011111:  //F1TS_XHPGT
            F1TS_XHPGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //F1TS_A
          case 0b01000001:  //F1TS_A
          case 0b01000010:  //F1TS_A
          case 0b01000011:  //F1TS_A
          case 0b01000100:  //F1TS_A
          case 0b01000101:  //F1TS_A
          case 0b01000110:  //F1TS_A
          case 0b01000111:  //F1TS_A
          case 0b01001000:  //F1TS_A
          case 0b01001001:  //F1TS_A
          case 0b01001010:  //F1TS_A
          case 0b01001011:  //F1TS_A
          case 0b01001100:  //F1TS_A
          case 0b01001101:  //F1TS_A
          case 0b01001110:  //F1TS_A
          case 0b01001111:  //F1TS_A
          case 0b01010000:  //F1TS_A
          case 0b01010001:  //F1TS_A
          case 0b01010010:  //F1TS_A
          case 0b01010011:  //F1TS_A
          case 0b01010100:  //F1TS_A
          case 0b01010101:  //F1TS_A
          case 0b01010110:  //F1TS_A
          case 0b01010111:  //F1TS_A
          case 0b01011000:  //F1TS_A
          case 0b01011001:  //F1TS_A
          case 0b01011010:  //F1TS_A
          case 0b01011011:  //F1TS_A
          case 0b01011100:  //F1TS_A
          case 0b01011101:  //F1TS_A
          case 0b01011110:  //F1TS_A
          case 0b01011111:  //F1TS_A
            F1_A.drawRaster (src, dst, rh);
            break;
          default:
            F1TS.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XF1TS);
          }  //switch
        }  //drawRaster
      },  //XF1TS

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

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

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

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

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

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

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

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

      //================================================================================
      //F2TS ($0001,$24xx,$006F)
      //  概要
      //    F2TS  512ドット256色2プレーン＞テキスト＞スプライト
      //    拡張なし
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のカラーが0でないとき
      //        2番目のカラー
      //      さもなくば(2番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //  中間コード1
      //    (f1p()!=0?(fpc(f1p())!=0?fpc(f1p()):(txp()!=0?tpc(txp()):spc(spp()))):(fpc(f2p())!=0?fpc(f2p()):(txp()!=0?tpc(txp()):spc(spp()))))
      //  中間コード2
      //    f1p()!=0?fpc(f1p())!=0?fpc(f1p()):txp()!=0?tpc(txp()):spc(spp()):fpc(f2p())!=0?fpc(f2p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=f1p())!=0?(v1=fpc(v0))!=0?v1:(v2=txp())!=0?tpc(v2):spc(spp()):(v6=fpc(f2p()))!=0?v6:(v8=txp())!=0?tpc(v8):spc(spp())
      //  中間コード4
      //    (p=f1p())!=0?(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=fpc(f2p()))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=f1p())!=0?(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=fpc(f2p()))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=f1p())!=0?(q=fpc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=fpc(f2p()))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      F2TS {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511])]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511])]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2TS

      //================================================================================
      //XF2TS
      //  概要
      //    F2TS  512ドット256色2プレーン＞テキスト＞スプライト
      //    拡張あり
      XF2TS {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //F2TS_XWC
          case 0b00010001:  //F2TS_XWC
          case 0b00010010:  //F2TS_XWC
          case 0b00010011:  //F2TS_XWC
            F2TS_XWC.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //F2TS_XWP
          case 0b00010101:  //F2TS_XWP
          case 0b00010110:  //F2TS_XWP
          case 0b00010111:  //F2TS_XWP
            F2TS_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //F2TS_XHC
            F2TS.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //F2TS_XHCT
            F2TS_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011010:  //F2TS_XHCG
            F2TS_XHCG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011011:  //F2TS_XHCGT
            F2TS_XHCGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //F2TS_XHPT
            F2TS_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011110:  //F2TS_XHPG
            F2TS_XHPG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011111:  //F2TS_XHPGT
            F2TS_XHPGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //F2TS_A
          case 0b01000001:  //F2TS_A
          case 0b01000010:  //F2TS_A
          case 0b01000011:  //F2TS_A
          case 0b01000100:  //F2TS_A
          case 0b01000101:  //F2TS_A
          case 0b01000110:  //F2TS_A
          case 0b01000111:  //F2TS_A
          case 0b01001000:  //F2TS_A
          case 0b01001001:  //F2TS_A
          case 0b01001010:  //F2TS_A
          case 0b01001011:  //F2TS_A
          case 0b01001100:  //F2TS_A
          case 0b01001101:  //F2TS_A
          case 0b01001110:  //F2TS_A
          case 0b01001111:  //F2TS_A
          case 0b01010000:  //F2TS_A
          case 0b01010001:  //F2TS_A
          case 0b01010010:  //F2TS_A
          case 0b01010011:  //F2TS_A
          case 0b01010100:  //F2TS_A
          case 0b01010101:  //F2TS_A
          case 0b01010110:  //F2TS_A
          case 0b01010111:  //F2TS_A
          case 0b01011000:  //F2TS_A
          case 0b01011001:  //F2TS_A
          case 0b01011010:  //F2TS_A
          case 0b01011011:  //F2TS_A
          case 0b01011100:  //F2TS_A
          case 0b01011101:  //F2TS_A
          case 0b01011110:  //F2TS_A
          case 0b01011111:  //F2TS_A
            F2_A.drawRaster (src, dst, rh);
            break;
          default:
            F2TS.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XF2TS);
          }  //switch
        }  //drawRaster
      },  //XF2TS

      //================================================================================
      //F2TS_XWC ($0001,$24xx,$106F)
      //  概要
      //    F2TS  512ドット256色2プレーン＞テキスト＞スプライト
      //    XWC  優先順位に関わらず0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //  中間コード1
      //    (f1p()!=0?(ls1(fpc(tev(f1p())))!=0?fpc(f1p()):(fpc(f1p())!=0?fpc(f1p()):(txp()!=0?tpc(txp()):spc(spp())))):(ls1(fpc(tev(f2p())))!=0?fpc(f2p()):(fpc(f2p())!=0?fpc(f2p()):(txp()!=0?tpc(txp()):spc(spp())))))
      //  中間コード2
      //    f1p()!=0?ls1(fpc(tev(f1p())))!=0?fpc(f1p()):fpc(f1p())!=0?fpc(f1p()):txp()!=0?tpc(txp()):spc(spp()):ls1(fpc(tev(f2p())))!=0?fpc(f2p()):fpc(f2p())!=0?fpc(f2p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=f1p())!=0?ls1(fpc(tev(v0)))!=0?fpc(v0):(v5=fpc(v0))!=0?v5:(v6=txp())!=0?tpc(v6):spc(spp()):ls1(fpc(tev(v13=f2p())))!=0?fpc(v13):(v15=fpc(v13))!=0?v15:(v16=txp())!=0?tpc(v16):spc(spp())
      //  中間コード4
      //    (p=f1p())!=0?ls1(fpc(tev(p)))!=0?fpc(p):(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):ls1(fpc(tev(p=f2p())))!=0?fpc(p):(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=f1p())!=0?(fpc(p&-2)&1)!=0?fpc(p):(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(fpc((p=f2p())&-2)&1)!=0?fpc(p):(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=f1p())!=0?(fpc(p&-2)&1)!=0?fpo(p):(q=fpc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(fpc((p=f2p())&-2)&1)!=0?fpo(p):(q=fpc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp())
      F2TS_XWC {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                VideoController.vcnPal32G8[p] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2] & 1) != 0 ?
                                VideoController.vcnPal32G8[p] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                VideoController.vcnPal32G8[p] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2] & 1) != 0 ?
                                VideoController.vcnPal32G8[p] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                      GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511])) & -2] & 1) != 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2TS_XWC

      //================================================================================
      //F2TS_XWP ($0001,$24xx,$146F)
      //  概要
      //    F2TS  512ドット256色2プレーン＞テキスト＞スプライト
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (f1p()==0?(fpc(tev(f2p()))!=0?fpc(tev(f2p())):(txp()!=0?tpc(txp()):spc(spp()))):f1p()==1?(fpc(0)!=0?fpc(0):(txp()!=0?tpc(txp()):spc(spp()))):ls1(f1p())==0?(fpc(f1p())!=0?fpc(f1p()):(txp()!=0?tpc(txp()):spc(spp()))):fpc(tev(f1p())))
      //  中間コード2
      //    f1p()==0?fpc(tev(f2p()))!=0?fpc(tev(f2p())):txp()!=0?tpc(txp()):spc(spp()):f1p()==1?fpc(0)!=0?fpc(0):txp()!=0?tpc(txp()):spc(spp()):ls1(f1p())==0?fpc(f1p())!=0?fpc(f1p()):txp()!=0?tpc(txp()):spc(spp()):fpc(tev(f1p()))
      //  中間コード3
      //    (v0=f1p())==0?(v1=fpc(tev(f2p())))!=0?v1:(v4=txp())!=0?tpc(v4):spc(spp()):v0==1?(v8=fpc(0))!=0?v8:(v9=txp())!=0?tpc(v9):spc(spp()):ls1(v0)==0?(v14=fpc(v0))!=0?v14:(v15=txp())!=0?tpc(v15):spc(spp()):fpc(tev(v0))
      //  中間コード4
      //    (p=f1p())==0?(p=fpc(tev(f2p())))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):p==1?(p=fpc(0))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):ls1(p)==0?(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):fpc(tev(p))
      //  中間コード5
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):p==1?(p=fpc(0))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p&1)==0?(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):fpc(p&-2)
      //  中間コード6
      //    (p=f1p())==0?(p=fpc(f2p()&-2))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):p==1?(p=fpc(0))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(p&1)==0?(q=fpc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):fpo(p&-2)
      F2TS_XWP {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    VideoController.vcnPal32G8[p & -2]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) == 0 ?
                                (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                 GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 1 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 2 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 3 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 4 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 5 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 6 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) == 0 ?
                                    (p = VideoController.vcnPal16G8[(GraphicScreen.graM4[gy4th | gx4th + 7 & 511] << 4 |
                                                                     GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]) & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    VideoController.vcnPal32G8[p & -2]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //F2TS_XWP

      //================================================================================
      //F2TS_XHCT ($0001,$24xx,$196F)
      //  概要
      //    F2TS  512ドット256色2プレーン＞テキスト＞スプライト
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のカラーと
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のカラーと
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //  中間コード1
      //    (f1p()!=0?(ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),(txp()!=0?tpc(txp()):spc(spp()))):(fpc(f1p())!=0?fpc(f1p()):(txp()!=0?tpc(txp()):spc(spp())))):(ls1(fpc(tev(f2p())))!=0?mix(fpc(f2p()),(txp()!=0?tpc(txp()):spc(spp()))):(fpc(f2p())!=0?fpc(f2p()):(txp()!=0?tpc(txp()):spc(spp())))))
      //  中間コード2
      //    f1p()!=0?ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),txp()!=0?tpc(txp()):spc(spp())):fpc(f1p())!=0?fpc(f1p()):txp()!=0?tpc(txp()):spc(spp()):ls1(fpc(tev(f2p())))!=0?mix(fpc(f2p()),txp()!=0?tpc(txp()):spc(spp())):fpc(f2p())!=0?fpc(f2p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=f1p())!=0?ls1(fpc(tev(v0)))!=0?mix(fpc(v0),(v6=txp())!=0?tpc(v6):spc(spp())):(v10=fpc(v0))!=0?v10:(v11=txp())!=0?tpc(v11):spc(spp()):ls1(fpc(tev(v18=f2p())))!=0?mix(fpc(v18),(v21=txp())!=0?tpc(v21):spc(spp())):(v25=fpc(v18))!=0?v25:(v26=txp())!=0?tpc(v26):spc(spp())
      //  中間コード4
      //    (p=f1p())!=0?ls1(fpc(tev(p)))!=0?mix(fpc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):ls1(fpc(tev(p=f2p())))!=0?mix(fpc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=f1p())!=0?(fpc(p&-2)&1)!=0?mix(fpc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(fpc((p=f2p())&-2)&1)!=0?mix(fpc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=fpc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=f1p())!=0?(fpc(p&-2)&1)!=0?cto(mix(fpc(p),(p=txp())!=0?tpc(p):spc(spp()))):(q=fpc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(fpc((p=f2p())&-2)&1)!=0?cto(mix(fpc(p),(p=txp())!=0?tpc(p):spc(spp()))):(q=fpc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp())
      F2TS_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          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;
            sx += half;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            gx4th += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (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],
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (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],
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]] :
                                    (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],
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 16 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
              XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]] :
                                    (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],
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 12 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
              XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]] :
                                    (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],
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 8 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
              XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]] :
                                    (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],
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
              XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]] :
                                    (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],
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                      GraphicScreen.graM4[gy1st | gx1st & 511])) != 0 ?
                                (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]] :
                                (VideoController.vcnPal16G8[(p = (GraphicScreen.graM4[gy4th | gx4th & 511] << 4 |
                                                                  GraphicScreen.graM4[gy3rd | gx3rd & 511])) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                (p = tp >>> 28) != 0 ?
                                VideoController.vcnPal32TS[p] :
                                VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
              XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (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],
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
              XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                          GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]] :
                                    (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],
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 20 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
              XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |

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