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

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

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

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

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

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

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

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

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

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

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

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

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

      //================================================================================
      //E1t ($0000,$09xx,$0001)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    拡張なし
      //  手順
      //    1番目のカラーが0でないとき
      //      1番目のカラー
      //    さもなくば(1番目のカラーが0のとき)
      //      テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (epc(e1p())!=0?epc(e1p()):tpc(0))
      //  中間コード2
      //    epc(e1p())!=0?epc(e1p()):tpc(0)
      //  中間コード3
      //    (v0=epc(e1p()))!=0?v0:tpc(0)
      //  中間コード4
      //    (p=epc(e1p()))!=0?p:tpc(0)
      //  中間コード5
      //    (p=epc(e1p()))!=0?p:tpc(0)
      //  中間コード6
      //    (p=epc(e1p()))!=0?cto(p):tpo(0)
      E1t {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 1 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 2 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 3 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 4 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 5 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 6 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 7 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 1 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 2 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 3 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 4 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 5 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 6 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 7 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t

      //================================================================================
      //XE1t
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    拡張あり
      XE1t {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //E1t_XWC
          case 0b00010001:  //E1t_XWC
          case 0b00010010:  //E1t_XWC
          case 0b00010011:  //E1t_XWC
            E1t.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //E1t_XWP
          case 0b00010101:  //E1t_XWP
          case 0b00010110:  //E1t_XWP
          case 0b00010111:  //E1t_XWP
            E1t_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //E1t_XHC
            E1t.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //E1t_XHCT
            E1t_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011010:  //E1t_XHCG
            E1t_XHCG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011011:  //E1t_XHCGT
            E1t_XHCGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //E1t_XHPT
            E1t_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011110:  //E1t_XHPG
            E1t_XHPG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011111:  //E1t_XHPGT
            E1t_XHPGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //E1t_A
          case 0b01000001:  //E1t_A
          case 0b01000010:  //E1t_A
          case 0b01000011:  //E1t_A
          case 0b01000100:  //E1t_A
          case 0b01000101:  //E1t_A
          case 0b01000110:  //E1t_A
          case 0b01000111:  //E1t_A
          case 0b01001000:  //E1t_A
          case 0b01001001:  //E1t_A
          case 0b01001010:  //E1t_A
          case 0b01001011:  //E1t_A
          case 0b01001100:  //E1t_A
          case 0b01001101:  //E1t_A
          case 0b01001110:  //E1t_A
          case 0b01001111:  //E1t_A
          case 0b01010000:  //E1t_A
          case 0b01010001:  //E1t_A
          case 0b01010010:  //E1t_A
          case 0b01010011:  //E1t_A
          case 0b01010100:  //E1t_A
          case 0b01010101:  //E1t_A
          case 0b01010110:  //E1t_A
          case 0b01010111:  //E1t_A
          case 0b01011000:  //E1t_A
          case 0b01011001:  //E1t_A
          case 0b01011010:  //E1t_A
          case 0b01011011:  //E1t_A
          case 0b01011100:  //E1t_A
          case 0b01011101:  //E1t_A
          case 0b01011110:  //E1t_A
          case 0b01011111:  //E1t_A
            E1t_A.drawRaster (src, dst, rh);
            break;
          default:
            E1t.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XE1t);
          }  //switch
        }  //drawRaster
      },  //XE1t

      //================================================================================
      //E1t_XWP ($0000,$09xx,$1401)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (e1p()<=1?(epc(0)!=0?epc(0):tpc(0)):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):tpc(0)):epc(tev(e1p())))
      //  中間コード2
      //    e1p()<=1?epc(0)!=0?epc(0):tpc(0):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):tpc(0):epc(tev(e1p()))
      //  中間コード3
      //    (v0=e1p())<=1?(v1=epc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=epc(v0))!=0?v4:tpc(0):epc(tev(v0))
      //  中間コード4
      //    (p=e1p())<=1?(p=epc(0))!=0?p:tpc(0):ls1(p)==0?(q=epc(p))!=0?q:tpc(0):epc(tev(p))
      //  中間コード5
      //    (p=e1p())<=1?(p=epc(0))!=0?p:tpc(0):(p&1)==0?(q=epc(p))!=0?q:tpc(0):epc(p&-2)
      //  中間コード6
      //    (p=e1p())<=1?(p=epc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=epc(p))!=0?cto(q):tpo(0):epo(p&-2)
      E1t_XWP {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              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] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              gx1st += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t_XWP

      //================================================================================
      //E1t_XHCT ($0000,$09xx,$1901)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //      1番目のカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),tpc(0)):(epc(e1p())!=0?epc(e1p()):tpc(0)))
      //  中間コード2
      //    ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),tpc(0)):epc(e1p())!=0?epc(e1p()):tpc(0)
      //  中間コード3
      //    ls1(epc(tev(v3=e1p())))!=0?mix(epc(v3),tpc(0)):(v7=epc(v3))!=0?v7:tpc(0)
      //  中間コード4
      //    ls1(epc(tev(p=e1p())))!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0)
      //  中間コード5
      //    (epc((p=e1p())&-2)&1)!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0)
      //  中間コード6
      //    (epc((p=e1p())&-2)&1)!=0?cto(mix(epc(p),tpc(0))):(q=epc(p))!=0?cto(q):tpo(0)
      E1t_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              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],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t_XHCT

      //================================================================================
      //E1t_XHCG ($0000,$09xx,$1A01)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //      1番目のパレットが奇数のとき
      //        2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0でないとき
      //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー
      //        さもなくば(2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //      さもなくば(1番目のパレットが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(ls1(e1p())!=0?(epc(tod(e2q()))!=0?epc(tod(e2q())):tpc(0)):(epc(e1p())!=0?epc(e1p()):tpc(0))))
      //  中間コード2
      //    ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):ls1(e1p())!=0?epc(tod(e2q()))!=0?epc(tod(e2q())):tpc(0):epc(e1p())!=0?epc(e1p()):tpc(0)
      //  中間コード3
      //    ls1(v1=epc(tev(v3=e1p())))!=0?mix(v1,epc(tod(e2q()))):ls1(v3)!=0?(v9=epc(tod(e2q())))!=0?v9:tpc(0):(v13=epc(v3))!=0?v13:tpc(0)
      //  中間コード4
      //    ls1(p=epc(tev(q=e1p())))!=0?mix(p,epc(tod(e2q()))):ls1(q)!=0?(p=epc(tod(e2q())))!=0?p:tpc(0):(p=epc(q))!=0?p:tpc(0)
      //  中間コード5
      //    ((p=epc((q=e1p())&-2))&1)!=0?mix(p,epc(e2q()|1)):(q&1)!=0?(p=epc(e2q()|1))!=0?p:tpc(0):(p=epc(q))!=0?p:tpc(0)
      //  中間コード6
      //    ((p=epc((q=e1p())&-2))&1)!=0?cto(mix(p,epc(e2q()|1))):(q&1)!=0?(p=epc(e2q()|1))!=0?cto(p):tpo(0):(p=epc(q))!=0?cto(p):tpo(0)
      E1t_XHCG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = (((p = 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] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t_XHCG

      //================================================================================
      //E1t_XHCGT ($0000,$09xx,$1B01)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //      1番目のパレットが奇数のとき
      //        2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0でないとき
      //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー
      //        さもなくば(2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //      さもなくば(1番目のパレットが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),tpc(0)):(ls1(e1p())!=0?(epc(tod(e2q()))!=0?epc(tod(e2q())):tpc(0)):(epc(e1p())!=0?epc(e1p()):tpc(0))))
      //  中間コード2
      //    ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),tpc(0)):ls1(e1p())!=0?epc(tod(e2q()))!=0?epc(tod(e2q())):tpc(0):epc(e1p())!=0?epc(e1p()):tpc(0)
      //  中間コード3
      //    ls1(v1=epc(tev(v3=e1p())))!=0?mix(mix(v1,epc(tod(e2q()))),tpc(0)):ls1(v3)!=0?(v11=epc(tod(e2q())))!=0?v11:tpc(0):(v15=epc(v3))!=0?v15:tpc(0)
      //  中間コード4
      //    ls1(p=epc(tev(q=e1p())))!=0?mix(mix(p,epc(tod(e2q()))),tpc(0)):ls1(q)!=0?(p=epc(tod(e2q())))!=0?p:tpc(0):(p=epc(q))!=0?p:tpc(0)
      //  中間コード5
      //    ((p=epc((q=e1p())&-2))&1)!=0?mix(mix(p,epc(e2q()|1)),tpc(0)):(q&1)!=0?(p=epc(e2q()|1))!=0?p:tpc(0):(p=epc(q))!=0?p:tpc(0)
      //  中間コード6
      //    ((p=epc((q=e1p())&-2))&1)!=0?cto(mix(mix(p,epc(e2q()|1)),tpc(0))):(q&1)!=0?(p=epc(e2q()|1))!=0?cto(p):tpo(0):(p=epc(q))!=0?cto(p):tpo(0)
      E1t_XHCGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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]),
                                    VideoController.vcnPal16TS[0])] :
                                (q & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              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]),
                                    VideoController.vcnPal16TS[0])] :
                                (q & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (q & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t_XHCGT

      //================================================================================
      //E1t_XHPT ($0000,$09xx,$1D01)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (e1p()<=1?(epc(0)!=0?epc(0):tpc(0)):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):tpc(0)):mix(epc(tev(e1p())),tpc(0)))
      //  中間コード2
      //    e1p()<=1?epc(0)!=0?epc(0):tpc(0):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):tpc(0):mix(epc(tev(e1p())),tpc(0))
      //  中間コード3
      //    (v0=e1p())<=1?(v1=epc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=epc(v0))!=0?v4:tpc(0):mix(epc(tev(v0)),tpc(0))
      //  中間コード4
      //    (p=e1p())<=1?(p=epc(0))!=0?p:tpc(0):ls1(p)==0?(q=epc(p))!=0?q:tpc(0):mix(epc(tev(p)),tpc(0))
      //  中間コード5
      //    (p=e1p())<=1?(p=epc(0))!=0?p:tpc(0):(p&1)==0?(q=epc(p))!=0?q:tpc(0):mix(epc(p&-2),tpc(0))
      //  中間コード6
      //    (p=e1p())<=1?(p=epc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=epc(p))!=0?cto(q):tpo(0):cto(mix(epc(p&-2),tpc(0)))
      E1t_XHPT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              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] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t_XHPT

      //================================================================================
      //E1t_XHPG ($0000,$09xx,$1E01)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0でないとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (e1p()<=1?(epc(0)!=0?epc(0):tpc(0)):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):tpc(0)):(mix(epc(tev(e1p())),epc(tod(e2q())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):tpc(0)))
      //  中間コード2
      //    e1p()<=1?epc(0)!=0?epc(0):tpc(0):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):tpc(0):mix(epc(tev(e1p())),epc(tod(e2q())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):tpc(0)
      //  中間コード3
      //    (v0=e1p())<=1?(v1=epc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=epc(v0))!=0?v4:tpc(0):(v6=mix(epc(tev(v0)),epc(tod(e2q()))))!=0?v6:tpc(0)
      //  中間コード4
      //    (p=e1p())<=1?(p=epc(0))!=0?p:tpc(0):ls1(p)==0?(q=epc(p))!=0?q:tpc(0):(q=mix(epc(tev(p)),epc(tod(e2q()))))!=0?q:tpc(0)
      //  中間コード5
      //    (p=e1p())<=1?(p=epc(0))!=0?p:tpc(0):(p&1)==0?(q=epc(p))!=0?q:tpc(0):(q=mix(epc(p&-2),epc(e2q()|1)))!=0?q:tpc(0)
      //  中間コード6
      //    (p=e1p())<=1?(p=epc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=epc(p))!=0?cto(q):tpo(0):(q=mix(epc(p&-2),epc(e2q()|1)))!=0?cto(q):tpo(0)
      E1t_XHPG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) <= 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t_XHPG

      //================================================================================
      //E1t_XHPGT ($0000,$09xx,$1F01)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが1以下のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (e1p()<=1?(epc(0)!=0?epc(0):tpc(0)):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):tpc(0)):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),tpc(0)))
      //  中間コード2
      //    e1p()<=1?epc(0)!=0?epc(0):tpc(0):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):tpc(0):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),tpc(0))
      //  中間コード3
      //    (v0=e1p())<=1?(v1=epc(0))!=0?v1:tpc(0):ls1(v0)==0?(v4=epc(v0))!=0?v4:tpc(0):mix(mix(epc(tev(v0)),epc(tod(e2q()))),tpc(0))
      //  中間コード4
      //    (p=e1p())<=1?(p=epc(0))!=0?p:tpc(0):ls1(p)==0?(q=epc(p))!=0?q:tpc(0):mix(mix(epc(tev(p)),epc(tod(e2q()))),tpc(0))
      //  中間コード5
      //    (p=e1p())<=1?(p=epc(0))!=0?p:tpc(0):(p&1)==0?(q=epc(p))!=0?q:tpc(0):mix(mix(epc(p&-2),epc(e2q()|1)),tpc(0))
      //  中間コード6
      //    (p=e1p())<=1?(p=epc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=epc(p))!=0?cto(q):tpo(0):cto(mix(mix(epc(p&-2),epc(e2q()|1)),tpc(0)))
      E1t_XHPGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) <= 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) <= 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t_XHPGT

      //================================================================================
      //E1t_A ($0000,$09xx,$4001)
      //  概要
      //    E1t  512ドット16色1プレーン＞テキスト(OFF)
      //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
      //  手順
      //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //  中間コード1
      //    mix(epc(e1p()),tpc(0))
      //  中間コード2
      //    mix(epc(e1p()),tpc(0))
      //  中間コード3
      //    mix(epc(e1p()),tpc(0))
      //  中間コード4
      //    mix(epc(e1p()),tpc(0))
      //  中間コード5
      //    mix(epc(e1p()),tpc(0))
      //  中間コード6
      //    cto(mix(epc(e1p()),tpc(0)))
      E1t_A {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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;  //次回のテキスト桁位置
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st & 511]],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 1 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 2 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 3 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 4 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 5 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 6 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 7 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              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;  //次回のテキスト桁位置
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st & 511]],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 1 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 2 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 3 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 4 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 5 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 6 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy1st | gx1st + 7 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E1t_A

      //================================================================================
      //E2t ($0000,$09xx,$0003)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    拡張なし
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のカラーが0でないとき
      //        2番目のカラー
      //      さもなくば(2番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(epc(e1p())!=0?epc(e1p()):tpc(0)):(epc(e2p())!=0?epc(e2p()):tpc(0)))
      //  中間コード2
      //    e1p()!=0?epc(e1p())!=0?epc(e1p()):tpc(0):epc(e2p())!=0?epc(e2p()):tpc(0)
      //  中間コード3
      //    (v0=e1p())!=0?(v1=epc(v0))!=0?v1:tpc(0):(v3=epc(e2p()))!=0?v3:tpc(0)
      //  中間コード4
      //    (p=e1p())!=0?(q=epc(p))!=0?q:tpc(0):(p=epc(e2p()))!=0?p:tpc(0)
      //  中間コード5
      //    (p=e1p())!=0?(q=epc(p))!=0?q:tpc(0):(p=epc(e2p()))!=0?p:tpc(0)
      //  中間コード6
      //    (p=e1p())!=0?(q=epc(p))!=0?cto(q):tpo(0):(p=epc(e2p()))!=0?cto(p):tpo(0)
      E2t {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511]]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511]]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t

      //================================================================================
      //XE2t
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    拡張あり
      XE2t {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //E2t_XWC
          case 0b00010001:  //E2t_XWC
          case 0b00010010:  //E2t_XWC
          case 0b00010011:  //E2t_XWC
            E2t.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //E2t_XWP
          case 0b00010101:  //E2t_XWP
          case 0b00010110:  //E2t_XWP
          case 0b00010111:  //E2t_XWP
            E2t_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //E2t_XHC
            E2t.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //E2t_XHCT
            E2t_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011010:  //E2t_XHCG
            E2t_XHCG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011011:  //E2t_XHCGT
            E2t_XHCGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //E2t_XHPT
            E2t_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011110:  //E2t_XHPG
            E2t_XHPG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011111:  //E2t_XHPGT
            E2t_XHPGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //E2t_A
          case 0b01000001:  //E2t_A
          case 0b01000010:  //E2t_A
          case 0b01000011:  //E2t_A
          case 0b01000100:  //E2t_A
          case 0b01000101:  //E2t_A
          case 0b01000110:  //E2t_A
          case 0b01000111:  //E2t_A
          case 0b01001000:  //E2t_A
          case 0b01001001:  //E2t_A
          case 0b01001010:  //E2t_A
          case 0b01001011:  //E2t_A
          case 0b01001100:  //E2t_A
          case 0b01001101:  //E2t_A
          case 0b01001110:  //E2t_A
          case 0b01001111:  //E2t_A
          case 0b01010000:  //E2t_A
          case 0b01010001:  //E2t_A
          case 0b01010010:  //E2t_A
          case 0b01010011:  //E2t_A
          case 0b01010100:  //E2t_A
          case 0b01010101:  //E2t_A
          case 0b01010110:  //E2t_A
          case 0b01010111:  //E2t_A
          case 0b01011000:  //E2t_A
          case 0b01011001:  //E2t_A
          case 0b01011010:  //E2t_A
          case 0b01011011:  //E2t_A
          case 0b01011100:  //E2t_A
          case 0b01011101:  //E2t_A
          case 0b01011110:  //E2t_A
          case 0b01011111:  //E2t_A
            E2t_A.drawRaster (src, dst, rh);
            break;
          default:
            E2t.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XE2t);
          }  //switch
        }  //drawRaster
      },  //XE2t

      //================================================================================
      //E2t_XWP ($0000,$09xx,$1403)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラー(0は黒)
      //  中間コード1
      //    (e1p()==0?(epc(tev(e2p()))!=0?epc(tev(e2p())):tpc(0)):e1p()==1?(epc(0)!=0?epc(0):tpc(0)):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):tpc(0)):epc(tev(e1p())))
      //  中間コード2
      //    e1p()==0?epc(tev(e2p()))!=0?epc(tev(e2p())):tpc(0):e1p()==1?epc(0)!=0?epc(0):tpc(0):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):tpc(0):epc(tev(e1p()))
      //  中間コード3
      //    (v0=e1p())==0?(v1=epc(tev(e2p())))!=0?v1:tpc(0):v0==1?(v5=epc(0))!=0?v5:tpc(0):ls1(v0)==0?(v8=epc(v0))!=0?v8:tpc(0):epc(tev(v0))
      //  中間コード4
      //    (p=e1p())==0?(p=epc(tev(e2p())))!=0?p:tpc(0):p==1?(p=epc(0))!=0?p:tpc(0):ls1(p)==0?(q=epc(p))!=0?q:tpc(0):epc(tev(p))
      //  中間コード5
      //    (p=e1p())==0?(p=epc(e2p()&-2))!=0?p:tpc(0):p==1?(p=epc(0))!=0?p:tpc(0):(p&1)==0?(q=epc(p))!=0?q:tpc(0):epc(p&-2)
      //  中間コード6
      //    (p=e1p())==0?(p=epc(e2p()&-2))!=0?cto(p):tpo(0):p==1?(p=epc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=epc(p))!=0?cto(q):tpo(0):epo(p&-2)
      E2t_XWP {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              gx1st += 8;
              gx2nd += 8;
              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] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPal32G8[p & -2]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t_XWP

      //================================================================================
      //E2t_XHCT ($0000,$09xx,$1903)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のカラーと
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のカラーと
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),tpc(0)):(epc(e1p())!=0?epc(e1p()):tpc(0))):(ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),tpc(0)):(epc(e2p())!=0?epc(e2p()):tpc(0))))
      //  中間コード2
      //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),tpc(0)):epc(e1p())!=0?epc(e1p()):tpc(0):ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),tpc(0)):epc(e2p())!=0?epc(e2p()):tpc(0)
      //  中間コード3
      //    (v0=e1p())!=0?ls1(epc(tev(v0)))!=0?mix(epc(v0),tpc(0)):(v7=epc(v0))!=0?v7:tpc(0):ls1(epc(tev(v12=e2p())))!=0?mix(epc(v12),tpc(0)):(v16=epc(v12))!=0?v16:tpc(0)
      //  中間コード4
      //    (p=e1p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0):ls1(epc(tev(p=e2p())))!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0)
      //  中間コード5
      //    (p=e1p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0):(epc((p=e2p())&-2)&1)!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0)
      //  中間コード6
      //    (p=e1p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),tpc(0))):(q=epc(p))!=0?cto(q):tpo(0):(epc((p=e2p())&-2)&1)!=0?cto(mix(epc(p),tpc(0))):(q=epc(p))!=0?cto(q):tpo(0)
      E2t_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              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],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t_XHCT

      //================================================================================
      //E2t_XHCG ($0000,$09xx,$1A03)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のパレットが奇数のとき
      //          2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0でないとき
      //            2番目(ONとみなす)のパレットを奇数化したパレットのカラー
      //          さもなくば(2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //        さもなくば(1番目のパレットが偶数のとき)
      //          1番目のカラーが0でないとき
      //            1番目のカラー
      //          さもなくば(1番目のカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(ls1(e1p())!=0?(epc(tod(e2q()))!=0?epc(tod(e2q())):tpc(0)):(epc(e1p())!=0?epc(e1p()):tpc(0)))):(ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):(epc(e2p())!=0?epc(e2p()):tpc(0))))
      //  中間コード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())):tpc(0):epc(e1p())!=0?epc(e1p()):tpc(0):ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p())!=0?epc(e2p()):tpc(0)
      //  中間コード3
      //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(v2,epc(tod(e2q()))):ls1(v0)!=0?(v9=epc(tod(e2q())))!=0?v9:tpc(0):(v13=epc(v0))!=0?v13:tpc(0):ls1(v16=epc(tev(v18=e2p())))!=0?mix(v16,epc(tod(e2q()))):(v23=epc(v18))!=0?v23:tpc(0)
      //  中間コード4
      //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(tod(e2q()))):ls1(p)!=0?(p=epc(tod(e2q())))!=0?p:tpc(0):(q=epc(p))!=0?q:tpc(0):ls1(p=epc(tev(q=e2p())))!=0?mix(p,epc(tod(e2q()))):(p=epc(q))!=0?p:tpc(0)
      //  中間コード5
      //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(e2q()|1)):(p&1)!=0?(p=epc(e2q()|1))!=0?p:tpc(0):(q=epc(p))!=0?q:tpc(0):((p=epc((q=e2p())&-2))&1)!=0?mix(p,epc(e2q()|1)):(p=epc(q))!=0?p:tpc(0)
      //  中間コード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):tpo(0):(q=epc(p))!=0?cto(q):tpo(0):((p=epc((q=e2p())&-2))&1)!=0?cto(mix(p,epc(e2q()|1))):(p=epc(q))!=0?cto(p):tpo(0)
      E2t_XHCG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                ((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] :
                                VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[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] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                ((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] :
                                VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((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] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t_XHCG

      //================================================================================
      //E2t_XHCGT ($0000,$09xx,$1B03)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のパレットが奇数のとき
      //          2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0でないとき
      //            2番目(ONとみなす)のパレットを奇数化したパレットのカラー
      //          さもなくば(2番目(ONとみなす)のパレットを奇数化したパレットのカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //        さもなくば(1番目のパレットが偶数のとき)
      //          1番目のカラーが0でないとき
      //            1番目のカラー
      //          さもなくば(1番目のカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),tpc(0)):(ls1(e1p())!=0?(epc(tod(e2q()))!=0?epc(tod(e2q())):tpc(0)):(epc(e1p())!=0?epc(e1p()):tpc(0)))):(ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),tpc(0)):(epc(e2p())!=0?epc(e2p()):tpc(0))))
      //  中間コード2
      //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),tpc(0)):ls1(e1p())!=0?epc(tod(e2q()))!=0?epc(tod(e2q())):tpc(0):epc(e1p())!=0?epc(e1p()):tpc(0):ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),tpc(0)):epc(e2p())!=0?epc(e2p()):tpc(0)
      //  中間コード3
      //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(mix(v2,epc(tod(e2q()))),tpc(0)):ls1(v0)!=0?(v11=epc(tod(e2q())))!=0?v11:tpc(0):(v15=epc(v0))!=0?v15:tpc(0):ls1(v18=epc(tev(v20=e2p())))!=0?mix(mix(v18,epc(tod(e2q()))),tpc(0)):(v27=epc(v20))!=0?v27:tpc(0)
      //  中間コード4
      //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(tod(e2q()))),tpc(0)):ls1(p)!=0?(p=epc(tod(e2q())))!=0?p:tpc(0):(q=epc(p))!=0?q:tpc(0):ls1(p=epc(tev(q=e2p())))!=0?mix(mix(p,epc(tod(e2q()))),tpc(0)):(p=epc(q))!=0?p:tpc(0)
      //  中間コード5
      //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(e2q()|1)),tpc(0)):(p&1)!=0?(p=epc(e2q()|1))!=0?p:tpc(0):(q=epc(p))!=0?q:tpc(0):((p=epc((q=e2p())&-2))&1)!=0?mix(mix(p,epc(e2q()|1)),tpc(0)):(p=epc(q))!=0?p:tpc(0)
      //  中間コード6
      //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(e2q()|1)),tpc(0))):(p&1)!=0?(p=epc(e2q()|1))!=0?cto(p):tpo(0):(q=epc(p))!=0?cto(q):tpo(0):((p=epc((q=e2p())&-2))&1)!=0?cto(mix(mix(p,epc(e2q()|1)),tpc(0))):(p=epc(q))!=0?cto(p):tpo(0)
      E2t_XHCGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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]),
                                    VideoController.vcnPal16TS[0])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    VideoController.vcnPal16TS[0])] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[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]),
                                    VideoController.vcnPal16TS[0])] :
                                (p & 1) != 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd & 511]) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      p,
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd & 511] | 1]),
                                    VideoController.vcnPal16TS[0])] :
                                (p = VideoController.vcnPal16G8[q]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 1 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 2 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 3 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 4 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 5 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 6 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              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]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p & 1) != 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    ((p = VideoController.vcnPal16G8[(q = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          p,
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gz2nd | gx2nd + 7 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])] :
                                    (p = VideoController.vcnPal16G8[q]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t_XHCGT

      //================================================================================
      //E2t_XHPT ($0000,$09xx,$1D03)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (e1p()==0?(epc(tev(e2p()))!=0?epc(tev(e2p())):tpc(0)):e1p()==1?(epc(0)!=0?epc(0):tpc(0)):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):tpc(0)):mix(epc(tev(e1p())),tpc(0)))
      //  中間コード2
      //    e1p()==0?epc(tev(e2p()))!=0?epc(tev(e2p())):tpc(0):e1p()==1?epc(0)!=0?epc(0):tpc(0):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):tpc(0):mix(epc(tev(e1p())),tpc(0))
      //  中間コード3
      //    (v0=e1p())==0?(v1=epc(tev(e2p())))!=0?v1:tpc(0):v0==1?(v5=epc(0))!=0?v5:tpc(0):ls1(v0)==0?(v8=epc(v0))!=0?v8:tpc(0):mix(epc(tev(v0)),tpc(0))
      //  中間コード4
      //    (p=e1p())==0?(p=epc(tev(e2p())))!=0?p:tpc(0):p==1?(p=epc(0))!=0?p:tpc(0):ls1(p)==0?(q=epc(p))!=0?q:tpc(0):mix(epc(tev(p)),tpc(0))
      //  中間コード5
      //    (p=e1p())==0?(p=epc(e2p()&-2))!=0?p:tpc(0):p==1?(p=epc(0))!=0?p:tpc(0):(p&1)==0?(q=epc(p))!=0?q:tpc(0):mix(epc(p&-2),tpc(0))
      //  中間コード6
      //    (p=e1p())==0?(p=epc(e2p()&-2))!=0?cto(p):tpo(0):p==1?(p=epc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=epc(p))!=0?cto(q):tpo(0):cto(mix(epc(p&-2),tpc(0)))
      E2t_XHPT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              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] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p & -2],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) == 0 ?
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] & -2]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p & -2],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t_XHPT

      //================================================================================
      //E2t_XHPG ($0000,$09xx,$1E03)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0でないとき
      //        1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (e1p()==0?(epc(tev(e2p()))!=0?epc(tev(e2p())):tpc(0)):e1p()==1?(epc(0)!=0?epc(0):tpc(0)):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):tpc(0)):(mix(epc(tev(e1p())),epc(tod(e2p())))!=0?mix(epc(tev(e1p())),epc(tod(e2p()))):tpc(0)))
      //  中間コード2
      //    e1p()==0?epc(tev(e2p()))!=0?epc(tev(e2p())):tpc(0):e1p()==1?epc(0)!=0?epc(0):tpc(0):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):tpc(0):mix(epc(tev(e1p())),epc(tod(e2p())))!=0?mix(epc(tev(e1p())),epc(tod(e2p()))):tpc(0)
      //  中間コード3
      //    (v0=e1p())==0?(v1=epc(tev(e2p())))!=0?v1:tpc(0):v0==1?(v5=epc(0))!=0?v5:tpc(0):ls1(v0)==0?(v8=epc(v0))!=0?v8:tpc(0):(v10=mix(epc(tev(v0)),epc(tod(e2p()))))!=0?v10:tpc(0)
      //  中間コード4
      //    (p=e1p())==0?(p=epc(tev(e2p())))!=0?p:tpc(0):p==1?(p=epc(0))!=0?p:tpc(0):ls1(p)==0?(q=epc(p))!=0?q:tpc(0):(q=mix(epc(tev(p)),epc(tod(e2p()))))!=0?q:tpc(0)
      //  中間コード5
      //    (p=e1p())==0?(p=epc(e2p()&-2))!=0?p:tpc(0):p==1?(p=epc(0))!=0?p:tpc(0):(p&1)==0?(q=epc(p))!=0?q:tpc(0):(q=mix(epc(p&-2),epc(e2p()|1)))!=0?q:tpc(0)
      //  中間コード6
      //    (p=e1p())==0?(p=epc(e2p()&-2))!=0?cto(p):tpo(0):p==1?(p=epc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=epc(p))!=0?cto(q):tpo(0):(q=mix(epc(p&-2),epc(e2p()|1)))!=0?cto(q):tpo(0)
      E2t_XHPG {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511] | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) == 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511] & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (q = VideoController.vcnMix2 (
                                   VideoController.vcnPal16G8[p & -2],
                                   VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511] | 1])) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (q = VideoController.vcnMix2 (
                                       VideoController.vcnPal16G8[p & -2],
                                       VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] | 1])) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t_XHPG

      //================================================================================
      //E2t_XHPGT ($0000,$09xx,$1F03)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0のとき
      //      2番目のパレットを偶数化したパレットのカラーが0でないとき
      //        2番目のパレットを偶数化したパレットのカラー
      //      さもなくば(2番目のパレットを偶数化したパレットのカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが1のとき
      //      グラフィックパレット0のカラーが0でないとき
      //        グラフィックパレット0のカラー
      //      さもなくば(グラフィックパレット0のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    1番目のパレットが2以上の偶数のとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが3以上の奇数のとき)
      //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらに
      //        テキストパレット0のカラー(0は黒)
      //      を混ぜたカラー(0は黒)
      //  中間コード1
      //    (e1p()==0?(epc(tev(e2p()))!=0?epc(tev(e2p())):tpc(0)):e1p()==1?(epc(0)!=0?epc(0):tpc(0)):ls1(e1p())==0?(epc(e1p())!=0?epc(e1p()):tpc(0)):mix(mix(epc(tev(e1p())),epc(tod(e2p()))),tpc(0)))
      //  中間コード2
      //    e1p()==0?epc(tev(e2p()))!=0?epc(tev(e2p())):tpc(0):e1p()==1?epc(0)!=0?epc(0):tpc(0):ls1(e1p())==0?epc(e1p())!=0?epc(e1p()):tpc(0):mix(mix(epc(tev(e1p())),epc(tod(e2p()))),tpc(0))
      //  中間コード3
      //    (v0=e1p())==0?(v1=epc(tev(e2p())))!=0?v1:tpc(0):v0==1?(v5=epc(0))!=0?v5:tpc(0):ls1(v0)==0?(v8=epc(v0))!=0?v8:tpc(0):mix(mix(epc(tev(v0)),epc(tod(e2p()))),tpc(0))
      //  中間コード4
      //    (p=e1p())==0?(p=epc(tev(e2p())))!=0?p:tpc(0):p==1?(p=epc(0))!=0?p:tpc(0):ls1(p)==0?(q=epc(p))!=0?q:tpc(0):mix(mix(epc(tev(p)),epc(tod(e2p()))),tpc(0))
      //  中間コード5
      //    (p=e1p())==0?(p=epc(e2p()&-2))!=0?p:tpc(0):p==1?(p=epc(0))!=0?p:tpc(0):(p&1)==0?(q=epc(p))!=0?q:tpc(0):mix(mix(epc(p&-2),epc(e2p()|1)),tpc(0))
      //  中間コード6
      //    (p=e1p())==0?(p=epc(e2p()&-2))!=0?cto(p):tpo(0):p==1?(p=epc(0))!=0?cto(p):tpo(0):(p&1)==0?(q=epc(p))!=0?cto(q):tpo(0):cto(mix(mix(epc(p&-2),epc(e2p()|1)),tpc(0)))
      E2t_XHPGT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            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] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511] | 1]),
                                    VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = GraphicScreen.graM4[gy1st | gx1st & 511]) == 0 ?
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511] & -2]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                p == 1 ?
                                (p = VideoController.vcnPal16G8[0]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0] :
                                (p & 1) == 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnMix2 (
                                      VideoController.vcnPal16G8[p & -2],
                                      VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511] | 1]),
                                    VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              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] :
                                    VideoController.vcnPal32TS[0] :
                                    p == 1 ?
                                    (p = VideoController.vcnPal16G8[0]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0] :
                                    (p & 1) == 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnMix2 (
                                          VideoController.vcnPal16G8[p & -2],
                                          VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] | 1]),
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t_XHPGT

      //================================================================================
      //E2t_A ($0000,$09xx,$4003)
      //  概要
      //    E2t  512ドット16色2プレーン＞テキスト(OFF)
      //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?mix(epc(e1p()),tpc(0)):mix(epc(e2p()),tpc(0)))
      //  中間コード2
      //    e1p()!=0?mix(epc(e1p()),tpc(0)):mix(epc(e2p()),tpc(0))
      //  中間コード3
      //    (v0=e1p())!=0?mix(epc(v0),tpc(0)):mix(epc(e2p()),tpc(0))
      //  中間コード4
      //    (p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0))
      //  中間コード5
      //    (p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0))
      //  中間コード6
      //    cto((p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0)))
      E2t_A {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          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;
            gx1st += half;
            gx2nd += half;
            tc = tc + (half >> 3) & CRTC.crtMask511;
            da += half;
          }
          if (ts == 0) {  //テキスト桁境界に合っているとき
            while (da < db) {
              int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
                        VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
                        VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
                        VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p;
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  (p = GraphicScreen.graM4[gy1st | gx1st & 511]) != 0 ?
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0]) :
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511]],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p;
              XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
                                  (p = GraphicScreen.graM4[gy1st | gx1st & 511]) != 0 ?
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0]) :
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd & 511]],
                                    VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
                                      (p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0]) :
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]],
                                        VideoController.vcnPal16TS[0])]);
              gx1st += 8;
              gx2nd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E2t_A

      //================================================================================
      //E3t ($0000,$09xx,$0007)
      //  概要
      //    E3t  512ドット16色3プレーン＞テキスト(OFF)
      //    拡張なし
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のカラーが0でないとき
      //        1番目のカラー
      //      さもなくば(1番目のカラーが0のとき)
      //        テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットが0でないとき
      //        2番目のカラーが0でないとき
      //          2番目のカラー
      //        さもなくば(2番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //      さもなくば(2番目のパレットが0のとき)
      //        3番目のカラーが0でないとき
      //          3番目のカラー
      //        さもなくば(3番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(epc(e1p())!=0?epc(e1p()):tpc(0)):(e2p()!=0?(epc(e2p())!=0?epc(e2p()):tpc(0)):(epc(e3p())!=0?epc(e3p()):tpc(0))))
      //  中間コード2
      //    e1p()!=0?epc(e1p())!=0?epc(e1p()):tpc(0):e2p()!=0?epc(e2p())!=0?epc(e2p()):tpc(0):epc(e3p())!=0?epc(e3p()):tpc(0)
      //  中間コード3
      //    (v0=e1p())!=0?(v1=epc(v0))!=0?v1:tpc(0):(v3=e2p())!=0?(v4=epc(v3))!=0?v4:tpc(0):(v6=epc(e3p()))!=0?v6:tpc(0)
      //  中間コード4
      //    (p=e1p())!=0?(q=epc(p))!=0?q:tpc(0):(p=e2p())!=0?(q=epc(p))!=0?q:tpc(0):(p=epc(e3p()))!=0?p:tpc(0)
      //  中間コード5
      //    (p=e1p())!=0?(q=epc(p))!=0?q:tpc(0):(p=e2p())!=0?(q=epc(p))!=0?q:tpc(0):(p=epc(e3p()))!=0?p:tpc(0)
      //  中間コード6
      //    (p=e1p())!=0?(q=epc(p))!=0?cto(q):tpo(0):(p=e2p())!=0?(q=epc(p))!=0?cto(q):tpo(0):(p=epc(e3p()))!=0?cto(p):tpo(0)
      E3t {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            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] :
                                VideoController.vcnPal32TS[0] :
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd & 511]]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 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] :
                                VideoController.vcnPal32TS[0] :
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) != 0 ?
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd & 511]]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 6 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 7] = ((p = GraphicScreen.graM4[gy1st | gx1st + 7 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511]) != 0 ?
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = VideoController.vcnPal16G8[GraphicScreen.graM4[gy3rd | gx3rd + 7 & 511]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    VideoController.vcnPal32TS[0]);
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //E3t

      //================================================================================
      //XE3t
      //  概要
      //    E3t  512ドット16色3プレーン＞テキスト(OFF)
      //    拡張あり
      XE3t {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
            //   .A.XHPGT
          case 0b00010000:  //E3t_XWC
          case 0b00010001:  //E3t_XWC
          case 0b00010010:  //E3t_XWC
          case 0b00010011:  //E3t_XWC
            E3t.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00010100:  //E3t_XWP
          case 0b00010101:  //E3t_XWP
          case 0b00010110:  //E3t_XWP
          case 0b00010111:  //E3t_XWP
            E3t_XWP.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011000:  //E3t_XHC
            E3t.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011001:  //E3t_XHCT
            E3t_XHCT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011010:  //E3t_XHCG
            E3t_XHCG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011011:  //E3t_XHCGT
            E3t_XHCGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011101:  //E3t_XHPT
            E3t_XHPT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011110:  //E3t_XHPG
            E3t_XHPG.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b00011111:  //E3t_XHPGT
            E3t_XHPGT.drawRaster (src, dst, rh);
            break;
            //   .A.XHPGT
          case 0b01000000:  //E3t_A
          case 0b01000001:  //E3t_A
          case 0b01000010:  //E3t_A
          case 0b01000011:  //E3t_A
          case 0b01000100:  //E3t_A
          case 0b01000101:  //E3t_A
          case 0b01000110:  //E3t_A
          case 0b01000111:  //E3t_A
          case 0b01001000:  //E3t_A
          case 0b01001001:  //E3t_A
          case 0b01001010:  //E3t_A
          case 0b01001011:  //E3t_A
          case 0b01001100:  //E3t_A
          case 0b01001101:  //E3t_A
          case 0b01001110:  //E3t_A
          case 0b01001111:  //E3t_A
          case 0b01010000:  //E3t_A
          case 0b01010001:  //E3t_A
          case 0b01010010:  //E3t_A
          case 0b01010011:  //E3t_A
          case 0b01010100:  //E3t_A
          case 0b01010101:  //E3t_A
          case 0b01010110:  //E3t_A
          case 0b01010111:  //E3t_A
          case 0b01011000:  //E3t_A
          case 0b01011001:  //E3t_A
          case 0b01011010:  //E3t_A
          case 0b01011011:  //E3t_A
          case 0b01011100:  //E3t_A
          case 0b01011101:  //E3t_A
          case 0b01011110:  //E3t_A
          case 0b01011111:  //E3t_A
            E3t_A.drawRaster (src, dst, rh);
            break;
          default:
            E3t.drawRaster (src, dst, rh);
            VideoController.vcnReportUnimplemented (XE3t);
          }  //switch
        }  //drawRaster
      },  //XE3t

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

      //================================================================================
      //E3t_XHCT ($0000,$09xx,$1907)
      //  概要
      //    E3t  512ドット16色3プレーン＞テキスト(OFF)
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    1番目のパレットが0でないとき
      //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
      //        1番目のカラーと
      //          テキストパレット0のカラー(0は黒)
      //        を混ぜたカラー(0は黒)
      //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //        1番目のカラーが0でないとき
      //          1番目のカラー
      //        さもなくば(1番目のカラーが0のとき)
      //          テキストパレット0のカラー(0は黒)
      //    さもなくば(1番目のパレットが0のとき)
      //      2番目のパレットが0でないとき
      //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
      //          2番目のカラーと
      //            テキストパレット0のカラー(0は黒)
      //          を混ぜたカラー(0は黒)
      //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //          2番目のカラーが0でないとき
      //            2番目のカラー
      //          さもなくば(2番目のカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //      さもなくば(2番目のパレットが0のとき)
      //        3番目のパレットを偶数化したパレットのカラーが奇数のとき
      //          3番目のカラーと
      //            テキストパレット0のカラー(0は黒)
      //          を混ぜたカラー(0は黒)
      //        さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
      //          3番目のカラーが0でないとき
      //            3番目のカラー
      //          さもなくば(3番目のカラーが0のとき)
      //            テキストパレット0のカラー(0は黒)
      //  中間コード1
      //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),tpc(0)):(epc(e1p())!=0?epc(e1p()):tpc(0))):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),tpc(0)):(epc(e2p())!=0?epc(e2p()):tpc(0))):(ls1(epc(tev(e3p())))!=0?mix(epc(e3p()),tpc(0)):(epc(e3p())!=0?epc(e3p()):tpc(0)))))
      //  中間コード2
      //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),tpc(0)):epc(e1p())!=0?epc(e1p()):tpc(0):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),tpc(0)):epc(e2p())!=0?epc(e2p()):tpc(0):ls1(epc(tev(e3p())))!=0?mix(epc(e3p()),tpc(0)):epc(e3p())!=0?epc(e3p()):tpc(0)
      //  中間コード3
      //    (v0=e1p())!=0?ls1(epc(tev(v0)))!=0?mix(epc(v0),tpc(0)):(v7=epc(v0))!=0?v7:tpc(0):(v9=e2p())!=0?ls1(epc(tev(v9)))!=0?mix(epc(v9),tpc(0)):(v16=epc(v9))!=0?v16:tpc(0):ls1(epc(tev(v21=e3p())))!=0?mix(epc(v21),tpc(0)):(v25=epc(v21))!=0?v25:tpc(0)
      //  中間コード4
      //    (p=e1p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0):(p=e2p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0):ls1(epc(tev(p=e3p())))!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0)
      //  中間コード5
      //    (p=e1p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0):(p=e2p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0):(epc((p=e3p())&-2)&1)!=0?mix(epc(p),tpc(0)):(q=epc(p))!=0?q:tpc(0)
      //  中間コード6
      //    (p=e1p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),tpc(0))):(q=epc(p))!=0?cto(q):tpo(0):(p=e2p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),tpc(0))):(q=epc(p))!=0?cto(q):tpo(0):(epc((p=e3p())&-2)&1)!=0?cto(mix(epc(p),tpc(0))):(q=epc(p))!=0?cto(q):tpo(0)
      E3t_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
          int gx3rd = CRTC.crtR12GrXCurr[pn];
          int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
          int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
          int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
          int ta1 = 0x00020000 + ta0;
          int ta2 = 0x00040000 + ta0;
          int ta3 = 0x00060000 + ta0;
          int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
          int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
          int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
          if (rh) {
            int half = XEiJ.pnlScreenWidth >> 4 << 3;
            gx1st += half;
            gx2nd += half;
            gx3rd += half;
            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],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (p = GraphicScreen.graM4[gy2nd | gx2nd & 511]) != 0 ?
                                (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0] :
                                (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy3rd | gx3rd & 511]) & -2] & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    VideoController.vcnPal16G8[p],
                                    VideoController.vcnPal16TS[0])] :
                                (q = VideoController.vcnPal16G8[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 1] = ((p = GraphicScreen.graM4[gy1st | gx1st + 1 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy3rd | gx3rd + 1 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 2] = ((p = GraphicScreen.graM4[gy1st | gx1st + 2 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy3rd | gx3rd + 2 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 3] = ((p = GraphicScreen.graM4[gy1st | gx1st + 3 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy3rd | gx3rd + 3 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 4] = ((p = GraphicScreen.graM4[gy1st | gx1st + 4 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy3rd | gx3rd + 4 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 5] = ((p = GraphicScreen.graM4[gy1st | gx1st + 5 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (VideoController.vcnPal16G8[(p = GraphicScreen.graM4[gy3rd | gx3rd + 5 & 511]) & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0]);
              XEiJ.pnlBM[da + 6] = ((p = GraphicScreen.graM4[gy1st | gx1st + 6 & 511]) != 0 ?
                                    (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        VideoController.vcnPal16G8[p],
                                        VideoController.vcnPal16TS[0])] :
                                    (q = VideoController.vcnPal16G8[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    VideoController.vcnPal32TS[0] :
                                    (p = GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511]) != 0 ?

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