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

                //                                                           ........ ........ .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 = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  (p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                        GraphicScreen.graM4[ga])) <= 1 ?
                                  VideoController.vcnPal32G8[0] :
                                  (p & 1) == 0 ?
                                  VideoController.vcnPal32G8[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      0)] :
                                  (p = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  (p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                        GraphicScreen.graM4[ga])) <= 1 ?
                                  VideoController.vcnPal32G8[0] :
                                  (p & 1) == 0 ?
                                  VideoController.vcnPal32G8[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      0)]);
                XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = (GraphicScreen.graM4[ga + 1048577] << 4 |
                                            GraphicScreen.graM4[ga + 1])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      (p = (GraphicScreen.graM4[ga + 1048577] << 4 |
                                            GraphicScreen.graM4[ga + 1])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)]);
                XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = (GraphicScreen.graM4[ga + 1048578] << 4 |
                                            GraphicScreen.graM4[ga + 2])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      (p = (GraphicScreen.graM4[ga + 1048578] << 4 |
                                            GraphicScreen.graM4[ga + 2])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)]);
                XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = (GraphicScreen.graM4[ga + 1048579] << 4 |
                                            GraphicScreen.graM4[ga + 3])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      (p = (GraphicScreen.graM4[ga + 1048579] << 4 |
                                            GraphicScreen.graM4[ga + 3])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)]);
                XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = (GraphicScreen.graM4[ga + 1048580] << 4 |
                                            GraphicScreen.graM4[ga + 4])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      (p = (GraphicScreen.graM4[ga + 1048580] << 4 |
                                            GraphicScreen.graM4[ga + 4])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)]);
                XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = (GraphicScreen.graM4[ga + 1048581] << 4 |
                                            GraphicScreen.graM4[ga + 5])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      (p = (GraphicScreen.graM4[ga + 1048581] << 4 |
                                            GraphicScreen.graM4[ga + 5])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)]);
                XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = (GraphicScreen.graM4[ga + 1048582] << 4 |
                                            GraphicScreen.graM4[ga + 6])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      (p = (GraphicScreen.graM4[ga + 1048582] << 4 |
                                            GraphicScreen.graM4[ga + 6])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)]);
                XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      (p = (GraphicScreen.graM4[ga + 1048583] << 4 |
                                            GraphicScreen.graM4[ga + 7])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      (p = (GraphicScreen.graM4[ga + 1048583] << 4 |
                                            GraphicScreen.graM4[ga + 7])) <= 1 ?
                                      VideoController.vcnPal32G8[0] :
                                      (p & 1) == 0 ?
                                      VideoController.vcnPal32G8[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          0)]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                          GraphicScreen.graM4[ga])) <= 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)] :
                                    (p = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = (GraphicScreen.graM4[ga + 1048576] << 4 |
                                          GraphicScreen.graM4[ga])) <= 1 ?
                                    VideoController.vcnPal32G8[0] :
                                    (p & 1) == 0 ?
                                    VideoController.vcnPal32G8[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        0)]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //STI_XHPT

      //================================================================================
      //STJ ($0007,$06xx,$0070)
      //  概要
      //    STJ  スプライト＞テキスト＞1024ドット65536色1プレーン
      //    拡張なし
      //  手順
      //    スプライトパレットの下位4bitが0でないまたはテキストパレットが0のとき
      //      スプライトカラーが0でないとき
      //        スプライトカラー
      //      さもなくば(スプライトカラーが0のとき)
      //        1番目のカラー(0は黒)
      //    さもなくば(スプライトパレットの下位4bitが0かつテキストパレットが0でないとき)
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のカラー(0は黒)
      //  中間コード1
      //    (ls4(spp())!=0||txp()==0?(spc(spp())!=0?spc(spp()):jpc(j1p(),j1p())):(tpc(txp())!=0?tpc(txp()):jpc(j1p(),j1p())))
      //  中間コード2
      //    ls4(spp())!=0||txp()==0?spc(spp())!=0?spc(spp()):jpc(j1p(),j1p()):tpc(txp())!=0?tpc(txp()):jpc(j1p(),j1p())
      //  中間コード3
      //    ls4(v1=spp())!=0||(v2=txp())==0?(v3=spc(v1))!=0?v3:jpc(v5=j1p(),v5):(v6=tpc(v2))!=0?v6:jpc(v8=j1p(),v8)
      //  中間コード4
      //    ls4(p=spp())!=0||(q=txp())==0?(q=spc(p))!=0?q:jpc(p=j1p(),p):(p=tpc(q))!=0?p:jpc(p=j1p(),p)
      //  中間コード5
      //    ((p=spp())&15)!=0||(q=txp())==0?(q=spc(p))!=0?q:jpc(p=j1p(),p):(p=tpc(q))!=0?p:jpc(p=j1p(),p)
      //  中間コード6
      //    ((p=spp())&15)!=0||(q=txp())==0?(q=spc(p))!=0?cto(q):jpo(p=j1p(),p):(p=tpc(q))!=0?cto(p):jpo(p=j1p(),p)
      STJ {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            sx += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                      GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                      GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                      GraphicScreen.graM4[ga])) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]] :
                                  (p = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                      GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                      GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                      GraphicScreen.graM4[ga])) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                          GraphicScreen.graM4[ga + 1])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                          GraphicScreen.graM4[ga + 1])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                          GraphicScreen.graM4[ga + 2])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                          GraphicScreen.graM4[ga + 2])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                          GraphicScreen.graM4[ga + 3])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                          GraphicScreen.graM4[ga + 3])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                          GraphicScreen.graM4[ga + 4])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                          GraphicScreen.graM4[ga + 4])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                          GraphicScreen.graM4[ga + 5])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                          GraphicScreen.graM4[ga + 5])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                          GraphicScreen.graM4[ga + 6])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                          GraphicScreen.graM4[ga + 6])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                          GraphicScreen.graM4[ga + 7])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                          GraphicScreen.graM4[ga + 7])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                        GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                        GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                        GraphicScreen.graM4[ga])) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (p = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                        GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                        GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                        GraphicScreen.graM4[ga])) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                      GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                      GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                      GraphicScreen.graM4[ga])) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]] :
                                  (p = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                      GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                      GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                      GraphicScreen.graM4[ga])) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                          GraphicScreen.graM4[ga + 1])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                          GraphicScreen.graM4[ga + 1])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                          GraphicScreen.graM4[ga + 2])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                          GraphicScreen.graM4[ga + 2])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                          GraphicScreen.graM4[ga + 3])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                          GraphicScreen.graM4[ga + 3])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                          GraphicScreen.graM4[ga + 4])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                          GraphicScreen.graM4[ga + 4])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                          GraphicScreen.graM4[ga + 5])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                          GraphicScreen.graM4[ga + 5])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                          GraphicScreen.graM4[ga + 6])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                          GraphicScreen.graM4[ga + 6])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                          GraphicScreen.graM4[ga + 7])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                          GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                          GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                          GraphicScreen.graM4[ga + 7])) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                        GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                        GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                        GraphicScreen.graM4[ga])) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (p = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                        GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                        GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                        GraphicScreen.graM4[ga])) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //STJ

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

      //================================================================================
      //STJ_XWC ($0007,$06xx,$1070)
      //  概要
      //    STJ  スプライト＞テキスト＞1024ドット65536色1プレーン
      //    XWC  優先順位に関わらず0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //      1番目のカラー(0は黒)
      //    さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //      スプライトパレットの下位4bitが0でないまたはテキストパレットが0のとき
      //        スプライトカラーが0でないとき
      //          スプライトカラー
      //        さもなくば(スプライトカラーが0のとき)
      //          1番目のカラー(0は黒)
      //      さもなくば(スプライトパレットの下位4bitが0かつテキストパレットが0でないとき)
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          1番目のカラー(0は黒)
      //  中間コード1
      //    (ls1(jpc(tod(j1p()),tod(j1p())))!=0?jpc(j1p(),j1p()):(ls4(spp())!=0||txp()==0?(spc(spp())!=0?spc(spp()):jpc(j1p(),j1p())):(tpc(txp())!=0?tpc(txp()):jpc(j1p(),j1p()))))
      //  中間コード2
      //    ls1(jpc(tod(j1p()),tod(j1p())))!=0?jpc(j1p(),j1p()):ls4(spp())!=0||txp()==0?spc(spp())!=0?spc(spp()):jpc(j1p(),j1p()):tpc(txp())!=0?tpc(txp()):jpc(j1p(),j1p())
      //  中間コード3
      //    ls1(jpc(v2=tod(v3=j1p()),v2))!=0?jpc(v3,v3):ls4(v6=spp())!=0||(v7=txp())==0?(v8=spc(v6))!=0?v8:jpc(v3,v3):(v10=tpc(v7))!=0?v10:jpc(v3,v3)
      //  中間コード4
      //    ls1(jpc(p=tod(q=j1p()),p))!=0?jpc(q,q):ls4(p=spp())!=0||(r=txp())==0?(r=spc(p))!=0?r:jpc(q,q):(p=tpc(r))!=0?p:jpc(q,q)
      //  中間コード5
      //    (jpc(p=(q=j1p())|1,p)&1)!=0?jpc(q,q):((p=spp())&15)!=0||(r=txp())==0?(r=spc(p))!=0?r:jpc(q,q):(p=tpc(r))!=0?p:jpc(q,q)
      //  中間コード6
      //    (jpc(p=(q=j1p())|1,p)&1)!=0?jpo(q,q):((p=spp())&15)!=0||(r=txp())==0?(r=spc(p))!=0?cto(r):jpo(q,q):(p=tpc(r))!=0?cto(p):jpo(q,q)
      STJ_XWC {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            sx += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q, r;
                XEiJ.pnlBM[da] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                           GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                           GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                           GraphicScreen.graM4[ga])) | 1) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]] :
                                  ((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (r = tp >>> 28) == 0 ?
                                  (r = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[r] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]] :
                                  (p = VideoController.vcnPal16TS[r]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 1] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                               GraphicScreen.graM4[ga + 1])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (r = tp >>> 24 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 2] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                               GraphicScreen.graM4[ga + 2])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (r = tp >>> 20 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 3] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                               GraphicScreen.graM4[ga + 3])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (r = tp >>> 16 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 4] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                               GraphicScreen.graM4[ga + 4])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (r = tp >>> 12 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 5] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                               GraphicScreen.graM4[ga + 5])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (r = tp >>> 8 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 6] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                               GraphicScreen.graM4[ga + 6])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (r = tp >>> 4 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 7] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                               GraphicScreen.graM4[ga + 7])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (r = tp & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q, r;
                  XEiJ.pnlBM[da] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                             GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                             GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                             GraphicScreen.graM4[ga])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (r = tp >>> 28) == 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = VideoController.vcnPal16TS[r]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q, r;
                XEiJ.pnlBM[da] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                           GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                           GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                           GraphicScreen.graM4[ga])) | 1) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]] :
                                  ((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (r = tp >>> 28) == 0 ?
                                  (r = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[r] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]] :
                                  (p = VideoController.vcnPal16TS[r]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 1] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                               GraphicScreen.graM4[ga + 1])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (r = tp >>> 24 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 2] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                               GraphicScreen.graM4[ga + 2])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (r = tp >>> 20 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 3] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                               GraphicScreen.graM4[ga + 3])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (r = tp >>> 16 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 4] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                               GraphicScreen.graM4[ga + 4])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (r = tp >>> 12 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 5] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                               GraphicScreen.graM4[ga + 5])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (r = tp >>> 8 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 6] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                               GraphicScreen.graM4[ga + 6])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (r = tp >>> 4 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 7] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                               GraphicScreen.graM4[ga + 7])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      ((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (r = tp & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q, r;
                  XEiJ.pnlBM[da] = (((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                             GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                             GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                             GraphicScreen.graM4[ga])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    ((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (r = tp >>> 28) == 0 ?
                                    (r = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = VideoController.vcnPal16TS[r]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //STJ_XWC

      //================================================================================
      //STJ_XWP ($0007,$06xx,$1470)
      //  概要
      //    STJ  スプライト＞テキスト＞1024ドット65536色1プレーン
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが1以下のとき
      //      スプライトパレットの下位4bitが0でないまたはテキストパレットが0のとき
      //        スプライトカラーが0でないとき
      //          スプライトカラー
      //        さもなくば(スプライトカラーが0のとき)
      //          グラフィックパレット0のカラー(0は黒)
      //      さもなくば(スプライトパレットの下位4bitが0かつテキストパレットが0でないとき)
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          グラフィックパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      スプライトパレットの下位4bitが0でないまたはテキストパレットが0のとき
      //        スプライトカラーが0でないとき
      //          スプライトカラー
      //        さもなくば(スプライトカラーが0のとき)
      //          1番目のカラー(0は黒)
      //      さもなくば(スプライトパレットの下位4bitが0かつテキストパレットが0でないとき)
      //        テキストカラーが0でないとき
      //          テキストカラー
      //        さもなくば(テキストカラーが0のとき)
      //          1番目のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (j1p()<=1?(ls4(spp())!=0||txp()==0?(spc(spp())!=0?spc(spp()):jpc(0,0)):(tpc(txp())!=0?tpc(txp()):jpc(0,0))):ls1(j1p())==0?(ls4(spp())!=0||txp()==0?(spc(spp())!=0?spc(spp()):jpc(j1p(),j1p())):(tpc(txp())!=0?tpc(txp()):jpc(j1p(),j1p()))):jpc(tev(j1p()),tev(j1p())))
      //  中間コード2
      //    j1p()<=1?ls4(spp())!=0||txp()==0?spc(spp())!=0?spc(spp()):jpc(0,0):tpc(txp())!=0?tpc(txp()):jpc(0,0):ls1(j1p())==0?ls4(spp())!=0||txp()==0?spc(spp())!=0?spc(spp()):jpc(j1p(),j1p()):tpc(txp())!=0?tpc(txp()):jpc(j1p(),j1p()):jpc(tev(j1p()),tev(j1p()))
      //  中間コード3
      //    (v0=j1p())<=1?ls4(v2=spp())!=0||(v3=txp())==0?(v4=spc(v2))!=0?v4:jpc(0,0):(v6=tpc(v3))!=0?v6:jpc(0,0):ls1(v0)==0?ls4(v10=spp())!=0||(v11=txp())==0?(v12=spc(v10))!=0?v12:jpc(v0,v0):(v14=tpc(v11))!=0?v14:jpc(v0,v0):jpc(v17=tev(v0),v17)
      //  中間コード4
      //    (p=j1p())<=1?ls4(p=spp())!=0||(q=txp())==0?(q=spc(p))!=0?q:jpc(0,0):(p=tpc(q))!=0?p:jpc(0,0):ls1(p)==0?ls4(q=spp())!=0||(r=txp())==0?(r=spc(q))!=0?r:jpc(p,p):(q=tpc(r))!=0?q:jpc(p,p):jpc(q=tev(p),q)
      //  中間コード5
      //    (p=j1p())<=1?((p=spp())&15)!=0||(q=txp())==0?(q=spc(p))!=0?q:jpc(0,0):(p=tpc(q))!=0?p:jpc(0,0):(p&1)==0?((q=spp())&15)!=0||(r=txp())==0?(r=spc(q))!=0?r:jpc(p,p):(q=tpc(r))!=0?q:jpc(p,p):jpc(q=p&-2,q)
      //  中間コード6
      //    (p=j1p())<=1?((p=spp())&15)!=0||(q=txp())==0?(q=spc(p))!=0?cto(q):jpo(0,0):(p=tpc(q))!=0?cto(p):jpo(0,0):(p&1)==0?((q=spp())&15)!=0||(r=txp())==0?(r=spc(q))!=0?cto(r):jpo(p,p):(q=tpc(r))!=0?cto(q):jpo(p,p):jpo(q=p&-2,q)
      STJ_XWP {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            sx += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q, r;
                XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                        GraphicScreen.graM4[ga + 2097152] << 8 |
                                        GraphicScreen.graM4[ga + 1048576] << 4 |
                                        GraphicScreen.graM4[ga])) <= 1 ?
                                  ((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[0 >> 8] |
                                    VideoController.vcnPal8G16L[0 & 255]] :
                                  (p = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[0 >> 8] |
                                    VideoController.vcnPal8G16L[0 & 255]] :
                                  (p & 1) == 0 ?
                                  ((q = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (r = tp >>> 28) == 0 ?
                                  (r = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[r] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[p >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]] :
                                  (q = VideoController.vcnPal16TS[r]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[p >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                            GraphicScreen.graM4[ga + 2097153] << 8 |
                                            GraphicScreen.graM4[ga + 1048577] << 4 |
                                            GraphicScreen.graM4[ga + 1])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (r = tp >>> 24 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                            GraphicScreen.graM4[ga + 2097154] << 8 |
                                            GraphicScreen.graM4[ga + 1048578] << 4 |
                                            GraphicScreen.graM4[ga + 2])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (r = tp >>> 20 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                            GraphicScreen.graM4[ga + 2097155] << 8 |
                                            GraphicScreen.graM4[ga + 1048579] << 4 |
                                            GraphicScreen.graM4[ga + 3])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (r = tp >>> 16 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                            GraphicScreen.graM4[ga + 2097156] << 8 |
                                            GraphicScreen.graM4[ga + 1048580] << 4 |
                                            GraphicScreen.graM4[ga + 4])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (r = tp >>> 12 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                            GraphicScreen.graM4[ga + 2097157] << 8 |
                                            GraphicScreen.graM4[ga + 1048581] << 4 |
                                            GraphicScreen.graM4[ga + 5])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (r = tp >>> 8 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                            GraphicScreen.graM4[ga + 2097158] << 8 |
                                            GraphicScreen.graM4[ga + 1048582] << 4 |
                                            GraphicScreen.graM4[ga + 6])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (r = tp >>> 4 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                            GraphicScreen.graM4[ga + 2097159] << 8 |
                                            GraphicScreen.graM4[ga + 1048583] << 4 |
                                            GraphicScreen.graM4[ga + 7])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (r = tp & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q, r;
                  XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                          GraphicScreen.graM4[ga + 2097152] << 8 |
                                          GraphicScreen.graM4[ga + 1048576] << 4 |
                                          GraphicScreen.graM4[ga])) <= 1 ?
                                    ((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    ((q = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (r = tp >>> 28) == 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (q = VideoController.vcnPal16TS[r]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q, r;
                XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                        GraphicScreen.graM4[ga + 2097152] << 8 |
                                        GraphicScreen.graM4[ga + 1048576] << 4 |
                                        GraphicScreen.graM4[ga])) <= 1 ?
                                  ((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[0 >> 8] |
                                    VideoController.vcnPal8G16L[0 & 255]] :
                                  (p = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[0 >> 8] |
                                    VideoController.vcnPal8G16L[0 & 255]] :
                                  (p & 1) == 0 ?
                                  ((q = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (r = tp >>> 28) == 0 ?
                                  (r = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[r] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[p >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]] :
                                  (q = VideoController.vcnPal16TS[r]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[p >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 1] = ((p = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                            GraphicScreen.graM4[ga + 2097153] << 8 |
                                            GraphicScreen.graM4[ga + 1048577] << 4 |
                                            GraphicScreen.graM4[ga + 1])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (r = tp >>> 24 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 2] = ((p = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                            GraphicScreen.graM4[ga + 2097154] << 8 |
                                            GraphicScreen.graM4[ga + 1048578] << 4 |
                                            GraphicScreen.graM4[ga + 2])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (r = tp >>> 20 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 3] = ((p = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                            GraphicScreen.graM4[ga + 2097155] << 8 |
                                            GraphicScreen.graM4[ga + 1048579] << 4 |
                                            GraphicScreen.graM4[ga + 3])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (r = tp >>> 16 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 4] = ((p = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                            GraphicScreen.graM4[ga + 2097156] << 8 |
                                            GraphicScreen.graM4[ga + 1048580] << 4 |
                                            GraphicScreen.graM4[ga + 4])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (r = tp >>> 12 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 5] = ((p = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                            GraphicScreen.graM4[ga + 2097157] << 8 |
                                            GraphicScreen.graM4[ga + 1048581] << 4 |
                                            GraphicScreen.graM4[ga + 5])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (r = tp >>> 8 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 6] = ((p = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                            GraphicScreen.graM4[ga + 2097158] << 8 |
                                            GraphicScreen.graM4[ga + 1048582] << 4 |
                                            GraphicScreen.graM4[ga + 6])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (r = tp >>> 4 & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 7] = ((p = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                            GraphicScreen.graM4[ga + 2097159] << 8 |
                                            GraphicScreen.graM4[ga + 1048583] << 4 |
                                            GraphicScreen.graM4[ga + 7])) <= 1 ?
                                      ((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[0 >> 8] |
                                        VideoController.vcnPal8G16L[0 & 255]] :
                                      (p & 1) == 0 ?
                                      ((q = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (r = tp & 15) == 0 ?
                                      (r = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[r] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      (q = VideoController.vcnPal16TS[r]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[p >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q, r;
                  XEiJ.pnlBM[da] = ((p = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                          GraphicScreen.graM4[ga + 2097152] << 8 |
                                          GraphicScreen.graM4[ga + 1048576] << 4 |
                                          GraphicScreen.graM4[ga])) <= 1 ?
                                    ((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[0 >> 8] |
                                      VideoController.vcnPal8G16L[0 & 255]] :
                                    (p & 1) == 0 ?
                                    ((q = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (r = tp >>> 28) == 0 ?
                                    (r = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[r] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    (q = VideoController.vcnPal16TS[r]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[p >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[(q = p & -2) >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //STJ_XWP

      //================================================================================
      //STJ_XHCT ($0007,$06xx,$1970)
      //  概要
      //    STJ  スプライト＞テキスト＞1024ドット65536色1プレーン
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    スプライトパレットの下位4bitが0でないまたはテキストパレットが0のとき
      //      スプライトカラーが0でないとき
      //        スプライトカラー
      //      さもなくば(スプライトカラーが0のとき)
      //        1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //          1番目のカラーとカラー0を混ぜたカラー(0は黒)
      //        さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //          1番目のカラー(0は黒)
      //    さもなくば(スプライトパレットの下位4bitが0かつテキストパレットが0でないとき)
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //          1番目のカラーとカラー0を混ぜたカラー(0は黒)
      //        さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //          1番目のカラー(0は黒)
      //  中間コード1
      //    (ls4(spp())!=0||txp()==0?(spc(spp())!=0?spc(spp()):(ls1(jpc(tod(j1p()),tod(j1p())))!=0?mix(jpc(j1p(),j1p()),0):jpc(j1p(),j1p()))):(tpc(txp())!=0?tpc(txp()):(ls1(jpc(tod(j1p()),tod(j1p())))!=0?mix(jpc(j1p(),j1p()),0):jpc(j1p(),j1p()))))
      //  中間コード2
      //    ls4(spp())!=0||txp()==0?spc(spp())!=0?spc(spp()):ls1(jpc(tod(j1p()),tod(j1p())))!=0?mix(jpc(j1p(),j1p()),0):jpc(j1p(),j1p()):tpc(txp())!=0?tpc(txp()):ls1(jpc(tod(j1p()),tod(j1p())))!=0?mix(jpc(j1p(),j1p()),0):jpc(j1p(),j1p())
      //  中間コード3
      //    ls4(v1=spp())!=0||(v2=txp())==0?(v3=spc(v1))!=0?v3:ls1(jpc(v6=tod(v7=j1p()),v6))!=0?mix(jpc(v7,v7),0):jpc(v7,v7):(v11=tpc(v2))!=0?v11:ls1(jpc(v14=tod(v15=j1p()),v14))!=0?mix(jpc(v15,v15),0):jpc(v15,v15)
      //  中間コード4
      //    ls4(p=spp())!=0||(q=txp())==0?(q=spc(p))!=0?q:ls1(jpc(p=tod(q=j1p()),p))!=0?mix(jpc(q,q),0):jpc(q,q):(p=tpc(q))!=0?p:ls1(jpc(p=tod(q=j1p()),p))!=0?mix(jpc(q,q),0):jpc(q,q)
      //  中間コード5
      //    ((p=spp())&15)!=0||(q=txp())==0?(q=spc(p))!=0?q:(jpc(p=(q=j1p())|1,p)&1)!=0?mix(jpc(q,q),0):jpc(q,q):(p=tpc(q))!=0?p:(jpc(p=(q=j1p())|1,p)&1)!=0?mix(jpc(q,q),0):jpc(q,q)
      //  中間コード6
      //    ((p=spp())&15)!=0||(q=txp())==0?(q=spc(p))!=0?cto(q):(jpc(p=(q=j1p())|1,p)&1)!=0?cto(mix(jpc(q,q),0)):jpo(q,q):(p=tpc(q))!=0?cto(p):(jpc(p=(q=j1p())|1,p)&1)!=0?cto(mix(jpc(q,q),0)):jpo(q,q)
      STJ_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int gx = CRTC.crtR12GrXCurr[0];  //1024ドットx座標。溢れは無視する
          int gy = CRTC.crtR13GrYZero[0] + src;  //1024ドットy座標。溢れは無視する
          int ga0 = ((gy & 511) << 9);  //x=0,y&=511の1024ドットアドレス
          int gt = VideoController.vcnReg2Curr >> (gy >> 7 & 4);  //y<512?G2nd|G1st:G4th|G3rd
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            sx += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            gx += half;
            da += half;
          }
          int ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18) + (gx & 511);  //1024ドットアドレス
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                           GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                           GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                           GraphicScreen.graM4[ga])) | 1) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      (VideoController.vcnPal8G16H[q >> 8] |
                                       VideoController.vcnPal8G16L[q & 255]),
                                      0)] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]] :
                                  (p = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                           GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                           GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                           GraphicScreen.graM4[ga])) | 1) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      (VideoController.vcnPal8G16H[q >> 8] |
                                       VideoController.vcnPal8G16L[q & 255]),
                                      0)] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                               GraphicScreen.graM4[ga + 1])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                               GraphicScreen.graM4[ga + 1])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                               GraphicScreen.graM4[ga + 2])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                               GraphicScreen.graM4[ga + 2])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                               GraphicScreen.graM4[ga + 3])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                               GraphicScreen.graM4[ga + 3])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                               GraphicScreen.graM4[ga + 4])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                               GraphicScreen.graM4[ga + 4])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                               GraphicScreen.graM4[ga + 5])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                               GraphicScreen.graM4[ga + 5])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                               GraphicScreen.graM4[ga + 6])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                               GraphicScreen.graM4[ga + 6])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                               GraphicScreen.graM4[ga + 7])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                               GraphicScreen.graM4[ga + 7])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                          VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                          VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                          VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                             GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                             GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                             GraphicScreen.graM4[ga])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                             GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                             GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                             GraphicScreen.graM4[ga])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                               ts=1のとき
            int tt = ts + 8;                                               //tt=9
            ts += 16;                                                      //ts=17
            //                                                               ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                     //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              int dw = Math.min (db - da, (512 - (gx & 511)) & -8);  //今回の幅。8の倍数
              gx += dw;  //次回の1024ドットx座標
              int dc = da + dw;  //今回のARGB出力インデックスの終了位置
              while (da < dc) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                int p, q;
                XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                  (q = VideoController.vcnPal16TS[p]) != 0 ?
                                  VideoController.vcnPalTbl[q] :
                                  ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                           GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                           GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                           GraphicScreen.graM4[ga])) | 1) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      (VideoController.vcnPal8G16H[q >> 8] |
                                       VideoController.vcnPal8G16L[q & 255]),
                                      0)] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]] :
                                  (p = VideoController.vcnPal16TS[q]) != 0 ?
                                  VideoController.vcnPalTbl[p] :
                                  ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                           GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                           GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                           GraphicScreen.graM4[ga])) | 1) >> 8] |
                                    VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnMix2 (
                                      (VideoController.vcnPal8G16H[q >> 8] |
                                       VideoController.vcnPal8G16L[q & 255]),
                                      0)] :
                                  VideoController.vcnPalTbl[
                                    VideoController.vcnPal8G16H[q >> 8] |
                                    VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                               GraphicScreen.graM4[ga + 1])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145729] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097153] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048577] << 4 |
                                                                               GraphicScreen.graM4[ga + 1])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                               GraphicScreen.graM4[ga + 2])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145730] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097154] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048578] << 4 |
                                                                               GraphicScreen.graM4[ga + 2])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                               GraphicScreen.graM4[ga + 3])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145731] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097155] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048579] << 4 |
                                                                               GraphicScreen.graM4[ga + 3])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                               GraphicScreen.graM4[ga + 4])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145732] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097156] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048580] << 4 |
                                                                               GraphicScreen.graM4[ga + 4])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                               GraphicScreen.graM4[ga + 5])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145733] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097157] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048581] << 4 |
                                                                               GraphicScreen.graM4[ga + 5])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                               GraphicScreen.graM4[ga + 6])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145734] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097158] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048582] << 4 |
                                                                               GraphicScreen.graM4[ga + 6])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
                                      (q = VideoController.vcnPal16TS[p]) != 0 ?
                                      VideoController.vcnPalTbl[q] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                               GraphicScreen.graM4[ga + 7])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]] :
                                      (p = VideoController.vcnPal16TS[q]) != 0 ?
                                      VideoController.vcnPalTbl[p] :
                                      ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145735] << 12 |
                                                                               GraphicScreen.graM4[ga + 2097159] << 8 |
                                                                               GraphicScreen.graM4[ga + 1048583] << 4 |
                                                                               GraphicScreen.graM4[ga + 7])) | 1) >> 8] |
                                        VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnMix2 (
                                          (VideoController.vcnPal8G16H[q >> 8] |
                                           VideoController.vcnPal8G16L[q & 255]),
                                          0)] :
                                      VideoController.vcnPalTbl[
                                        VideoController.vcnPal8G16H[q >> 8] |
                                        VideoController.vcnPal8G16L[q & 255]]);
                sx += 8;
                ga += 8;
                da += 8;
              }  //while da<dc
              if (da < db) {
                //                                                           ........ ........ .1234567 ________  p0>>tt
                //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
                p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
                p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
                p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
                p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
                int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                          VideoController.VCN_TXP2[p2 >>> 24] |
                          VideoController.VCN_TXP1[p1 >>> 24] |
                          VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
                tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
                for (int k = 0; k < 8; k++) {
                  if ((gx & 511) == 0) {  //gxが512の倍数のとき
                    ga = ga0 + ((gt >> (gx >> 8 & 2) & 3) << 18);  //gaを再計算する
                  }
                  gx++;
                  int p, q;
                  XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                             GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                             GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                             GraphicScreen.graM4[ga])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]] :
                                    (p = VideoController.vcnPal16TS[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((VideoController.vcnPal8G16H[(p = (q = (GraphicScreen.graM4[ga + 3145728] << 12 |
                                                                             GraphicScreen.graM4[ga + 2097152] << 8 |
                                                                             GraphicScreen.graM4[ga + 1048576] << 4 |
                                                                             GraphicScreen.graM4[ga])) | 1) >> 8] |
                                      VideoController.vcnPal8G16L[p & 255]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        (VideoController.vcnPal8G16H[q >> 8] |
                                         VideoController.vcnPal8G16L[q & 255]),
                                        0)] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnPal8G16H[q >> 8] |
                                      VideoController.vcnPal8G16L[q & 255]]);
                  sx++;
                  tp <<= 4;
                  ga++;
                  da++;
                }  //for k
              }  //if da<db
            }  //while da<db
            ts -= 16;                                                      //ts=1
          }  //if ts==0
        }  //drawRaster
      },  //STJ_XHCT

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

      //================================================================================
      //E1TS ($0000,$24xx,$0061)
      //  概要
      //    E1TS  512ドット16色1プレーン＞テキスト＞スプライト
      //    拡張なし
      //  手順
      //    1番目のカラーが0でないとき
      //      1番目のカラー
      //    さもなくば(1番目のカラーが0のとき)
      //      テキストパレットが0でないとき
      //        テキストカラー(0は黒)
      //      さもなくば(テキストパレットが0のとき)
      //        スプライトカラー(0は黒)
      //  中間コード1
      //    (epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp())))
      //  中間コード2
      //    epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=epc(e1p()))!=0?v0:(v2=txp())!=0?tpc(v2):spc(spp())
      //  中間コード4
      //    (p=epc(e1p()))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=epc(e1p()))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=epc(e1p()))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      E1TS {
        @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);
          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;
            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[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[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[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[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[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[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[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[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;
              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[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[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[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[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[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[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[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[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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS

      //================================================================================
      //XE1TS
      //  概要
      //    E1TS  512ドット16色1プレーン＞テキスト＞スプライト
      //    拡張あり
      XE1TS {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //E1TS_XWC
          case 0b00010001:  //E1TS_XWC
          case 0b00010010:  //E1TS_XWC
          case 0b00010011:  //E1TS_XWC
            E1TS_XWC.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //E1TS_XWP
          case 0b00010101:  //E1TS_XWP
          case 0b00010110:  //E1TS_XWP
          case 0b00010111:  //E1TS_XWP
            E1TS_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //E1TS_XHC
            E1TS.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //E1TS_XHCT
            E1TS_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011010:  //E1TS_XHCG
            E1TS_XHCG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011011:  //E1TS_XHCGT
            E1TS_XHCGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //E1TS_XHPT
            E1TS_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011110:  //E1TS_XHPG
            E1TS_XHPG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011111:  //E1TS_XHPGT
            E1TS_XHPGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //E1TS_A
          case 0b01000001:  //E1TS_A
          case 0b01000010:  //E1TS_A
          case 0b01000011:  //E1TS_A
          case 0b01000100:  //E1TS_A
          case 0b01000101:  //E1TS_A
          case 0b01000110:  //E1TS_A
          case 0b01000111:  //E1TS_A
          case 0b01001000:  //E1TS_A
          case 0b01001001:  //E1TS_A
          case 0b01001010:  //E1TS_A
          case 0b01001011:  //E1TS_A
          case 0b01001100:  //E1TS_A
          case 0b01001101:  //E1TS_A
          case 0b01001110:  //E1TS_A
          case 0b01001111:  //E1TS_A
          case 0b01010000:  //E1TS_A
          case 0b01010001:  //E1TS_A
          case 0b01010010:  //E1TS_A
          case 0b01010011:  //E1TS_A
          case 0b01010100:  //E1TS_A
          case 0b01010101:  //E1TS_A
          case 0b01010110:  //E1TS_A
          case 0b01010111:  //E1TS_A
          case 0b01011000:  //E1TS_A
          case 0b01011001:  //E1TS_A
          case 0b01011010:  //E1TS_A
          case 0b01011011:  //E1TS_A
          case 0b01011100:  //E1TS_A
          case 0b01011101:  //E1TS_A
          case 0b01011110:  //E1TS_A
          case 0b01011111:  //E1TS_A
            E1_A.drawRaster (src, dst, rh);
            break;
          default:
            E1TS.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XE1TS);
          }  //switch
        }  //drawRaster
      },  //XE1TS

      //================================================================================
      //E1TS_XWC ($0000,$24xx,$1061)
      //  概要
      //    E1TS  512ドット16色1プレーン＞テキスト＞スプライト
      //    XWC  優先順位に関わらず0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //      1番目のカラー(0は黒)
      //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //  中間コード1
      //    (ls1(epc(tev(e1p())))!=0?epc(e1p()):(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp()))))
      //  中間コード2
      //    ls1(epc(tev(e1p())))!=0?epc(e1p()):epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    ls1(epc(tev(v3=e1p())))!=0?epc(v3):(v5=epc(v3))!=0?v5:(v6=txp())!=0?tpc(v6):spc(spp())
      //  中間コード4
      //    ls1(epc(tev(p=e1p())))!=0?epc(p):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (epc((p=e1p())&-2)&1)!=0?epc(p):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (epc((p=e1p())&-2)&1)!=0?epo(p):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp())
      E1TS_XWC {
        @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);
          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;
            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[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[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[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[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[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[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[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[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;
              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[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[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[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[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[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[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[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[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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS_XWC

      //================================================================================
      //E1TS_XWP ($0000,$24xx,$1461)
      //  概要
      //    E1TS  512ドット16色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
      //    (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()))):epc(tev(e1p())))
      //  中間コード2
      //    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()):epc(tev(e1p()))
      //  中間コード3
      //    (v0=e1p())<=1?(v1=epc(0))!=0?v1:(v2=txp())!=0?tpc(v2):spc(spp()):ls1(v0)==0?(v7=epc(v0))!=0?v7:(v8=txp())!=0?tpc(v8):spc(spp()):epc(tev(v0))
      //  中間コード4
      //    (p=e1p())<=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()):epc(tev(p))
      //  中間コード5
      //    (p=e1p())<=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()):epc(p&-2)
      //  中間コード6
      //    (p=e1p())<=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()):epo(p&-2)
      E1TS_XWP {
        @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);
          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;
            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]) <= 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[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[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[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[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[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[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[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;
              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]) <= 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[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[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[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[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[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[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[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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS_XWP

      //================================================================================
      //E1TS_XHCT ($0000,$24xx,$1961)
      //  概要
      //    E1TS  512ドット16色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(epc(tev(e1p())))!=0?mix(epc(e1p()),(txp()!=0?tpc(txp()):spc(spp()))):(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp()))))
      //  中間コード2
      //    ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),txp()!=0?tpc(txp()):spc(spp())):epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    ls1(epc(tev(v3=e1p())))!=0?mix(epc(v3),(v6=txp())!=0?tpc(v6):spc(spp())):(v10=epc(v3))!=0?v10:(v11=txp())!=0?tpc(v11):spc(spp())
      //  中間コード4
      //    ls1(epc(tev(p=e1p())))!=0?mix(epc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (epc((p=e1p())&-2)&1)!=0?mix(epc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (epc((p=e1p())&-2)&1)!=0?cto(mix(epc(p),(p=txp())!=0?tpc(p):spc(spp()))):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp())
      E1TS_XHCT {
        @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);
          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;
            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[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[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[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[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[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[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[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[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;
              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[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[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[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[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[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[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[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[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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS_XHCT

      //================================================================================
      //E1TS_XHCG ($0000,$24xx,$1A61)
      //  概要
      //    E1TS  512ドット16色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(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())))))
      //  中間コード2
      //    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())
      //  中間コード3
      //    ls1(v1=epc(tev(v3=e1p())))!=0?mix(v1,epc(tod(e2q()))):ls1(v3)!=0?(v9=epc(tod(e2q())))!=0?v9:(v12=txp())!=0?tpc(v12):spc(spp()):(v16=epc(v3))!=0?v16:(v17=txp())!=0?tpc(v17):spc(spp())
      //  中間コード4
      //    ls1(p=epc(tev(q=e1p())))!=0?mix(p,epc(tod(e2q()))):ls1(q)!=0?(p=epc(tod(e2q())))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(q))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    ((p=epc((q=e1p())&-2))&1)!=0?mix(p,epc(e2q()|1)):(q&1)!=0?(p=epc(e2q()|1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(q))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    ((p=epc((q=e1p())&-2))&1)!=0?cto(mix(p,epc(e2q()|1))):(q&1)!=0?(p=epc(e2q()|1))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(p=epc(q))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      E1TS_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 gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);  //ONとみなす
          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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])] :
                                (q & 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]] :
                                (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[gy1st | gx1st + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])] :
                                    (q & 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]] :
                                    (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;
              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[gy1st | gx1st & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])] :
                                (q & 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]] :
                                (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[gy1st | gx1st + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])] :
                                    (q & 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]] :
                                    (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[gy1st | gx1st + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])] :
                                    (q & 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]] :
                                    (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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS_XHCG

      //================================================================================
      //E1TS_XHCGT ($0000,$24xx,$1B61)
      //  概要
      //    E1TS  512ドット16色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(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())))))
      //  中間コード2
      //    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())
      //  中間コード3
      //    ls1(v1=epc(tev(v3=e1p())))!=0?mix(mix(v1,epc(tod(e2q()))),(v9=txp())!=0?tpc(v9):spc(spp())):ls1(v3)!=0?(v14=epc(tod(e2q())))!=0?v14:(v17=txp())!=0?tpc(v17):spc(spp()):(v21=epc(v3))!=0?v21:(v22=txp())!=0?tpc(v22):spc(spp())
      //  中間コード4
      //    ls1(p=epc(tev(q=e1p())))!=0?mix(mix(p,epc(tod(e2q()))),(p=txp())!=0?tpc(p):spc(spp())):ls1(q)!=0?(p=epc(tod(e2q())))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(q))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    ((p=epc((q=e1p())&-2))&1)!=0?mix(mix(p,epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp())):(q&1)!=0?(p=epc(e2q()|1))!=0?p:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(q))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    ((p=epc((q=e1p())&-2))&1)!=0?cto(mix(mix(p,epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp()))):(q&1)!=0?(p=epc(e2q()|1))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp()):(p=epc(q))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      E1TS_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 gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);  //ONとみなす
          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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q & 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]] :
                                (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[gy1st | gx1st + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q & 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]] :
                                    (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;
              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[gy1st | gx1st & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]])] :
                                (q & 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]] :
                                (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[gy1st | gx1st + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 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[gz2nd | gx2nd + 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[gy1st | gx1st + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]])] :
                                    (q & 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]] :
                                    (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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS_XHCGT

      //================================================================================
      //E1TS_XHPT ($0000,$24xx,$1D61)
      //  概要
      //    E1TS  512ドット16色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
      //    (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()<=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())<=1?(v1=epc(0))!=0?v1:(v2=txp())!=0?tpc(v2):spc(spp()):ls1(v0)==0?(v7=epc(v0))!=0?v7:(v8=txp())!=0?tpc(v8):spc(spp()):mix(epc(tev(v0)),(v15=txp())!=0?tpc(v15):spc(spp()))
      //  中間コード4
      //    (p=e1p())<=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())<=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())<=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())))
      E1TS_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);
          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;
            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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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;
              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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS_XHPT

      //================================================================================
      //E1TS_XHPG ($0000,$24xx,$1E61)
      //  概要
      //    E1TS  512ドット16色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
      //    (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()<=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())<=1?(v1=epc(0))!=0?v1:(v2=txp())!=0?tpc(v2):spc(spp()):ls1(v0)==0?(v7=epc(v0))!=0?v7:(v8=txp())!=0?tpc(v8):spc(spp()):(v12=mix(epc(tev(v0)),epc(tod(e2q()))))!=0?v12:(v18=txp())!=0?tpc(v18):spc(spp())
      //  中間コード4
      //    (p=e1p())<=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())<=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())<=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())
      E1TS_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 gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);  //ONとみなす
          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[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[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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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;
              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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS_XHPG

      //================================================================================
      //E1TS_XHPGT ($0000,$24xx,$1F61)
      //  概要
      //    E1TS  512ドット16色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
      //    (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()<=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())<=1?(v1=epc(0))!=0?v1:(v2=txp())!=0?tpc(v2):spc(spp()):ls1(v0)==0?(v7=epc(v0))!=0?v7:(v8=txp())!=0?tpc(v8):spc(spp()):mix(mix(epc(tev(v0)),epc(tod(e2q()))),(v19=txp())!=0?tpc(v19):spc(spp()))
      //  中間コード4
      //    (p=e1p())<=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())<=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())<=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())))
      E1TS_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 gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);  //ONとみなす
          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[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[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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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;
              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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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]) <= 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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1TS_XHPGT

      //================================================================================
      //E2TS ($0000,$24xx,$0063)
      //  概要
      //    E2TS  512ドット16色2プレーン＞テキスト＞スプライト
      //    拡張なし
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のカラーが0でないとき
      //        2番目のカラー
      //      さもなくば(2番目のカラーが0のとき)
      //        テキストパレットが0でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp()))):(epc(e2p())!=0?epc(e2p()):(txp()!=0?tpc(txp()):spc(spp()))))
      //  中間コード2
      //    e1p()!=0?epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp()):epc(e2p())!=0?epc(e2p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=e1p())!=0?(v1=epc(v0))!=0?v1:(v2=txp())!=0?tpc(v2):spc(spp()):(v6=epc(e2p()))!=0?v6:(v8=txp())!=0?tpc(v8):spc(spp())
      //  中間コード4
      //    (p=e1p())!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(e2p()))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=e1p())!=0?(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(p=epc(e2p()))!=0?p:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=e1p())!=0?(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(p=epc(e2p()))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      E2TS {
        @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 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[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[gy2nd | gx2nd & 511]]) != 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]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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, q;
              XEiJ.pnlBM[da] = ((p = 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[gy2nd | gx2nd & 511]]) != 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]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    (p = tp >>> 24 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :
                                    VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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
      },  //E2TS

      //================================================================================
      //XE2TS
      //  概要
      //    E2TS  512ドット16色2プレーン＞テキスト＞スプライト
      //    拡張あり
      XE2TS {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //E2TS_XWC
          case 0b00010001:  //E2TS_XWC
          case 0b00010010:  //E2TS_XWC
          case 0b00010011:  //E2TS_XWC
            E2TS_XWC.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //E2TS_XWP
          case 0b00010101:  //E2TS_XWP
          case 0b00010110:  //E2TS_XWP
          case 0b00010111:  //E2TS_XWP
            E2TS_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //E2TS_XHC
            E2TS.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //E2TS_XHCT
            E2TS_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011010:  //E2TS_XHCG
            E2TS_XHCG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011011:  //E2TS_XHCGT
            E2TS_XHCGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //E2TS_XHPT
            E2TS_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011110:  //E2TS_XHPG
            E2TS_XHPG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011111:  //E2TS_XHPGT
            E2TS_XHPGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //E2TS_A
          case 0b01000001:  //E2TS_A
          case 0b01000010:  //E2TS_A
          case 0b01000011:  //E2TS_A
          case 0b01000100:  //E2TS_A
          case 0b01000101:  //E2TS_A
          case 0b01000110:  //E2TS_A
          case 0b01000111:  //E2TS_A
          case 0b01001000:  //E2TS_A
          case 0b01001001:  //E2TS_A
          case 0b01001010:  //E2TS_A
          case 0b01001011:  //E2TS_A
          case 0b01001100:  //E2TS_A
          case 0b01001101:  //E2TS_A
          case 0b01001110:  //E2TS_A
          case 0b01001111:  //E2TS_A
          case 0b01010000:  //E2TS_A
          case 0b01010001:  //E2TS_A
          case 0b01010010:  //E2TS_A
          case 0b01010011:  //E2TS_A
          case 0b01010100:  //E2TS_A
          case 0b01010101:  //E2TS_A
          case 0b01010110:  //E2TS_A
          case 0b01010111:  //E2TS_A
          case 0b01011000:  //E2TS_A
          case 0b01011001:  //E2TS_A
          case 0b01011010:  //E2TS_A
          case 0b01011011:  //E2TS_A
          case 0b01011100:  //E2TS_A
          case 0b01011101:  //E2TS_A
          case 0b01011110:  //E2TS_A
          case 0b01011111:  //E2TS_A
            E2_A.drawRaster (src, dst, rh);
            break;
          default:
            E2TS.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XE2TS);
          }  //switch
        }  //drawRaster
      },  //XE2TS

      //================================================================================
      //E2TS_XWC ($0000,$24xx,$1063)
      //  概要
      //    E2TS  512ドット16色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
      //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?epc(e1p()):(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp())))):(ls1(epc(tev(e2p())))!=0?epc(e2p()):(epc(e2p())!=0?epc(e2p()):(txp()!=0?tpc(txp()):spc(spp())))))
      //  中間コード2
      //    e1p()!=0?ls1(epc(tev(e1p())))!=0?epc(e1p()):epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp()):ls1(epc(tev(e2p())))!=0?epc(e2p()):epc(e2p())!=0?epc(e2p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=e1p())!=0?ls1(epc(tev(v0)))!=0?epc(v0):(v5=epc(v0))!=0?v5:(v6=txp())!=0?tpc(v6):spc(spp()):ls1(epc(tev(v13=e2p())))!=0?epc(v13):(v15=epc(v13))!=0?v15:(v16=txp())!=0?tpc(v16):spc(spp())
      //  中間コード4
      //    (p=e1p())!=0?ls1(epc(tev(p)))!=0?epc(p):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):ls1(epc(tev(p=e2p())))!=0?epc(p):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=e1p())!=0?(epc(p&-2)&1)!=0?epc(p):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(epc((p=e2p())&-2)&1)!=0?epc(p):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=e1p())!=0?(epc(p&-2)&1)!=0?epo(p):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(epc((p=e2p())&-2)&1)!=0?epo(p):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp())
      E2TS_XWC {
        @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 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[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[gy2nd | gx2nd & 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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] = ((p = 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[gy2nd | gx2nd & 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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
      },  //E2TS_XWC

      //================================================================================
      //E2TS_XWP ($0000,$24xx,$1463)
      //  概要
      //    E2TS  512ドット16色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
      //    (e1p()==0?(epc(tev(e2p()))!=0?epc(tev(e2p())):(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()))):epc(tev(e1p())))
      //  中間コード2
      //    e1p()==0?epc(tev(e2p()))!=0?epc(tev(e2p())):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()):epc(tev(e1p()))
      //  中間コード3
      //    (v0=e1p())==0?(v1=epc(tev(e2p())))!=0?v1:(v4=txp())!=0?tpc(v4):spc(spp()):v0==1?(v8=epc(0))!=0?v8:(v9=txp())!=0?tpc(v9):spc(spp()):ls1(v0)==0?(v14=epc(v0))!=0?v14:(v15=txp())!=0?tpc(v15):spc(spp()):epc(tev(v0))
      //  中間コード4
      //    (p=e1p())==0?(p=epc(tev(e2p())))!=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()):epc(tev(p))
      //  中間コード5
      //    (p=e1p())==0?(p=epc(e2p()&-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()):epc(p&-2)
      //  中間コード6
      //    (p=e1p())==0?(p=epc(e2p()&-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()):epo(p&-2)
      E2TS_XWP {
        @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 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[gy1st | gx1st & 511]) == 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 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[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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;
              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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 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[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2TS_XWP

      //================================================================================
      //E2TS_XHCT ($0000,$24xx,$1963)
      //  概要
      //    E2TS  512ドット16色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
      //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),(txp()!=0?tpc(txp()):spc(spp()))):(epc(e1p())!=0?epc(e1p()):(txp()!=0?tpc(txp()):spc(spp())))):(ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),(txp()!=0?tpc(txp()):spc(spp()))):(epc(e2p())!=0?epc(e2p()):(txp()!=0?tpc(txp()):spc(spp())))))
      //  中間コード2
      //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),txp()!=0?tpc(txp()):spc(spp())):epc(e1p())!=0?epc(e1p()):txp()!=0?tpc(txp()):spc(spp()):ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),txp()!=0?tpc(txp()):spc(spp())):epc(e2p())!=0?epc(e2p()):txp()!=0?tpc(txp()):spc(spp())
      //  中間コード3
      //    (v0=e1p())!=0?ls1(epc(tev(v0)))!=0?mix(epc(v0),(v6=txp())!=0?tpc(v6):spc(spp())):(v10=epc(v0))!=0?v10:(v11=txp())!=0?tpc(v11):spc(spp()):ls1(epc(tev(v18=e2p())))!=0?mix(epc(v18),(v21=txp())!=0?tpc(v21):spc(spp())):(v25=epc(v18))!=0?v25:(v26=txp())!=0?tpc(v26):spc(spp())
      //  中間コード4
      //    (p=e1p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):ls1(epc(tev(p=e2p())))!=0?mix(epc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード5
      //    (p=e1p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp()):(epc((p=e2p())&-2)&1)!=0?mix(epc(p),(p=txp())!=0?tpc(p):spc(spp())):(q=epc(p))!=0?q:(p=txp())!=0?tpc(p):spc(spp())
      //  中間コード6
      //    (p=e1p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),(p=txp())!=0?tpc(p):spc(spp()))):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp()):(epc((p=e2p())&-2)&1)!=0?cto(mix(epc(p),(p=txp())!=0?tpc(p):spc(spp()))):(q=epc(p))!=0?cto(q):(p=txp())!=0?tpo(p):spo(spp())
      E2TS_XHCT {
        @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 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[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[gy2nd | gx2nd & 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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] = ((p = 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[gy2nd | gx2nd & 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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[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[gy2nd | gx2nd + 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
      },  //E2TS_XHCT

      //================================================================================
      //E2TS_XHCG ($0000,$24xx,$1A63)
      //  概要
      //    E2TS  512ドット16色2プレーン＞テキスト＞スプライト
      //    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番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが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()))))):(ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):(epc(e2p())!=0?epc(e2p()):(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()):ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p())!=0?epc(e2p()):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()):ls1(v22=epc(tev(v24=e2p())))!=0?mix(v22,epc(tod(e2q()))):(v29=epc(v24))!=0?v29:(v30=txp())!=0?tpc(v30):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()):ls1(p=epc(tev(q=e2p())))!=0?mix(p,epc(tod(e2q()))):(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=epc((q=e2p())&-2))&1)!=0?mix(p,epc(e2q()|1)):(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=epc((q=e2p())&-2))&1)!=0?cto(mix(p,epc(e2q()|1))):(p=epc(q))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      E2TS_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とみなす
          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[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])] :
                                (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])] :
                                    (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;
              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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])] :
                                (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])] :
                                    (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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])] :
                                    (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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2TS_XHCG

      //================================================================================
      //E2TS_XHCGT ($0000,$24xx,$1B63)
      //  概要
      //    E2TS  512ドット16色2プレーン＞テキスト＞スプライト
      //    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番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //          テキストパレットが0でないとき
      //            テキストカラー(0は黒)
      //          さもなくば(テキストパレットが0のとき)
      //            スプライトカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが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()))))):(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())))))
      //  中間コード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()):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())
      //  中間コード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()):ls1(v27=epc(tev(v29=e2p())))!=0?mix(mix(v27,epc(tod(e2q()))),(v35=txp())!=0?tpc(v35):spc(spp())):(v39=epc(v29))!=0?v39:(v40=txp())!=0?tpc(v40):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()):ls1(p=epc(tev(q=e2p())))!=0?mix(mix(p,epc(tod(e2q()))),(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=epc((q=e2p())&-2))&1)!=0?mix(mix(p,epc(e2q()|1)),(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=epc((q=e2p())&-2))&1)!=0?cto(mix(mix(p,epc(e2q()|1)),(p=txp())!=0?tpc(p):spc(spp()))):(p=epc(q))!=0?cto(p):(p=txp())!=0?tpo(p):spo(spp())
      E2TS_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とみなす
          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[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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;
              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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    (p = tp >>> 28) != 0 ?
                                    VideoController.vcnPal16TS[p] :
                                    VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        (p = tp >>> 24 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        (p = tp >>> 20 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        (p = tp >>> 16 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        (p = tp >>> 12 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        (p = tp >>> 8 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        (p = tp >>> 4 & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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 = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        (p = tp & 15) != 0 ?
                                        VideoController.vcnPal16TS[p] :
                                        VideoController.vcnPal16TS[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;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2TS_XHCGT

      //================================================================================
      //E2TS_XHPT ($0000,$24xx,$1D63)
      //  概要
      //    E2TS  512ドット16色2プレーン＞テキスト＞スプライト
      //    XHPT  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でないとき
      //          テキストカラー(0は黒)
      //        さもなくば(テキストパレットが0のとき)
      //          スプライトカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (e1p()==0?(epc(tev(e2p()))!=0?epc(tev(e2p())):(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?epc(tev(e2p()))!=0?epc(tev(e2p())):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=epc(tev(e2p())))!=0?v1:(v4=txp())!=0?tpc(v4):spc(spp()):v0==1?(v8=epc(0))!=0?v8:(v9=txp())!=0?tpc(v9):spc(spp()):ls1(v0)==0?(v14=epc(v0))!=0?v14:(v15=txp())!=0?tpc(v15):spc(spp()):mix(epc(tev(v0)),(v22=txp())!=0?tpc(v22):spc(spp()))
      //  中間コード4
      //    (p=e1p())==0?(p=epc(tev(e2p())))!=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=epc(e2p()&-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=epc(e2p()&-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())))
      E2TS_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);
          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[gy1st | gx1st & 511]) == 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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;
              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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 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 = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    (p = tp >>> 4 & 15) != 0 ?
                                    VideoController.vcnPal32TS[p] :

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