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

                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 6] = ((p = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 7] = ((p = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          } else {  //テキスト桁境界に合っていないとき
            //                                                             ts=1のとき
            int tt = ts + 8;                                             //tt=9
            ts += 16;                                                    //ts=17
            //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
            int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
            int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
            int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
            int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
            tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
            while (da < db) {
              //                                                           ........ ........ .1234567 ________  p0>>tt
              //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
              p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
              p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
              p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
              p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
              int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
                        VideoController.VCN_TXP2[p2 >>> 24] |
                        VideoController.VCN_TXP1[p1 >>> 24] |
                        VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
              tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
              int p, q;
              XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
                                (q = VideoController.vcnPal16TS[p]) != 0 ?
                                VideoController.vcnPalTbl[q] :
                                ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                       GraphicScreen.graM4[gy1st | gx1st & 511])) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1])] :
                                (q & 1) != 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1] :
                                VideoController.vcnPal32G8[q] :
                                (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx]]) != 0 ?
                                VideoController.vcnPalTbl[p] :
                                ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd & 511] << 4 |
                                                                       GraphicScreen.graM4[gy1st | gx1st & 511])) & -2]) & 1) != 0 ?
                                VideoController.vcnPalTbl[
                                  VideoController.vcnMix2 (
                                    p,
                                    VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1])] :
                                (q & 1) != 0 ?
                                VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th & 511] << 4 |
                                                            GraphicScreen.graM4[gz3rd | gx3rd & 511]) | 1] :
                                VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 1]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 1 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 1 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 1 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 1 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 2] = ((p = tp >>> 20 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 2]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 2 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 2 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 2 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 2 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 3] = ((p = tp >>> 16 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 3]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 3 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 3 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 3 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 3 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 4] = ((p = tp >>> 12 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 4]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 4 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 4 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 4 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 4 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 5] = ((p = tp >>> 8 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 5]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 5 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 5 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 5 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 5 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 6] = ((p = tp >>> 4 & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 6]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 6 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 6 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 6 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 6 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              XEiJ.pnlBM[da + 7] = ((p = tp & 15) != 0 ?
                                    (q = VideoController.vcnPal16TS[p]) != 0 ?
                                    VideoController.vcnPalTbl[q] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q] :
                                    (p = VideoController.vcnPal16TS[SpriteScreen.sprBuffer[sx + 7]]) != 0 ?
                                    VideoController.vcnPalTbl[p] :
                                    ((p = VideoController.vcnPal16G8[(q = (GraphicScreen.graM4[gy2nd | gx2nd + 7 & 511] << 4 |
                                                                           GraphicScreen.graM4[gy1st | gx1st + 7 & 511])) & -2]) & 1) != 0 ?
                                    VideoController.vcnPalTbl[
                                      VideoController.vcnMix2 (
                                        p,
                                        VideoController.vcnPal16G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                    GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1])] :
                                    (q & 1) != 0 ?
                                    VideoController.vcnPal32G8[(GraphicScreen.graM4[gz4th | gx4th + 7 & 511] << 4 |
                                                                GraphicScreen.graM4[gz3rd | gx3rd + 7 & 511]) | 1] :
                                    VideoController.vcnPal32G8[q]);
              sx += 8;
              gx1st += 8;
              gx2nd += 8;
              gx3rd += 8;
              gx4th += 8;
              da += 8;
            }  //while da<db
          }  //if ts==0
        }  //drawRaster
      },  //TSF1_XHCG

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      //================================================================================
      //TSG_XHCT ($0003,$12xx,$196F)
      //  概要
      //    TSG  テキスト＞スプライト＞512ドット65536色1プレーン
      //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
      //  手順
      //    テキストパレットが0でないとき
      //      テキストカラーが0でないとき
      //        テキストカラー
      //      さもなくば(テキストカラーが0のとき)
      //        1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //          1番目のカラーとカラー0を混ぜたカラー(0は黒)
      //        さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //          1番目のカラー(0は黒)
      //    さもなくば(テキストパレットが0のとき)
      //      スプライトカラーが0でないとき
      //        スプライトカラー
      //      さもなくば(スプライトカラーが0のとき)
      //        1番目のパレットを奇数化したパレットのカラーが奇数のとき
      //          1番目のカラーとカラー0を混ぜたカラー(0は黒)
      //        さもなくば(1番目のパレットを奇数化したパレットのカラーが偶数のとき)
      //          1番目のカラー(0は黒)
      //  中間コード1
      //    (txp()!=0?(tpc(txp())!=0?tpc(txp()):(ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),0):gpc(g1p(),g1p()))):(spc(spp())!=0?spc(spp()):(ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),0):gpc(g1p(),g1p()))))
      //  中間コード2
      //    txp()!=0?tpc(txp())!=0?tpc(txp()):ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),0):gpc(g1p(),g1p()):spc(spp())!=0?spc(spp()):ls1(gpc(tod(g1p()),tod(g1p())))!=0?mix(gpc(g1p(),g1p()),0):gpc(g1p(),g1p())
      //  中間コード3
      //    (v0=txp())!=0?(v1=tpc(v0))!=0?v1:ls1(gpc(v4=tod(v5=g1p()),v4))!=0?mix(gpc(v5,v5),0):gpc(v5,v5):(v9=spc(spp()))!=0?v9:ls1(gpc(v13=tod(v14=g1p()),v13))!=0?mix(gpc(v14,v14),0):gpc(v14,v14)
      //  中間コード4
      //    (p=txp())!=0?(q=tpc(p))!=0?q:ls1(gpc(p=tod(q=g1p()),p))!=0?mix(gpc(q,q),0):gpc(q,q):(p=spc(spp()))!=0?p:ls1(gpc(p=tod(q=g1p()),p))!=0?mix(gpc(q,q),0):gpc(q,q)
      //  中間コード5
      //    (p=txp())!=0?(q=tpc(p))!=0?q:(gpc(p=(q=g1p())|1,p)&1)!=0?mix(gpc(q,q),0):gpc(q,q):(p=spc(spp()))!=0?p:(gpc(p=(q=g1p())|1,p)&1)!=0?mix(gpc(q,q),0):gpc(q,q)
      //  中間コード6
      //    (p=txp())!=0?(q=tpc(p))!=0?cto(q):(gpc(p=(q=g1p())|1,p)&1)!=0?cto(mix(gpc(q,q),0)):gpo(q,q):(p=spc(spp()))!=0?cto(p):(gpc(p=(q=g1p())|1,p)&1)!=0?cto(mix(gpc(q,q),0)):gpo(q,q)
      TSG_XHCT {
        @Override public void drawRaster (int src, int dst, boolean rh) {
          SpriteScreen.sprStep3 ();
          int sx = 16;  //スプライトx座標
          int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
          int gx1st = CRTC.crtR12GrXCurr[pn];
          int gy1st = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);
          pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
          int gx2nd = CRTC.crtR12GrXCurr[pn];
          int gy2nd = (pn << 18) + ((CRTC.crtR13GrYZero[pn] + src & 511) << 9);

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