DrawingMode.java
     1: //========================================================================================
     2: //  DrawingMode.java
     3: //    en:Drawing mode -- It superimposes a raster of the sprite screen, the text screen and the graphic screen according to the drawing mode.
     4: //    ja:描画モード -- 描画モードに従って1ラスタ分のスプライト画面、テキスト画面およびグラフィック画面を重ね合わせます。
     5: //  Copyright (C) 2003-2023 Makoto Kamada
     6: //
     7: //  This file is part of the XEiJ (X68000 Emulator in Java).
     8: //  You can use, modify and redistribute the XEiJ if the conditions are met.
     9: //  Read the XEiJ License for more details.
    10: //  https://stdkmd.net/xeij/
    11: //========================================================================================
    12: 
    13: package xeij;
    14: 
    15: public enum DrawingMode {
    16: 
    17:   //================================================================================
    18:   //
    19:   //  表示できる画面モード
    20:   //       1. N
    21:   //       2. N_XWC → N
    22:   //       3. N_XWP → N
    23:   //       4. N_XHC → N
    24:   //       5. N_XHCT → N
    25:   //       6. N_XHCG → N
    26:   //       7. N_XHCGT → N
    27:   //       8. N_XHPT → N
    28:   //       9. N_XHPG → N
    29:   //      10. N_XHPGT → N
    30:   //      11. N_A → N
    31:   //      12. S
    32:   //      13. S_XWC → S
    33:   //      14. S_XWP → S
    34:   //      15. S_XHC → S
    35:   //      16. S_XHCT → S
    36:   //      17. S_XHCG → S
    37:   //      18. S_XHCGT → S
    38:   //      19. S_XHPT → S
    39:   //      20. S_XHPG → S
    40:   //      21. S_XHPGT → S
    41:   //      22. S_A → N
    42:   //      23. T
    43:   //      24. T_XWC → T
    44:   //      25. T_XWP → T
    45:   //      26. T_XHC → T
    46:   //      27. T_XHCT → T
    47:   //      28. T_XHCG → T
    48:   //      29. T_XHCGT → T
    49:   //      30. T_XHPT → T
    50:   //      31. T_XHPG → T
    51:   //      32. T_XHPGT → T
    52:   //      33. T_A → N
    53:   //      34. ST
    54:   //      35. ST_XWC → ST
    55:   //      36. ST_XWP → ST
    56:   //      37. ST_XHC → ST
    57:   //      38. ST_XHCT → ST
    58:   //      39. ST_XHCG → ST
    59:   //      40. ST_XHCGT → ST
    60:   //      41. ST_XHPT → ST
    61:   //      42. ST_XHPG → ST
    62:   //      43. ST_XHPGT → ST
    63:   //      44. ST_A → N
    64:   //      45. TS
    65:   //      46. TS_XWC → TS
    66:   //      47. TS_XWP → TS
    67:   //      48. TS_XHC → TS
    68:   //      49. TS_XHCT → TS
    69:   //      50. TS_XHCG → TS
    70:   //      51. TS_XHCGT → TS
    71:   //      52. TS_XHPT → TS
    72:   //      53. TS_XHPG → TS
    73:   //      54. TS_XHPGT → TS
    74:   //      55. TS_A → N
    75:   //      56. E1
    76:   //      57. E1_XWC → E1
    77:   //      58. E1_XWP
    78:   //      59. E1_XHC → E1
    79:   //      60. E1_XHCT
    80:   //      61. E1_XHCG
    81:   //      62. E1_XHCGT
    82:   //      63. E1_XHPT
    83:   //      64. E1_XHPG
    84:   //      65. E1_XHPGT
    85:   //      66. E1_A
    86:   //      67. E2
    87:   //      68. E2_XWC → E2
    88:   //      69. E2_XWP
    89:   //      70. E2_XHC → E2
    90:   //      71. E2_XHCT
    91:   //      72. E2_XHCG
    92:   //      73. E2_XHCGT
    93:   //      74. E2_XHPT
    94:   //      75. E2_XHPG
    95:   //      76. E2_XHPGT
    96:   //      77. E2_A
    97:   //      78. E3
    98:   //      79. E3_XWC → E3
    99:   //      80. E3_XWP
   100:   //      81. E3_XHC → E3
   101:   //      82. E3_XHCT
   102:   //      83. E3_XHCG
   103:   //      84. E3_XHCGT
   104:   //      85. E3_XHPT
   105:   //      86. E3_XHPG
   106:   //      87. E3_XHPGT
   107:   //      88. E3_A
   108:   //      89. E4
   109:   //      90. E4_XWC → E4
   110:   //      91. E4_XWP
   111:   //      92. E4_XHC → E4
   112:   //      93. E4_XHCT
   113:   //      94. E4_XHCG
   114:   //      95. E4_XHCGT
   115:   //      96. E4_XHPT
   116:   //      97. E4_XHPG
   117:   //      98. E4_XHPGT
   118:   //      99. E4_A
   119:   //     100. F1
   120:   //     101. F1_XWC → F1
   121:   //     102. F1_XWP
   122:   //     103. F1_XHC → F1
   123:   //     104. F1_XHCT
   124:   //     105. F1_XHCG
   125:   //     106. F1_XHCGT
   126:   //     107. F1_XHPT
   127:   //     108. F1_XHPG
   128:   //     109. F1_XHPGT
   129:   //     110. F1_A
   130:   //     111. F2
   131:   //     112. F2_XWC → F2
   132:   //     113. F2_XWP
   133:   //     114. F2_XHC → F2
   134:   //     115. F2_XHCT
   135:   //     116. F2_XHCG
   136:   //     117. F2_XHCGT
   137:   //     118. F2_XHPT
   138:   //     119. F2_XHPG
   139:   //     120. F2_XHPGT
   140:   //     121. F2_A
   141:   //     122. G
   142:   //     123. G_XWC → G
   143:   //     124. G_XWP
   144:   //     125. G_XHC → G
   145:   //     126. G_XHCT
   146:   //     127. G_XHPT
   147:   //     128. G_A
   148:   //     129. H
   149:   //     130. H_XWC → H
   150:   //     131. H_XWP
   151:   //     132. H_XHC → H
   152:   //     133. H_XHCT
   153:   //     134. H_XHPT
   154:   //     135. H_A
   155:   //     136. I
   156:   //     137. I_XWC → I
   157:   //     138. I_XWP
   158:   //     139. I_XHC → I
   159:   //     140. I_XHCT
   160:   //     141. I_XHPT
   161:   //     142. I_A
   162:   //     143. J
   163:   //     144. J_XWC → J
   164:   //     145. J_XWP
   165:   //     146. J_XHC → J
   166:   //     147. J_XHCT
   167:   //     148. J_XHPT
   168:   //     149. J_A
   169:   //     150. E1S
   170:   //     151. E1S_XWC
   171:   //     152. E1S_XWP
   172:   //     153. E1S_XHC → E1S
   173:   //     154. E1S_XHCT
   174:   //     155. E1S_XHCG
   175:   //     156. E1S_XHCGT
   176:   //     157. E1S_XHPT
   177:   //     158. E1S_XHPG
   178:   //     159. E1S_XHPGT
   179:   //     160. E1S_A → E1_A
   180:   //     161. E2S
   181:   //     162. E2S_XWC
   182:   //     163. E2S_XWP
   183:   //     164. E2S_XHC → E2S
   184:   //     165. E2S_XHCT
   185:   //     166. E2S_XHCG
   186:   //     167. E2S_XHCGT
   187:   //     168. E2S_XHPT
   188:   //     169. E2S_XHPG
   189:   //     170. E2S_XHPGT
   190:   //     171. E2S_A → E2_A
   191:   //     172. E3S
   192:   //     173. E3S_XWC
   193:   //     174. E3S_XWP
   194:   //     175. E3S_XHC → E3S
   195:   //     176. E3S_XHCT
   196:   //     177. E3S_XHCG
   197:   //     178. E3S_XHCGT
   198:   //     179. E3S_XHPT
   199:   //     180. E3S_XHPG
   200:   //     181. E3S_XHPGT
   201:   //     182. E3S_A → E3_A
   202:   //     183. E4S
   203:   //     184. E4S_XWC
   204:   //     185. E4S_XWP
   205:   //     186. E4S_XHC → E4S
   206:   //     187. E4S_XHCT
   207:   //     188. E4S_XHCG
   208:   //     189. E4S_XHCGT
   209:   //     190. E4S_XHPT
   210:   //     191. E4S_XHPG
   211:   //     192. E4S_XHPGT
   212:   //     193. E4S_A → E4_A
   213:   //     194. F1S
   214:   //     195. F1S_XWC
   215:   //     196. F1S_XWP
   216:   //     197. F1S_XHC → F1S
   217:   //     198. F1S_XHCT
   218:   //     199. F1S_XHCG
   219:   //     200. F1S_XHCGT
   220:   //     201. F1S_XHPT
   221:   //     202. F1S_XHPG
   222:   //     203. F1S_XHPGT
   223:   //     204. F1S_A → F1_A
   224:   //     205. F2S
   225:   //     206. F2S_XWC
   226:   //     207. F2S_XWP
   227:   //     208. F2S_XHC → F2S
   228:   //     209. F2S_XHCT
   229:   //     210. F2S_XHCG
   230:   //     211. F2S_XHCGT
   231:   //     212. F2S_XHPT
   232:   //     213. F2S_XHPG
   233:   //     214. F2S_XHPGT
   234:   //     215. F2S_A → F2_A
   235:   //     216. GS
   236:   //     217. GS_XWC
   237:   //     218. GS_XWP
   238:   //     219. GS_XHC → GS
   239:   //     220. GS_XHCT
   240:   //     221. GS_XHPT
   241:   //     222. GS_A → G_A
   242:   //     223. HS
   243:   //     224. HS_XWC
   244:   //     225. HS_XWP
   245:   //     226. HS_XHC → HS
   246:   //     227. HS_XHCT
   247:   //     228. HS_XHPT
   248:   //     229. HS_A → H_A
   249:   //     230. IS
   250:   //     231. IS_XWC
   251:   //     232. IS_XWP
   252:   //     233. IS_XHC → IS
   253:   //     234. IS_XHCT
   254:   //     235. IS_XHPT
   255:   //     236. IS_A → I_A
   256:   //     237. JS
   257:   //     238. JS_XWC
   258:   //     239. JS_XWP
   259:   //     240. JS_XHC → JS
   260:   //     241. JS_XHCT
   261:   //     242. JS_XHPT
   262:   //     243. JS_A → J_A
   263:   //     244. SE1
   264:   //     245. SE1_XWC
   265:   //     246. SE1_XWP
   266:   //     247. SE1_XHC → SE1
   267:   //     248. SE1_XHCT
   268:   //     249. SE1_XHCG
   269:   //     250. SE1_XHCGT
   270:   //     251. SE1_XHPT
   271:   //     252. SE1_XHPG
   272:   //     253. SE1_XHPGT
   273:   //     254. SE1_A → E1_A
   274:   //     255. SE2
   275:   //     256. SE2_XWC
   276:   //     257. SE2_XWP
   277:   //     258. SE2_XHC → SE2
   278:   //     259. SE2_XHCT
   279:   //     260. SE2_XHCG
   280:   //     261. SE2_XHCGT
   281:   //     262. SE2_XHPT
   282:   //     263. SE2_XHPG
   283:   //     264. SE2_XHPGT
   284:   //     265. SE2_A → E2_A
   285:   //     266. SE3
   286:   //     267. SE3_XWC
   287:   //     268. SE3_XWP
   288:   //     269. SE3_XHC → SE3
   289:   //     270. SE3_XHCT
   290:   //     271. SE3_XHCG
   291:   //     272. SE3_XHCGT
   292:   //     273. SE3_XHPT
   293:   //     274. SE3_XHPG
   294:   //     275. SE3_XHPGT
   295:   //     276. SE3_A → E3_A
   296:   //     277. SE4
   297:   //     278. SE4_XWC
   298:   //     279. SE4_XWP
   299:   //     280. SE4_XHC → SE4
   300:   //     281. SE4_XHCT
   301:   //     282. SE4_XHCG
   302:   //     283. SE4_XHCGT
   303:   //     284. SE4_XHPT
   304:   //     285. SE4_XHPG
   305:   //     286. SE4_XHPGT
   306:   //     287. SE4_A → E4_A
   307:   //     288. SF1
   308:   //     289. SF1_XWC
   309:   //     290. SF1_XWP
   310:   //     291. SF1_XHC → SF1
   311:   //     292. SF1_XHCT
   312:   //     293. SF1_XHCG
   313:   //     294. SF1_XHCGT
   314:   //     295. SF1_XHPT
   315:   //     296. SF1_XHPG
   316:   //     297. SF1_XHPGT
   317:   //     298. SF1_A → F1_A
   318:   //     299. SF2
   319:   //     300. SF2_XWC
   320:   //     301. SF2_XWP
   321:   //     302. SF2_XHC → SF2
   322:   //     303. SF2_XHCT
   323:   //     304. SF2_XHCG
   324:   //     305. SF2_XHCGT
   325:   //     306. SF2_XHPT
   326:   //     307. SF2_XHPG
   327:   //     308. SF2_XHPGT
   328:   //     309. SF2_A → F2_A
   329:   //     310. SG
   330:   //     311. SG_XWC
   331:   //     312. SG_XWP
   332:   //     313. SG_XHC → SG
   333:   //     314. SG_XHCT
   334:   //     315. SG_XHPT
   335:   //     316. SG_A → G_A
   336:   //     317. SH
   337:   //     318. SH_XWC
   338:   //     319. SH_XWP
   339:   //     320. SH_XHC → SH
   340:   //     321. SH_XHCT
   341:   //     322. SH_XHPT
   342:   //     323. SH_A → H_A
   343:   //     324. SI
   344:   //     325. SI_XWC
   345:   //     326. SI_XWP
   346:   //     327. SI_XHC → SI
   347:   //     328. SI_XHCT
   348:   //     329. SI_XHPT
   349:   //     330. SI_A → I_A
   350:   //     331. SJ
   351:   //     332. SJ_XWC
   352:   //     333. SJ_XWP
   353:   //     334. SJ_XHC → SJ
   354:   //     335. SJ_XHCT
   355:   //     336. SJ_XHPT
   356:   //     337. SJ_A → J_A
   357:   //     338. E1T
   358:   //     339. E1T_XWC
   359:   //     340. E1T_XWP
   360:   //     341. E1T_XHC → E1T
   361:   //     342. E1T_XHCT
   362:   //     343. E1T_XHCG
   363:   //     344. E1T_XHCGT
   364:   //     345. E1T_XHPT
   365:   //     346. E1T_XHPG
   366:   //     347. E1T_XHPGT
   367:   //     348. E1T_A → E1_A
   368:   //     349. E2T
   369:   //     350. E2T_XWC
   370:   //     351. E2T_XWP
   371:   //     352. E2T_XHC → E2T
   372:   //     353. E2T_XHCT
   373:   //     354. E2T_XHCG
   374:   //     355. E2T_XHCGT
   375:   //     356. E2T_XHPT
   376:   //     357. E2T_XHPG
   377:   //     358. E2T_XHPGT
   378:   //     359. E2T_A → E2_A
   379:   //     360. E3T
   380:   //     361. E3T_XWC
   381:   //     362. E3T_XWP
   382:   //     363. E3T_XHC → E3T
   383:   //     364. E3T_XHCT
   384:   //     365. E3T_XHCG
   385:   //     366. E3T_XHCGT
   386:   //     367. E3T_XHPT
   387:   //     368. E3T_XHPG
   388:   //     369. E3T_XHPGT
   389:   //     370. E3T_A → E3_A
   390:   //     371. E4T
   391:   //     372. E4T_XWC
   392:   //     373. E4T_XWP
   393:   //     374. E4T_XHC → E4T
   394:   //     375. E4T_XHCT
   395:   //     376. E4T_XHCG
   396:   //     377. E4T_XHCGT
   397:   //     378. E4T_XHPT
   398:   //     379. E4T_XHPG
   399:   //     380. E4T_XHPGT
   400:   //     381. E4T_A → E4_A
   401:   //     382. F1T
   402:   //     383. F1T_XWC
   403:   //     384. F1T_XWP
   404:   //     385. F1T_XHC → F1T
   405:   //     386. F1T_XHCT
   406:   //     387. F1T_XHCG
   407:   //     388. F1T_XHCGT
   408:   //     389. F1T_XHPT
   409:   //     390. F1T_XHPG
   410:   //     391. F1T_XHPGT
   411:   //     392. F1T_A → F1_A
   412:   //     393. F2T
   413:   //     394. F2T_XWC
   414:   //     395. F2T_XWP
   415:   //     396. F2T_XHC → F2T
   416:   //     397. F2T_XHCT
   417:   //     398. F2T_XHCG
   418:   //     399. F2T_XHCGT
   419:   //     400. F2T_XHPT
   420:   //     401. F2T_XHPG
   421:   //     402. F2T_XHPGT
   422:   //     403. F2T_A → F2_A
   423:   //     404. GT
   424:   //     405. GT_XWC
   425:   //     406. GT_XWP
   426:   //     407. GT_XHC → GT
   427:   //     408. GT_XHCT
   428:   //     409. GT_XHPT
   429:   //     410. GT_A → G_A
   430:   //     411. HT
   431:   //     412. HT_XWC
   432:   //     413. HT_XWP
   433:   //     414. HT_XHC → HT
   434:   //     415. HT_XHCT
   435:   //     416. HT_XHPT
   436:   //     417. HT_A → H_A
   437:   //     418. IT
   438:   //     419. IT_XWC
   439:   //     420. IT_XWP
   440:   //     421. IT_XHC → IT
   441:   //     422. IT_XHCT
   442:   //     423. IT_XHPT
   443:   //     424. IT_A → I_A
   444:   //     425. JT
   445:   //     426. JT_XWC
   446:   //     427. JT_XWP
   447:   //     428. JT_XHC → JT
   448:   //     429. JT_XHCT
   449:   //     430. JT_XHPT
   450:   //     431. JT_A → J_A
   451:   //     432. E1t
   452:   //     433. E1t_XWC → E1t
   453:   //     434. E1t_XWP
   454:   //     435. E1t_XHC → E1t
   455:   //     436. E1t_XHCT
   456:   //     437. E1t_XHCG
   457:   //     438. E1t_XHCGT
   458:   //     439. E1t_XHPT
   459:   //     440. E1t_XHPG
   460:   //     441. E1t_XHPGT
   461:   //     442. E1t_A
   462:   //     443. E2t
   463:   //     444. E2t_XWC → E2t
   464:   //     445. E2t_XWP
   465:   //     446. E2t_XHC → E2t
   466:   //     447. E2t_XHCT
   467:   //     448. E2t_XHCG
   468:   //     449. E2t_XHCGT
   469:   //     450. E2t_XHPT
   470:   //     451. E2t_XHPG
   471:   //     452. E2t_XHPGT
   472:   //     453. E2t_A
   473:   //     454. E3t
   474:   //     455. E3t_XWC → E3t
   475:   //     456. E3t_XWP
   476:   //     457. E3t_XHC → E3t
   477:   //     458. E3t_XHCT
   478:   //     459. E3t_XHCG
   479:   //     460. E3t_XHCGT
   480:   //     461. E3t_XHPT
   481:   //     462. E3t_XHPG
   482:   //     463. E3t_XHPGT
   483:   //     464. E3t_A
   484:   //     465. E4t
   485:   //     466. E4t_XWC → E4t
   486:   //     467. E4t_XWP
   487:   //     468. E4t_XHC → E4t
   488:   //     469. E4t_XHCT
   489:   //     470. E4t_XHCG
   490:   //     471. E4t_XHCGT
   491:   //     472. E4t_XHPT
   492:   //     473. E4t_XHPG
   493:   //     474. E4t_XHPGT
   494:   //     475. E4t_A
   495:   //     476. F1t
   496:   //     477. F1t_XWC → F1t
   497:   //     478. F1t_XWP
   498:   //     479. F1t_XHC → F1t
   499:   //     480. F1t_XHCT
   500:   //     481. F1t_XHCG
   501:   //     482. F1t_XHCGT
   502:   //     483. F1t_XHPT
   503:   //     484. F1t_XHPG
   504:   //     485. F1t_XHPGT
   505:   //     486. F1t_A
   506:   //     487. F2t
   507:   //     488. F2t_XWC → F2t
   508:   //     489. F2t_XWP
   509:   //     490. F2t_XHC → F2t
   510:   //     491. F2t_XHCT
   511:   //     492. F2t_XHCG
   512:   //     493. F2t_XHCGT
   513:   //     494. F2t_XHPT
   514:   //     495. F2t_XHPG
   515:   //     496. F2t_XHPGT
   516:   //     497. F2t_A
   517:   //     498. Gt
   518:   //     499. Gt_XWC → Gt
   519:   //     500. Gt_XWP
   520:   //     501. Gt_XHC → Gt
   521:   //     502. Gt_XHCT
   522:   //     503. Gt_XHPT
   523:   //     504. Gt_A
   524:   //     505. Ht
   525:   //     506. Ht_XWC → Ht
   526:   //     507. Ht_XWP
   527:   //     508. Ht_XHC → Ht
   528:   //     509. Ht_XHCT
   529:   //     510. Ht_XHPT
   530:   //     511. Ht_A
   531:   //     512. It
   532:   //     513. It_XWC → It
   533:   //     514. It_XWP
   534:   //     515. It_XHC → It
   535:   //     516. It_XHCT
   536:   //     517. It_XHPT
   537:   //     518. It_A
   538:   //     519. Jt
   539:   //     520. Jt_XWC → Jt
   540:   //     521. Jt_XWP
   541:   //     522. Jt_XHC → Jt
   542:   //     523. Jt_XHCT
   543:   //     524. Jt_XHPT
   544:   //     525. Jt_A
   545:   //     526. TE1
   546:   //     527. TE1_XWC
   547:   //     528. TE1_XWP
   548:   //     529. TE1_XHC → TE1
   549:   //     530. TE1_XHCT
   550:   //     531. TE1_XHCG
   551:   //     532. TE1_XHCGT
   552:   //     533. TE1_XHPT
   553:   //     534. TE1_XHPG
   554:   //     535. TE1_XHPGT
   555:   //     536. TE1_A → E1_A
   556:   //     537. TE2
   557:   //     538. TE2_XWC
   558:   //     539. TE2_XWP
   559:   //     540. TE2_XHC → TE2
   560:   //     541. TE2_XHCT
   561:   //     542. TE2_XHCG
   562:   //     543. TE2_XHCGT
   563:   //     544. TE2_XHPT
   564:   //     545. TE2_XHPG
   565:   //     546. TE2_XHPGT
   566:   //     547. TE2_A → E2_A
   567:   //     548. TE3
   568:   //     549. TE3_XWC
   569:   //     550. TE3_XWP
   570:   //     551. TE3_XHC → TE3
   571:   //     552. TE3_XHCT
   572:   //     553. TE3_XHCG
   573:   //     554. TE3_XHCGT
   574:   //     555. TE3_XHPT
   575:   //     556. TE3_XHPG
   576:   //     557. TE3_XHPGT
   577:   //     558. TE3_A → E3_A
   578:   //     559. TE4
   579:   //     560. TE4_XWC
   580:   //     561. TE4_XWP
   581:   //     562. TE4_XHC → TE4
   582:   //     563. TE4_XHCT
   583:   //     564. TE4_XHCG
   584:   //     565. TE4_XHCGT
   585:   //     566. TE4_XHPT
   586:   //     567. TE4_XHPG
   587:   //     568. TE4_XHPGT
   588:   //     569. TE4_A → E4_A
   589:   //     570. TF1
   590:   //     571. TF1_XWC
   591:   //     572. TF1_XWP
   592:   //     573. TF1_XHC → TF1
   593:   //     574. TF1_XHCT
   594:   //     575. TF1_XHCG
   595:   //     576. TF1_XHCGT
   596:   //     577. TF1_XHPT
   597:   //     578. TF1_XHPG
   598:   //     579. TF1_XHPGT
   599:   //     580. TF1_A → F1_A
   600:   //     581. TF2
   601:   //     582. TF2_XWC
   602:   //     583. TF2_XWP
   603:   //     584. TF2_XHC → TF2
   604:   //     585. TF2_XHCT
   605:   //     586. TF2_XHCG
   606:   //     587. TF2_XHCGT
   607:   //     588. TF2_XHPT
   608:   //     589. TF2_XHPG
   609:   //     590. TF2_XHPGT
   610:   //     591. TF2_A → F2_A
   611:   //     592. TG
   612:   //     593. TG_XWC
   613:   //     594. TG_XWP
   614:   //     595. TG_XHC → TG
   615:   //     596. TG_XHCT
   616:   //     597. TG_XHPT
   617:   //     598. TG_A → G_A
   618:   //     599. TH
   619:   //     600. TH_XWC
   620:   //     601. TH_XWP
   621:   //     602. TH_XHC → TH
   622:   //     603. TH_XHCT
   623:   //     604. TH_XHPT
   624:   //     605. TH_A → H_A
   625:   //     606. TI
   626:   //     607. TI_XWC
   627:   //     608. TI_XWP
   628:   //     609. TI_XHC → TI
   629:   //     610. TI_XHCT
   630:   //     611. TI_XHPT
   631:   //     612. TI_A → I_A
   632:   //     613. TJ
   633:   //     614. TJ_XWC
   634:   //     615. TJ_XWP
   635:   //     616. TJ_XHC → TJ
   636:   //     617. TJ_XHCT
   637:   //     618. TJ_XHPT
   638:   //     619. TJ_A → J_A
   639:   //     620. E1ST
   640:   //     621. E1ST_XWC
   641:   //     622. E1ST_XWP
   642:   //     623. E1ST_XHC → E1ST
   643:   //     624. E1ST_XHCT
   644:   //     625. E1ST_XHCG
   645:   //     626. E1ST_XHCGT
   646:   //     627. E1ST_XHPT
   647:   //     628. E1ST_XHPG
   648:   //     629. E1ST_XHPGT
   649:   //     630. E1ST_A → E1_A
   650:   //     631. E2ST
   651:   //     632. E2ST_XWC
   652:   //     633. E2ST_XWP
   653:   //     634. E2ST_XHC → E2ST
   654:   //     635. E2ST_XHCT
   655:   //     636. E2ST_XHCG
   656:   //     637. E2ST_XHCGT
   657:   //     638. E2ST_XHPT
   658:   //     639. E2ST_XHPG
   659:   //     640. E2ST_XHPGT
   660:   //     641. E2ST_A → E2_A
   661:   //     642. E3ST
   662:   //     643. E3ST_XWC
   663:   //     644. E3ST_XWP
   664:   //     645. E3ST_XHC → E3ST
   665:   //     646. E3ST_XHCT
   666:   //     647. E3ST_XHCG
   667:   //     648. E3ST_XHCGT
   668:   //     649. E3ST_XHPT
   669:   //     650. E3ST_XHPG
   670:   //     651. E3ST_XHPGT
   671:   //     652. E3ST_A → E3_A
   672:   //     653. E4ST
   673:   //     654. E4ST_XWC
   674:   //     655. E4ST_XWP
   675:   //     656. E4ST_XHC → E4ST
   676:   //     657. E4ST_XHCT
   677:   //     658. E4ST_XHCG
   678:   //     659. E4ST_XHCGT
   679:   //     660. E4ST_XHPT
   680:   //     661. E4ST_XHPG
   681:   //     662. E4ST_XHPGT
   682:   //     663. E4ST_A → E4_A
   683:   //     664. F1ST
   684:   //     665. F1ST_XWC
   685:   //     666. F1ST_XWP
   686:   //     667. F1ST_XHC → F1ST
   687:   //     668. F1ST_XHCT
   688:   //     669. F1ST_XHCG
   689:   //     670. F1ST_XHCGT
   690:   //     671. F1ST_XHPT
   691:   //     672. F1ST_XHPG
   692:   //     673. F1ST_XHPGT
   693:   //     674. F1ST_A → F1_A
   694:   //     675. F2ST
   695:   //     676. F2ST_XWC
   696:   //     677. F2ST_XWP
   697:   //     678. F2ST_XHC → F2ST
   698:   //     679. F2ST_XHCT
   699:   //     680. F2ST_XHCG
   700:   //     681. F2ST_XHCGT
   701:   //     682. F2ST_XHPT
   702:   //     683. F2ST_XHPG
   703:   //     684. F2ST_XHPGT
   704:   //     685. F2ST_A → F2_A
   705:   //     686. GST
   706:   //     687. GST_XWC
   707:   //     688. GST_XWP
   708:   //     689. GST_XHC → GST
   709:   //     690. GST_XHCT
   710:   //     691. GST_XHPT
   711:   //     692. GST_A → G_A
   712:   //     693. HST
   713:   //     694. HST_XWC
   714:   //     695. HST_XWP
   715:   //     696. HST_XHC → HST
   716:   //     697. HST_XHCT
   717:   //     698. HST_XHPT
   718:   //     699. HST_A → H_A
   719:   //     700. IST
   720:   //     701. IST_XWC
   721:   //     702. IST_XWP
   722:   //     703. IST_XHC → IST
   723:   //     704. IST_XHCT
   724:   //     705. IST_XHPT
   725:   //     706. IST_A → I_A
   726:   //     707. JST
   727:   //     708. JST_XWC
   728:   //     709. JST_XWP
   729:   //     710. JST_XHC → JST
   730:   //     711. JST_XHCT
   731:   //     712. JST_XHPT
   732:   //     713. JST_A → J_A
   733:   //     714. SE1T
   734:   //     715. SE1T_XWC
   735:   //     716. SE1T_XWP
   736:   //     717. SE1T_XHC → SE1T
   737:   //     718. SE1T_XHCT
   738:   //     719. SE1T_XHCG
   739:   //     720. SE1T_XHCGT
   740:   //     721. SE1T_XHPT
   741:   //     722. SE1T_XHPG
   742:   //     723. SE1T_XHPGT
   743:   //     724. SE1T_A → E1_A
   744:   //     725. SE2T
   745:   //     726. SE2T_XWC
   746:   //     727. SE2T_XWP
   747:   //     728. SE2T_XHC → SE2T
   748:   //     729. SE2T_XHCT
   749:   //     730. SE2T_XHCG
   750:   //     731. SE2T_XHCGT
   751:   //     732. SE2T_XHPT
   752:   //     733. SE2T_XHPG
   753:   //     734. SE2T_XHPGT
   754:   //     735. SE2T_A → E2_A
   755:   //     736. SE3T
   756:   //     737. SE3T_XWC
   757:   //     738. SE3T_XWP
   758:   //     739. SE3T_XHC → SE3T
   759:   //     740. SE3T_XHCT
   760:   //     741. SE3T_XHCG
   761:   //     742. SE3T_XHCGT
   762:   //     743. SE3T_XHPT
   763:   //     744. SE3T_XHPG
   764:   //     745. SE3T_XHPGT
   765:   //     746. SE3T_A → E3_A
   766:   //     747. SE4T
   767:   //     748. SE4T_XWC
   768:   //     749. SE4T_XWP
   769:   //     750. SE4T_XHC → SE4T
   770:   //     751. SE4T_XHCT
   771:   //     752. SE4T_XHCG
   772:   //     753. SE4T_XHCGT
   773:   //     754. SE4T_XHPT
   774:   //     755. SE4T_XHPG
   775:   //     756. SE4T_XHPGT
   776:   //     757. SE4T_A → E4_A
   777:   //     758. SF1T
   778:   //     759. SF1T_XWC
   779:   //     760. SF1T_XWP
   780:   //     761. SF1T_XHC → SF1T
   781:   //     762. SF1T_XHCT
   782:   //     763. SF1T_XHCG
   783:   //     764. SF1T_XHCGT
   784:   //     765. SF1T_XHPT
   785:   //     766. SF1T_XHPG
   786:   //     767. SF1T_XHPGT
   787:   //     768. SF1T_A → F1_A
   788:   //     769. SF2T
   789:   //     770. SF2T_XWC
   790:   //     771. SF2T_XWP
   791:   //     772. SF2T_XHC → SF2T
   792:   //     773. SF2T_XHCT
   793:   //     774. SF2T_XHCG
   794:   //     775. SF2T_XHCGT
   795:   //     776. SF2T_XHPT
   796:   //     777. SF2T_XHPG
   797:   //     778. SF2T_XHPGT
   798:   //     779. SF2T_A → F2_A
   799:   //     780. SGT
   800:   //     781. SGT_XWC
   801:   //     782. SGT_XWP
   802:   //     783. SGT_XHC → SGT
   803:   //     784. SGT_XHCT
   804:   //     785. SGT_XHPT
   805:   //     786. SGT_A → G_A
   806:   //     787. SHT
   807:   //     788. SHT_XWC
   808:   //     789. SHT_XWP
   809:   //     790. SHT_XHC → SHT
   810:   //     791. SHT_XHCT
   811:   //     792. SHT_XHPT
   812:   //     793. SHT_A → H_A
   813:   //     794. SIT
   814:   //     795. SIT_XWC
   815:   //     796. SIT_XWP
   816:   //     797. SIT_XHC → SIT
   817:   //     798. SIT_XHCT
   818:   //     799. SIT_XHPT
   819:   //     800. SIT_A → I_A
   820:   //     801. SJT
   821:   //     802. SJT_XWC
   822:   //     803. SJT_XWP
   823:   //     804. SJT_XHC → SJT
   824:   //     805. SJT_XHCT
   825:   //     806. SJT_XHPT
   826:   //     807. SJT_A → J_A
   827:   //     808. SE1t
   828:   //     809. SE1t_XWC
   829:   //     810. SE1t_XWP
   830:   //     811. SE1t_XHC → SE1t
   831:   //     812. SE1t_XHCT
   832:   //     813. SE1t_XHCG
   833:   //     814. SE1t_XHCGT
   834:   //     815. SE1t_XHPT
   835:   //     816. SE1t_XHPG
   836:   //     817. SE1t_XHPGT
   837:   //     818. SE1t_A → E1_A
   838:   //     819. SE2t
   839:   //     820. SE2t_XWC
   840:   //     821. SE2t_XWP
   841:   //     822. SE2t_XHC → SE2t
   842:   //     823. SE2t_XHCT
   843:   //     824. SE2t_XHCG
   844:   //     825. SE2t_XHCGT
   845:   //     826. SE2t_XHPT
   846:   //     827. SE2t_XHPG
   847:   //     828. SE2t_XHPGT
   848:   //     829. SE2t_A → E2_A
   849:   //     830. SE3t
   850:   //     831. SE3t_XWC
   851:   //     832. SE3t_XWP
   852:   //     833. SE3t_XHC → SE3t
   853:   //     834. SE3t_XHCT
   854:   //     835. SE3t_XHCG
   855:   //     836. SE3t_XHCGT
   856:   //     837. SE3t_XHPT
   857:   //     838. SE3t_XHPG
   858:   //     839. SE3t_XHPGT
   859:   //     840. SE3t_A → E3_A
   860:   //     841. SE4t
   861:   //     842. SE4t_XWC
   862:   //     843. SE4t_XWP
   863:   //     844. SE4t_XHC → SE4t
   864:   //     845. SE4t_XHCT
   865:   //     846. SE4t_XHCG
   866:   //     847. SE4t_XHCGT
   867:   //     848. SE4t_XHPT
   868:   //     849. SE4t_XHPG
   869:   //     850. SE4t_XHPGT
   870:   //     851. SE4t_A → E4_A
   871:   //     852. SF1t
   872:   //     853. SF1t_XWC
   873:   //     854. SF1t_XWP
   874:   //     855. SF1t_XHC → SF1t
   875:   //     856. SF1t_XHCT
   876:   //     857. SF1t_XHCG
   877:   //     858. SF1t_XHCGT
   878:   //     859. SF1t_XHPT
   879:   //     860. SF1t_XHPG
   880:   //     861. SF1t_XHPGT
   881:   //     862. SF1t_A → F1_A
   882:   //     863. SF2t
   883:   //     864. SF2t_XWC
   884:   //     865. SF2t_XWP
   885:   //     866. SF2t_XHC → SF2t
   886:   //     867. SF2t_XHCT
   887:   //     868. SF2t_XHCG
   888:   //     869. SF2t_XHCGT
   889:   //     870. SF2t_XHPT
   890:   //     871. SF2t_XHPG
   891:   //     872. SF2t_XHPGT
   892:   //     873. SF2t_A → F2_A
   893:   //     874. SGt
   894:   //     875. SGt_XWC
   895:   //     876. SGt_XWP
   896:   //     877. SGt_XHC → SGt
   897:   //     878. SGt_XHCT
   898:   //     879. SGt_XHPT
   899:   //     880. SGt_A → G_A
   900:   //     881. SHt
   901:   //     882. SHt_XWC
   902:   //     883. SHt_XWP
   903:   //     884. SHt_XHC → SHt
   904:   //     885. SHt_XHCT
   905:   //     886. SHt_XHPT
   906:   //     887. SHt_A → H_A
   907:   //     888. SIt
   908:   //     889. SIt_XWC
   909:   //     890. SIt_XWP
   910:   //     891. SIt_XHC → SIt
   911:   //     892. SIt_XHCT
   912:   //     893. SIt_XHPT
   913:   //     894. SIt_A → I_A
   914:   //     895. SJt
   915:   //     896. SJt_XWC
   916:   //     897. SJt_XWP
   917:   //     898. SJt_XHC → SJt
   918:   //     899. SJt_XHCT
   919:   //     900. SJt_XHPT
   920:   //     901. SJt_A → J_A
   921:   //     902. STE1
   922:   //     903. STE1_XWC
   923:   //     904. STE1_XWP
   924:   //     905. STE1_XHC → STE1
   925:   //     906. STE1_XHCT
   926:   //     907. STE1_XHCG
   927:   //     908. STE1_XHCGT
   928:   //     909. STE1_XHPT
   929:   //     910. STE1_XHPG
   930:   //     911. STE1_XHPGT
   931:   //     912. STE1_A → E1_A
   932:   //     913. STE2
   933:   //     914. STE2_XWC
   934:   //     915. STE2_XWP
   935:   //     916. STE2_XHC → STE2
   936:   //     917. STE2_XHCT
   937:   //     918. STE2_XHCG
   938:   //     919. STE2_XHCGT
   939:   //     920. STE2_XHPT
   940:   //     921. STE2_XHPG
   941:   //     922. STE2_XHPGT
   942:   //     923. STE2_A → E2_A
   943:   //     924. STE3
   944:   //     925. STE3_XWC
   945:   //     926. STE3_XWP
   946:   //     927. STE3_XHC → STE3
   947:   //     928. STE3_XHCT
   948:   //     929. STE3_XHCG
   949:   //     930. STE3_XHCGT
   950:   //     931. STE3_XHPT
   951:   //     932. STE3_XHPG
   952:   //     933. STE3_XHPGT
   953:   //     934. STE3_A → E3_A
   954:   //     935. STE4
   955:   //     936. STE4_XWC
   956:   //     937. STE4_XWP
   957:   //     938. STE4_XHC → STE4
   958:   //     939. STE4_XHCT
   959:   //     940. STE4_XHCG
   960:   //     941. STE4_XHCGT
   961:   //     942. STE4_XHPT
   962:   //     943. STE4_XHPG
   963:   //     944. STE4_XHPGT
   964:   //     945. STE4_A → E4_A
   965:   //     946. STF1
   966:   //     947. STF1_XWC
   967:   //     948. STF1_XWP
   968:   //     949. STF1_XHC → STF1
   969:   //     950. STF1_XHCT
   970:   //     951. STF1_XHCG
   971:   //     952. STF1_XHCGT
   972:   //     953. STF1_XHPT
   973:   //     954. STF1_XHPG
   974:   //     955. STF1_XHPGT
   975:   //     956. STF1_A → F1_A
   976:   //     957. STF2
   977:   //     958. STF2_XWC
   978:   //     959. STF2_XWP
   979:   //     960. STF2_XHC → STF2
   980:   //     961. STF2_XHCT
   981:   //     962. STF2_XHCG
   982:   //     963. STF2_XHCGT
   983:   //     964. STF2_XHPT
   984:   //     965. STF2_XHPG
   985:   //     966. STF2_XHPGT
   986:   //     967. STF2_A → F2_A
   987:   //     968. STG
   988:   //     969. STG_XWC
   989:   //     970. STG_XWP
   990:   //     971. STG_XHC → STG
   991:   //     972. STG_XHCT
   992:   //     973. STG_XHPT
   993:   //     974. STG_A → G_A
   994:   //     975. STH
   995:   //     976. STH_XWC
   996:   //     977. STH_XWP
   997:   //     978. STH_XHC → STH
   998:   //     979. STH_XHCT
   999:   //     980. STH_XHPT
  1000:   //     981. STH_A → H_A
  1001:   //     982. STI
  1002:   //     983. STI_XWC
  1003:   //     984. STI_XWP
  1004:   //     985. STI_XHC → STI
  1005:   //     986. STI_XHCT
  1006:   //     987. STI_XHPT
  1007:   //     988. STI_A → I_A
  1008:   //     989. STJ
  1009:   //     990. STJ_XWC
  1010:   //     991. STJ_XWP
  1011:   //     992. STJ_XHC → STJ
  1012:   //     993. STJ_XHCT
  1013:   //     994. STJ_XHPT
  1014:   //     995. STJ_A → J_A
  1015:   //     996. E1TS
  1016:   //     997. E1TS_XWC
  1017:   //     998. E1TS_XWP
  1018:   //     999. E1TS_XHC → E1TS
  1019:   //    1000. E1TS_XHCT
  1020:   //    1001. E1TS_XHCG
  1021:   //    1002. E1TS_XHCGT
  1022:   //    1003. E1TS_XHPT
  1023:   //    1004. E1TS_XHPG
  1024:   //    1005. E1TS_XHPGT
  1025:   //    1006. E1TS_A → E1_A
  1026:   //    1007. E2TS
  1027:   //    1008. E2TS_XWC
  1028:   //    1009. E2TS_XWP
  1029:   //    1010. E2TS_XHC → E2TS
  1030:   //    1011. E2TS_XHCT
  1031:   //    1012. E2TS_XHCG
  1032:   //    1013. E2TS_XHCGT
  1033:   //    1014. E2TS_XHPT
  1034:   //    1015. E2TS_XHPG
  1035:   //    1016. E2TS_XHPGT
  1036:   //    1017. E2TS_A → E2_A
  1037:   //    1018. E3TS
  1038:   //    1019. E3TS_XWC
  1039:   //    1020. E3TS_XWP
  1040:   //    1021. E3TS_XHC → E3TS
  1041:   //    1022. E3TS_XHCT
  1042:   //    1023. E3TS_XHCG
  1043:   //    1024. E3TS_XHCGT
  1044:   //    1025. E3TS_XHPT
  1045:   //    1026. E3TS_XHPG
  1046:   //    1027. E3TS_XHPGT
  1047:   //    1028. E3TS_A → E3_A
  1048:   //    1029. E4TS
  1049:   //    1030. E4TS_XWC
  1050:   //    1031. E4TS_XWP
  1051:   //    1032. E4TS_XHC → E4TS
  1052:   //    1033. E4TS_XHCT
  1053:   //    1034. E4TS_XHCG
  1054:   //    1035. E4TS_XHCGT
  1055:   //    1036. E4TS_XHPT
  1056:   //    1037. E4TS_XHPG
  1057:   //    1038. E4TS_XHPGT
  1058:   //    1039. E4TS_A → E4_A
  1059:   //    1040. F1TS
  1060:   //    1041. F1TS_XWC
  1061:   //    1042. F1TS_XWP
  1062:   //    1043. F1TS_XHC → F1TS
  1063:   //    1044. F1TS_XHCT
  1064:   //    1045. F1TS_XHCG
  1065:   //    1046. F1TS_XHCGT
  1066:   //    1047. F1TS_XHPT
  1067:   //    1048. F1TS_XHPG
  1068:   //    1049. F1TS_XHPGT
  1069:   //    1050. F1TS_A → F1_A
  1070:   //    1051. F2TS
  1071:   //    1052. F2TS_XWC
  1072:   //    1053. F2TS_XWP
  1073:   //    1054. F2TS_XHC → F2TS
  1074:   //    1055. F2TS_XHCT
  1075:   //    1056. F2TS_XHCG
  1076:   //    1057. F2TS_XHCGT
  1077:   //    1058. F2TS_XHPT
  1078:   //    1059. F2TS_XHPG
  1079:   //    1060. F2TS_XHPGT
  1080:   //    1061. F2TS_A → F2_A
  1081:   //    1062. GTS
  1082:   //    1063. GTS_XWC
  1083:   //    1064. GTS_XWP
  1084:   //    1065. GTS_XHC → GTS
  1085:   //    1066. GTS_XHCT
  1086:   //    1067. GTS_XHPT
  1087:   //    1068. GTS_A → G_A
  1088:   //    1069. HTS
  1089:   //    1070. HTS_XWC
  1090:   //    1071. HTS_XWP
  1091:   //    1072. HTS_XHC → HTS
  1092:   //    1073. HTS_XHCT
  1093:   //    1074. HTS_XHPT
  1094:   //    1075. HTS_A → H_A
  1095:   //    1076. ITS
  1096:   //    1077. ITS_XWC
  1097:   //    1078. ITS_XWP
  1098:   //    1079. ITS_XHC → ITS
  1099:   //    1080. ITS_XHCT
  1100:   //    1081. ITS_XHPT
  1101:   //    1082. ITS_A → I_A
  1102:   //    1083. JTS
  1103:   //    1084. JTS_XWC
  1104:   //    1085. JTS_XWP
  1105:   //    1086. JTS_XHC → JTS
  1106:   //    1087. JTS_XHCT
  1107:   //    1088. JTS_XHPT
  1108:   //    1089. JTS_A → J_A
  1109:   //    1090. TE1S
  1110:   //    1091. TE1S_XWC
  1111:   //    1092. TE1S_XWP
  1112:   //    1093. TE1S_XHC → TE1S
  1113:   //    1094. TE1S_XHCT
  1114:   //    1095. TE1S_XHCG
  1115:   //    1096. TE1S_XHCGT
  1116:   //    1097. TE1S_XHPT
  1117:   //    1098. TE1S_XHPG
  1118:   //    1099. TE1S_XHPGT
  1119:   //    1100. TE1S_A → E1_A
  1120:   //    1101. TE2S
  1121:   //    1102. TE2S_XWC
  1122:   //    1103. TE2S_XWP
  1123:   //    1104. TE2S_XHC → TE2S
  1124:   //    1105. TE2S_XHCT
  1125:   //    1106. TE2S_XHCG
  1126:   //    1107. TE2S_XHCGT
  1127:   //    1108. TE2S_XHPT
  1128:   //    1109. TE2S_XHPG
  1129:   //    1110. TE2S_XHPGT
  1130:   //    1111. TE2S_A → E2_A
  1131:   //    1112. TE3S
  1132:   //    1113. TE3S_XWC
  1133:   //    1114. TE3S_XWP
  1134:   //    1115. TE3S_XHC → TE3S
  1135:   //    1116. TE3S_XHCT
  1136:   //    1117. TE3S_XHCG
  1137:   //    1118. TE3S_XHCGT
  1138:   //    1119. TE3S_XHPT
  1139:   //    1120. TE3S_XHPG
  1140:   //    1121. TE3S_XHPGT
  1141:   //    1122. TE3S_A → E3_A
  1142:   //    1123. TE4S
  1143:   //    1124. TE4S_XWC
  1144:   //    1125. TE4S_XWP
  1145:   //    1126. TE4S_XHC → TE4S
  1146:   //    1127. TE4S_XHCT
  1147:   //    1128. TE4S_XHCG
  1148:   //    1129. TE4S_XHCGT
  1149:   //    1130. TE4S_XHPT
  1150:   //    1131. TE4S_XHPG
  1151:   //    1132. TE4S_XHPGT
  1152:   //    1133. TE4S_A → E4_A
  1153:   //    1134. TF1S
  1154:   //    1135. TF1S_XWC
  1155:   //    1136. TF1S_XWP
  1156:   //    1137. TF1S_XHC → TF1S
  1157:   //    1138. TF1S_XHCT
  1158:   //    1139. TF1S_XHCG
  1159:   //    1140. TF1S_XHCGT
  1160:   //    1141. TF1S_XHPT
  1161:   //    1142. TF1S_XHPG
  1162:   //    1143. TF1S_XHPGT
  1163:   //    1144. TF1S_A → F1_A
  1164:   //    1145. TF2S
  1165:   //    1146. TF2S_XWC
  1166:   //    1147. TF2S_XWP
  1167:   //    1148. TF2S_XHC → TF2S
  1168:   //    1149. TF2S_XHCT
  1169:   //    1150. TF2S_XHCG
  1170:   //    1151. TF2S_XHCGT
  1171:   //    1152. TF2S_XHPT
  1172:   //    1153. TF2S_XHPG
  1173:   //    1154. TF2S_XHPGT
  1174:   //    1155. TF2S_A → F2_A
  1175:   //    1156. TGS
  1176:   //    1157. TGS_XWC
  1177:   //    1158. TGS_XWP
  1178:   //    1159. TGS_XHC → TGS
  1179:   //    1160. TGS_XHCT
  1180:   //    1161. TGS_XHPT
  1181:   //    1162. TGS_A → G_A
  1182:   //    1163. THS
  1183:   //    1164. THS_XWC
  1184:   //    1165. THS_XWP
  1185:   //    1166. THS_XHC → THS
  1186:   //    1167. THS_XHCT
  1187:   //    1168. THS_XHPT
  1188:   //    1169. THS_A → H_A
  1189:   //    1170. TIS
  1190:   //    1171. TIS_XWC
  1191:   //    1172. TIS_XWP
  1192:   //    1173. TIS_XHC → TIS
  1193:   //    1174. TIS_XHCT
  1194:   //    1175. TIS_XHPT
  1195:   //    1176. TIS_A → I_A
  1196:   //    1177. TJS
  1197:   //    1178. TJS_XWC
  1198:   //    1179. TJS_XWP
  1199:   //    1180. TJS_XHC → TJS
  1200:   //    1181. TJS_XHCT
  1201:   //    1182. TJS_XHPT
  1202:   //    1183. TJS_A → J_A
  1203:   //    1184. TE1s
  1204:   //    1185. TE1s_XWC
  1205:   //    1186. TE1s_XWP
  1206:   //    1187. TE1s_XHC → TE1s
  1207:   //    1188. TE1s_XHCT
  1208:   //    1189. TE1s_XHCG
  1209:   //    1190. TE1s_XHCGT
  1210:   //    1191. TE1s_XHPT
  1211:   //    1192. TE1s_XHPG
  1212:   //    1193. TE1s_XHPGT
  1213:   //    1194. TE1s_A → E1_A
  1214:   //    1195. TE2s
  1215:   //    1196. TE2s_XWC
  1216:   //    1197. TE2s_XWP
  1217:   //    1198. TE2s_XHC → TE2s
  1218:   //    1199. TE2s_XHCT
  1219:   //    1200. TE2s_XHCG
  1220:   //    1201. TE2s_XHCGT
  1221:   //    1202. TE2s_XHPT
  1222:   //    1203. TE2s_XHPG
  1223:   //    1204. TE2s_XHPGT
  1224:   //    1205. TE2s_A → E2_A
  1225:   //    1206. TE3s
  1226:   //    1207. TE3s_XWC
  1227:   //    1208. TE3s_XWP
  1228:   //    1209. TE3s_XHC → TE3s
  1229:   //    1210. TE3s_XHCT
  1230:   //    1211. TE3s_XHCG
  1231:   //    1212. TE3s_XHCGT
  1232:   //    1213. TE3s_XHPT
  1233:   //    1214. TE3s_XHPG
  1234:   //    1215. TE3s_XHPGT
  1235:   //    1216. TE3s_A → E3_A
  1236:   //    1217. TE4s
  1237:   //    1218. TE4s_XWC
  1238:   //    1219. TE4s_XWP
  1239:   //    1220. TE4s_XHC → TE4s
  1240:   //    1221. TE4s_XHCT
  1241:   //    1222. TE4s_XHCG
  1242:   //    1223. TE4s_XHCGT
  1243:   //    1224. TE4s_XHPT
  1244:   //    1225. TE4s_XHPG
  1245:   //    1226. TE4s_XHPGT
  1246:   //    1227. TE4s_A → E4_A
  1247:   //    1228. TF1s
  1248:   //    1229. TF1s_XWC
  1249:   //    1230. TF1s_XWP
  1250:   //    1231. TF1s_XHC → TF1s
  1251:   //    1232. TF1s_XHCT
  1252:   //    1233. TF1s_XHCG
  1253:   //    1234. TF1s_XHCGT
  1254:   //    1235. TF1s_XHPT
  1255:   //    1236. TF1s_XHPG
  1256:   //    1237. TF1s_XHPGT
  1257:   //    1238. TF1s_A → F1_A
  1258:   //    1239. TF2s
  1259:   //    1240. TF2s_XWC
  1260:   //    1241. TF2s_XWP
  1261:   //    1242. TF2s_XHC → TF2s
  1262:   //    1243. TF2s_XHCT
  1263:   //    1244. TF2s_XHCG
  1264:   //    1245. TF2s_XHCGT
  1265:   //    1246. TF2s_XHPT
  1266:   //    1247. TF2s_XHPG
  1267:   //    1248. TF2s_XHPGT
  1268:   //    1249. TF2s_A → F2_A
  1269:   //    1250. TGs
  1270:   //    1251. TGs_XWC
  1271:   //    1252. TGs_XWP
  1272:   //    1253. TGs_XHC → TGs
  1273:   //    1254. TGs_XHCT
  1274:   //    1255. TGs_XHPT
  1275:   //    1256. TGs_A → G_A
  1276:   //    1257. THs
  1277:   //    1258. THs_XWC
  1278:   //    1259. THs_XWP
  1279:   //    1260. THs_XHC → THs
  1280:   //    1261. THs_XHCT
  1281:   //    1262. THs_XHPT
  1282:   //    1263. THs_A → H_A
  1283:   //    1264. TIs
  1284:   //    1265. TIs_XWC
  1285:   //    1266. TIs_XWP
  1286:   //    1267. TIs_XHC → TIs
  1287:   //    1268. TIs_XHCT
  1288:   //    1269. TIs_XHPT
  1289:   //    1270. TIs_A → I_A
  1290:   //    1271. TJs
  1291:   //    1272. TJs_XWC
  1292:   //    1273. TJs_XWP
  1293:   //    1274. TJs_XHC → TJs
  1294:   //    1275. TJs_XHCT
  1295:   //    1276. TJs_XHPT
  1296:   //    1277. TJs_A → J_A
  1297:   //    1278. TSE1
  1298:   //    1279. TSE1_XWC
  1299:   //    1280. TSE1_XWP
  1300:   //    1281. TSE1_XHC → TSE1
  1301:   //    1282. TSE1_XHCT
  1302:   //    1283. TSE1_XHCG
  1303:   //    1284. TSE1_XHCGT
  1304:   //    1285. TSE1_XHPT
  1305:   //    1286. TSE1_XHPG
  1306:   //    1287. TSE1_XHPGT
  1307:   //    1288. TSE1_A → E1_A
  1308:   //    1289. TSE2
  1309:   //    1290. TSE2_XWC
  1310:   //    1291. TSE2_XWP
  1311:   //    1292. TSE2_XHC → TSE2
  1312:   //    1293. TSE2_XHCT
  1313:   //    1294. TSE2_XHCG
  1314:   //    1295. TSE2_XHCGT
  1315:   //    1296. TSE2_XHPT
  1316:   //    1297. TSE2_XHPG
  1317:   //    1298. TSE2_XHPGT
  1318:   //    1299. TSE2_A → E2_A
  1319:   //    1300. TSE3
  1320:   //    1301. TSE3_XWC
  1321:   //    1302. TSE3_XWP
  1322:   //    1303. TSE3_XHC → TSE3
  1323:   //    1304. TSE3_XHCT
  1324:   //    1305. TSE3_XHCG
  1325:   //    1306. TSE3_XHCGT
  1326:   //    1307. TSE3_XHPT
  1327:   //    1308. TSE3_XHPG
  1328:   //    1309. TSE3_XHPGT
  1329:   //    1310. TSE3_A → E3_A
  1330:   //    1311. TSE4
  1331:   //    1312. TSE4_XWC
  1332:   //    1313. TSE4_XWP
  1333:   //    1314. TSE4_XHC → TSE4
  1334:   //    1315. TSE4_XHCT
  1335:   //    1316. TSE4_XHCG
  1336:   //    1317. TSE4_XHCGT
  1337:   //    1318. TSE4_XHPT
  1338:   //    1319. TSE4_XHPG
  1339:   //    1320. TSE4_XHPGT
  1340:   //    1321. TSE4_A → E4_A
  1341:   //    1322. TSF1
  1342:   //    1323. TSF1_XWC
  1343:   //    1324. TSF1_XWP
  1344:   //    1325. TSF1_XHC → TSF1
  1345:   //    1326. TSF1_XHCT
  1346:   //    1327. TSF1_XHCG
  1347:   //    1328. TSF1_XHCGT
  1348:   //    1329. TSF1_XHPT
  1349:   //    1330. TSF1_XHPG
  1350:   //    1331. TSF1_XHPGT
  1351:   //    1332. TSF1_A → F1_A
  1352:   //    1333. TSF2
  1353:   //    1334. TSF2_XWC
  1354:   //    1335. TSF2_XWP
  1355:   //    1336. TSF2_XHC → TSF2
  1356:   //    1337. TSF2_XHCT
  1357:   //    1338. TSF2_XHCG
  1358:   //    1339. TSF2_XHCGT
  1359:   //    1340. TSF2_XHPT
  1360:   //    1341. TSF2_XHPG
  1361:   //    1342. TSF2_XHPGT
  1362:   //    1343. TSF2_A → F2_A
  1363:   //    1344. TSG
  1364:   //    1345. TSG_XWC
  1365:   //    1346. TSG_XWP
  1366:   //    1347. TSG_XHC → TSG
  1367:   //    1348. TSG_XHCT
  1368:   //    1349. TSG_XHPT
  1369:   //    1350. TSG_A → G_A
  1370:   //    1351. TSH
  1371:   //    1352. TSH_XWC
  1372:   //    1353. TSH_XWP
  1373:   //    1354. TSH_XHC → TSH
  1374:   //    1355. TSH_XHCT
  1375:   //    1356. TSH_XHPT
  1376:   //    1357. TSH_A → H_A
  1377:   //    1358. TSI
  1378:   //    1359. TSI_XWC
  1379:   //    1360. TSI_XWP
  1380:   //    1361. TSI_XHC → TSI
  1381:   //    1362. TSI_XHCT
  1382:   //    1363. TSI_XHPT
  1383:   //    1364. TSI_A → I_A
  1384:   //    1365. TSJ
  1385:   //    1366. TSJ_XWC
  1386:   //    1367. TSJ_XWP
  1387:   //    1368. TSJ_XHC → TSJ
  1388:   //    1369. TSJ_XHCT
  1389:   //    1370. TSJ_XHPT
  1390:   //    1371. TSJ_A → J_A
  1391: 
  1392:   //================================================================================
  1393:   //N ($0000,$06xx,$0000)
  1394:   //  概要
  1395:   //    N  表示画面なし
  1396:   //    拡張なし
  1397:   //  手順
  1398:   //    カラー0(黒)
  1399:   //  中間コード1
  1400:   //    0
  1401:   //  中間コード2
  1402:   //    0
  1403:   //  中間コード3
  1404:   //    0
  1405:   //  中間コード4
  1406:   //    0
  1407:   //  中間コード5
  1408:   //    0
  1409:   //  中間コード6
  1410:   //    cto(0)
  1411:   N {
  1412:     @Override public void drawRaster (int src, int dst, boolean rh) {
  1413:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  1414:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  1415:       if (rh) {
  1416:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  1417:         da += half;
  1418:       }
  1419:       while (da < db) {
  1420:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[0]);
  1421:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[0]);
  1422:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[0]);
  1423:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[0]);
  1424:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[0]);
  1425:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[0]);
  1426:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[0]);
  1427:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[0]);
  1428:         da += 8;
  1429:       }  //while da<db
  1430:     }  //drawRaster
  1431:   },  //N
  1432: 
  1433:   //================================================================================
  1434:   //XN
  1435:   //  概要
  1436:   //    N  表示画面なし
  1437:   //    拡張あり
  1438:   XN {
  1439:     @Override public void drawRaster (int src, int dst, boolean rh) {
  1440:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  1441:         //   .A.XHPGT
  1442:       case 0b00010000:  //N_XWC
  1443:       case 0b00010001:  //N_XWC
  1444:       case 0b00010010:  //N_XWC
  1445:       case 0b00010011:  //N_XWC
  1446:         N.drawRaster (src, dst, rh);
  1447:         break;
  1448:         //   .A.XHPGT
  1449:       case 0b00010100:  //N_XWP
  1450:       case 0b00010101:  //N_XWP
  1451:       case 0b00010110:  //N_XWP
  1452:       case 0b00010111:  //N_XWP
  1453:         N.drawRaster (src, dst, rh);
  1454:         break;
  1455:         //   .A.XHPGT
  1456:       case 0b00011000:  //N_XHC
  1457:         N.drawRaster (src, dst, rh);
  1458:         break;
  1459:         //   .A.XHPGT
  1460:       case 0b00011001:  //N_XHCT
  1461:         N.drawRaster (src, dst, rh);
  1462:         break;
  1463:         //   .A.XHPGT
  1464:       case 0b00011010:  //N_XHCG
  1465:         N.drawRaster (src, dst, rh);
  1466:         break;
  1467:         //   .A.XHPGT
  1468:       case 0b00011011:  //N_XHCGT
  1469:         N.drawRaster (src, dst, rh);
  1470:         break;
  1471:         //   .A.XHPGT
  1472:       case 0b00011101:  //N_XHPT
  1473:         N.drawRaster (src, dst, rh);
  1474:         break;
  1475:         //   .A.XHPGT
  1476:       case 0b00011110:  //N_XHPG
  1477:         N.drawRaster (src, dst, rh);
  1478:         break;
  1479:         //   .A.XHPGT
  1480:       case 0b00011111:  //N_XHPGT
  1481:         N.drawRaster (src, dst, rh);
  1482:         break;
  1483:         //   .A.XHPGT
  1484:       case 0b01000000:  //N_A
  1485:       case 0b01000001:  //N_A
  1486:       case 0b01000010:  //N_A
  1487:       case 0b01000011:  //N_A
  1488:       case 0b01000100:  //N_A
  1489:       case 0b01000101:  //N_A
  1490:       case 0b01000110:  //N_A
  1491:       case 0b01000111:  //N_A
  1492:       case 0b01001000:  //N_A
  1493:       case 0b01001001:  //N_A
  1494:       case 0b01001010:  //N_A
  1495:       case 0b01001011:  //N_A
  1496:       case 0b01001100:  //N_A
  1497:       case 0b01001101:  //N_A
  1498:       case 0b01001110:  //N_A
  1499:       case 0b01001111:  //N_A
  1500:       case 0b01010000:  //N_A
  1501:       case 0b01010001:  //N_A
  1502:       case 0b01010010:  //N_A
  1503:       case 0b01010011:  //N_A
  1504:       case 0b01010100:  //N_A
  1505:       case 0b01010101:  //N_A
  1506:       case 0b01010110:  //N_A
  1507:       case 0b01010111:  //N_A
  1508:       case 0b01011000:  //N_A
  1509:       case 0b01011001:  //N_A
  1510:       case 0b01011010:  //N_A
  1511:       case 0b01011011:  //N_A
  1512:       case 0b01011100:  //N_A
  1513:       case 0b01011101:  //N_A
  1514:       case 0b01011110:  //N_A
  1515:       case 0b01011111:  //N_A
  1516:         N.drawRaster (src, dst, rh);
  1517:         break;
  1518:       default:
  1519:         N.drawRaster (src, dst, rh);
  1520:         VideoController.vcnReportUnimplemented (XN);
  1521:       }  //switch
  1522:     }  //drawRaster
  1523:   },  //XN
  1524: 
  1525:   //================================================================================
  1526:   //S ($0000,$06xx,$0040)
  1527:   //  概要
  1528:   //    S  スプライト
  1529:   //    拡張なし
  1530:   //  手順
  1531:   //    スプライトカラー(0は黒)
  1532:   //  中間コード1
  1533:   //    spc(spp())
  1534:   //  中間コード2
  1535:   //    spc(spp())
  1536:   //  中間コード3
  1537:   //    spc(spp())
  1538:   //  中間コード4
  1539:   //    spc(spp())
  1540:   //  中間コード5
  1541:   //    spc(spp())
  1542:   //  中間コード6
  1543:   //    spo(spp())
  1544:   S {
  1545:     @Override public void drawRaster (int src, int dst, boolean rh) {
  1546:       SpriteScreen.sprStep3 ();
  1547:       int sx = 16;  //スプライトx座標
  1548:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  1549:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  1550:       if (rh) {
  1551:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  1552:         sx += half;
  1553:         da += half;
  1554:       }
  1555:       while (da < db) {
  1556:         XEiJ.pnlBM[da] = (VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
  1557:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
  1558:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
  1559:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
  1560:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
  1561:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
  1562:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
  1563:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
  1564:         sx += 8;
  1565:         da += 8;
  1566:       }  //while da<db
  1567:     }  //drawRaster
  1568:   },  //S
  1569: 
  1570:   //================================================================================
  1571:   //XS
  1572:   //  概要
  1573:   //    S  スプライト
  1574:   //    拡張あり
  1575:   XS {
  1576:     @Override public void drawRaster (int src, int dst, boolean rh) {
  1577:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  1578:         //   .A.XHPGT
  1579:       case 0b00010000:  //S_XWC
  1580:       case 0b00010001:  //S_XWC
  1581:       case 0b00010010:  //S_XWC
  1582:       case 0b00010011:  //S_XWC
  1583:         S.drawRaster (src, dst, rh);
  1584:         break;
  1585:         //   .A.XHPGT
  1586:       case 0b00010100:  //S_XWP
  1587:       case 0b00010101:  //S_XWP
  1588:       case 0b00010110:  //S_XWP
  1589:       case 0b00010111:  //S_XWP
  1590:         S.drawRaster (src, dst, rh);
  1591:         break;
  1592:         //   .A.XHPGT
  1593:       case 0b00011000:  //S_XHC
  1594:         S.drawRaster (src, dst, rh);
  1595:         break;
  1596:         //   .A.XHPGT
  1597:       case 0b00011001:  //S_XHCT
  1598:         S.drawRaster (src, dst, rh);
  1599:         break;
  1600:         //   .A.XHPGT
  1601:       case 0b00011010:  //S_XHCG
  1602:         S.drawRaster (src, dst, rh);
  1603:         break;
  1604:         //   .A.XHPGT
  1605:       case 0b00011011:  //S_XHCGT
  1606:         S.drawRaster (src, dst, rh);
  1607:         break;
  1608:         //   .A.XHPGT
  1609:       case 0b00011101:  //S_XHPT
  1610:         S.drawRaster (src, dst, rh);
  1611:         break;
  1612:         //   .A.XHPGT
  1613:       case 0b00011110:  //S_XHPG
  1614:         S.drawRaster (src, dst, rh);
  1615:         break;
  1616:         //   .A.XHPGT
  1617:       case 0b00011111:  //S_XHPGT
  1618:         S.drawRaster (src, dst, rh);
  1619:         break;
  1620:         //   .A.XHPGT
  1621:       case 0b01000000:  //S_A
  1622:       case 0b01000001:  //S_A
  1623:       case 0b01000010:  //S_A
  1624:       case 0b01000011:  //S_A
  1625:       case 0b01000100:  //S_A
  1626:       case 0b01000101:  //S_A
  1627:       case 0b01000110:  //S_A
  1628:       case 0b01000111:  //S_A
  1629:       case 0b01001000:  //S_A
  1630:       case 0b01001001:  //S_A
  1631:       case 0b01001010:  //S_A
  1632:       case 0b01001011:  //S_A
  1633:       case 0b01001100:  //S_A
  1634:       case 0b01001101:  //S_A
  1635:       case 0b01001110:  //S_A
  1636:       case 0b01001111:  //S_A
  1637:       case 0b01010000:  //S_A
  1638:       case 0b01010001:  //S_A
  1639:       case 0b01010010:  //S_A
  1640:       case 0b01010011:  //S_A
  1641:       case 0b01010100:  //S_A
  1642:       case 0b01010101:  //S_A
  1643:       case 0b01010110:  //S_A
  1644:       case 0b01010111:  //S_A
  1645:       case 0b01011000:  //S_A
  1646:       case 0b01011001:  //S_A
  1647:       case 0b01011010:  //S_A
  1648:       case 0b01011011:  //S_A
  1649:       case 0b01011100:  //S_A
  1650:       case 0b01011101:  //S_A
  1651:       case 0b01011110:  //S_A
  1652:       case 0b01011111:  //S_A
  1653:         N.drawRaster (src, dst, rh);
  1654:         break;
  1655:       default:
  1656:         S.drawRaster (src, dst, rh);
  1657:         VideoController.vcnReportUnimplemented (XS);
  1658:       }  //switch
  1659:     }  //drawRaster
  1660:   },  //XS
  1661: 
  1662:   //================================================================================
  1663:   //T ($0000,$06xx,$0020)
  1664:   //  概要
  1665:   //    T  テキスト
  1666:   //    拡張なし
  1667:   //  手順
  1668:   //    テキストカラー(0は黒)
  1669:   //  中間コード1
  1670:   //    tpc(txp())
  1671:   //  中間コード2
  1672:   //    tpc(txp())
  1673:   //  中間コード3
  1674:   //    tpc(txp())
  1675:   //  中間コード4
  1676:   //    tpc(txp())
  1677:   //  中間コード5
  1678:   //    tpc(txp())
  1679:   //  中間コード6
  1680:   //    tpo(txp())
  1681:   T {
  1682:     @Override public void drawRaster (int src, int dst, boolean rh) {
  1683:       int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
  1684:       int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
  1685:       int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
  1686:       int ta1 = 0x00020000 + ta0;
  1687:       int ta2 = 0x00040000 + ta0;
  1688:       int ta3 = 0x00060000 + ta0;
  1689:       int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
  1690:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  1691:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  1692:       if (rh) {
  1693:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  1694:         tc = tc + (half >> 3) & CRTC.crtMask511;
  1695:         da += half;
  1696:       }
  1697:       if (ts == 0) {  //テキスト桁境界に合っているとき
  1698:         while (da < db) {
  1699:           int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
  1700:                     VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
  1701:                     VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
  1702:                     VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
  1703:           tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  1704:           XEiJ.pnlBM[da] = (VideoController.vcnPal32TS[tp >>> 28]);
  1705:           XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32TS[tp >>> 24 & 15]);
  1706:           XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32TS[tp >>> 20 & 15]);
  1707:           XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32TS[tp >>> 16 & 15]);
  1708:           XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32TS[tp >>> 12 & 15]);
  1709:           XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32TS[tp >>> 8 & 15]);
  1710:           XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32TS[tp >>> 4 & 15]);
  1711:           XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32TS[tp & 15]);
  1712:           da += 8;
  1713:         }  //while da<db
  1714:       } else {  //テキスト桁境界に合っていないとき
  1715:         //                                                             ts=1のとき
  1716:         int tt = ts + 8;                                             //tt=9
  1717:         ts += 16;                                                    //ts=17
  1718:         //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
  1719:         int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
  1720:         int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
  1721:         int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
  1722:         int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
  1723:         tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  1724:         while (da < db) {
  1725:           //                                                           ........ ........ .1234567 ________  p0>>tt
  1726:           //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
  1727:           p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
  1728:           p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
  1729:           p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
  1730:           p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
  1731:           int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
  1732:                     VideoController.VCN_TXP2[p2 >>> 24] |
  1733:                     VideoController.VCN_TXP1[p1 >>> 24] |
  1734:                     VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
  1735:           tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  1736:           XEiJ.pnlBM[da] = (VideoController.vcnPal32TS[tp >>> 28]);
  1737:           XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32TS[tp >>> 24 & 15]);
  1738:           XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32TS[tp >>> 20 & 15]);
  1739:           XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32TS[tp >>> 16 & 15]);
  1740:           XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32TS[tp >>> 12 & 15]);
  1741:           XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32TS[tp >>> 8 & 15]);
  1742:           XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32TS[tp >>> 4 & 15]);
  1743:           XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32TS[tp & 15]);
  1744:           da += 8;
  1745:         }  //while da<db
  1746:       }  //if ts==0
  1747:     }  //drawRaster
  1748:   },  //T
  1749: 
  1750:   //================================================================================
  1751:   //XT
  1752:   //  概要
  1753:   //    T  テキスト
  1754:   //    拡張あり
  1755:   XT {
  1756:     @Override public void drawRaster (int src, int dst, boolean rh) {
  1757:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  1758:         //   .A.XHPGT
  1759:       case 0b00010000:  //T_XWC
  1760:       case 0b00010001:  //T_XWC
  1761:       case 0b00010010:  //T_XWC
  1762:       case 0b00010011:  //T_XWC
  1763:         T.drawRaster (src, dst, rh);
  1764:         break;
  1765:         //   .A.XHPGT
  1766:       case 0b00010100:  //T_XWP
  1767:       case 0b00010101:  //T_XWP
  1768:       case 0b00010110:  //T_XWP
  1769:       case 0b00010111:  //T_XWP
  1770:         T.drawRaster (src, dst, rh);
  1771:         break;
  1772:         //   .A.XHPGT
  1773:       case 0b00011000:  //T_XHC
  1774:         T.drawRaster (src, dst, rh);
  1775:         break;
  1776:         //   .A.XHPGT
  1777:       case 0b00011001:  //T_XHCT
  1778:         T.drawRaster (src, dst, rh);
  1779:         break;
  1780:         //   .A.XHPGT
  1781:       case 0b00011010:  //T_XHCG
  1782:         T.drawRaster (src, dst, rh);
  1783:         break;
  1784:         //   .A.XHPGT
  1785:       case 0b00011011:  //T_XHCGT
  1786:         T.drawRaster (src, dst, rh);
  1787:         break;
  1788:         //   .A.XHPGT
  1789:       case 0b00011101:  //T_XHPT
  1790:         T.drawRaster (src, dst, rh);
  1791:         break;
  1792:         //   .A.XHPGT
  1793:       case 0b00011110:  //T_XHPG
  1794:         T.drawRaster (src, dst, rh);
  1795:         break;
  1796:         //   .A.XHPGT
  1797:       case 0b00011111:  //T_XHPGT
  1798:         T.drawRaster (src, dst, rh);
  1799:         break;
  1800:         //   .A.XHPGT
  1801:       case 0b01000000:  //T_A
  1802:       case 0b01000001:  //T_A
  1803:       case 0b01000010:  //T_A
  1804:       case 0b01000011:  //T_A
  1805:       case 0b01000100:  //T_A
  1806:       case 0b01000101:  //T_A
  1807:       case 0b01000110:  //T_A
  1808:       case 0b01000111:  //T_A
  1809:       case 0b01001000:  //T_A
  1810:       case 0b01001001:  //T_A
  1811:       case 0b01001010:  //T_A
  1812:       case 0b01001011:  //T_A
  1813:       case 0b01001100:  //T_A
  1814:       case 0b01001101:  //T_A
  1815:       case 0b01001110:  //T_A
  1816:       case 0b01001111:  //T_A
  1817:       case 0b01010000:  //T_A
  1818:       case 0b01010001:  //T_A
  1819:       case 0b01010010:  //T_A
  1820:       case 0b01010011:  //T_A
  1821:       case 0b01010100:  //T_A
  1822:       case 0b01010101:  //T_A
  1823:       case 0b01010110:  //T_A
  1824:       case 0b01010111:  //T_A
  1825:       case 0b01011000:  //T_A
  1826:       case 0b01011001:  //T_A
  1827:       case 0b01011010:  //T_A
  1828:       case 0b01011011:  //T_A
  1829:       case 0b01011100:  //T_A
  1830:       case 0b01011101:  //T_A
  1831:       case 0b01011110:  //T_A
  1832:       case 0b01011111:  //T_A
  1833:         N.drawRaster (src, dst, rh);
  1834:         break;
  1835:       default:
  1836:         T.drawRaster (src, dst, rh);
  1837:         VideoController.vcnReportUnimplemented (XT);
  1838:       }  //switch
  1839:     }  //drawRaster
  1840:   },  //XT
  1841: 
  1842:   //================================================================================
  1843:   //ST ($0000,$06xx,$0060)
  1844:   //  概要
  1845:   //    ST  スプライト>テキスト
  1846:   //    拡張なし
  1847:   //  手順
  1848:   //    スプライトパレットの下位4bitが0でないまたはテキストパレットが0のとき
  1849:   //      スプライトカラー(0は黒)
  1850:   //    さもなくば(スプライトパレットの下位4bitが0かつテキストパレットが0でないとき)
  1851:   //      テキストカラー(0は黒)
  1852:   //  中間コード1
  1853:   //    (ls4(spp())!=0||txp()==0?spc(spp()):tpc(txp()))
  1854:   //  中間コード2
  1855:   //    ls4(spp())!=0||txp()==0?spc(spp()):tpc(txp())
  1856:   //  中間コード3
  1857:   //    ls4(v1=spp())!=0||(v2=txp())==0?spc(v1):tpc(v2)
  1858:   //  中間コード4
  1859:   //    ls4(p=spp())!=0||(q=txp())==0?spc(p):tpc(q)
  1860:   //  中間コード5
  1861:   //    ((p=spp())&15)!=0||(q=txp())==0?spc(p):tpc(q)
  1862:   //  中間コード6
  1863:   //    ((p=spp())&15)!=0||(q=txp())==0?spo(p):tpo(q)
  1864:   ST {
  1865:     @Override public void drawRaster (int src, int dst, boolean rh) {
  1866:       SpriteScreen.sprStep3 ();
  1867:       int sx = 16;  //スプライトx座標
  1868:       int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
  1869:       int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
  1870:       int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
  1871:       int ta1 = 0x00020000 + ta0;
  1872:       int ta2 = 0x00040000 + ta0;
  1873:       int ta3 = 0x00060000 + ta0;
  1874:       int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
  1875:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  1876:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  1877:       if (rh) {
  1878:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  1879:         sx += half;
  1880:         tc = tc + (half >> 3) & CRTC.crtMask511;
  1881:         da += half;
  1882:       }
  1883:       if (ts == 0) {  //テキスト桁境界に合っているとき
  1884:         while (da < db) {
  1885:           int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
  1886:                     VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
  1887:                     VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
  1888:                     VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
  1889:           tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  1890:           int p, q;
  1891:           XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
  1892:                             VideoController.vcnPal32TS[p] :
  1893:                             VideoController.vcnPal32TS[q]);
  1894:           XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
  1895:                                 VideoController.vcnPal32TS[p] :
  1896:                                 VideoController.vcnPal32TS[q]);
  1897:           XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
  1898:                                 VideoController.vcnPal32TS[p] :
  1899:                                 VideoController.vcnPal32TS[q]);
  1900:           XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
  1901:                                 VideoController.vcnPal32TS[p] :
  1902:                                 VideoController.vcnPal32TS[q]);
  1903:           XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
  1904:                                 VideoController.vcnPal32TS[p] :
  1905:                                 VideoController.vcnPal32TS[q]);
  1906:           XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
  1907:                                 VideoController.vcnPal32TS[p] :
  1908:                                 VideoController.vcnPal32TS[q]);
  1909:           XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
  1910:                                 VideoController.vcnPal32TS[p] :
  1911:                                 VideoController.vcnPal32TS[q]);
  1912:           XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
  1913:                                 VideoController.vcnPal32TS[p] :
  1914:                                 VideoController.vcnPal32TS[q]);
  1915:           sx += 8;
  1916:           da += 8;
  1917:         }  //while da<db
  1918:       } else {  //テキスト桁境界に合っていないとき
  1919:         //                                                             ts=1のとき
  1920:         int tt = ts + 8;                                             //tt=9
  1921:         ts += 16;                                                    //ts=17
  1922:         //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
  1923:         int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
  1924:         int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
  1925:         int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
  1926:         int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
  1927:         tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  1928:         while (da < db) {
  1929:           //                                                           ........ ........ .1234567 ________  p0>>tt
  1930:           //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
  1931:           p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
  1932:           p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
  1933:           p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
  1934:           p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
  1935:           int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
  1936:                     VideoController.VCN_TXP2[p2 >>> 24] |
  1937:                     VideoController.VCN_TXP1[p1 >>> 24] |
  1938:                     VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
  1939:           tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  1940:           int p, q;
  1941:           XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
  1942:                             VideoController.vcnPal32TS[p] :
  1943:                             VideoController.vcnPal32TS[q]);
  1944:           XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
  1945:                                 VideoController.vcnPal32TS[p] :
  1946:                                 VideoController.vcnPal32TS[q]);
  1947:           XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
  1948:                                 VideoController.vcnPal32TS[p] :
  1949:                                 VideoController.vcnPal32TS[q]);
  1950:           XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
  1951:                                 VideoController.vcnPal32TS[p] :
  1952:                                 VideoController.vcnPal32TS[q]);
  1953:           XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
  1954:                                 VideoController.vcnPal32TS[p] :
  1955:                                 VideoController.vcnPal32TS[q]);
  1956:           XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
  1957:                                 VideoController.vcnPal32TS[p] :
  1958:                                 VideoController.vcnPal32TS[q]);
  1959:           XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
  1960:                                 VideoController.vcnPal32TS[p] :
  1961:                                 VideoController.vcnPal32TS[q]);
  1962:           XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
  1963:                                 VideoController.vcnPal32TS[p] :
  1964:                                 VideoController.vcnPal32TS[q]);
  1965:           sx += 8;
  1966:           da += 8;
  1967:         }  //while da<db
  1968:       }  //if ts==0
  1969:     }  //drawRaster
  1970:   },  //ST
  1971: 
  1972:   //================================================================================
  1973:   //XST
  1974:   //  概要
  1975:   //    ST  スプライト>テキスト
  1976:   //    拡張あり
  1977:   XST {
  1978:     @Override public void drawRaster (int src, int dst, boolean rh) {
  1979:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  1980:         //   .A.XHPGT
  1981:       case 0b00010000:  //ST_XWC
  1982:       case 0b00010001:  //ST_XWC
  1983:       case 0b00010010:  //ST_XWC
  1984:       case 0b00010011:  //ST_XWC
  1985:         ST.drawRaster (src, dst, rh);
  1986:         break;
  1987:         //   .A.XHPGT
  1988:       case 0b00010100:  //ST_XWP
  1989:       case 0b00010101:  //ST_XWP
  1990:       case 0b00010110:  //ST_XWP
  1991:       case 0b00010111:  //ST_XWP
  1992:         ST.drawRaster (src, dst, rh);
  1993:         break;
  1994:         //   .A.XHPGT
  1995:       case 0b00011000:  //ST_XHC
  1996:         ST.drawRaster (src, dst, rh);
  1997:         break;
  1998:         //   .A.XHPGT
  1999:       case 0b00011001:  //ST_XHCT
  2000:         ST.drawRaster (src, dst, rh);
  2001:         break;
  2002:         //   .A.XHPGT
  2003:       case 0b00011010:  //ST_XHCG
  2004:         ST.drawRaster (src, dst, rh);
  2005:         break;
  2006:         //   .A.XHPGT
  2007:       case 0b00011011:  //ST_XHCGT
  2008:         ST.drawRaster (src, dst, rh);
  2009:         break;
  2010:         //   .A.XHPGT
  2011:       case 0b00011101:  //ST_XHPT
  2012:         ST.drawRaster (src, dst, rh);
  2013:         break;
  2014:         //   .A.XHPGT
  2015:       case 0b00011110:  //ST_XHPG
  2016:         ST.drawRaster (src, dst, rh);
  2017:         break;
  2018:         //   .A.XHPGT
  2019:       case 0b00011111:  //ST_XHPGT
  2020:         ST.drawRaster (src, dst, rh);
  2021:         break;
  2022:         //   .A.XHPGT
  2023:       case 0b01000000:  //ST_A
  2024:       case 0b01000001:  //ST_A
  2025:       case 0b01000010:  //ST_A
  2026:       case 0b01000011:  //ST_A
  2027:       case 0b01000100:  //ST_A
  2028:       case 0b01000101:  //ST_A
  2029:       case 0b01000110:  //ST_A
  2030:       case 0b01000111:  //ST_A
  2031:       case 0b01001000:  //ST_A
  2032:       case 0b01001001:  //ST_A
  2033:       case 0b01001010:  //ST_A
  2034:       case 0b01001011:  //ST_A
  2035:       case 0b01001100:  //ST_A
  2036:       case 0b01001101:  //ST_A
  2037:       case 0b01001110:  //ST_A
  2038:       case 0b01001111:  //ST_A
  2039:       case 0b01010000:  //ST_A
  2040:       case 0b01010001:  //ST_A
  2041:       case 0b01010010:  //ST_A
  2042:       case 0b01010011:  //ST_A
  2043:       case 0b01010100:  //ST_A
  2044:       case 0b01010101:  //ST_A
  2045:       case 0b01010110:  //ST_A
  2046:       case 0b01010111:  //ST_A
  2047:       case 0b01011000:  //ST_A
  2048:       case 0b01011001:  //ST_A
  2049:       case 0b01011010:  //ST_A
  2050:       case 0b01011011:  //ST_A
  2051:       case 0b01011100:  //ST_A
  2052:       case 0b01011101:  //ST_A
  2053:       case 0b01011110:  //ST_A
  2054:       case 0b01011111:  //ST_A
  2055:         N.drawRaster (src, dst, rh);
  2056:         break;
  2057:       default:
  2058:         ST.drawRaster (src, dst, rh);
  2059:         VideoController.vcnReportUnimplemented (XST);
  2060:       }  //switch
  2061:     }  //drawRaster
  2062:   },  //XST
  2063: 
  2064:   //================================================================================
  2065:   //TS ($0000,$12xx,$0060)
  2066:   //  概要
  2067:   //    TS  テキスト>スプライト
  2068:   //    拡張なし
  2069:   //  手順
  2070:   //    テキストパレットが0でないとき
  2071:   //      テキストカラー(0は黒)
  2072:   //    さもなくば(テキストパレットが0のとき)
  2073:   //      スプライトカラー(0は黒)
  2074:   //  中間コード1
  2075:   //    (txp()!=0?tpc(txp()):spc(spp()))
  2076:   //  中間コード2
  2077:   //    txp()!=0?tpc(txp()):spc(spp())
  2078:   //  中間コード3
  2079:   //    (v0=txp())!=0?tpc(v0):spc(spp())
  2080:   //  中間コード4
  2081:   //    (p=txp())!=0?tpc(p):spc(spp())
  2082:   //  中間コード5
  2083:   //    (p=txp())!=0?tpc(p):spc(spp())
  2084:   //  中間コード6
  2085:   //    (p=txp())!=0?tpo(p):spo(spp())
  2086:   TS {
  2087:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2088:       SpriteScreen.sprStep3 ();
  2089:       int sx = 16;  //スプライトx座標
  2090:       int ty = CRTC.crtR11TxYZero + src & 1023;  //ラスタ
  2091:       int tc = (ty & CRTC.crtMask3) << 7 | CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
  2092:       int ta0 = 0x00e00000 + ((ty & CRTC.crtMaskMinus4) << 7);  //ラスタブロックアドレス
  2093:       int ta1 = 0x00020000 + ta0;
  2094:       int ta2 = 0x00040000 + ta0;
  2095:       int ta3 = 0x00060000 + ta0;
  2096:       int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
  2097:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2098:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2099:       if (rh) {
  2100:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2101:         sx += half;
  2102:         tc = tc + (half >> 3) & CRTC.crtMask511;
  2103:         da += half;
  2104:       }
  2105:       if (ts == 0) {  //テキスト桁境界に合っているとき
  2106:         while (da < db) {
  2107:           int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
  2108:                     VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
  2109:                     VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
  2110:                     VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
  2111:           tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  2112:           int p;
  2113:           XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
  2114:                             VideoController.vcnPal32TS[p] :
  2115:                             VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
  2116:           XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
  2117:                                 VideoController.vcnPal32TS[p] :
  2118:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
  2119:           XEiJ.pnlBM[da + 2] = ((p = tp >>> 20 & 15) != 0 ?
  2120:                                 VideoController.vcnPal32TS[p] :
  2121:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
  2122:           XEiJ.pnlBM[da + 3] = ((p = tp >>> 16 & 15) != 0 ?
  2123:                                 VideoController.vcnPal32TS[p] :
  2124:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
  2125:           XEiJ.pnlBM[da + 4] = ((p = tp >>> 12 & 15) != 0 ?
  2126:                                 VideoController.vcnPal32TS[p] :
  2127:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
  2128:           XEiJ.pnlBM[da + 5] = ((p = tp >>> 8 & 15) != 0 ?
  2129:                                 VideoController.vcnPal32TS[p] :
  2130:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
  2131:           XEiJ.pnlBM[da + 6] = ((p = tp >>> 4 & 15) != 0 ?
  2132:                                 VideoController.vcnPal32TS[p] :
  2133:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
  2134:           XEiJ.pnlBM[da + 7] = ((p = tp & 15) != 0 ?
  2135:                                 VideoController.vcnPal32TS[p] :
  2136:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
  2137:           sx += 8;
  2138:           da += 8;
  2139:         }  //while da<db
  2140:       } else {  //テキスト桁境界に合っていないとき
  2141:         //                                                             ts=1のとき
  2142:         int tt = ts + 8;                                             //tt=9
  2143:         ts += 16;                                                    //ts=17
  2144:         //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
  2145:         int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
  2146:         int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
  2147:         int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
  2148:         int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
  2149:         tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  2150:         while (da < db) {
  2151:           //                                                           ........ ........ .1234567 ________  p0>>tt
  2152:           //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
  2153:           p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
  2154:           p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
  2155:           p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
  2156:           p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
  2157:           int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
  2158:                     VideoController.VCN_TXP2[p2 >>> 24] |
  2159:                     VideoController.VCN_TXP1[p1 >>> 24] |
  2160:                     VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
  2161:           tc = tc + 1 & CRTC.crtMask511;  //次回のテキスト桁位置
  2162:           int p;
  2163:           XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
  2164:                             VideoController.vcnPal32TS[p] :
  2165:                             VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
  2166:           XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
  2167:                                 VideoController.vcnPal32TS[p] :
  2168:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
  2169:           XEiJ.pnlBM[da + 2] = ((p = tp >>> 20 & 15) != 0 ?
  2170:                                 VideoController.vcnPal32TS[p] :
  2171:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
  2172:           XEiJ.pnlBM[da + 3] = ((p = tp >>> 16 & 15) != 0 ?
  2173:                                 VideoController.vcnPal32TS[p] :
  2174:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
  2175:           XEiJ.pnlBM[da + 4] = ((p = tp >>> 12 & 15) != 0 ?
  2176:                                 VideoController.vcnPal32TS[p] :
  2177:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
  2178:           XEiJ.pnlBM[da + 5] = ((p = tp >>> 8 & 15) != 0 ?
  2179:                                 VideoController.vcnPal32TS[p] :
  2180:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
  2181:           XEiJ.pnlBM[da + 6] = ((p = tp >>> 4 & 15) != 0 ?
  2182:                                 VideoController.vcnPal32TS[p] :
  2183:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
  2184:           XEiJ.pnlBM[da + 7] = ((p = tp & 15) != 0 ?
  2185:                                 VideoController.vcnPal32TS[p] :
  2186:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
  2187:           sx += 8;
  2188:           da += 8;
  2189:         }  //while da<db
  2190:       }  //if ts==0
  2191:     }  //drawRaster
  2192:   },  //TS
  2193: 
  2194:   //================================================================================
  2195:   //XTS
  2196:   //  概要
  2197:   //    TS  テキスト>スプライト
  2198:   //    拡張あり
  2199:   XTS {
  2200:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2201:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  2202:         //   .A.XHPGT
  2203:       case 0b00010000:  //TS_XWC
  2204:       case 0b00010001:  //TS_XWC
  2205:       case 0b00010010:  //TS_XWC
  2206:       case 0b00010011:  //TS_XWC
  2207:         TS.drawRaster (src, dst, rh);
  2208:         break;
  2209:         //   .A.XHPGT
  2210:       case 0b00010100:  //TS_XWP
  2211:       case 0b00010101:  //TS_XWP
  2212:       case 0b00010110:  //TS_XWP
  2213:       case 0b00010111:  //TS_XWP
  2214:         TS.drawRaster (src, dst, rh);
  2215:         break;
  2216:         //   .A.XHPGT
  2217:       case 0b00011000:  //TS_XHC
  2218:         TS.drawRaster (src, dst, rh);
  2219:         break;
  2220:         //   .A.XHPGT
  2221:       case 0b00011001:  //TS_XHCT
  2222:         TS.drawRaster (src, dst, rh);
  2223:         break;
  2224:         //   .A.XHPGT
  2225:       case 0b00011010:  //TS_XHCG
  2226:         TS.drawRaster (src, dst, rh);
  2227:         break;
  2228:         //   .A.XHPGT
  2229:       case 0b00011011:  //TS_XHCGT
  2230:         TS.drawRaster (src, dst, rh);
  2231:         break;
  2232:         //   .A.XHPGT
  2233:       case 0b00011101:  //TS_XHPT
  2234:         TS.drawRaster (src, dst, rh);
  2235:         break;
  2236:         //   .A.XHPGT
  2237:       case 0b00011110:  //TS_XHPG
  2238:         TS.drawRaster (src, dst, rh);
  2239:         break;
  2240:         //   .A.XHPGT
  2241:       case 0b00011111:  //TS_XHPGT
  2242:         TS.drawRaster (src, dst, rh);
  2243:         break;
  2244:         //   .A.XHPGT
  2245:       case 0b01000000:  //TS_A
  2246:       case 0b01000001:  //TS_A
  2247:       case 0b01000010:  //TS_A
  2248:       case 0b01000011:  //TS_A
  2249:       case 0b01000100:  //TS_A
  2250:       case 0b01000101:  //TS_A
  2251:       case 0b01000110:  //TS_A
  2252:       case 0b01000111:  //TS_A
  2253:       case 0b01001000:  //TS_A
  2254:       case 0b01001001:  //TS_A
  2255:       case 0b01001010:  //TS_A
  2256:       case 0b01001011:  //TS_A
  2257:       case 0b01001100:  //TS_A
  2258:       case 0b01001101:  //TS_A
  2259:       case 0b01001110:  //TS_A
  2260:       case 0b01001111:  //TS_A
  2261:       case 0b01010000:  //TS_A
  2262:       case 0b01010001:  //TS_A
  2263:       case 0b01010010:  //TS_A
  2264:       case 0b01010011:  //TS_A
  2265:       case 0b01010100:  //TS_A
  2266:       case 0b01010101:  //TS_A
  2267:       case 0b01010110:  //TS_A
  2268:       case 0b01010111:  //TS_A
  2269:       case 0b01011000:  //TS_A
  2270:       case 0b01011001:  //TS_A
  2271:       case 0b01011010:  //TS_A
  2272:       case 0b01011011:  //TS_A
  2273:       case 0b01011100:  //TS_A
  2274:       case 0b01011101:  //TS_A
  2275:       case 0b01011110:  //TS_A
  2276:       case 0b01011111:  //TS_A
  2277:         N.drawRaster (src, dst, rh);
  2278:         break;
  2279:       default:
  2280:         TS.drawRaster (src, dst, rh);
  2281:         VideoController.vcnReportUnimplemented (XTS);
  2282:       }  //switch
  2283:     }  //drawRaster
  2284:   },  //XTS
  2285: 
  2286:   //================================================================================
  2287:   //E1 ($0000,$06xx,$0001)
  2288:   //  概要
  2289:   //    E1  512ドット16色1プレーン
  2290:   //    拡張なし
  2291:   //  手順
  2292:   //    1番目のカラー(0は黒)
  2293:   //  中間コード1
  2294:   //    epc(e1p())
  2295:   //  中間コード2
  2296:   //    epc(e1p())
  2297:   //  中間コード3
  2298:   //    epc(e1p())
  2299:   //  中間コード4
  2300:   //    epc(e1p())
  2301:   //  中間コード5
  2302:   //    epc(e1p())
  2303:   //  中間コード6
  2304:   //    epo(e1p())
  2305:   E1 {
  2306:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2307:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2308:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2309:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  2310:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2311:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2312:       if (rh) {
  2313:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2314:         gx1st += half << 1;
  2315:         da += half;
  2316:       }
  2317:       while (da < db) {
  2318:         XEiJ.pnlBM[da] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st & 1023]]);
  2319:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]]);
  2320:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]]);
  2321:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]]);
  2322:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]]);
  2323:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]]);
  2324:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]]);
  2325:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]]);
  2326:         gx1st += 16;
  2327:         da += 8;
  2328:       }  //while da<db
  2329:     }  //drawRaster
  2330:   },  //E1
  2331: 
  2332:   //================================================================================
  2333:   //XE1
  2334:   //  概要
  2335:   //    E1  512ドット16色1プレーン
  2336:   //    拡張あり
  2337:   XE1 {
  2338:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2339:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  2340:         //   .A.XHPGT
  2341:       case 0b00010000:  //E1_XWC
  2342:       case 0b00010001:  //E1_XWC
  2343:       case 0b00010010:  //E1_XWC
  2344:       case 0b00010011:  //E1_XWC
  2345:         E1.drawRaster (src, dst, rh);
  2346:         break;
  2347:         //   .A.XHPGT
  2348:       case 0b00010100:  //E1_XWP
  2349:       case 0b00010101:  //E1_XWP
  2350:       case 0b00010110:  //E1_XWP
  2351:       case 0b00010111:  //E1_XWP
  2352:         E1_XWP.drawRaster (src, dst, rh);
  2353:         break;
  2354:         //   .A.XHPGT
  2355:       case 0b00011000:  //E1_XHC
  2356:         E1.drawRaster (src, dst, rh);
  2357:         break;
  2358:         //   .A.XHPGT
  2359:       case 0b00011001:  //E1_XHCT
  2360:         E1_XHCT.drawRaster (src, dst, rh);
  2361:         break;
  2362:         //   .A.XHPGT
  2363:       case 0b00011010:  //E1_XHCG
  2364:         E1_XHCG.drawRaster (src, dst, rh);
  2365:         break;
  2366:         //   .A.XHPGT
  2367:       case 0b00011011:  //E1_XHCGT
  2368:         E1_XHCGT.drawRaster (src, dst, rh);
  2369:         break;
  2370:         //   .A.XHPGT
  2371:       case 0b00011101:  //E1_XHPT
  2372:         E1_XHPT.drawRaster (src, dst, rh);
  2373:         break;
  2374:         //   .A.XHPGT
  2375:       case 0b00011110:  //E1_XHPG
  2376:         E1_XHPG.drawRaster (src, dst, rh);
  2377:         break;
  2378:         //   .A.XHPGT
  2379:       case 0b00011111:  //E1_XHPGT
  2380:         E1_XHPGT.drawRaster (src, dst, rh);
  2381:         break;
  2382:         //   .A.XHPGT
  2383:       case 0b01000000:  //E1_A
  2384:       case 0b01000001:  //E1_A
  2385:       case 0b01000010:  //E1_A
  2386:       case 0b01000011:  //E1_A
  2387:       case 0b01000100:  //E1_A
  2388:       case 0b01000101:  //E1_A
  2389:       case 0b01000110:  //E1_A
  2390:       case 0b01000111:  //E1_A
  2391:       case 0b01001000:  //E1_A
  2392:       case 0b01001001:  //E1_A
  2393:       case 0b01001010:  //E1_A
  2394:       case 0b01001011:  //E1_A
  2395:       case 0b01001100:  //E1_A
  2396:       case 0b01001101:  //E1_A
  2397:       case 0b01001110:  //E1_A
  2398:       case 0b01001111:  //E1_A
  2399:       case 0b01010000:  //E1_A
  2400:       case 0b01010001:  //E1_A
  2401:       case 0b01010010:  //E1_A
  2402:       case 0b01010011:  //E1_A
  2403:       case 0b01010100:  //E1_A
  2404:       case 0b01010101:  //E1_A
  2405:       case 0b01010110:  //E1_A
  2406:       case 0b01010111:  //E1_A
  2407:       case 0b01011000:  //E1_A
  2408:       case 0b01011001:  //E1_A
  2409:       case 0b01011010:  //E1_A
  2410:       case 0b01011011:  //E1_A
  2411:       case 0b01011100:  //E1_A
  2412:       case 0b01011101:  //E1_A
  2413:       case 0b01011110:  //E1_A
  2414:       case 0b01011111:  //E1_A
  2415:         E1_A.drawRaster (src, dst, rh);
  2416:         break;
  2417:       default:
  2418:         E1.drawRaster (src, dst, rh);
  2419:         VideoController.vcnReportUnimplemented (XE1);
  2420:       }  //switch
  2421:     }  //drawRaster
  2422:   },  //XE1
  2423: 
  2424:   //================================================================================
  2425:   //E1_XWP ($0000,$06xx,$1401)
  2426:   //  概要
  2427:   //    E1  512ドット16色1プレーン
  2428:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  2429:   //  手順
  2430:   //    1番目のパレットが1以下のとき
  2431:   //      グラフィックパレット0のカラー(0は黒)
  2432:   //    1番目のパレットが2以上の偶数のとき
  2433:   //      1番目のカラー(0は黒)
  2434:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  2435:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  2436:   //  中間コード1
  2437:   //    (e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p())))
  2438:   //  中間コード2
  2439:   //    e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p()))
  2440:   //  中間コード3
  2441:   //    (v0=e1p())<=1?epc(0):ls1(v0)==0?epc(v0):epc(tev(v0))
  2442:   //  中間コード4
  2443:   //    (p=e1p())<=1?epc(0):ls1(p)==0?epc(p):epc(tev(p))
  2444:   //  中間コード5
  2445:   //    (p=e1p())<=1?epc(0):(p&1)==0?epc(p):epc(p&-2)
  2446:   //  中間コード6
  2447:   //    (p=e1p())<=1?epo(0):(p&1)==0?epo(p):epo(p&-2)
  2448:   E1_XWP {
  2449:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2450:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2451:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2452:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  2453:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2454:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2455:       if (rh) {
  2456:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2457:         gx1st += half << 1;
  2458:         da += half;
  2459:       }
  2460:       while (da < db) {
  2461:         int p;
  2462:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) <= 1 ?
  2463:                           VideoController.vcnPal32G8[0] :
  2464:                           (p & 1) == 0 ?
  2465:                           VideoController.vcnPal32G8[p] :
  2466:                           VideoController.vcnPal32G8[p & -2]);
  2467:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) <= 1 ?
  2468:                               VideoController.vcnPal32G8[0] :
  2469:                               (p & 1) == 0 ?
  2470:                               VideoController.vcnPal32G8[p] :
  2471:                               VideoController.vcnPal32G8[p & -2]);
  2472:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) <= 1 ?
  2473:                               VideoController.vcnPal32G8[0] :
  2474:                               (p & 1) == 0 ?
  2475:                               VideoController.vcnPal32G8[p] :
  2476:                               VideoController.vcnPal32G8[p & -2]);
  2477:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) <= 1 ?
  2478:                               VideoController.vcnPal32G8[0] :
  2479:                               (p & 1) == 0 ?
  2480:                               VideoController.vcnPal32G8[p] :
  2481:                               VideoController.vcnPal32G8[p & -2]);
  2482:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) <= 1 ?
  2483:                               VideoController.vcnPal32G8[0] :
  2484:                               (p & 1) == 0 ?
  2485:                               VideoController.vcnPal32G8[p] :
  2486:                               VideoController.vcnPal32G8[p & -2]);
  2487:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) <= 1 ?
  2488:                               VideoController.vcnPal32G8[0] :
  2489:                               (p & 1) == 0 ?
  2490:                               VideoController.vcnPal32G8[p] :
  2491:                               VideoController.vcnPal32G8[p & -2]);
  2492:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) <= 1 ?
  2493:                               VideoController.vcnPal32G8[0] :
  2494:                               (p & 1) == 0 ?
  2495:                               VideoController.vcnPal32G8[p] :
  2496:                               VideoController.vcnPal32G8[p & -2]);
  2497:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) <= 1 ?
  2498:                               VideoController.vcnPal32G8[0] :
  2499:                               (p & 1) == 0 ?
  2500:                               VideoController.vcnPal32G8[p] :
  2501:                               VideoController.vcnPal32G8[p & -2]);
  2502:         gx1st += 16;
  2503:         da += 8;
  2504:       }  //while da<db
  2505:     }  //drawRaster
  2506:   },  //E1_XWP
  2507: 
  2508:   //================================================================================
  2509:   //E1_XHCT ($0000,$06xx,$1901)
  2510:   //  概要
  2511:   //    E1  512ドット16色1プレーン
  2512:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  2513:   //  手順
  2514:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  2515:   //      1番目のカラーとカラー0を混ぜたカラー(0は黒)
  2516:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  2517:   //      1番目のカラー(0は黒)
  2518:   //  中間コード1
  2519:   //    (ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p()))
  2520:   //  中間コード2
  2521:   //    ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p())
  2522:   //  中間コード3
  2523:   //    ls1(epc(tev(v3=e1p())))!=0?mix(epc(v3),0):epc(v3)
  2524:   //  中間コード4
  2525:   //    ls1(epc(tev(p=e1p())))!=0?mix(epc(p),0):epc(p)
  2526:   //  中間コード5
  2527:   //    (epc((p=e1p())&-2)&1)!=0?mix(epc(p),0):epc(p)
  2528:   //  中間コード6
  2529:   //    (epc((p=e1p())&-2)&1)!=0?cto(mix(epc(p),0)):epo(p)
  2530:   E1_XHCT {
  2531:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2532:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2533:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2534:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  2535:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2536:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2537:       if (rh) {
  2538:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2539:         gx1st += half << 1;
  2540:         da += half;
  2541:       }
  2542:       while (da < db) {
  2543:         int p;
  2544:         XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st & 1023]) & -2] & 1) != 0 ?
  2545:                           VideoController.vcnPalTbl[
  2546:                             VideoController.vcnMix2 (
  2547:                               VideoController.vcnPal16G8[p],
  2548:                               0)] :
  2549:                           VideoController.vcnPal32G8[p]);
  2550:         XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) & -2] & 1) != 0 ?
  2551:                               VideoController.vcnPalTbl[
  2552:                                 VideoController.vcnMix2 (
  2553:                                   VideoController.vcnPal16G8[p],
  2554:                                   0)] :
  2555:                               VideoController.vcnPal32G8[p]);
  2556:         XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) & -2] & 1) != 0 ?
  2557:                               VideoController.vcnPalTbl[
  2558:                                 VideoController.vcnMix2 (
  2559:                                   VideoController.vcnPal16G8[p],
  2560:                                   0)] :
  2561:                               VideoController.vcnPal32G8[p]);
  2562:         XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) & -2] & 1) != 0 ?
  2563:                               VideoController.vcnPalTbl[
  2564:                                 VideoController.vcnMix2 (
  2565:                                   VideoController.vcnPal16G8[p],
  2566:                                   0)] :
  2567:                               VideoController.vcnPal32G8[p]);
  2568:         XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) & -2] & 1) != 0 ?
  2569:                               VideoController.vcnPalTbl[
  2570:                                 VideoController.vcnMix2 (
  2571:                                   VideoController.vcnPal16G8[p],
  2572:                                   0)] :
  2573:                               VideoController.vcnPal32G8[p]);
  2574:         XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) & -2] & 1) != 0 ?
  2575:                               VideoController.vcnPalTbl[
  2576:                                 VideoController.vcnMix2 (
  2577:                                   VideoController.vcnPal16G8[p],
  2578:                                   0)] :
  2579:                               VideoController.vcnPal32G8[p]);
  2580:         XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) & -2] & 1) != 0 ?
  2581:                               VideoController.vcnPalTbl[
  2582:                                 VideoController.vcnMix2 (
  2583:                                   VideoController.vcnPal16G8[p],
  2584:                                   0)] :
  2585:                               VideoController.vcnPal32G8[p]);
  2586:         XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) & -2] & 1) != 0 ?
  2587:                               VideoController.vcnPalTbl[
  2588:                                 VideoController.vcnMix2 (
  2589:                                   VideoController.vcnPal16G8[p],
  2590:                                   0)] :
  2591:                               VideoController.vcnPal32G8[p]);
  2592:         gx1st += 16;
  2593:         da += 8;
  2594:       }  //while da<db
  2595:     }  //drawRaster
  2596:   },  //E1_XHCT
  2597: 
  2598:   //================================================================================
  2599:   //E1_XHCG ($0000,$06xx,$1A01)
  2600:   //  概要
  2601:   //    E1  512ドット16色1プレーン
  2602:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  2603:   //  手順
  2604:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  2605:   //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  2606:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  2607:   //      1番目のパレットが奇数のとき
  2608:   //        2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  2609:   //      さもなくば(1番目のパレットが偶数のとき)
  2610:   //        1番目のカラー(0は黒)
  2611:   //  中間コード1
  2612:   //    (ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p())))
  2613:   //  中間コード2
  2614:   //    ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p())
  2615:   //  中間コード3
  2616:   //    ls1(v1=epc(tev(v3=e1p())))!=0?mix(v1,epc(tod(e2q()))):ls1(v3)!=0?epc(tod(e2q())):epc(v3)
  2617:   //  中間コード4
  2618:   //    ls1(p=epc(tev(q=e1p())))!=0?mix(p,epc(tod(e2q()))):ls1(q)!=0?epc(tod(e2q())):epc(q)
  2619:   //  中間コード5
  2620:   //    ((p=epc((q=e1p())&-2))&1)!=0?mix(p,epc(e2q()|1)):(q&1)!=0?epc(e2q()|1):epc(q)
  2621:   //  中間コード6
  2622:   //    ((p=epc((q=e1p())&-2))&1)!=0?cto(mix(p,epc(e2q()|1))):(q&1)!=0?epo(e2q()|1):epo(q)
  2623:   E1_XHCG {
  2624:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2625:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2626:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2627:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  2628:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  2629:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  2630:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  2631:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2632:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2633:       if (rh) {
  2634:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2635:         gx1st += half << 1;
  2636:         gx2nd += half << 1;
  2637:         da += half;
  2638:       }
  2639:       while (da < db) {
  2640:         int p, q;
  2641:         XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st & 1023]) & -2]) & 1) != 0 ?
  2642:                           VideoController.vcnPalTbl[
  2643:                             VideoController.vcnMix2 (
  2644:                               p,
  2645:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  2646:                           (q & 1) != 0 ?
  2647:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  2648:                           VideoController.vcnPal32G8[q]);
  2649:         XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) & -2]) & 1) != 0 ?
  2650:                               VideoController.vcnPalTbl[
  2651:                                 VideoController.vcnMix2 (
  2652:                                   p,
  2653:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  2654:                               (q & 1) != 0 ?
  2655:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  2656:                               VideoController.vcnPal32G8[q]);
  2657:         XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) & -2]) & 1) != 0 ?
  2658:                               VideoController.vcnPalTbl[
  2659:                                 VideoController.vcnMix2 (
  2660:                                   p,
  2661:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  2662:                               (q & 1) != 0 ?
  2663:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  2664:                               VideoController.vcnPal32G8[q]);
  2665:         XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) & -2]) & 1) != 0 ?
  2666:                               VideoController.vcnPalTbl[
  2667:                                 VideoController.vcnMix2 (
  2668:                                   p,
  2669:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  2670:                               (q & 1) != 0 ?
  2671:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  2672:                               VideoController.vcnPal32G8[q]);
  2673:         XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) & -2]) & 1) != 0 ?
  2674:                               VideoController.vcnPalTbl[
  2675:                                 VideoController.vcnMix2 (
  2676:                                   p,
  2677:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  2678:                               (q & 1) != 0 ?
  2679:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  2680:                               VideoController.vcnPal32G8[q]);
  2681:         XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) & -2]) & 1) != 0 ?
  2682:                               VideoController.vcnPalTbl[
  2683:                                 VideoController.vcnMix2 (
  2684:                                   p,
  2685:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  2686:                               (q & 1) != 0 ?
  2687:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  2688:                               VideoController.vcnPal32G8[q]);
  2689:         XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) & -2]) & 1) != 0 ?
  2690:                               VideoController.vcnPalTbl[
  2691:                                 VideoController.vcnMix2 (
  2692:                                   p,
  2693:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  2694:                               (q & 1) != 0 ?
  2695:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  2696:                               VideoController.vcnPal32G8[q]);
  2697:         XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) & -2]) & 1) != 0 ?
  2698:                               VideoController.vcnPalTbl[
  2699:                                 VideoController.vcnMix2 (
  2700:                                   p,
  2701:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  2702:                               (q & 1) != 0 ?
  2703:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  2704:                               VideoController.vcnPal32G8[q]);
  2705:         gx1st += 16;
  2706:         gx2nd += 16;
  2707:         da += 8;
  2708:       }  //while da<db
  2709:     }  //drawRaster
  2710:   },  //E1_XHCG
  2711: 
  2712:   //================================================================================
  2713:   //E1_XHCGT ($0000,$06xx,$1B01)
  2714:   //  概要
  2715:   //    E1  512ドット16色1プレーン
  2716:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  2717:   //  手順
  2718:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  2719:   //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  2720:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  2721:   //      1番目のパレットが奇数のとき
  2722:   //        2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  2723:   //      さもなくば(1番目のパレットが偶数のとき)
  2724:   //        1番目のカラー(0は黒)
  2725:   //  中間コード1
  2726:   //    (ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p())))
  2727:   //  中間コード2
  2728:   //    ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p())
  2729:   //  中間コード3
  2730:   //    ls1(v1=epc(tev(v3=e1p())))!=0?mix(mix(v1,epc(tod(e2q()))),0):ls1(v3)!=0?epc(tod(e2q())):epc(v3)
  2731:   //  中間コード4
  2732:   //    ls1(p=epc(tev(q=e1p())))!=0?mix(mix(p,epc(tod(e2q()))),0):ls1(q)!=0?epc(tod(e2q())):epc(q)
  2733:   //  中間コード5
  2734:   //    ((p=epc((q=e1p())&-2))&1)!=0?mix(mix(p,epc(e2q()|1)),0):(q&1)!=0?epc(e2q()|1):epc(q)
  2735:   //  中間コード6
  2736:   //    ((p=epc((q=e1p())&-2))&1)!=0?cto(mix(mix(p,epc(e2q()|1)),0)):(q&1)!=0?epo(e2q()|1):epo(q)
  2737:   E1_XHCGT {
  2738:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2739:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2740:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2741:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  2742:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  2743:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  2744:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  2745:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2746:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2747:       if (rh) {
  2748:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2749:         gx1st += half << 1;
  2750:         gx2nd += half << 1;
  2751:         da += half;
  2752:       }
  2753:       while (da < db) {
  2754:         int p, q;
  2755:         XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st & 1023]) & -2]) & 1) != 0 ?
  2756:                           VideoController.vcnPalTbl[
  2757:                             VideoController.vcnMix2 (
  2758:                               VideoController.vcnMix2 (
  2759:                                 p,
  2760:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  2761:                               0)] :
  2762:                           (q & 1) != 0 ?
  2763:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  2764:                           VideoController.vcnPal32G8[q]);
  2765:         XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) & -2]) & 1) != 0 ?
  2766:                               VideoController.vcnPalTbl[
  2767:                                 VideoController.vcnMix2 (
  2768:                                   VideoController.vcnMix2 (
  2769:                                     p,
  2770:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  2771:                                   0)] :
  2772:                               (q & 1) != 0 ?
  2773:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  2774:                               VideoController.vcnPal32G8[q]);
  2775:         XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) & -2]) & 1) != 0 ?
  2776:                               VideoController.vcnPalTbl[
  2777:                                 VideoController.vcnMix2 (
  2778:                                   VideoController.vcnMix2 (
  2779:                                     p,
  2780:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  2781:                                   0)] :
  2782:                               (q & 1) != 0 ?
  2783:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  2784:                               VideoController.vcnPal32G8[q]);
  2785:         XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) & -2]) & 1) != 0 ?
  2786:                               VideoController.vcnPalTbl[
  2787:                                 VideoController.vcnMix2 (
  2788:                                   VideoController.vcnMix2 (
  2789:                                     p,
  2790:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  2791:                                   0)] :
  2792:                               (q & 1) != 0 ?
  2793:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  2794:                               VideoController.vcnPal32G8[q]);
  2795:         XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) & -2]) & 1) != 0 ?
  2796:                               VideoController.vcnPalTbl[
  2797:                                 VideoController.vcnMix2 (
  2798:                                   VideoController.vcnMix2 (
  2799:                                     p,
  2800:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  2801:                                   0)] :
  2802:                               (q & 1) != 0 ?
  2803:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  2804:                               VideoController.vcnPal32G8[q]);
  2805:         XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) & -2]) & 1) != 0 ?
  2806:                               VideoController.vcnPalTbl[
  2807:                                 VideoController.vcnMix2 (
  2808:                                   VideoController.vcnMix2 (
  2809:                                     p,
  2810:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  2811:                                   0)] :
  2812:                               (q & 1) != 0 ?
  2813:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  2814:                               VideoController.vcnPal32G8[q]);
  2815:         XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) & -2]) & 1) != 0 ?
  2816:                               VideoController.vcnPalTbl[
  2817:                                 VideoController.vcnMix2 (
  2818:                                   VideoController.vcnMix2 (
  2819:                                     p,
  2820:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  2821:                                   0)] :
  2822:                               (q & 1) != 0 ?
  2823:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  2824:                               VideoController.vcnPal32G8[q]);
  2825:         XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) & -2]) & 1) != 0 ?
  2826:                               VideoController.vcnPalTbl[
  2827:                                 VideoController.vcnMix2 (
  2828:                                   VideoController.vcnMix2 (
  2829:                                     p,
  2830:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  2831:                                   0)] :
  2832:                               (q & 1) != 0 ?
  2833:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  2834:                               VideoController.vcnPal32G8[q]);
  2835:         gx1st += 16;
  2836:         gx2nd += 16;
  2837:         da += 8;
  2838:       }  //while da<db
  2839:     }  //drawRaster
  2840:   },  //E1_XHCGT
  2841: 
  2842:   //================================================================================
  2843:   //E1_XHPT ($0000,$06xx,$1D01)
  2844:   //  概要
  2845:   //    E1  512ドット16色1プレーン
  2846:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  2847:   //  手順
  2848:   //    1番目のパレットが1以下のとき
  2849:   //      グラフィックパレット0のカラー(0は黒)
  2850:   //    1番目のパレットが2以上の偶数のとき
  2851:   //      1番目のカラー(0は黒)
  2852:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  2853:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  2854:   //  中間コード1
  2855:   //    (e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0))
  2856:   //  中間コード2
  2857:   //    e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0)
  2858:   //  中間コード3
  2859:   //    (v0=e1p())<=1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),0)
  2860:   //  中間コード4
  2861:   //    (p=e1p())<=1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),0)
  2862:   //  中間コード5
  2863:   //    (p=e1p())<=1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),0)
  2864:   //  中間コード6
  2865:   //    (p=e1p())<=1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),0))
  2866:   E1_XHPT {
  2867:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2868:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2869:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2870:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  2871:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2872:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2873:       if (rh) {
  2874:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2875:         gx1st += half << 1;
  2876:         da += half;
  2877:       }
  2878:       while (da < db) {
  2879:         int p;
  2880:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) <= 1 ?
  2881:                           VideoController.vcnPal32G8[0] :
  2882:                           (p & 1) == 0 ?
  2883:                           VideoController.vcnPal32G8[p] :
  2884:                           VideoController.vcnPalTbl[
  2885:                             VideoController.vcnMix2 (
  2886:                               VideoController.vcnPal16G8[p & -2],
  2887:                               0)]);
  2888:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) <= 1 ?
  2889:                               VideoController.vcnPal32G8[0] :
  2890:                               (p & 1) == 0 ?
  2891:                               VideoController.vcnPal32G8[p] :
  2892:                               VideoController.vcnPalTbl[
  2893:                                 VideoController.vcnMix2 (
  2894:                                   VideoController.vcnPal16G8[p & -2],
  2895:                                   0)]);
  2896:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) <= 1 ?
  2897:                               VideoController.vcnPal32G8[0] :
  2898:                               (p & 1) == 0 ?
  2899:                               VideoController.vcnPal32G8[p] :
  2900:                               VideoController.vcnPalTbl[
  2901:                                 VideoController.vcnMix2 (
  2902:                                   VideoController.vcnPal16G8[p & -2],
  2903:                                   0)]);
  2904:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) <= 1 ?
  2905:                               VideoController.vcnPal32G8[0] :
  2906:                               (p & 1) == 0 ?
  2907:                               VideoController.vcnPal32G8[p] :
  2908:                               VideoController.vcnPalTbl[
  2909:                                 VideoController.vcnMix2 (
  2910:                                   VideoController.vcnPal16G8[p & -2],
  2911:                                   0)]);
  2912:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) <= 1 ?
  2913:                               VideoController.vcnPal32G8[0] :
  2914:                               (p & 1) == 0 ?
  2915:                               VideoController.vcnPal32G8[p] :
  2916:                               VideoController.vcnPalTbl[
  2917:                                 VideoController.vcnMix2 (
  2918:                                   VideoController.vcnPal16G8[p & -2],
  2919:                                   0)]);
  2920:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) <= 1 ?
  2921:                               VideoController.vcnPal32G8[0] :
  2922:                               (p & 1) == 0 ?
  2923:                               VideoController.vcnPal32G8[p] :
  2924:                               VideoController.vcnPalTbl[
  2925:                                 VideoController.vcnMix2 (
  2926:                                   VideoController.vcnPal16G8[p & -2],
  2927:                                   0)]);
  2928:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) <= 1 ?
  2929:                               VideoController.vcnPal32G8[0] :
  2930:                               (p & 1) == 0 ?
  2931:                               VideoController.vcnPal32G8[p] :
  2932:                               VideoController.vcnPalTbl[
  2933:                                 VideoController.vcnMix2 (
  2934:                                   VideoController.vcnPal16G8[p & -2],
  2935:                                   0)]);
  2936:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) <= 1 ?
  2937:                               VideoController.vcnPal32G8[0] :
  2938:                               (p & 1) == 0 ?
  2939:                               VideoController.vcnPal32G8[p] :
  2940:                               VideoController.vcnPalTbl[
  2941:                                 VideoController.vcnMix2 (
  2942:                                   VideoController.vcnPal16G8[p & -2],
  2943:                                   0)]);
  2944:         gx1st += 16;
  2945:         da += 8;
  2946:       }  //while da<db
  2947:     }  //drawRaster
  2948:   },  //E1_XHPT
  2949: 
  2950:   //================================================================================
  2951:   //E1_XHPG ($0000,$06xx,$1E01)
  2952:   //  概要
  2953:   //    E1  512ドット16色1プレーン
  2954:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  2955:   //  手順
  2956:   //    1番目のパレットが1以下のとき
  2957:   //      グラフィックパレット0のカラー(0は黒)
  2958:   //    1番目のパレットが2以上の偶数のとき
  2959:   //      1番目のカラー(0は黒)
  2960:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  2961:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  2962:   //  中間コード1
  2963:   //    (e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2q()))))
  2964:   //  中間コード2
  2965:   //    e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2q())))
  2966:   //  中間コード3
  2967:   //    (v0=e1p())<=1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),epc(tod(e2q())))
  2968:   //  中間コード4
  2969:   //    (p=e1p())<=1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),epc(tod(e2q())))
  2970:   //  中間コード5
  2971:   //    (p=e1p())<=1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),epc(e2q()|1))
  2972:   //  中間コード6
  2973:   //    (p=e1p())<=1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),epc(e2q()|1)))
  2974:   E1_XHPG {
  2975:     @Override public void drawRaster (int src, int dst, boolean rh) {
  2976:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2977:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2978:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  2979:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  2980:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  2981:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  2982:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2983:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2984:       if (rh) {
  2985:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2986:         gx1st += half << 1;
  2987:         gx2nd += half << 1;
  2988:         da += half;
  2989:       }
  2990:       while (da < db) {
  2991:         int p;
  2992:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) <= 1 ?
  2993:                           VideoController.vcnPal32G8[0] :
  2994:                           (p & 1) == 0 ?
  2995:                           VideoController.vcnPal32G8[p] :
  2996:                           VideoController.vcnPalTbl[
  2997:                             VideoController.vcnMix2 (
  2998:                               VideoController.vcnPal16G8[p & -2],
  2999:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])]);
  3000:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) <= 1 ?
  3001:                               VideoController.vcnPal32G8[0] :
  3002:                               (p & 1) == 0 ?
  3003:                               VideoController.vcnPal32G8[p] :
  3004:                               VideoController.vcnPalTbl[
  3005:                                 VideoController.vcnMix2 (
  3006:                                   VideoController.vcnPal16G8[p & -2],
  3007:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])]);
  3008:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) <= 1 ?
  3009:                               VideoController.vcnPal32G8[0] :
  3010:                               (p & 1) == 0 ?
  3011:                               VideoController.vcnPal32G8[p] :
  3012:                               VideoController.vcnPalTbl[
  3013:                                 VideoController.vcnMix2 (
  3014:                                   VideoController.vcnPal16G8[p & -2],
  3015:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])]);
  3016:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) <= 1 ?
  3017:                               VideoController.vcnPal32G8[0] :
  3018:                               (p & 1) == 0 ?
  3019:                               VideoController.vcnPal32G8[p] :
  3020:                               VideoController.vcnPalTbl[
  3021:                                 VideoController.vcnMix2 (
  3022:                                   VideoController.vcnPal16G8[p & -2],
  3023:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])]);
  3024:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) <= 1 ?
  3025:                               VideoController.vcnPal32G8[0] :
  3026:                               (p & 1) == 0 ?
  3027:                               VideoController.vcnPal32G8[p] :
  3028:                               VideoController.vcnPalTbl[
  3029:                                 VideoController.vcnMix2 (
  3030:                                   VideoController.vcnPal16G8[p & -2],
  3031:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])]);
  3032:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) <= 1 ?
  3033:                               VideoController.vcnPal32G8[0] :
  3034:                               (p & 1) == 0 ?
  3035:                               VideoController.vcnPal32G8[p] :
  3036:                               VideoController.vcnPalTbl[
  3037:                                 VideoController.vcnMix2 (
  3038:                                   VideoController.vcnPal16G8[p & -2],
  3039:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])]);
  3040:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) <= 1 ?
  3041:                               VideoController.vcnPal32G8[0] :
  3042:                               (p & 1) == 0 ?
  3043:                               VideoController.vcnPal32G8[p] :
  3044:                               VideoController.vcnPalTbl[
  3045:                                 VideoController.vcnMix2 (
  3046:                                   VideoController.vcnPal16G8[p & -2],
  3047:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])]);
  3048:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) <= 1 ?
  3049:                               VideoController.vcnPal32G8[0] :
  3050:                               (p & 1) == 0 ?
  3051:                               VideoController.vcnPal32G8[p] :
  3052:                               VideoController.vcnPalTbl[
  3053:                                 VideoController.vcnMix2 (
  3054:                                   VideoController.vcnPal16G8[p & -2],
  3055:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])]);
  3056:         gx1st += 16;
  3057:         gx2nd += 16;
  3058:         da += 8;
  3059:       }  //while da<db
  3060:     }  //drawRaster
  3061:   },  //E1_XHPG
  3062: 
  3063:   //================================================================================
  3064:   //E1_XHPGT ($0000,$06xx,$1F01)
  3065:   //  概要
  3066:   //    E1  512ドット16色1プレーン
  3067:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  3068:   //  手順
  3069:   //    1番目のパレットが1以下のとき
  3070:   //      グラフィックパレット0のカラー(0は黒)
  3071:   //    1番目のパレットが2以上の偶数のとき
  3072:   //      1番目のカラー(0は黒)
  3073:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  3074:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  3075:   //  中間コード1
  3076:   //    (e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0))
  3077:   //  中間コード2
  3078:   //    e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0)
  3079:   //  中間コード3
  3080:   //    (v0=e1p())<=1?epc(0):ls1(v0)==0?epc(v0):mix(mix(epc(tev(v0)),epc(tod(e2q()))),0)
  3081:   //  中間コード4
  3082:   //    (p=e1p())<=1?epc(0):ls1(p)==0?epc(p):mix(mix(epc(tev(p)),epc(tod(e2q()))),0)
  3083:   //  中間コード5
  3084:   //    (p=e1p())<=1?epc(0):(p&1)==0?epc(p):mix(mix(epc(p&-2),epc(e2q()|1)),0)
  3085:   //  中間コード6
  3086:   //    (p=e1p())<=1?epo(0):(p&1)==0?epo(p):cto(mix(mix(epc(p&-2),epc(e2q()|1)),0))
  3087:   E1_XHPGT {
  3088:     @Override public void drawRaster (int src, int dst, boolean rh) {
  3089:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3090:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3091:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3092:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3093:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3094:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  3095:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3096:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3097:       if (rh) {
  3098:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3099:         gx1st += half << 1;
  3100:         gx2nd += half << 1;
  3101:         da += half;
  3102:       }
  3103:       while (da < db) {
  3104:         int p;
  3105:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) <= 1 ?
  3106:                           VideoController.vcnPal32G8[0] :
  3107:                           (p & 1) == 0 ?
  3108:                           VideoController.vcnPal32G8[p] :
  3109:                           VideoController.vcnPalTbl[
  3110:                             VideoController.vcnMix2 (
  3111:                               VideoController.vcnMix2 (
  3112:                                 VideoController.vcnPal16G8[p & -2],
  3113:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  3114:                               0)]);
  3115:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) <= 1 ?
  3116:                               VideoController.vcnPal32G8[0] :
  3117:                               (p & 1) == 0 ?
  3118:                               VideoController.vcnPal32G8[p] :
  3119:                               VideoController.vcnPalTbl[
  3120:                                 VideoController.vcnMix2 (
  3121:                                   VideoController.vcnMix2 (
  3122:                                     VideoController.vcnPal16G8[p & -2],
  3123:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  3124:                                   0)]);
  3125:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) <= 1 ?
  3126:                               VideoController.vcnPal32G8[0] :
  3127:                               (p & 1) == 0 ?
  3128:                               VideoController.vcnPal32G8[p] :
  3129:                               VideoController.vcnPalTbl[
  3130:                                 VideoController.vcnMix2 (
  3131:                                   VideoController.vcnMix2 (
  3132:                                     VideoController.vcnPal16G8[p & -2],
  3133:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  3134:                                   0)]);
  3135:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) <= 1 ?
  3136:                               VideoController.vcnPal32G8[0] :
  3137:                               (p & 1) == 0 ?
  3138:                               VideoController.vcnPal32G8[p] :
  3139:                               VideoController.vcnPalTbl[
  3140:                                 VideoController.vcnMix2 (
  3141:                                   VideoController.vcnMix2 (
  3142:                                     VideoController.vcnPal16G8[p & -2],
  3143:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  3144:                                   0)]);
  3145:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) <= 1 ?
  3146:                               VideoController.vcnPal32G8[0] :
  3147:                               (p & 1) == 0 ?
  3148:                               VideoController.vcnPal32G8[p] :
  3149:                               VideoController.vcnPalTbl[
  3150:                                 VideoController.vcnMix2 (
  3151:                                   VideoController.vcnMix2 (
  3152:                                     VideoController.vcnPal16G8[p & -2],
  3153:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  3154:                                   0)]);
  3155:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) <= 1 ?
  3156:                               VideoController.vcnPal32G8[0] :
  3157:                               (p & 1) == 0 ?
  3158:                               VideoController.vcnPal32G8[p] :
  3159:                               VideoController.vcnPalTbl[
  3160:                                 VideoController.vcnMix2 (
  3161:                                   VideoController.vcnMix2 (
  3162:                                     VideoController.vcnPal16G8[p & -2],
  3163:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  3164:                                   0)]);
  3165:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) <= 1 ?
  3166:                               VideoController.vcnPal32G8[0] :
  3167:                               (p & 1) == 0 ?
  3168:                               VideoController.vcnPal32G8[p] :
  3169:                               VideoController.vcnPalTbl[
  3170:                                 VideoController.vcnMix2 (
  3171:                                   VideoController.vcnMix2 (
  3172:                                     VideoController.vcnPal16G8[p & -2],
  3173:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  3174:                                   0)]);
  3175:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) <= 1 ?
  3176:                               VideoController.vcnPal32G8[0] :
  3177:                               (p & 1) == 0 ?
  3178:                               VideoController.vcnPal32G8[p] :
  3179:                               VideoController.vcnPalTbl[
  3180:                                 VideoController.vcnMix2 (
  3181:                                   VideoController.vcnMix2 (
  3182:                                     VideoController.vcnPal16G8[p & -2],
  3183:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  3184:                                   0)]);
  3185:         gx1st += 16;
  3186:         gx2nd += 16;
  3187:         da += 8;
  3188:       }  //while da<db
  3189:     }  //drawRaster
  3190:   },  //E1_XHPGT
  3191: 
  3192:   //================================================================================
  3193:   //E1_A ($0000,$06xx,$4001)
  3194:   //  概要
  3195:   //    E1  512ドット16色1プレーン
  3196:   //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
  3197:   //  手順
  3198:   //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  3199:   //  中間コード1
  3200:   //    mix(epc(e1p()),tpc(0))
  3201:   //  中間コード2
  3202:   //    mix(epc(e1p()),tpc(0))
  3203:   //  中間コード3
  3204:   //    mix(epc(e1p()),tpc(0))
  3205:   //  中間コード4
  3206:   //    mix(epc(e1p()),tpc(0))
  3207:   //  中間コード5
  3208:   //    mix(epc(e1p()),tpc(0))
  3209:   //  中間コード6
  3210:   //    cto(mix(epc(e1p()),tpc(0)))
  3211:   E1_A {
  3212:     @Override public void drawRaster (int src, int dst, boolean rh) {
  3213:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3214:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3215:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3216:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3217:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3218:       if (rh) {
  3219:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3220:         gx1st += half << 1;
  3221:         da += half;
  3222:       }
  3223:       while (da < db) {
  3224:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  3225:                             VideoController.vcnMix2 (
  3226:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st & 1023]],
  3227:                               VideoController.vcnPal16TS[0])]);
  3228:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  3229:                                 VideoController.vcnMix2 (
  3230:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]],
  3231:                                   VideoController.vcnPal16TS[0])]);
  3232:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  3233:                                 VideoController.vcnMix2 (
  3234:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]],
  3235:                                   VideoController.vcnPal16TS[0])]);
  3236:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  3237:                                 VideoController.vcnMix2 (
  3238:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]],
  3239:                                   VideoController.vcnPal16TS[0])]);
  3240:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  3241:                                 VideoController.vcnMix2 (
  3242:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]],
  3243:                                   VideoController.vcnPal16TS[0])]);
  3244:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  3245:                                 VideoController.vcnMix2 (
  3246:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]],
  3247:                                   VideoController.vcnPal16TS[0])]);
  3248:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  3249:                                 VideoController.vcnMix2 (
  3250:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]],
  3251:                                   VideoController.vcnPal16TS[0])]);
  3252:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  3253:                                 VideoController.vcnMix2 (
  3254:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]],
  3255:                                   VideoController.vcnPal16TS[0])]);
  3256:         gx1st += 16;
  3257:         da += 8;
  3258:       }  //while da<db
  3259:     }  //drawRaster
  3260:   },  //E1_A
  3261: 
  3262:   //================================================================================
  3263:   //E2 ($0000,$06xx,$0003)
  3264:   //  概要
  3265:   //    E2  512ドット16色2プレーン
  3266:   //    拡張なし
  3267:   //  手順
  3268:   //    1番目のパレットが0でないとき
  3269:   //      1番目のカラー(0は黒)
  3270:   //    さもなくば(1番目のパレットが0のとき)
  3271:   //      2番目のカラー(0は黒)
  3272:   //  中間コード1
  3273:   //    (e1p()!=0?epc(e1p()):epc(e2p()))
  3274:   //  中間コード2
  3275:   //    e1p()!=0?epc(e1p()):epc(e2p())
  3276:   //  中間コード3
  3277:   //    (v0=e1p())!=0?epc(v0):epc(e2p())
  3278:   //  中間コード4
  3279:   //    (p=e1p())!=0?epc(p):epc(e2p())
  3280:   //  中間コード5
  3281:   //    (p=e1p())!=0?epc(p):epc(e2p())
  3282:   //  中間コード6
  3283:   //    (p=e1p())!=0?epo(p):epo(e2p())
  3284:   E2 {
  3285:     @Override public void drawRaster (int src, int dst, boolean rh) {
  3286:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3287:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3288:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3289:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3290:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3291:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3292:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3293:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3294:       if (rh) {
  3295:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3296:         gx1st += half << 1;
  3297:         gx2nd += half << 1;
  3298:         da += half;
  3299:       }
  3300:       while (da < db) {
  3301:         int p;
  3302:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  3303:                           VideoController.vcnPal32G8[p] :
  3304:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023]]);
  3305:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  3306:                               VideoController.vcnPal32G8[p] :
  3307:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]]);
  3308:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  3309:                               VideoController.vcnPal32G8[p] :
  3310:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]]);
  3311:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  3312:                               VideoController.vcnPal32G8[p] :
  3313:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]]);
  3314:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  3315:                               VideoController.vcnPal32G8[p] :
  3316:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]]);
  3317:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  3318:                               VideoController.vcnPal32G8[p] :
  3319:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]]);
  3320:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  3321:                               VideoController.vcnPal32G8[p] :
  3322:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]]);
  3323:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  3324:                               VideoController.vcnPal32G8[p] :
  3325:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]]);
  3326:         gx1st += 16;
  3327:         gx2nd += 16;
  3328:         da += 8;
  3329:       }  //while da<db
  3330:     }  //drawRaster
  3331:   },  //E2
  3332: 
  3333:   //================================================================================
  3334:   //XE2
  3335:   //  概要
  3336:   //    E2  512ドット16色2プレーン
  3337:   //    拡張あり
  3338:   XE2 {
  3339:     @Override public void drawRaster (int src, int dst, boolean rh) {
  3340:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  3341:         //   .A.XHPGT
  3342:       case 0b00010000:  //E2_XWC
  3343:       case 0b00010001:  //E2_XWC
  3344:       case 0b00010010:  //E2_XWC
  3345:       case 0b00010011:  //E2_XWC
  3346:         E2.drawRaster (src, dst, rh);
  3347:         break;
  3348:         //   .A.XHPGT
  3349:       case 0b00010100:  //E2_XWP
  3350:       case 0b00010101:  //E2_XWP
  3351:       case 0b00010110:  //E2_XWP
  3352:       case 0b00010111:  //E2_XWP
  3353:         E2_XWP.drawRaster (src, dst, rh);
  3354:         break;
  3355:         //   .A.XHPGT
  3356:       case 0b00011000:  //E2_XHC
  3357:         E2.drawRaster (src, dst, rh);
  3358:         break;
  3359:         //   .A.XHPGT
  3360:       case 0b00011001:  //E2_XHCT
  3361:         E2_XHCT.drawRaster (src, dst, rh);
  3362:         break;
  3363:         //   .A.XHPGT
  3364:       case 0b00011010:  //E2_XHCG
  3365:         E2_XHCG.drawRaster (src, dst, rh);
  3366:         break;
  3367:         //   .A.XHPGT
  3368:       case 0b00011011:  //E2_XHCGT
  3369:         E2_XHCGT.drawRaster (src, dst, rh);
  3370:         break;
  3371:         //   .A.XHPGT
  3372:       case 0b00011101:  //E2_XHPT
  3373:         E2_XHPT.drawRaster (src, dst, rh);
  3374:         break;
  3375:         //   .A.XHPGT
  3376:       case 0b00011110:  //E2_XHPG
  3377:         E2_XHPG.drawRaster (src, dst, rh);
  3378:         break;
  3379:         //   .A.XHPGT
  3380:       case 0b00011111:  //E2_XHPGT
  3381:         E2_XHPGT.drawRaster (src, dst, rh);
  3382:         break;
  3383:         //   .A.XHPGT
  3384:       case 0b01000000:  //E2_A
  3385:       case 0b01000001:  //E2_A
  3386:       case 0b01000010:  //E2_A
  3387:       case 0b01000011:  //E2_A
  3388:       case 0b01000100:  //E2_A
  3389:       case 0b01000101:  //E2_A
  3390:       case 0b01000110:  //E2_A
  3391:       case 0b01000111:  //E2_A
  3392:       case 0b01001000:  //E2_A
  3393:       case 0b01001001:  //E2_A
  3394:       case 0b01001010:  //E2_A
  3395:       case 0b01001011:  //E2_A
  3396:       case 0b01001100:  //E2_A
  3397:       case 0b01001101:  //E2_A
  3398:       case 0b01001110:  //E2_A
  3399:       case 0b01001111:  //E2_A
  3400:       case 0b01010000:  //E2_A
  3401:       case 0b01010001:  //E2_A
  3402:       case 0b01010010:  //E2_A
  3403:       case 0b01010011:  //E2_A
  3404:       case 0b01010100:  //E2_A
  3405:       case 0b01010101:  //E2_A
  3406:       case 0b01010110:  //E2_A
  3407:       case 0b01010111:  //E2_A
  3408:       case 0b01011000:  //E2_A
  3409:       case 0b01011001:  //E2_A
  3410:       case 0b01011010:  //E2_A
  3411:       case 0b01011011:  //E2_A
  3412:       case 0b01011100:  //E2_A
  3413:       case 0b01011101:  //E2_A
  3414:       case 0b01011110:  //E2_A
  3415:       case 0b01011111:  //E2_A
  3416:         E2_A.drawRaster (src, dst, rh);
  3417:         break;
  3418:       default:
  3419:         E2.drawRaster (src, dst, rh);
  3420:         VideoController.vcnReportUnimplemented (XE2);
  3421:       }  //switch
  3422:     }  //drawRaster
  3423:   },  //XE2
  3424: 
  3425:   //================================================================================
  3426:   //E2_XWP ($0000,$06xx,$1403)
  3427:   //  概要
  3428:   //    E2  512ドット16色2プレーン
  3429:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  3430:   //  手順
  3431:   //    1番目のパレットが0のとき
  3432:   //      2番目のパレットを偶数化したパレットのカラー(0は黒)
  3433:   //    1番目のパレットが1のとき
  3434:   //      グラフィックパレット0のカラー(0は黒)
  3435:   //    1番目のパレットが2以上の偶数のとき
  3436:   //      1番目のカラー(0は黒)
  3437:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  3438:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  3439:   //  中間コード1
  3440:   //    (e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p())))
  3441:   //  中間コード2
  3442:   //    e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p()))
  3443:   //  中間コード3
  3444:   //    (v0=e1p())==0?epc(tev(e2p())):v0==1?epc(0):ls1(v0)==0?epc(v0):epc(tev(v0))
  3445:   //  中間コード4
  3446:   //    (p=e1p())==0?epc(tev(e2p())):p==1?epc(0):ls1(p)==0?epc(p):epc(tev(p))
  3447:   //  中間コード5
  3448:   //    (p=e1p())==0?epc(e2p()&-2):p==1?epc(0):(p&1)==0?epc(p):epc(p&-2)
  3449:   //  中間コード6
  3450:   //    (p=e1p())==0?epo(e2p()&-2):p==1?epo(0):(p&1)==0?epo(p):epo(p&-2)
  3451:   E2_XWP {
  3452:     @Override public void drawRaster (int src, int dst, boolean rh) {
  3453:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3454:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3455:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3456:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3457:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3458:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3459:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3460:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3461:       if (rh) {
  3462:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3463:         gx1st += half << 1;
  3464:         gx2nd += half << 1;
  3465:         da += half;
  3466:       }
  3467:       while (da < db) {
  3468:         int p;
  3469:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  3470:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2] :
  3471:                           p == 1 ?
  3472:                           VideoController.vcnPal32G8[0] :
  3473:                           (p & 1) == 0 ?
  3474:                           VideoController.vcnPal32G8[p] :
  3475:                           VideoController.vcnPal32G8[p & -2]);
  3476:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  3477:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2] :
  3478:                               p == 1 ?
  3479:                               VideoController.vcnPal32G8[0] :
  3480:                               (p & 1) == 0 ?
  3481:                               VideoController.vcnPal32G8[p] :
  3482:                               VideoController.vcnPal32G8[p & -2]);
  3483:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  3484:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2] :
  3485:                               p == 1 ?
  3486:                               VideoController.vcnPal32G8[0] :
  3487:                               (p & 1) == 0 ?
  3488:                               VideoController.vcnPal32G8[p] :
  3489:                               VideoController.vcnPal32G8[p & -2]);
  3490:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  3491:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2] :
  3492:                               p == 1 ?
  3493:                               VideoController.vcnPal32G8[0] :
  3494:                               (p & 1) == 0 ?
  3495:                               VideoController.vcnPal32G8[p] :
  3496:                               VideoController.vcnPal32G8[p & -2]);
  3497:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  3498:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2] :
  3499:                               p == 1 ?
  3500:                               VideoController.vcnPal32G8[0] :
  3501:                               (p & 1) == 0 ?
  3502:                               VideoController.vcnPal32G8[p] :
  3503:                               VideoController.vcnPal32G8[p & -2]);
  3504:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  3505:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2] :
  3506:                               p == 1 ?
  3507:                               VideoController.vcnPal32G8[0] :
  3508:                               (p & 1) == 0 ?
  3509:                               VideoController.vcnPal32G8[p] :
  3510:                               VideoController.vcnPal32G8[p & -2]);
  3511:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  3512:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2] :
  3513:                               p == 1 ?
  3514:                               VideoController.vcnPal32G8[0] :
  3515:                               (p & 1) == 0 ?
  3516:                               VideoController.vcnPal32G8[p] :
  3517:                               VideoController.vcnPal32G8[p & -2]);
  3518:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  3519:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2] :
  3520:                               p == 1 ?
  3521:                               VideoController.vcnPal32G8[0] :
  3522:                               (p & 1) == 0 ?
  3523:                               VideoController.vcnPal32G8[p] :
  3524:                               VideoController.vcnPal32G8[p & -2]);
  3525:         gx1st += 16;
  3526:         gx2nd += 16;
  3527:         da += 8;
  3528:       }  //while da<db
  3529:     }  //drawRaster
  3530:   },  //E2_XWP
  3531: 
  3532:   //================================================================================
  3533:   //E2_XHCT ($0000,$06xx,$1903)
  3534:   //  概要
  3535:   //    E2  512ドット16色2プレーン
  3536:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  3537:   //  手順
  3538:   //    1番目のパレットが0でないとき
  3539:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  3540:   //        1番目のカラーとカラー0を混ぜたカラー(0は黒)
  3541:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3542:   //        1番目のカラー(0は黒)
  3543:   //    さもなくば(1番目のパレットが0のとき)
  3544:   //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
  3545:   //        2番目のカラーとカラー0を混ぜたカラー(0は黒)
  3546:   //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3547:   //        2番目のカラー(0は黒)
  3548:   //  中間コード1
  3549:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p())):(ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),0):epc(e2p())))
  3550:   //  中間コード2
  3551:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p()):ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),0):epc(e2p())
  3552:   //  中間コード3
  3553:   //    (v0=e1p())!=0?ls1(epc(tev(v0)))!=0?mix(epc(v0),0):epc(v0):ls1(epc(tev(v10=e2p())))!=0?mix(epc(v10),0):epc(v10)
  3554:   //  中間コード4
  3555:   //    (p=e1p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),0):epc(p):ls1(epc(tev(p=e2p())))!=0?mix(epc(p),0):epc(p)
  3556:   //  中間コード5
  3557:   //    (p=e1p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),0):epc(p):(epc((p=e2p())&-2)&1)!=0?mix(epc(p),0):epc(p)
  3558:   //  中間コード6
  3559:   //    (p=e1p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),0)):epo(p):(epc((p=e2p())&-2)&1)!=0?cto(mix(epc(p),0)):epo(p)
  3560:   E2_XHCT {
  3561:     @Override public void drawRaster (int src, int dst, boolean rh) {
  3562:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3563:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3564:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3565:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3566:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3567:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3568:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3569:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3570:       if (rh) {
  3571:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3572:         gx1st += half << 1;
  3573:         gx2nd += half << 1;
  3574:         da += half;
  3575:       }
  3576:       while (da < db) {
  3577:         int p;
  3578:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  3579:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3580:                           VideoController.vcnPalTbl[
  3581:                             VideoController.vcnMix2 (
  3582:                               VideoController.vcnPal16G8[p],
  3583:                               0)] :
  3584:                           VideoController.vcnPal32G8[p] :
  3585:                           (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) & -2] & 1) != 0 ?
  3586:                           VideoController.vcnPalTbl[
  3587:                             VideoController.vcnMix2 (
  3588:                               VideoController.vcnPal16G8[p],
  3589:                               0)] :
  3590:                           VideoController.vcnPal32G8[p]);
  3591:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  3592:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3593:                               VideoController.vcnPalTbl[
  3594:                                 VideoController.vcnMix2 (
  3595:                                   VideoController.vcnPal16G8[p],
  3596:                                   0)] :
  3597:                               VideoController.vcnPal32G8[p] :
  3598:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) & -2] & 1) != 0 ?
  3599:                               VideoController.vcnPalTbl[
  3600:                                 VideoController.vcnMix2 (
  3601:                                   VideoController.vcnPal16G8[p],
  3602:                                   0)] :
  3603:                               VideoController.vcnPal32G8[p]);
  3604:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  3605:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3606:                               VideoController.vcnPalTbl[
  3607:                                 VideoController.vcnMix2 (
  3608:                                   VideoController.vcnPal16G8[p],
  3609:                                   0)] :
  3610:                               VideoController.vcnPal32G8[p] :
  3611:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) & -2] & 1) != 0 ?
  3612:                               VideoController.vcnPalTbl[
  3613:                                 VideoController.vcnMix2 (
  3614:                                   VideoController.vcnPal16G8[p],
  3615:                                   0)] :
  3616:                               VideoController.vcnPal32G8[p]);
  3617:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  3618:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3619:                               VideoController.vcnPalTbl[
  3620:                                 VideoController.vcnMix2 (
  3621:                                   VideoController.vcnPal16G8[p],
  3622:                                   0)] :
  3623:                               VideoController.vcnPal32G8[p] :
  3624:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) & -2] & 1) != 0 ?
  3625:                               VideoController.vcnPalTbl[
  3626:                                 VideoController.vcnMix2 (
  3627:                                   VideoController.vcnPal16G8[p],
  3628:                                   0)] :
  3629:                               VideoController.vcnPal32G8[p]);
  3630:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  3631:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3632:                               VideoController.vcnPalTbl[
  3633:                                 VideoController.vcnMix2 (
  3634:                                   VideoController.vcnPal16G8[p],
  3635:                                   0)] :
  3636:                               VideoController.vcnPal32G8[p] :
  3637:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) & -2] & 1) != 0 ?
  3638:                               VideoController.vcnPalTbl[
  3639:                                 VideoController.vcnMix2 (
  3640:                                   VideoController.vcnPal16G8[p],
  3641:                                   0)] :
  3642:                               VideoController.vcnPal32G8[p]);
  3643:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  3644:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3645:                               VideoController.vcnPalTbl[
  3646:                                 VideoController.vcnMix2 (
  3647:                                   VideoController.vcnPal16G8[p],
  3648:                                   0)] :
  3649:                               VideoController.vcnPal32G8[p] :
  3650:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) & -2] & 1) != 0 ?
  3651:                               VideoController.vcnPalTbl[
  3652:                                 VideoController.vcnMix2 (
  3653:                                   VideoController.vcnPal16G8[p],
  3654:                                   0)] :
  3655:                               VideoController.vcnPal32G8[p]);
  3656:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  3657:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3658:                               VideoController.vcnPalTbl[
  3659:                                 VideoController.vcnMix2 (
  3660:                                   VideoController.vcnPal16G8[p],
  3661:                                   0)] :
  3662:                               VideoController.vcnPal32G8[p] :
  3663:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) & -2] & 1) != 0 ?
  3664:                               VideoController.vcnPalTbl[
  3665:                                 VideoController.vcnMix2 (
  3666:                                   VideoController.vcnPal16G8[p],
  3667:                                   0)] :
  3668:                               VideoController.vcnPal32G8[p]);
  3669:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  3670:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3671:                               VideoController.vcnPalTbl[
  3672:                                 VideoController.vcnMix2 (
  3673:                                   VideoController.vcnPal16G8[p],
  3674:                                   0)] :
  3675:                               VideoController.vcnPal32G8[p] :
  3676:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) & -2] & 1) != 0 ?
  3677:                               VideoController.vcnPalTbl[
  3678:                                 VideoController.vcnMix2 (
  3679:                                   VideoController.vcnPal16G8[p],
  3680:                                   0)] :
  3681:                               VideoController.vcnPal32G8[p]);
  3682:         gx1st += 16;
  3683:         gx2nd += 16;
  3684:         da += 8;
  3685:       }  //while da<db
  3686:     }  //drawRaster
  3687:   },  //E2_XHCT
  3688: 
  3689:   //================================================================================
  3690:   //E2_XHCG ($0000,$06xx,$1A03)
  3691:   //  概要
  3692:   //    E2  512ドット16色2プレーン
  3693:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  3694:   //  手順
  3695:   //    1番目のパレットが0でないとき
  3696:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  3697:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  3698:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3699:   //        1番目のパレットが奇数のとき
  3700:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  3701:   //        さもなくば(1番目のパレットが偶数のとき)
  3702:   //          1番目のカラー(0は黒)
  3703:   //    さもなくば(1番目のパレットが0のとき)
  3704:   //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
  3705:   //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  3706:   //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3707:   //        2番目のカラー(0は黒)
  3708:   //  中間コード1
  3709:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()))):(ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p())))
  3710:   //  中間コード2
  3711:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()):ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p())
  3712:   //  中間コード3
  3713:   //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(v2,epc(tod(e2q()))):ls1(v0)!=0?epc(tod(e2q())):epc(v0):ls1(v14=epc(tev(v16=e2p())))!=0?mix(v14,epc(tod(e2q()))):epc(v16)
  3714:   //  中間コード4
  3715:   //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(tod(e2q()))):ls1(p)!=0?epc(tod(e2q())):epc(p):ls1(p=epc(tev(q=e2p())))!=0?mix(p,epc(tod(e2q()))):epc(q)
  3716:   //  中間コード5
  3717:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(e2q()|1)):(p&1)!=0?epc(e2q()|1):epc(p):((p=epc((q=e2p())&-2))&1)!=0?mix(p,epc(e2q()|1)):epc(q)
  3718:   //  中間コード6
  3719:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(e2q()|1))):(p&1)!=0?epo(e2q()|1):epo(p):((p=epc((q=e2p())&-2))&1)!=0?cto(mix(p,epc(e2q()|1))):epo(q)
  3720:   E2_XHCG {
  3721:     @Override public void drawRaster (int src, int dst, boolean rh) {
  3722:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3723:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3724:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3725:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3726:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3727:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3728:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  3729:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3730:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3731:       if (rh) {
  3732:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3733:         gx1st += half << 1;
  3734:         gx2nd += half << 1;
  3735:         da += half;
  3736:       }
  3737:       while (da < db) {
  3738:         int p, q;
  3739:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  3740:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3741:                           VideoController.vcnPalTbl[
  3742:                             VideoController.vcnMix2 (
  3743:                               q,
  3744:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  3745:                           (p & 1) != 0 ?
  3746:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  3747:                           VideoController.vcnPal32G8[p] :
  3748:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) & -2]) & 1) != 0 ?
  3749:                           VideoController.vcnPalTbl[
  3750:                             VideoController.vcnMix2 (
  3751:                               p,
  3752:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  3753:                           VideoController.vcnPal32G8[q]);
  3754:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  3755:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3756:                               VideoController.vcnPalTbl[
  3757:                                 VideoController.vcnMix2 (
  3758:                                   q,
  3759:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  3760:                               (p & 1) != 0 ?
  3761:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  3762:                               VideoController.vcnPal32G8[p] :
  3763:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) & -2]) & 1) != 0 ?
  3764:                               VideoController.vcnPalTbl[
  3765:                                 VideoController.vcnMix2 (
  3766:                                   p,
  3767:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  3768:                               VideoController.vcnPal32G8[q]);
  3769:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  3770:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3771:                               VideoController.vcnPalTbl[
  3772:                                 VideoController.vcnMix2 (
  3773:                                   q,
  3774:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  3775:                               (p & 1) != 0 ?
  3776:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  3777:                               VideoController.vcnPal32G8[p] :
  3778:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) & -2]) & 1) != 0 ?
  3779:                               VideoController.vcnPalTbl[
  3780:                                 VideoController.vcnMix2 (
  3781:                                   p,
  3782:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  3783:                               VideoController.vcnPal32G8[q]);
  3784:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  3785:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3786:                               VideoController.vcnPalTbl[
  3787:                                 VideoController.vcnMix2 (
  3788:                                   q,
  3789:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  3790:                               (p & 1) != 0 ?
  3791:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  3792:                               VideoController.vcnPal32G8[p] :
  3793:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) & -2]) & 1) != 0 ?
  3794:                               VideoController.vcnPalTbl[
  3795:                                 VideoController.vcnMix2 (
  3796:                                   p,
  3797:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  3798:                               VideoController.vcnPal32G8[q]);
  3799:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  3800:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3801:                               VideoController.vcnPalTbl[
  3802:                                 VideoController.vcnMix2 (
  3803:                                   q,
  3804:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  3805:                               (p & 1) != 0 ?
  3806:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  3807:                               VideoController.vcnPal32G8[p] :
  3808:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) & -2]) & 1) != 0 ?
  3809:                               VideoController.vcnPalTbl[
  3810:                                 VideoController.vcnMix2 (
  3811:                                   p,
  3812:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  3813:                               VideoController.vcnPal32G8[q]);
  3814:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  3815:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3816:                               VideoController.vcnPalTbl[
  3817:                                 VideoController.vcnMix2 (
  3818:                                   q,
  3819:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  3820:                               (p & 1) != 0 ?
  3821:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  3822:                               VideoController.vcnPal32G8[p] :
  3823:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) & -2]) & 1) != 0 ?
  3824:                               VideoController.vcnPalTbl[
  3825:                                 VideoController.vcnMix2 (
  3826:                                   p,
  3827:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  3828:                               VideoController.vcnPal32G8[q]);
  3829:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  3830:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3831:                               VideoController.vcnPalTbl[
  3832:                                 VideoController.vcnMix2 (
  3833:                                   q,
  3834:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  3835:                               (p & 1) != 0 ?
  3836:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  3837:                               VideoController.vcnPal32G8[p] :
  3838:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) & -2]) & 1) != 0 ?
  3839:                               VideoController.vcnPalTbl[
  3840:                                 VideoController.vcnMix2 (
  3841:                                   p,
  3842:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  3843:                               VideoController.vcnPal32G8[q]);
  3844:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  3845:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3846:                               VideoController.vcnPalTbl[
  3847:                                 VideoController.vcnMix2 (
  3848:                                   q,
  3849:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  3850:                               (p & 1) != 0 ?
  3851:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  3852:                               VideoController.vcnPal32G8[p] :
  3853:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) & -2]) & 1) != 0 ?
  3854:                               VideoController.vcnPalTbl[
  3855:                                 VideoController.vcnMix2 (
  3856:                                   p,
  3857:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  3858:                               VideoController.vcnPal32G8[q]);
  3859:         gx1st += 16;
  3860:         gx2nd += 16;
  3861:         da += 8;
  3862:       }  //while da<db
  3863:     }  //drawRaster
  3864:   },  //E2_XHCG
  3865: 
  3866:   //================================================================================
  3867:   //E2_XHCGT ($0000,$06xx,$1B03)
  3868:   //  概要
  3869:   //    E2  512ドット16色2プレーン
  3870:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  3871:   //  手順
  3872:   //    1番目のパレットが0でないとき
  3873:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  3874:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  3875:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3876:   //        1番目のパレットが奇数のとき
  3877:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  3878:   //        さもなくば(1番目のパレットが偶数のとき)
  3879:   //          1番目のカラー(0は黒)
  3880:   //    さもなくば(1番目のパレットが0のとき)
  3881:   //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
  3882:   //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  3883:   //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3884:   //        2番目のカラー(0は黒)
  3885:   //  中間コード1
  3886:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()))):(ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),0):epc(e2p())))
  3887:   //  中間コード2
  3888:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()):ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),0):epc(e2p())
  3889:   //  中間コード3
  3890:   //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(mix(v2,epc(tod(e2q()))),0):ls1(v0)!=0?epc(tod(e2q())):epc(v0):ls1(v15=epc(tev(v17=e2p())))!=0?mix(mix(v15,epc(tod(e2q()))),0):epc(v17)
  3891:   //  中間コード4
  3892:   //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(tod(e2q()))),0):ls1(p)!=0?epc(tod(e2q())):epc(p):ls1(p=epc(tev(q=e2p())))!=0?mix(mix(p,epc(tod(e2q()))),0):epc(q)
  3893:   //  中間コード5
  3894:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(e2q()|1)),0):(p&1)!=0?epc(e2q()|1):epc(p):((p=epc((q=e2p())&-2))&1)!=0?mix(mix(p,epc(e2q()|1)),0):epc(q)
  3895:   //  中間コード6
  3896:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(e2q()|1)),0)):(p&1)!=0?epo(e2q()|1):epo(p):((p=epc((q=e2p())&-2))&1)!=0?cto(mix(mix(p,epc(e2q()|1)),0)):epo(q)
  3897:   E2_XHCGT {
  3898:     @Override public void drawRaster (int src, int dst, boolean rh) {
  3899:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3900:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3901:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3902:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3903:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3904:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  3905:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  3906:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3907:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3908:       if (rh) {
  3909:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3910:         gx1st += half << 1;
  3911:         gx2nd += half << 1;
  3912:         da += half;
  3913:       }
  3914:       while (da < db) {
  3915:         int p, q;
  3916:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  3917:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3918:                           VideoController.vcnPalTbl[
  3919:                             VideoController.vcnMix2 (
  3920:                               VideoController.vcnMix2 (
  3921:                                 q,
  3922:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  3923:                               0)] :
  3924:                           (p & 1) != 0 ?
  3925:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  3926:                           VideoController.vcnPal32G8[p] :
  3927:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) & -2]) & 1) != 0 ?
  3928:                           VideoController.vcnPalTbl[
  3929:                             VideoController.vcnMix2 (
  3930:                               VideoController.vcnMix2 (
  3931:                                 p,
  3932:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  3933:                               0)] :
  3934:                           VideoController.vcnPal32G8[q]);
  3935:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  3936:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3937:                               VideoController.vcnPalTbl[
  3938:                                 VideoController.vcnMix2 (
  3939:                                   VideoController.vcnMix2 (
  3940:                                     q,
  3941:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  3942:                                   0)] :
  3943:                               (p & 1) != 0 ?
  3944:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  3945:                               VideoController.vcnPal32G8[p] :
  3946:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) & -2]) & 1) != 0 ?
  3947:                               VideoController.vcnPalTbl[
  3948:                                 VideoController.vcnMix2 (
  3949:                                   VideoController.vcnMix2 (
  3950:                                     p,
  3951:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  3952:                                   0)] :
  3953:                               VideoController.vcnPal32G8[q]);
  3954:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  3955:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3956:                               VideoController.vcnPalTbl[
  3957:                                 VideoController.vcnMix2 (
  3958:                                   VideoController.vcnMix2 (
  3959:                                     q,
  3960:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  3961:                                   0)] :
  3962:                               (p & 1) != 0 ?
  3963:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  3964:                               VideoController.vcnPal32G8[p] :
  3965:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) & -2]) & 1) != 0 ?
  3966:                               VideoController.vcnPalTbl[
  3967:                                 VideoController.vcnMix2 (
  3968:                                   VideoController.vcnMix2 (
  3969:                                     p,
  3970:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  3971:                                   0)] :
  3972:                               VideoController.vcnPal32G8[q]);
  3973:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  3974:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3975:                               VideoController.vcnPalTbl[
  3976:                                 VideoController.vcnMix2 (
  3977:                                   VideoController.vcnMix2 (
  3978:                                     q,
  3979:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  3980:                                   0)] :
  3981:                               (p & 1) != 0 ?
  3982:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  3983:                               VideoController.vcnPal32G8[p] :
  3984:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) & -2]) & 1) != 0 ?
  3985:                               VideoController.vcnPalTbl[
  3986:                                 VideoController.vcnMix2 (
  3987:                                   VideoController.vcnMix2 (
  3988:                                     p,
  3989:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  3990:                                   0)] :
  3991:                               VideoController.vcnPal32G8[q]);
  3992:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  3993:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3994:                               VideoController.vcnPalTbl[
  3995:                                 VideoController.vcnMix2 (
  3996:                                   VideoController.vcnMix2 (
  3997:                                     q,
  3998:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  3999:                                   0)] :
  4000:                               (p & 1) != 0 ?
  4001:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  4002:                               VideoController.vcnPal32G8[p] :
  4003:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) & -2]) & 1) != 0 ?
  4004:                               VideoController.vcnPalTbl[
  4005:                                 VideoController.vcnMix2 (
  4006:                                   VideoController.vcnMix2 (
  4007:                                     p,
  4008:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  4009:                                   0)] :
  4010:                               VideoController.vcnPal32G8[q]);
  4011:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  4012:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  4013:                               VideoController.vcnPalTbl[
  4014:                                 VideoController.vcnMix2 (
  4015:                                   VideoController.vcnMix2 (
  4016:                                     q,
  4017:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  4018:                                   0)] :
  4019:                               (p & 1) != 0 ?
  4020:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  4021:                               VideoController.vcnPal32G8[p] :
  4022:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) & -2]) & 1) != 0 ?
  4023:                               VideoController.vcnPalTbl[
  4024:                                 VideoController.vcnMix2 (
  4025:                                   VideoController.vcnMix2 (
  4026:                                     p,
  4027:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  4028:                                   0)] :
  4029:                               VideoController.vcnPal32G8[q]);
  4030:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  4031:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  4032:                               VideoController.vcnPalTbl[
  4033:                                 VideoController.vcnMix2 (
  4034:                                   VideoController.vcnMix2 (
  4035:                                     q,
  4036:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  4037:                                   0)] :
  4038:                               (p & 1) != 0 ?
  4039:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  4040:                               VideoController.vcnPal32G8[p] :
  4041:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) & -2]) & 1) != 0 ?
  4042:                               VideoController.vcnPalTbl[
  4043:                                 VideoController.vcnMix2 (
  4044:                                   VideoController.vcnMix2 (
  4045:                                     p,
  4046:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  4047:                                   0)] :
  4048:                               VideoController.vcnPal32G8[q]);
  4049:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  4050:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  4051:                               VideoController.vcnPalTbl[
  4052:                                 VideoController.vcnMix2 (
  4053:                                   VideoController.vcnMix2 (
  4054:                                     q,
  4055:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  4056:                                   0)] :
  4057:                               (p & 1) != 0 ?
  4058:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  4059:                               VideoController.vcnPal32G8[p] :
  4060:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) & -2]) & 1) != 0 ?
  4061:                               VideoController.vcnPalTbl[
  4062:                                 VideoController.vcnMix2 (
  4063:                                   VideoController.vcnMix2 (
  4064:                                     p,
  4065:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  4066:                                   0)] :
  4067:                               VideoController.vcnPal32G8[q]);
  4068:         gx1st += 16;
  4069:         gx2nd += 16;
  4070:         da += 8;
  4071:       }  //while da<db
  4072:     }  //drawRaster
  4073:   },  //E2_XHCGT
  4074: 
  4075:   //================================================================================
  4076:   //E2_XHPT ($0000,$06xx,$1D03)
  4077:   //  概要
  4078:   //    E2  512ドット16色2プレーン
  4079:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  4080:   //  手順
  4081:   //    1番目のパレットが0のとき
  4082:   //      2番目のパレットを偶数化したパレットのカラー(0は黒)
  4083:   //    1番目のパレットが1のとき
  4084:   //      グラフィックパレット0のカラー(0は黒)
  4085:   //    1番目のパレットが2以上の偶数のとき
  4086:   //      1番目のカラー(0は黒)
  4087:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  4088:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  4089:   //  中間コード1
  4090:   //    (e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0))
  4091:   //  中間コード2
  4092:   //    e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0)
  4093:   //  中間コード3
  4094:   //    (v0=e1p())==0?epc(tev(e2p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),0)
  4095:   //  中間コード4
  4096:   //    (p=e1p())==0?epc(tev(e2p())):p==1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),0)
  4097:   //  中間コード5
  4098:   //    (p=e1p())==0?epc(e2p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),0)
  4099:   //  中間コード6
  4100:   //    (p=e1p())==0?epo(e2p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),0))
  4101:   E2_XHPT {
  4102:     @Override public void drawRaster (int src, int dst, boolean rh) {
  4103:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4104:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4105:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4106:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4107:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4108:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4109:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4110:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4111:       if (rh) {
  4112:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4113:         gx1st += half << 1;
  4114:         gx2nd += half << 1;
  4115:         da += half;
  4116:       }
  4117:       while (da < db) {
  4118:         int p;
  4119:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  4120:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2] :
  4121:                           p == 1 ?
  4122:                           VideoController.vcnPal32G8[0] :
  4123:                           (p & 1) == 0 ?
  4124:                           VideoController.vcnPal32G8[p] :
  4125:                           VideoController.vcnPalTbl[
  4126:                             VideoController.vcnMix2 (
  4127:                               VideoController.vcnPal16G8[p & -2],
  4128:                               0)]);
  4129:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  4130:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2] :
  4131:                               p == 1 ?
  4132:                               VideoController.vcnPal32G8[0] :
  4133:                               (p & 1) == 0 ?
  4134:                               VideoController.vcnPal32G8[p] :
  4135:                               VideoController.vcnPalTbl[
  4136:                                 VideoController.vcnMix2 (
  4137:                                   VideoController.vcnPal16G8[p & -2],
  4138:                                   0)]);
  4139:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  4140:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2] :
  4141:                               p == 1 ?
  4142:                               VideoController.vcnPal32G8[0] :
  4143:                               (p & 1) == 0 ?
  4144:                               VideoController.vcnPal32G8[p] :
  4145:                               VideoController.vcnPalTbl[
  4146:                                 VideoController.vcnMix2 (
  4147:                                   VideoController.vcnPal16G8[p & -2],
  4148:                                   0)]);
  4149:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  4150:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2] :
  4151:                               p == 1 ?
  4152:                               VideoController.vcnPal32G8[0] :
  4153:                               (p & 1) == 0 ?
  4154:                               VideoController.vcnPal32G8[p] :
  4155:                               VideoController.vcnPalTbl[
  4156:                                 VideoController.vcnMix2 (
  4157:                                   VideoController.vcnPal16G8[p & -2],
  4158:                                   0)]);
  4159:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  4160:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2] :
  4161:                               p == 1 ?
  4162:                               VideoController.vcnPal32G8[0] :
  4163:                               (p & 1) == 0 ?
  4164:                               VideoController.vcnPal32G8[p] :
  4165:                               VideoController.vcnPalTbl[
  4166:                                 VideoController.vcnMix2 (
  4167:                                   VideoController.vcnPal16G8[p & -2],
  4168:                                   0)]);
  4169:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  4170:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2] :
  4171:                               p == 1 ?
  4172:                               VideoController.vcnPal32G8[0] :
  4173:                               (p & 1) == 0 ?
  4174:                               VideoController.vcnPal32G8[p] :
  4175:                               VideoController.vcnPalTbl[
  4176:                                 VideoController.vcnMix2 (
  4177:                                   VideoController.vcnPal16G8[p & -2],
  4178:                                   0)]);
  4179:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  4180:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2] :
  4181:                               p == 1 ?
  4182:                               VideoController.vcnPal32G8[0] :
  4183:                               (p & 1) == 0 ?
  4184:                               VideoController.vcnPal32G8[p] :
  4185:                               VideoController.vcnPalTbl[
  4186:                                 VideoController.vcnMix2 (
  4187:                                   VideoController.vcnPal16G8[p & -2],
  4188:                                   0)]);
  4189:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  4190:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2] :
  4191:                               p == 1 ?
  4192:                               VideoController.vcnPal32G8[0] :
  4193:                               (p & 1) == 0 ?
  4194:                               VideoController.vcnPal32G8[p] :
  4195:                               VideoController.vcnPalTbl[
  4196:                                 VideoController.vcnMix2 (
  4197:                                   VideoController.vcnPal16G8[p & -2],
  4198:                                   0)]);
  4199:         gx1st += 16;
  4200:         gx2nd += 16;
  4201:         da += 8;
  4202:       }  //while da<db
  4203:     }  //drawRaster
  4204:   },  //E2_XHPT
  4205: 
  4206:   //================================================================================
  4207:   //E2_XHPG ($0000,$06xx,$1E03)
  4208:   //  概要
  4209:   //    E2  512ドット16色2プレーン
  4210:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  4211:   //  手順
  4212:   //    1番目のパレットが0のとき
  4213:   //      2番目のパレットを偶数化したパレットのカラー(0は黒)
  4214:   //    1番目のパレットが1のとき
  4215:   //      グラフィックパレット0のカラー(0は黒)
  4216:   //    1番目のパレットが2以上の偶数のとき
  4217:   //      1番目のカラー(0は黒)
  4218:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  4219:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  4220:   //  中間コード1
  4221:   //    (e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2p()))))
  4222:   //  中間コード2
  4223:   //    e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2p())))
  4224:   //  中間コード3
  4225:   //    (v0=e1p())==0?epc(tev(e2p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),epc(tod(e2p())))
  4226:   //  中間コード4
  4227:   //    (p=e1p())==0?epc(tev(e2p())):p==1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),epc(tod(e2p())))
  4228:   //  中間コード5
  4229:   //    (p=e1p())==0?epc(e2p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),epc(e2p()|1))
  4230:   //  中間コード6
  4231:   //    (p=e1p())==0?epo(e2p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),epc(e2p()|1)))
  4232:   E2_XHPG {
  4233:     @Override public void drawRaster (int src, int dst, boolean rh) {
  4234:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4235:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4236:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4237:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4238:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4239:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4240:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4241:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4242:       if (rh) {
  4243:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4244:         gx1st += half << 1;
  4245:         gx2nd += half << 1;
  4246:         da += half;
  4247:       }
  4248:       while (da < db) {
  4249:         int p;
  4250:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  4251:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2] :
  4252:                           p == 1 ?
  4253:                           VideoController.vcnPal32G8[0] :
  4254:                           (p & 1) == 0 ?
  4255:                           VideoController.vcnPal32G8[p] :
  4256:                           VideoController.vcnPalTbl[
  4257:                             VideoController.vcnMix2 (
  4258:                               VideoController.vcnPal16G8[p & -2],
  4259:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] | 1])]);
  4260:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  4261:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2] :
  4262:                               p == 1 ?
  4263:                               VideoController.vcnPal32G8[0] :
  4264:                               (p & 1) == 0 ?
  4265:                               VideoController.vcnPal32G8[p] :
  4266:                               VideoController.vcnPalTbl[
  4267:                                 VideoController.vcnMix2 (
  4268:                                   VideoController.vcnPal16G8[p & -2],
  4269:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] | 1])]);
  4270:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  4271:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2] :
  4272:                               p == 1 ?
  4273:                               VideoController.vcnPal32G8[0] :
  4274:                               (p & 1) == 0 ?
  4275:                               VideoController.vcnPal32G8[p] :
  4276:                               VideoController.vcnPalTbl[
  4277:                                 VideoController.vcnMix2 (
  4278:                                   VideoController.vcnPal16G8[p & -2],
  4279:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] | 1])]);
  4280:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  4281:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2] :
  4282:                               p == 1 ?
  4283:                               VideoController.vcnPal32G8[0] :
  4284:                               (p & 1) == 0 ?
  4285:                               VideoController.vcnPal32G8[p] :
  4286:                               VideoController.vcnPalTbl[
  4287:                                 VideoController.vcnMix2 (
  4288:                                   VideoController.vcnPal16G8[p & -2],
  4289:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] | 1])]);
  4290:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  4291:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2] :
  4292:                               p == 1 ?
  4293:                               VideoController.vcnPal32G8[0] :
  4294:                               (p & 1) == 0 ?
  4295:                               VideoController.vcnPal32G8[p] :
  4296:                               VideoController.vcnPalTbl[
  4297:                                 VideoController.vcnMix2 (
  4298:                                   VideoController.vcnPal16G8[p & -2],
  4299:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] | 1])]);
  4300:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  4301:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2] :
  4302:                               p == 1 ?
  4303:                               VideoController.vcnPal32G8[0] :
  4304:                               (p & 1) == 0 ?
  4305:                               VideoController.vcnPal32G8[p] :
  4306:                               VideoController.vcnPalTbl[
  4307:                                 VideoController.vcnMix2 (
  4308:                                   VideoController.vcnPal16G8[p & -2],
  4309:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] | 1])]);
  4310:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  4311:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2] :
  4312:                               p == 1 ?
  4313:                               VideoController.vcnPal32G8[0] :
  4314:                               (p & 1) == 0 ?
  4315:                               VideoController.vcnPal32G8[p] :
  4316:                               VideoController.vcnPalTbl[
  4317:                                 VideoController.vcnMix2 (
  4318:                                   VideoController.vcnPal16G8[p & -2],
  4319:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] | 1])]);
  4320:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  4321:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2] :
  4322:                               p == 1 ?
  4323:                               VideoController.vcnPal32G8[0] :
  4324:                               (p & 1) == 0 ?
  4325:                               VideoController.vcnPal32G8[p] :
  4326:                               VideoController.vcnPalTbl[
  4327:                                 VideoController.vcnMix2 (
  4328:                                   VideoController.vcnPal16G8[p & -2],
  4329:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] | 1])]);
  4330:         gx1st += 16;
  4331:         gx2nd += 16;
  4332:         da += 8;
  4333:       }  //while da<db
  4334:     }  //drawRaster
  4335:   },  //E2_XHPG
  4336: 
  4337:   //================================================================================
  4338:   //E2_XHPGT ($0000,$06xx,$1F03)
  4339:   //  概要
  4340:   //    E2  512ドット16色2プレーン
  4341:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  4342:   //  手順
  4343:   //    1番目のパレットが0のとき
  4344:   //      2番目のパレットを偶数化したパレットのカラー(0は黒)
  4345:   //    1番目のパレットが1のとき
  4346:   //      グラフィックパレット0のカラー(0は黒)
  4347:   //    1番目のパレットが2以上の偶数のとき
  4348:   //      1番目のカラー(0は黒)
  4349:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  4350:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  4351:   //  中間コード1
  4352:   //    (e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2p()))),0))
  4353:   //  中間コード2
  4354:   //    e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2p()))),0)
  4355:   //  中間コード3
  4356:   //    (v0=e1p())==0?epc(tev(e2p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(mix(epc(tev(v0)),epc(tod(e2p()))),0)
  4357:   //  中間コード4
  4358:   //    (p=e1p())==0?epc(tev(e2p())):p==1?epc(0):ls1(p)==0?epc(p):mix(mix(epc(tev(p)),epc(tod(e2p()))),0)
  4359:   //  中間コード5
  4360:   //    (p=e1p())==0?epc(e2p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(mix(epc(p&-2),epc(e2p()|1)),0)
  4361:   //  中間コード6
  4362:   //    (p=e1p())==0?epo(e2p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(mix(epc(p&-2),epc(e2p()|1)),0))
  4363:   E2_XHPGT {
  4364:     @Override public void drawRaster (int src, int dst, boolean rh) {
  4365:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4366:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4367:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4368:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4369:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4370:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4371:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4372:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4373:       if (rh) {
  4374:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4375:         gx1st += half << 1;
  4376:         gx2nd += half << 1;
  4377:         da += half;
  4378:       }
  4379:       while (da < db) {
  4380:         int p;
  4381:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  4382:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2] :
  4383:                           p == 1 ?
  4384:                           VideoController.vcnPal32G8[0] :
  4385:                           (p & 1) == 0 ?
  4386:                           VideoController.vcnPal32G8[p] :
  4387:                           VideoController.vcnPalTbl[
  4388:                             VideoController.vcnMix2 (
  4389:                               VideoController.vcnMix2 (
  4390:                                 VideoController.vcnPal16G8[p & -2],
  4391:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] | 1]),
  4392:                               0)]);
  4393:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  4394:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2] :
  4395:                               p == 1 ?
  4396:                               VideoController.vcnPal32G8[0] :
  4397:                               (p & 1) == 0 ?
  4398:                               VideoController.vcnPal32G8[p] :
  4399:                               VideoController.vcnPalTbl[
  4400:                                 VideoController.vcnMix2 (
  4401:                                   VideoController.vcnMix2 (
  4402:                                     VideoController.vcnPal16G8[p & -2],
  4403:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] | 1]),
  4404:                                   0)]);
  4405:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  4406:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2] :
  4407:                               p == 1 ?
  4408:                               VideoController.vcnPal32G8[0] :
  4409:                               (p & 1) == 0 ?
  4410:                               VideoController.vcnPal32G8[p] :
  4411:                               VideoController.vcnPalTbl[
  4412:                                 VideoController.vcnMix2 (
  4413:                                   VideoController.vcnMix2 (
  4414:                                     VideoController.vcnPal16G8[p & -2],
  4415:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] | 1]),
  4416:                                   0)]);
  4417:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  4418:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2] :
  4419:                               p == 1 ?
  4420:                               VideoController.vcnPal32G8[0] :
  4421:                               (p & 1) == 0 ?
  4422:                               VideoController.vcnPal32G8[p] :
  4423:                               VideoController.vcnPalTbl[
  4424:                                 VideoController.vcnMix2 (
  4425:                                   VideoController.vcnMix2 (
  4426:                                     VideoController.vcnPal16G8[p & -2],
  4427:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] | 1]),
  4428:                                   0)]);
  4429:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  4430:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2] :
  4431:                               p == 1 ?
  4432:                               VideoController.vcnPal32G8[0] :
  4433:                               (p & 1) == 0 ?
  4434:                               VideoController.vcnPal32G8[p] :
  4435:                               VideoController.vcnPalTbl[
  4436:                                 VideoController.vcnMix2 (
  4437:                                   VideoController.vcnMix2 (
  4438:                                     VideoController.vcnPal16G8[p & -2],
  4439:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] | 1]),
  4440:                                   0)]);
  4441:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  4442:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2] :
  4443:                               p == 1 ?
  4444:                               VideoController.vcnPal32G8[0] :
  4445:                               (p & 1) == 0 ?
  4446:                               VideoController.vcnPal32G8[p] :
  4447:                               VideoController.vcnPalTbl[
  4448:                                 VideoController.vcnMix2 (
  4449:                                   VideoController.vcnMix2 (
  4450:                                     VideoController.vcnPal16G8[p & -2],
  4451:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] | 1]),
  4452:                                   0)]);
  4453:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  4454:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2] :
  4455:                               p == 1 ?
  4456:                               VideoController.vcnPal32G8[0] :
  4457:                               (p & 1) == 0 ?
  4458:                               VideoController.vcnPal32G8[p] :
  4459:                               VideoController.vcnPalTbl[
  4460:                                 VideoController.vcnMix2 (
  4461:                                   VideoController.vcnMix2 (
  4462:                                     VideoController.vcnPal16G8[p & -2],
  4463:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] | 1]),
  4464:                                   0)]);
  4465:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  4466:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2] :
  4467:                               p == 1 ?
  4468:                               VideoController.vcnPal32G8[0] :
  4469:                               (p & 1) == 0 ?
  4470:                               VideoController.vcnPal32G8[p] :
  4471:                               VideoController.vcnPalTbl[
  4472:                                 VideoController.vcnMix2 (
  4473:                                   VideoController.vcnMix2 (
  4474:                                     VideoController.vcnPal16G8[p & -2],
  4475:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] | 1]),
  4476:                                   0)]);
  4477:         gx1st += 16;
  4478:         gx2nd += 16;
  4479:         da += 8;
  4480:       }  //while da<db
  4481:     }  //drawRaster
  4482:   },  //E2_XHPGT
  4483: 
  4484:   //================================================================================
  4485:   //E2_A ($0000,$06xx,$4003)
  4486:   //  概要
  4487:   //    E2  512ドット16色2プレーン
  4488:   //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
  4489:   //  手順
  4490:   //    1番目のパレットが0でないとき
  4491:   //      1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  4492:   //    さもなくば(1番目のパレットが0のとき)
  4493:   //      2番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  4494:   //  中間コード1
  4495:   //    (e1p()!=0?mix(epc(e1p()),tpc(0)):mix(epc(e2p()),tpc(0)))
  4496:   //  中間コード2
  4497:   //    e1p()!=0?mix(epc(e1p()),tpc(0)):mix(epc(e2p()),tpc(0))
  4498:   //  中間コード3
  4499:   //    (v0=e1p())!=0?mix(epc(v0),tpc(0)):mix(epc(e2p()),tpc(0))
  4500:   //  中間コード4
  4501:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0))
  4502:   //  中間コード5
  4503:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0))
  4504:   //  中間コード6
  4505:   //    cto((p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0)))
  4506:   E2_A {
  4507:     @Override public void drawRaster (int src, int dst, boolean rh) {
  4508:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4509:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4510:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4511:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4512:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4513:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4514:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4515:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4516:       if (rh) {
  4517:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4518:         gx1st += half << 1;
  4519:         gx2nd += half << 1;
  4520:         da += half;
  4521:       }
  4522:       while (da < db) {
  4523:         int p;
  4524:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  4525:                             (p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  4526:                             VideoController.vcnMix2 (
  4527:                               VideoController.vcnPal16G8[p],
  4528:                               VideoController.vcnPal16TS[0]) :
  4529:                             VideoController.vcnMix2 (
  4530:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023]],
  4531:                               VideoController.vcnPal16TS[0])]);
  4532:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  4533:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  4534:                                 VideoController.vcnMix2 (
  4535:                                   VideoController.vcnPal16G8[p],
  4536:                                   VideoController.vcnPal16TS[0]) :
  4537:                                 VideoController.vcnMix2 (
  4538:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]],
  4539:                                   VideoController.vcnPal16TS[0])]);
  4540:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  4541:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  4542:                                 VideoController.vcnMix2 (
  4543:                                   VideoController.vcnPal16G8[p],
  4544:                                   VideoController.vcnPal16TS[0]) :
  4545:                                 VideoController.vcnMix2 (
  4546:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]],
  4547:                                   VideoController.vcnPal16TS[0])]);
  4548:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  4549:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  4550:                                 VideoController.vcnMix2 (
  4551:                                   VideoController.vcnPal16G8[p],
  4552:                                   VideoController.vcnPal16TS[0]) :
  4553:                                 VideoController.vcnMix2 (
  4554:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]],
  4555:                                   VideoController.vcnPal16TS[0])]);
  4556:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  4557:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  4558:                                 VideoController.vcnMix2 (
  4559:                                   VideoController.vcnPal16G8[p],
  4560:                                   VideoController.vcnPal16TS[0]) :
  4561:                                 VideoController.vcnMix2 (
  4562:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]],
  4563:                                   VideoController.vcnPal16TS[0])]);
  4564:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  4565:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  4566:                                 VideoController.vcnMix2 (
  4567:                                   VideoController.vcnPal16G8[p],
  4568:                                   VideoController.vcnPal16TS[0]) :
  4569:                                 VideoController.vcnMix2 (
  4570:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]],
  4571:                                   VideoController.vcnPal16TS[0])]);
  4572:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  4573:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  4574:                                 VideoController.vcnMix2 (
  4575:                                   VideoController.vcnPal16G8[p],
  4576:                                   VideoController.vcnPal16TS[0]) :
  4577:                                 VideoController.vcnMix2 (
  4578:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]],
  4579:                                   VideoController.vcnPal16TS[0])]);
  4580:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  4581:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  4582:                                 VideoController.vcnMix2 (
  4583:                                   VideoController.vcnPal16G8[p],
  4584:                                   VideoController.vcnPal16TS[0]) :
  4585:                                 VideoController.vcnMix2 (
  4586:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]],
  4587:                                   VideoController.vcnPal16TS[0])]);
  4588:         gx1st += 16;
  4589:         gx2nd += 16;
  4590:         da += 8;
  4591:       }  //while da<db
  4592:     }  //drawRaster
  4593:   },  //E2_A
  4594: 
  4595:   //================================================================================
  4596:   //E3 ($0000,$06xx,$0007)
  4597:   //  概要
  4598:   //    E3  512ドット16色3プレーン
  4599:   //    拡張なし
  4600:   //  手順
  4601:   //    1番目のパレットが0でないとき
  4602:   //      1番目のカラー(0は黒)
  4603:   //    さもなくば(1番目のパレットが0のとき)
  4604:   //      2番目のパレットが0でないとき
  4605:   //        2番目のカラー(0は黒)
  4606:   //      さもなくば(2番目のパレットが0のとき)
  4607:   //        3番目のカラー(0は黒)
  4608:   //  中間コード1
  4609:   //    (e1p()!=0?epc(e1p()):(e2p()!=0?epc(e2p()):epc(e3p())))
  4610:   //  中間コード2
  4611:   //    e1p()!=0?epc(e1p()):e2p()!=0?epc(e2p()):epc(e3p())
  4612:   //  中間コード3
  4613:   //    (v0=e1p())!=0?epc(v0):(v2=e2p())!=0?epc(v2):epc(e3p())
  4614:   //  中間コード4
  4615:   //    (p=e1p())!=0?epc(p):(p=e2p())!=0?epc(p):epc(e3p())
  4616:   //  中間コード5
  4617:   //    (p=e1p())!=0?epc(p):(p=e2p())!=0?epc(p):epc(e3p())
  4618:   //  中間コード6
  4619:   //    (p=e1p())!=0?epo(p):(p=e2p())!=0?epo(p):epo(e3p())
  4620:   E3 {
  4621:     @Override public void drawRaster (int src, int dst, boolean rh) {
  4622:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4623:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4624:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4625:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4626:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4627:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4628:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  4629:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  4630:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4631:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4632:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4633:       if (rh) {
  4634:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4635:         gx1st += half << 1;
  4636:         gx2nd += half << 1;
  4637:         gx3rd += half << 1;
  4638:         da += half;
  4639:       }
  4640:       while (da < db) {
  4641:         int p;
  4642:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  4643:                           VideoController.vcnPal32G8[p] :
  4644:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  4645:                           VideoController.vcnPal32G8[p] :
  4646:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023]]);
  4647:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  4648:                               VideoController.vcnPal32G8[p] :
  4649:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  4650:                               VideoController.vcnPal32G8[p] :
  4651:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]]);
  4652:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  4653:                               VideoController.vcnPal32G8[p] :
  4654:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  4655:                               VideoController.vcnPal32G8[p] :
  4656:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]]);
  4657:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  4658:                               VideoController.vcnPal32G8[p] :
  4659:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  4660:                               VideoController.vcnPal32G8[p] :
  4661:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]]);
  4662:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  4663:                               VideoController.vcnPal32G8[p] :
  4664:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  4665:                               VideoController.vcnPal32G8[p] :
  4666:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]]);
  4667:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  4668:                               VideoController.vcnPal32G8[p] :
  4669:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  4670:                               VideoController.vcnPal32G8[p] :
  4671:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]]);
  4672:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  4673:                               VideoController.vcnPal32G8[p] :
  4674:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  4675:                               VideoController.vcnPal32G8[p] :
  4676:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]]);
  4677:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  4678:                               VideoController.vcnPal32G8[p] :
  4679:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  4680:                               VideoController.vcnPal32G8[p] :
  4681:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]]);
  4682:         gx1st += 16;
  4683:         gx2nd += 16;
  4684:         gx3rd += 16;
  4685:         da += 8;
  4686:       }  //while da<db
  4687:     }  //drawRaster
  4688:   },  //E3
  4689: 
  4690:   //================================================================================
  4691:   //XE3
  4692:   //  概要
  4693:   //    E3  512ドット16色3プレーン
  4694:   //    拡張あり
  4695:   XE3 {
  4696:     @Override public void drawRaster (int src, int dst, boolean rh) {
  4697:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  4698:         //   .A.XHPGT
  4699:       case 0b00010000:  //E3_XWC
  4700:       case 0b00010001:  //E3_XWC
  4701:       case 0b00010010:  //E3_XWC
  4702:       case 0b00010011:  //E3_XWC
  4703:         E3.drawRaster (src, dst, rh);
  4704:         break;
  4705:         //   .A.XHPGT
  4706:       case 0b00010100:  //E3_XWP
  4707:       case 0b00010101:  //E3_XWP
  4708:       case 0b00010110:  //E3_XWP
  4709:       case 0b00010111:  //E3_XWP
  4710:         E3_XWP.drawRaster (src, dst, rh);
  4711:         break;
  4712:         //   .A.XHPGT
  4713:       case 0b00011000:  //E3_XHC
  4714:         E3.drawRaster (src, dst, rh);
  4715:         break;
  4716:         //   .A.XHPGT
  4717:       case 0b00011001:  //E3_XHCT
  4718:         E3_XHCT.drawRaster (src, dst, rh);
  4719:         break;
  4720:         //   .A.XHPGT
  4721:       case 0b00011010:  //E3_XHCG
  4722:         E3_XHCG.drawRaster (src, dst, rh);
  4723:         break;
  4724:         //   .A.XHPGT
  4725:       case 0b00011011:  //E3_XHCGT
  4726:         E3_XHCGT.drawRaster (src, dst, rh);
  4727:         break;
  4728:         //   .A.XHPGT
  4729:       case 0b00011101:  //E3_XHPT
  4730:         E3_XHPT.drawRaster (src, dst, rh);
  4731:         break;
  4732:         //   .A.XHPGT
  4733:       case 0b00011110:  //E3_XHPG
  4734:         E3_XHPG.drawRaster (src, dst, rh);
  4735:         break;
  4736:         //   .A.XHPGT
  4737:       case 0b00011111:  //E3_XHPGT
  4738:         E3_XHPGT.drawRaster (src, dst, rh);
  4739:         break;
  4740:         //   .A.XHPGT
  4741:       case 0b01000000:  //E3_A
  4742:       case 0b01000001:  //E3_A
  4743:       case 0b01000010:  //E3_A
  4744:       case 0b01000011:  //E3_A
  4745:       case 0b01000100:  //E3_A
  4746:       case 0b01000101:  //E3_A
  4747:       case 0b01000110:  //E3_A
  4748:       case 0b01000111:  //E3_A
  4749:       case 0b01001000:  //E3_A
  4750:       case 0b01001001:  //E3_A
  4751:       case 0b01001010:  //E3_A
  4752:       case 0b01001011:  //E3_A
  4753:       case 0b01001100:  //E3_A
  4754:       case 0b01001101:  //E3_A
  4755:       case 0b01001110:  //E3_A
  4756:       case 0b01001111:  //E3_A
  4757:       case 0b01010000:  //E3_A
  4758:       case 0b01010001:  //E3_A
  4759:       case 0b01010010:  //E3_A
  4760:       case 0b01010011:  //E3_A
  4761:       case 0b01010100:  //E3_A
  4762:       case 0b01010101:  //E3_A
  4763:       case 0b01010110:  //E3_A
  4764:       case 0b01010111:  //E3_A
  4765:       case 0b01011000:  //E3_A
  4766:       case 0b01011001:  //E3_A
  4767:       case 0b01011010:  //E3_A
  4768:       case 0b01011011:  //E3_A
  4769:       case 0b01011100:  //E3_A
  4770:       case 0b01011101:  //E3_A
  4771:       case 0b01011110:  //E3_A
  4772:       case 0b01011111:  //E3_A
  4773:         E3_A.drawRaster (src, dst, rh);
  4774:         break;
  4775:       default:
  4776:         E3.drawRaster (src, dst, rh);
  4777:         VideoController.vcnReportUnimplemented (XE3);
  4778:       }  //switch
  4779:     }  //drawRaster
  4780:   },  //XE3
  4781: 
  4782:   //================================================================================
  4783:   //E3_XWP ($0000,$06xx,$1407)
  4784:   //  概要
  4785:   //    E3  512ドット16色3プレーン
  4786:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  4787:   //  手順
  4788:   //    1番目のパレットが0のとき
  4789:   //      2番目のパレットを偶数化したパレットが0でないとき
  4790:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  4791:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  4792:   //        3番目のパレットを偶数化したパレットのカラー(0は黒)
  4793:   //    1番目のパレットが1のとき
  4794:   //      グラフィックパレット0のカラー(0は黒)
  4795:   //    1番目のパレットが2以上の偶数のとき
  4796:   //      1番目のカラー(0は黒)
  4797:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  4798:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  4799:   //  中間コード1
  4800:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):epc(tev(e3p()))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p())))
  4801:   //  中間コード2
  4802:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):epc(tev(e3p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p()))
  4803:   //  中間コード3
  4804:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):epc(tev(e3p())):v0==1?epc(0):ls1(v0)==0?epc(v0):epc(tev(v0))
  4805:   //  中間コード4
  4806:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):epc(tev(e3p())):p==1?epc(0):ls1(p)==0?epc(p):epc(tev(p))
  4807:   //  中間コード5
  4808:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):epc(e3p()&-2):p==1?epc(0):(p&1)==0?epc(p):epc(p&-2)
  4809:   //  中間コード6
  4810:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):epo(e3p()&-2):p==1?epo(0):(p&1)==0?epo(p):epo(p&-2)
  4811:   E3_XWP {
  4812:     @Override public void drawRaster (int src, int dst, boolean rh) {
  4813:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4814:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4815:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4816:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4817:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4818:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4819:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  4820:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  4821:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4822:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4823:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4824:       if (rh) {
  4825:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4826:         gx1st += half << 1;
  4827:         gx2nd += half << 1;
  4828:         gx3rd += half << 1;
  4829:         da += half;
  4830:       }
  4831:       while (da < db) {
  4832:         int p;
  4833:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  4834:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  4835:                           VideoController.vcnPal32G8[p] :
  4836:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2] :
  4837:                           p == 1 ?
  4838:                           VideoController.vcnPal32G8[0] :
  4839:                           (p & 1) == 0 ?
  4840:                           VideoController.vcnPal32G8[p] :
  4841:                           VideoController.vcnPal32G8[p & -2]);
  4842:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  4843:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  4844:                               VideoController.vcnPal32G8[p] :
  4845:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2] :
  4846:                               p == 1 ?
  4847:                               VideoController.vcnPal32G8[0] :
  4848:                               (p & 1) == 0 ?
  4849:                               VideoController.vcnPal32G8[p] :
  4850:                               VideoController.vcnPal32G8[p & -2]);
  4851:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  4852:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  4853:                               VideoController.vcnPal32G8[p] :
  4854:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2] :
  4855:                               p == 1 ?
  4856:                               VideoController.vcnPal32G8[0] :
  4857:                               (p & 1) == 0 ?
  4858:                               VideoController.vcnPal32G8[p] :
  4859:                               VideoController.vcnPal32G8[p & -2]);
  4860:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  4861:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  4862:                               VideoController.vcnPal32G8[p] :
  4863:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2] :
  4864:                               p == 1 ?
  4865:                               VideoController.vcnPal32G8[0] :
  4866:                               (p & 1) == 0 ?
  4867:                               VideoController.vcnPal32G8[p] :
  4868:                               VideoController.vcnPal32G8[p & -2]);
  4869:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  4870:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  4871:                               VideoController.vcnPal32G8[p] :
  4872:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2] :
  4873:                               p == 1 ?
  4874:                               VideoController.vcnPal32G8[0] :
  4875:                               (p & 1) == 0 ?
  4876:                               VideoController.vcnPal32G8[p] :
  4877:                               VideoController.vcnPal32G8[p & -2]);
  4878:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  4879:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  4880:                               VideoController.vcnPal32G8[p] :
  4881:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2] :
  4882:                               p == 1 ?
  4883:                               VideoController.vcnPal32G8[0] :
  4884:                               (p & 1) == 0 ?
  4885:                               VideoController.vcnPal32G8[p] :
  4886:                               VideoController.vcnPal32G8[p & -2]);
  4887:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  4888:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  4889:                               VideoController.vcnPal32G8[p] :
  4890:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2] :
  4891:                               p == 1 ?
  4892:                               VideoController.vcnPal32G8[0] :
  4893:                               (p & 1) == 0 ?
  4894:                               VideoController.vcnPal32G8[p] :
  4895:                               VideoController.vcnPal32G8[p & -2]);
  4896:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  4897:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  4898:                               VideoController.vcnPal32G8[p] :
  4899:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2] :
  4900:                               p == 1 ?
  4901:                               VideoController.vcnPal32G8[0] :
  4902:                               (p & 1) == 0 ?
  4903:                               VideoController.vcnPal32G8[p] :
  4904:                               VideoController.vcnPal32G8[p & -2]);
  4905:         gx1st += 16;
  4906:         gx2nd += 16;
  4907:         gx3rd += 16;
  4908:         da += 8;
  4909:       }  //while da<db
  4910:     }  //drawRaster
  4911:   },  //E3_XWP
  4912: 
  4913:   //================================================================================
  4914:   //E3_XHCT ($0000,$06xx,$1907)
  4915:   //  概要
  4916:   //    E3  512ドット16色3プレーン
  4917:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  4918:   //  手順
  4919:   //    1番目のパレットが0でないとき
  4920:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  4921:   //        1番目のカラーとカラー0を混ぜたカラー(0は黒)
  4922:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  4923:   //        1番目のカラー(0は黒)
  4924:   //    さもなくば(1番目のパレットが0のとき)
  4925:   //      2番目のパレットが0でないとき
  4926:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  4927:   //          2番目のカラーとカラー0を混ぜたカラー(0は黒)
  4928:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  4929:   //          2番目のカラー(0は黒)
  4930:   //      さもなくば(2番目のパレットが0のとき)
  4931:   //        3番目のパレットを偶数化したパレットのカラーが奇数のとき
  4932:   //          3番目のカラーとカラー0を混ぜたカラー(0は黒)
  4933:   //        さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  4934:   //          3番目のカラー(0は黒)
  4935:   //  中間コード1
  4936:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p())):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),0):epc(e2p())):(ls1(epc(tev(e3p())))!=0?mix(epc(e3p()),0):epc(e3p()))))
  4937:   //  中間コード2
  4938:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p()):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),0):epc(e2p()):ls1(epc(tev(e3p())))!=0?mix(epc(e3p()),0):epc(e3p())
  4939:   //  中間コード3
  4940:   //    (v0=e1p())!=0?ls1(epc(tev(v0)))!=0?mix(epc(v0),0):epc(v0):(v7=e2p())!=0?ls1(epc(tev(v7)))!=0?mix(epc(v7),0):epc(v7):ls1(epc(tev(v17=e3p())))!=0?mix(epc(v17),0):epc(v17)
  4941:   //  中間コード4
  4942:   //    (p=e1p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),0):epc(p):(p=e2p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),0):epc(p):ls1(epc(tev(p=e3p())))!=0?mix(epc(p),0):epc(p)
  4943:   //  中間コード5
  4944:   //    (p=e1p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),0):epc(p):(p=e2p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),0):epc(p):(epc((p=e3p())&-2)&1)!=0?mix(epc(p),0):epc(p)
  4945:   //  中間コード6
  4946:   //    (p=e1p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),0)):epo(p):(p=e2p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),0)):epo(p):(epc((p=e3p())&-2)&1)!=0?cto(mix(epc(p),0)):epo(p)
  4947:   E3_XHCT {
  4948:     @Override public void drawRaster (int src, int dst, boolean rh) {
  4949:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4950:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4951:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4952:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4953:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4954:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4955:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  4956:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  4957:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  4958:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4959:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4960:       if (rh) {
  4961:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4962:         gx1st += half << 1;
  4963:         gx2nd += half << 1;
  4964:         gx3rd += half << 1;
  4965:         da += half;
  4966:       }
  4967:       while (da < db) {
  4968:         int p;
  4969:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  4970:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  4971:                           VideoController.vcnPalTbl[
  4972:                             VideoController.vcnMix2 (
  4973:                               VideoController.vcnPal16G8[p],
  4974:                               0)] :
  4975:                           VideoController.vcnPal32G8[p] :
  4976:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  4977:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  4978:                           VideoController.vcnPalTbl[
  4979:                             VideoController.vcnMix2 (
  4980:                               VideoController.vcnPal16G8[p],
  4981:                               0)] :
  4982:                           VideoController.vcnPal32G8[p] :
  4983:                           (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) & -2] & 1) != 0 ?
  4984:                           VideoController.vcnPalTbl[
  4985:                             VideoController.vcnMix2 (
  4986:                               VideoController.vcnPal16G8[p],
  4987:                               0)] :
  4988:                           VideoController.vcnPal32G8[p]);
  4989:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  4990:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  4991:                               VideoController.vcnPalTbl[
  4992:                                 VideoController.vcnMix2 (
  4993:                                   VideoController.vcnPal16G8[p],
  4994:                                   0)] :
  4995:                               VideoController.vcnPal32G8[p] :
  4996:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  4997:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  4998:                               VideoController.vcnPalTbl[
  4999:                                 VideoController.vcnMix2 (
  5000:                                   VideoController.vcnPal16G8[p],
  5001:                                   0)] :
  5002:                               VideoController.vcnPal32G8[p] :
  5003:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) & -2] & 1) != 0 ?
  5004:                               VideoController.vcnPalTbl[
  5005:                                 VideoController.vcnMix2 (
  5006:                                   VideoController.vcnPal16G8[p],
  5007:                                   0)] :
  5008:                               VideoController.vcnPal32G8[p]);
  5009:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  5010:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5011:                               VideoController.vcnPalTbl[
  5012:                                 VideoController.vcnMix2 (
  5013:                                   VideoController.vcnPal16G8[p],
  5014:                                   0)] :
  5015:                               VideoController.vcnPal32G8[p] :
  5016:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  5017:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5018:                               VideoController.vcnPalTbl[
  5019:                                 VideoController.vcnMix2 (
  5020:                                   VideoController.vcnPal16G8[p],
  5021:                                   0)] :
  5022:                               VideoController.vcnPal32G8[p] :
  5023:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) & -2] & 1) != 0 ?
  5024:                               VideoController.vcnPalTbl[
  5025:                                 VideoController.vcnMix2 (
  5026:                                   VideoController.vcnPal16G8[p],
  5027:                                   0)] :
  5028:                               VideoController.vcnPal32G8[p]);
  5029:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  5030:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5031:                               VideoController.vcnPalTbl[
  5032:                                 VideoController.vcnMix2 (
  5033:                                   VideoController.vcnPal16G8[p],
  5034:                                   0)] :
  5035:                               VideoController.vcnPal32G8[p] :
  5036:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  5037:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5038:                               VideoController.vcnPalTbl[
  5039:                                 VideoController.vcnMix2 (
  5040:                                   VideoController.vcnPal16G8[p],
  5041:                                   0)] :
  5042:                               VideoController.vcnPal32G8[p] :
  5043:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) & -2] & 1) != 0 ?
  5044:                               VideoController.vcnPalTbl[
  5045:                                 VideoController.vcnMix2 (
  5046:                                   VideoController.vcnPal16G8[p],
  5047:                                   0)] :
  5048:                               VideoController.vcnPal32G8[p]);
  5049:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  5050:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5051:                               VideoController.vcnPalTbl[
  5052:                                 VideoController.vcnMix2 (
  5053:                                   VideoController.vcnPal16G8[p],
  5054:                                   0)] :
  5055:                               VideoController.vcnPal32G8[p] :
  5056:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  5057:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5058:                               VideoController.vcnPalTbl[
  5059:                                 VideoController.vcnMix2 (
  5060:                                   VideoController.vcnPal16G8[p],
  5061:                                   0)] :
  5062:                               VideoController.vcnPal32G8[p] :
  5063:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) & -2] & 1) != 0 ?
  5064:                               VideoController.vcnPalTbl[
  5065:                                 VideoController.vcnMix2 (
  5066:                                   VideoController.vcnPal16G8[p],
  5067:                                   0)] :
  5068:                               VideoController.vcnPal32G8[p]);
  5069:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  5070:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5071:                               VideoController.vcnPalTbl[
  5072:                                 VideoController.vcnMix2 (
  5073:                                   VideoController.vcnPal16G8[p],
  5074:                                   0)] :
  5075:                               VideoController.vcnPal32G8[p] :
  5076:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  5077:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5078:                               VideoController.vcnPalTbl[
  5079:                                 VideoController.vcnMix2 (
  5080:                                   VideoController.vcnPal16G8[p],
  5081:                                   0)] :
  5082:                               VideoController.vcnPal32G8[p] :
  5083:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) & -2] & 1) != 0 ?
  5084:                               VideoController.vcnPalTbl[
  5085:                                 VideoController.vcnMix2 (
  5086:                                   VideoController.vcnPal16G8[p],
  5087:                                   0)] :
  5088:                               VideoController.vcnPal32G8[p]);
  5089:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  5090:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5091:                               VideoController.vcnPalTbl[
  5092:                                 VideoController.vcnMix2 (
  5093:                                   VideoController.vcnPal16G8[p],
  5094:                                   0)] :
  5095:                               VideoController.vcnPal32G8[p] :
  5096:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  5097:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5098:                               VideoController.vcnPalTbl[
  5099:                                 VideoController.vcnMix2 (
  5100:                                   VideoController.vcnPal16G8[p],
  5101:                                   0)] :
  5102:                               VideoController.vcnPal32G8[p] :
  5103:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) & -2] & 1) != 0 ?
  5104:                               VideoController.vcnPalTbl[
  5105:                                 VideoController.vcnMix2 (
  5106:                                   VideoController.vcnPal16G8[p],
  5107:                                   0)] :
  5108:                               VideoController.vcnPal32G8[p]);
  5109:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  5110:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5111:                               VideoController.vcnPalTbl[
  5112:                                 VideoController.vcnMix2 (
  5113:                                   VideoController.vcnPal16G8[p],
  5114:                                   0)] :
  5115:                               VideoController.vcnPal32G8[p] :
  5116:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  5117:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5118:                               VideoController.vcnPalTbl[
  5119:                                 VideoController.vcnMix2 (
  5120:                                   VideoController.vcnPal16G8[p],
  5121:                                   0)] :
  5122:                               VideoController.vcnPal32G8[p] :
  5123:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) & -2] & 1) != 0 ?
  5124:                               VideoController.vcnPalTbl[
  5125:                                 VideoController.vcnMix2 (
  5126:                                   VideoController.vcnPal16G8[p],
  5127:                                   0)] :
  5128:                               VideoController.vcnPal32G8[p]);
  5129:         gx1st += 16;
  5130:         gx2nd += 16;
  5131:         gx3rd += 16;
  5132:         da += 8;
  5133:       }  //while da<db
  5134:     }  //drawRaster
  5135:   },  //E3_XHCT
  5136: 
  5137:   //================================================================================
  5138:   //E3_XHCG ($0000,$06xx,$1A07)
  5139:   //  概要
  5140:   //    E3  512ドット16色3プレーン
  5141:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  5142:   //  手順
  5143:   //    1番目のパレットが0でないとき
  5144:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  5145:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  5146:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5147:   //        1番目のパレットが奇数のとき
  5148:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  5149:   //        さもなくば(1番目のパレットが偶数のとき)
  5150:   //          1番目のカラー(0は黒)
  5151:   //    さもなくば(1番目のパレットが0のとき)
  5152:   //      2番目のパレットが0でないとき
  5153:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  5154:   //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  5155:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5156:   //          2番目のカラー(0は黒)
  5157:   //      さもなくば(2番目のパレットが0のとき)
  5158:   //        3番目のパレットを偶数化したパレットのカラーが奇数のとき
  5159:   //          3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラー(0は黒)
  5160:   //        さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5161:   //          3番目のパレットが奇数のとき
  5162:   //            パレット1のカラー(0は黒)
  5163:   //          さもなくば(3番目のパレットが偶数のとき)
  5164:   //            3番目のカラー(0は黒)
  5165:   //  中間コード1
  5166:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()))):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p())):(ls1(epc(tev(e3p())))!=0?mix(epc(tev(e3p())),epc(1)):(ls1(e3p())!=0?epc(1):epc(e3p())))))
  5167:   //  中間コード2
  5168:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p()):ls1(epc(tev(e3p())))!=0?mix(epc(tev(e3p())),epc(1)):ls1(e3p())!=0?epc(1):epc(e3p())
  5169:   //  中間コード3
  5170:   //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(v2,epc(tod(e2q()))):ls1(v0)!=0?epc(tod(e2q())):epc(v0):(v13=e2p())!=0?ls1(v15=epc(tev(v13)))!=0?mix(v15,epc(tod(e2q()))):epc(v13):ls1(v23=epc(tev(v25=e3p())))!=0?mix(v23,epc(1)):ls1(v25)!=0?epc(1):epc(v25)
  5171:   //  中間コード4
  5172:   //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(tod(e2q()))):ls1(p)!=0?epc(tod(e2q())):epc(p):(p=e2p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(tod(e2q()))):epc(p):ls1(p=epc(tev(q=e3p())))!=0?mix(p,epc(1)):ls1(q)!=0?epc(1):epc(q)
  5173:   //  中間コード5
  5174:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(e2q()|1)):(p&1)!=0?epc(e2q()|1):epc(p):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(e2q()|1)):epc(p):((p=epc((q=e3p())&-2))&1)!=0?mix(p,epc(1)):(q&1)!=0?epc(1):epc(q)
  5175:   //  中間コード6
  5176:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(e2q()|1))):(p&1)!=0?epo(e2q()|1):epo(p):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(e2q()|1))):epo(p):((p=epc((q=e3p())&-2))&1)!=0?cto(mix(p,epc(1))):(q&1)!=0?epo(1):epo(q)
  5177:   E3_XHCG {
  5178:     @Override public void drawRaster (int src, int dst, boolean rh) {
  5179:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  5180:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  5181:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5182:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  5183:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  5184:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5185:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  5186:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  5187:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  5188:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5189:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  5190:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  5191:       if (rh) {
  5192:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  5193:         gx1st += half << 1;
  5194:         gx2nd += half << 1;
  5195:         gx3rd += half << 1;
  5196:         da += half;
  5197:       }
  5198:       while (da < db) {
  5199:         int p, q;
  5200:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  5201:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5202:                           VideoController.vcnPalTbl[
  5203:                             VideoController.vcnMix2 (
  5204:                               q,
  5205:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  5206:                           (p & 1) != 0 ?
  5207:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  5208:                           VideoController.vcnPal32G8[p] :
  5209:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  5210:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5211:                           VideoController.vcnPalTbl[
  5212:                             VideoController.vcnMix2 (
  5213:                               q,
  5214:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  5215:                           VideoController.vcnPal32G8[p] :
  5216:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) & -2]) & 1) != 0 ?
  5217:                           VideoController.vcnPalTbl[
  5218:                             VideoController.vcnMix2 (
  5219:                               p,
  5220:                               VideoController.vcnPal16G8[1])] :
  5221:                           (q & 1) != 0 ?
  5222:                           VideoController.vcnPal32G8[1] :
  5223:                           VideoController.vcnPal32G8[q]);
  5224:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  5225:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5226:                               VideoController.vcnPalTbl[
  5227:                                 VideoController.vcnMix2 (
  5228:                                   q,
  5229:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  5230:                               (p & 1) != 0 ?
  5231:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  5232:                               VideoController.vcnPal32G8[p] :
  5233:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  5234:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5235:                               VideoController.vcnPalTbl[
  5236:                                 VideoController.vcnMix2 (
  5237:                                   q,
  5238:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  5239:                               VideoController.vcnPal32G8[p] :
  5240:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) & -2]) & 1) != 0 ?
  5241:                               VideoController.vcnPalTbl[
  5242:                                 VideoController.vcnMix2 (
  5243:                                   p,
  5244:                                   VideoController.vcnPal16G8[1])] :
  5245:                               (q & 1) != 0 ?
  5246:                               VideoController.vcnPal32G8[1] :
  5247:                               VideoController.vcnPal32G8[q]);
  5248:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  5249:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5250:                               VideoController.vcnPalTbl[
  5251:                                 VideoController.vcnMix2 (
  5252:                                   q,
  5253:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  5254:                               (p & 1) != 0 ?
  5255:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  5256:                               VideoController.vcnPal32G8[p] :
  5257:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  5258:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5259:                               VideoController.vcnPalTbl[
  5260:                                 VideoController.vcnMix2 (
  5261:                                   q,
  5262:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  5263:                               VideoController.vcnPal32G8[p] :
  5264:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) & -2]) & 1) != 0 ?
  5265:                               VideoController.vcnPalTbl[
  5266:                                 VideoController.vcnMix2 (
  5267:                                   p,
  5268:                                   VideoController.vcnPal16G8[1])] :
  5269:                               (q & 1) != 0 ?
  5270:                               VideoController.vcnPal32G8[1] :
  5271:                               VideoController.vcnPal32G8[q]);
  5272:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  5273:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5274:                               VideoController.vcnPalTbl[
  5275:                                 VideoController.vcnMix2 (
  5276:                                   q,
  5277:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  5278:                               (p & 1) != 0 ?
  5279:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  5280:                               VideoController.vcnPal32G8[p] :
  5281:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  5282:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5283:                               VideoController.vcnPalTbl[
  5284:                                 VideoController.vcnMix2 (
  5285:                                   q,
  5286:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  5287:                               VideoController.vcnPal32G8[p] :
  5288:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) & -2]) & 1) != 0 ?
  5289:                               VideoController.vcnPalTbl[
  5290:                                 VideoController.vcnMix2 (
  5291:                                   p,
  5292:                                   VideoController.vcnPal16G8[1])] :
  5293:                               (q & 1) != 0 ?
  5294:                               VideoController.vcnPal32G8[1] :
  5295:                               VideoController.vcnPal32G8[q]);
  5296:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  5297:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5298:                               VideoController.vcnPalTbl[
  5299:                                 VideoController.vcnMix2 (
  5300:                                   q,
  5301:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  5302:                               (p & 1) != 0 ?
  5303:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  5304:                               VideoController.vcnPal32G8[p] :
  5305:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  5306:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5307:                               VideoController.vcnPalTbl[
  5308:                                 VideoController.vcnMix2 (
  5309:                                   q,
  5310:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  5311:                               VideoController.vcnPal32G8[p] :
  5312:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) & -2]) & 1) != 0 ?
  5313:                               VideoController.vcnPalTbl[
  5314:                                 VideoController.vcnMix2 (
  5315:                                   p,
  5316:                                   VideoController.vcnPal16G8[1])] :
  5317:                               (q & 1) != 0 ?
  5318:                               VideoController.vcnPal32G8[1] :
  5319:                               VideoController.vcnPal32G8[q]);
  5320:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  5321:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5322:                               VideoController.vcnPalTbl[
  5323:                                 VideoController.vcnMix2 (
  5324:                                   q,
  5325:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  5326:                               (p & 1) != 0 ?
  5327:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  5328:                               VideoController.vcnPal32G8[p] :
  5329:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  5330:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5331:                               VideoController.vcnPalTbl[
  5332:                                 VideoController.vcnMix2 (
  5333:                                   q,
  5334:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  5335:                               VideoController.vcnPal32G8[p] :
  5336:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) & -2]) & 1) != 0 ?
  5337:                               VideoController.vcnPalTbl[
  5338:                                 VideoController.vcnMix2 (
  5339:                                   p,
  5340:                                   VideoController.vcnPal16G8[1])] :
  5341:                               (q & 1) != 0 ?
  5342:                               VideoController.vcnPal32G8[1] :
  5343:                               VideoController.vcnPal32G8[q]);
  5344:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  5345:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5346:                               VideoController.vcnPalTbl[
  5347:                                 VideoController.vcnMix2 (
  5348:                                   q,
  5349:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  5350:                               (p & 1) != 0 ?
  5351:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  5352:                               VideoController.vcnPal32G8[p] :
  5353:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  5354:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5355:                               VideoController.vcnPalTbl[
  5356:                                 VideoController.vcnMix2 (
  5357:                                   q,
  5358:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  5359:                               VideoController.vcnPal32G8[p] :
  5360:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) & -2]) & 1) != 0 ?
  5361:                               VideoController.vcnPalTbl[
  5362:                                 VideoController.vcnMix2 (
  5363:                                   p,
  5364:                                   VideoController.vcnPal16G8[1])] :
  5365:                               (q & 1) != 0 ?
  5366:                               VideoController.vcnPal32G8[1] :
  5367:                               VideoController.vcnPal32G8[q]);
  5368:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  5369:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5370:                               VideoController.vcnPalTbl[
  5371:                                 VideoController.vcnMix2 (
  5372:                                   q,
  5373:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  5374:                               (p & 1) != 0 ?
  5375:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  5376:                               VideoController.vcnPal32G8[p] :
  5377:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  5378:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5379:                               VideoController.vcnPalTbl[
  5380:                                 VideoController.vcnMix2 (
  5381:                                   q,
  5382:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  5383:                               VideoController.vcnPal32G8[p] :
  5384:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) & -2]) & 1) != 0 ?
  5385:                               VideoController.vcnPalTbl[
  5386:                                 VideoController.vcnMix2 (
  5387:                                   p,
  5388:                                   VideoController.vcnPal16G8[1])] :
  5389:                               (q & 1) != 0 ?
  5390:                               VideoController.vcnPal32G8[1] :
  5391:                               VideoController.vcnPal32G8[q]);
  5392:         gx1st += 16;
  5393:         gx2nd += 16;
  5394:         gx3rd += 16;
  5395:         da += 8;
  5396:       }  //while da<db
  5397:     }  //drawRaster
  5398:   },  //E3_XHCG
  5399: 
  5400:   //================================================================================
  5401:   //E3_XHCGT ($0000,$06xx,$1B07)
  5402:   //  概要
  5403:   //    E3  512ドット16色3プレーン
  5404:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  5405:   //  手順
  5406:   //    1番目のパレットが0でないとき
  5407:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  5408:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  5409:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5410:   //        1番目のパレットが奇数のとき
  5411:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  5412:   //        さもなくば(1番目のパレットが偶数のとき)
  5413:   //          1番目のカラー(0は黒)
  5414:   //    さもなくば(1番目のパレットが0のとき)
  5415:   //      2番目のパレットが0でないとき
  5416:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  5417:   //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  5418:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5419:   //          2番目のカラー(0は黒)
  5420:   //      さもなくば(2番目のパレットが0のとき)
  5421:   //        3番目のパレットを偶数化したパレットのカラーが奇数のとき
  5422:   //          3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  5423:   //        さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5424:   //          3番目のパレットが奇数のとき
  5425:   //            パレット1のカラー(0は黒)
  5426:   //          さもなくば(3番目のパレットが偶数のとき)
  5427:   //            3番目のカラー(0は黒)
  5428:   //  中間コード1
  5429:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()))):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),0):epc(e2p())):(ls1(epc(tev(e3p())))!=0?mix(mix(epc(tev(e3p())),epc(1)),0):(ls1(e3p())!=0?epc(1):epc(e3p())))))
  5430:   //  中間コード2
  5431:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),0):epc(e2p()):ls1(epc(tev(e3p())))!=0?mix(mix(epc(tev(e3p())),epc(1)),0):ls1(e3p())!=0?epc(1):epc(e3p())
  5432:   //  中間コード3
  5433:   //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(mix(v2,epc(tod(e2q()))),0):ls1(v0)!=0?epc(tod(e2q())):epc(v0):(v14=e2p())!=0?ls1(v16=epc(tev(v14)))!=0?mix(mix(v16,epc(tod(e2q()))),0):epc(v14):ls1(v25=epc(tev(v27=e3p())))!=0?mix(mix(v25,epc(1)),0):ls1(v27)!=0?epc(1):epc(v27)
  5434:   //  中間コード4
  5435:   //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(tod(e2q()))),0):ls1(p)!=0?epc(tod(e2q())):epc(p):(p=e2p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(tod(e2q()))),0):epc(p):ls1(p=epc(tev(q=e3p())))!=0?mix(mix(p,epc(1)),0):ls1(q)!=0?epc(1):epc(q)
  5436:   //  中間コード5
  5437:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(e2q()|1)),0):(p&1)!=0?epc(e2q()|1):epc(p):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(e2q()|1)),0):epc(p):((p=epc((q=e3p())&-2))&1)!=0?mix(mix(p,epc(1)),0):(q&1)!=0?epc(1):epc(q)
  5438:   //  中間コード6
  5439:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(e2q()|1)),0)):(p&1)!=0?epo(e2q()|1):epo(p):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(e2q()|1)),0)):epo(p):((p=epc((q=e3p())&-2))&1)!=0?cto(mix(mix(p,epc(1)),0)):(q&1)!=0?epo(1):epo(q)
  5440:   E3_XHCGT {
  5441:     @Override public void drawRaster (int src, int dst, boolean rh) {
  5442:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  5443:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  5444:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5445:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  5446:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  5447:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5448:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  5449:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  5450:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  5451:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5452:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  5453:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  5454:       if (rh) {
  5455:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  5456:         gx1st += half << 1;
  5457:         gx2nd += half << 1;
  5458:         gx3rd += half << 1;
  5459:         da += half;
  5460:       }
  5461:       while (da < db) {
  5462:         int p, q;
  5463:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  5464:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5465:                           VideoController.vcnPalTbl[
  5466:                             VideoController.vcnMix2 (
  5467:                               VideoController.vcnMix2 (
  5468:                                 q,
  5469:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  5470:                               0)] :
  5471:                           (p & 1) != 0 ?
  5472:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  5473:                           VideoController.vcnPal32G8[p] :
  5474:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  5475:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5476:                           VideoController.vcnPalTbl[
  5477:                             VideoController.vcnMix2 (
  5478:                               VideoController.vcnMix2 (
  5479:                                 q,
  5480:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  5481:                               0)] :
  5482:                           VideoController.vcnPal32G8[p] :
  5483:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) & -2]) & 1) != 0 ?
  5484:                           VideoController.vcnPalTbl[
  5485:                             VideoController.vcnMix2 (
  5486:                               VideoController.vcnMix2 (
  5487:                                 p,
  5488:                                 VideoController.vcnPal16G8[1]),
  5489:                               0)] :
  5490:                           (q & 1) != 0 ?
  5491:                           VideoController.vcnPal32G8[1] :
  5492:                           VideoController.vcnPal32G8[q]);
  5493:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  5494:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5495:                               VideoController.vcnPalTbl[
  5496:                                 VideoController.vcnMix2 (
  5497:                                   VideoController.vcnMix2 (
  5498:                                     q,
  5499:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  5500:                                   0)] :
  5501:                               (p & 1) != 0 ?
  5502:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  5503:                               VideoController.vcnPal32G8[p] :
  5504:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  5505:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5506:                               VideoController.vcnPalTbl[
  5507:                                 VideoController.vcnMix2 (
  5508:                                   VideoController.vcnMix2 (
  5509:                                     q,
  5510:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  5511:                                   0)] :
  5512:                               VideoController.vcnPal32G8[p] :
  5513:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) & -2]) & 1) != 0 ?
  5514:                               VideoController.vcnPalTbl[
  5515:                                 VideoController.vcnMix2 (
  5516:                                   VideoController.vcnMix2 (
  5517:                                     p,
  5518:                                     VideoController.vcnPal16G8[1]),
  5519:                                   0)] :
  5520:                               (q & 1) != 0 ?
  5521:                               VideoController.vcnPal32G8[1] :
  5522:                               VideoController.vcnPal32G8[q]);
  5523:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  5524:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5525:                               VideoController.vcnPalTbl[
  5526:                                 VideoController.vcnMix2 (
  5527:                                   VideoController.vcnMix2 (
  5528:                                     q,
  5529:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  5530:                                   0)] :
  5531:                               (p & 1) != 0 ?
  5532:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  5533:                               VideoController.vcnPal32G8[p] :
  5534:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  5535:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5536:                               VideoController.vcnPalTbl[
  5537:                                 VideoController.vcnMix2 (
  5538:                                   VideoController.vcnMix2 (
  5539:                                     q,
  5540:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  5541:                                   0)] :
  5542:                               VideoController.vcnPal32G8[p] :
  5543:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) & -2]) & 1) != 0 ?
  5544:                               VideoController.vcnPalTbl[
  5545:                                 VideoController.vcnMix2 (
  5546:                                   VideoController.vcnMix2 (
  5547:                                     p,
  5548:                                     VideoController.vcnPal16G8[1]),
  5549:                                   0)] :
  5550:                               (q & 1) != 0 ?
  5551:                               VideoController.vcnPal32G8[1] :
  5552:                               VideoController.vcnPal32G8[q]);
  5553:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  5554:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5555:                               VideoController.vcnPalTbl[
  5556:                                 VideoController.vcnMix2 (
  5557:                                   VideoController.vcnMix2 (
  5558:                                     q,
  5559:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  5560:                                   0)] :
  5561:                               (p & 1) != 0 ?
  5562:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  5563:                               VideoController.vcnPal32G8[p] :
  5564:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  5565:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5566:                               VideoController.vcnPalTbl[
  5567:                                 VideoController.vcnMix2 (
  5568:                                   VideoController.vcnMix2 (
  5569:                                     q,
  5570:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  5571:                                   0)] :
  5572:                               VideoController.vcnPal32G8[p] :
  5573:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) & -2]) & 1) != 0 ?
  5574:                               VideoController.vcnPalTbl[
  5575:                                 VideoController.vcnMix2 (
  5576:                                   VideoController.vcnMix2 (
  5577:                                     p,
  5578:                                     VideoController.vcnPal16G8[1]),
  5579:                                   0)] :
  5580:                               (q & 1) != 0 ?
  5581:                               VideoController.vcnPal32G8[1] :
  5582:                               VideoController.vcnPal32G8[q]);
  5583:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  5584:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5585:                               VideoController.vcnPalTbl[
  5586:                                 VideoController.vcnMix2 (
  5587:                                   VideoController.vcnMix2 (
  5588:                                     q,
  5589:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  5590:                                   0)] :
  5591:                               (p & 1) != 0 ?
  5592:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  5593:                               VideoController.vcnPal32G8[p] :
  5594:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  5595:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5596:                               VideoController.vcnPalTbl[
  5597:                                 VideoController.vcnMix2 (
  5598:                                   VideoController.vcnMix2 (
  5599:                                     q,
  5600:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  5601:                                   0)] :
  5602:                               VideoController.vcnPal32G8[p] :
  5603:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) & -2]) & 1) != 0 ?
  5604:                               VideoController.vcnPalTbl[
  5605:                                 VideoController.vcnMix2 (
  5606:                                   VideoController.vcnMix2 (
  5607:                                     p,
  5608:                                     VideoController.vcnPal16G8[1]),
  5609:                                   0)] :
  5610:                               (q & 1) != 0 ?
  5611:                               VideoController.vcnPal32G8[1] :
  5612:                               VideoController.vcnPal32G8[q]);
  5613:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  5614:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5615:                               VideoController.vcnPalTbl[
  5616:                                 VideoController.vcnMix2 (
  5617:                                   VideoController.vcnMix2 (
  5618:                                     q,
  5619:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  5620:                                   0)] :
  5621:                               (p & 1) != 0 ?
  5622:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  5623:                               VideoController.vcnPal32G8[p] :
  5624:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  5625:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5626:                               VideoController.vcnPalTbl[
  5627:                                 VideoController.vcnMix2 (
  5628:                                   VideoController.vcnMix2 (
  5629:                                     q,
  5630:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  5631:                                   0)] :
  5632:                               VideoController.vcnPal32G8[p] :
  5633:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) & -2]) & 1) != 0 ?
  5634:                               VideoController.vcnPalTbl[
  5635:                                 VideoController.vcnMix2 (
  5636:                                   VideoController.vcnMix2 (
  5637:                                     p,
  5638:                                     VideoController.vcnPal16G8[1]),
  5639:                                   0)] :
  5640:                               (q & 1) != 0 ?
  5641:                               VideoController.vcnPal32G8[1] :
  5642:                               VideoController.vcnPal32G8[q]);
  5643:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  5644:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5645:                               VideoController.vcnPalTbl[
  5646:                                 VideoController.vcnMix2 (
  5647:                                   VideoController.vcnMix2 (
  5648:                                     q,
  5649:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  5650:                                   0)] :
  5651:                               (p & 1) != 0 ?
  5652:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  5653:                               VideoController.vcnPal32G8[p] :
  5654:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  5655:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5656:                               VideoController.vcnPalTbl[
  5657:                                 VideoController.vcnMix2 (
  5658:                                   VideoController.vcnMix2 (
  5659:                                     q,
  5660:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  5661:                                   0)] :
  5662:                               VideoController.vcnPal32G8[p] :
  5663:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) & -2]) & 1) != 0 ?
  5664:                               VideoController.vcnPalTbl[
  5665:                                 VideoController.vcnMix2 (
  5666:                                   VideoController.vcnMix2 (
  5667:                                     p,
  5668:                                     VideoController.vcnPal16G8[1]),
  5669:                                   0)] :
  5670:                               (q & 1) != 0 ?
  5671:                               VideoController.vcnPal32G8[1] :
  5672:                               VideoController.vcnPal32G8[q]);
  5673:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  5674:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5675:                               VideoController.vcnPalTbl[
  5676:                                 VideoController.vcnMix2 (
  5677:                                   VideoController.vcnMix2 (
  5678:                                     q,
  5679:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  5680:                                   0)] :
  5681:                               (p & 1) != 0 ?
  5682:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  5683:                               VideoController.vcnPal32G8[p] :
  5684:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  5685:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5686:                               VideoController.vcnPalTbl[
  5687:                                 VideoController.vcnMix2 (
  5688:                                   VideoController.vcnMix2 (
  5689:                                     q,
  5690:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  5691:                                   0)] :
  5692:                               VideoController.vcnPal32G8[p] :
  5693:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) & -2]) & 1) != 0 ?
  5694:                               VideoController.vcnPalTbl[
  5695:                                 VideoController.vcnMix2 (
  5696:                                   VideoController.vcnMix2 (
  5697:                                     p,
  5698:                                     VideoController.vcnPal16G8[1]),
  5699:                                   0)] :
  5700:                               (q & 1) != 0 ?
  5701:                               VideoController.vcnPal32G8[1] :
  5702:                               VideoController.vcnPal32G8[q]);
  5703:         gx1st += 16;
  5704:         gx2nd += 16;
  5705:         gx3rd += 16;
  5706:         da += 8;
  5707:       }  //while da<db
  5708:     }  //drawRaster
  5709:   },  //E3_XHCGT
  5710: 
  5711:   //================================================================================
  5712:   //E3_XHPT ($0000,$06xx,$1D07)
  5713:   //  概要
  5714:   //    E3  512ドット16色3プレーン
  5715:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  5716:   //  手順
  5717:   //    1番目のパレットが0のとき
  5718:   //      2番目のパレットを偶数化したパレットが0でないとき
  5719:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  5720:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  5721:   //        3番目のパレットを偶数化したパレットのカラー(0は黒)
  5722:   //    1番目のパレットが1のとき
  5723:   //      グラフィックパレット0のカラー(0は黒)
  5724:   //    1番目のパレットが2以上の偶数のとき
  5725:   //      1番目のカラー(0は黒)
  5726:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  5727:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  5728:   //  中間コード1
  5729:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):epc(tev(e3p()))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0))
  5730:   //  中間コード2
  5731:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):epc(tev(e3p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0)
  5732:   //  中間コード3
  5733:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):epc(tev(e3p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),0)
  5734:   //  中間コード4
  5735:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):epc(tev(e3p())):p==1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),0)
  5736:   //  中間コード5
  5737:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):epc(e3p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),0)
  5738:   //  中間コード6
  5739:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):epo(e3p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),0))
  5740:   E3_XHPT {
  5741:     @Override public void drawRaster (int src, int dst, boolean rh) {
  5742:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  5743:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  5744:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5745:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  5746:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  5747:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5748:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  5749:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  5750:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5751:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  5752:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  5753:       if (rh) {
  5754:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  5755:         gx1st += half << 1;
  5756:         gx2nd += half << 1;
  5757:         gx3rd += half << 1;
  5758:         da += half;
  5759:       }
  5760:       while (da < db) {
  5761:         int p;
  5762:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  5763:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  5764:                           VideoController.vcnPal32G8[p] :
  5765:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2] :
  5766:                           p == 1 ?
  5767:                           VideoController.vcnPal32G8[0] :
  5768:                           (p & 1) == 0 ?
  5769:                           VideoController.vcnPal32G8[p] :
  5770:                           VideoController.vcnPalTbl[
  5771:                             VideoController.vcnMix2 (
  5772:                               VideoController.vcnPal16G8[p & -2],
  5773:                               0)]);
  5774:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  5775:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  5776:                               VideoController.vcnPal32G8[p] :
  5777:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2] :
  5778:                               p == 1 ?
  5779:                               VideoController.vcnPal32G8[0] :
  5780:                               (p & 1) == 0 ?
  5781:                               VideoController.vcnPal32G8[p] :
  5782:                               VideoController.vcnPalTbl[
  5783:                                 VideoController.vcnMix2 (
  5784:                                   VideoController.vcnPal16G8[p & -2],
  5785:                                   0)]);
  5786:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  5787:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  5788:                               VideoController.vcnPal32G8[p] :
  5789:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2] :
  5790:                               p == 1 ?
  5791:                               VideoController.vcnPal32G8[0] :
  5792:                               (p & 1) == 0 ?
  5793:                               VideoController.vcnPal32G8[p] :
  5794:                               VideoController.vcnPalTbl[
  5795:                                 VideoController.vcnMix2 (
  5796:                                   VideoController.vcnPal16G8[p & -2],
  5797:                                   0)]);
  5798:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  5799:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  5800:                               VideoController.vcnPal32G8[p] :
  5801:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2] :
  5802:                               p == 1 ?
  5803:                               VideoController.vcnPal32G8[0] :
  5804:                               (p & 1) == 0 ?
  5805:                               VideoController.vcnPal32G8[p] :
  5806:                               VideoController.vcnPalTbl[
  5807:                                 VideoController.vcnMix2 (
  5808:                                   VideoController.vcnPal16G8[p & -2],
  5809:                                   0)]);
  5810:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  5811:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  5812:                               VideoController.vcnPal32G8[p] :
  5813:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2] :
  5814:                               p == 1 ?
  5815:                               VideoController.vcnPal32G8[0] :
  5816:                               (p & 1) == 0 ?
  5817:                               VideoController.vcnPal32G8[p] :
  5818:                               VideoController.vcnPalTbl[
  5819:                                 VideoController.vcnMix2 (
  5820:                                   VideoController.vcnPal16G8[p & -2],
  5821:                                   0)]);
  5822:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  5823:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  5824:                               VideoController.vcnPal32G8[p] :
  5825:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2] :
  5826:                               p == 1 ?
  5827:                               VideoController.vcnPal32G8[0] :
  5828:                               (p & 1) == 0 ?
  5829:                               VideoController.vcnPal32G8[p] :
  5830:                               VideoController.vcnPalTbl[
  5831:                                 VideoController.vcnMix2 (
  5832:                                   VideoController.vcnPal16G8[p & -2],
  5833:                                   0)]);
  5834:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  5835:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  5836:                               VideoController.vcnPal32G8[p] :
  5837:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2] :
  5838:                               p == 1 ?
  5839:                               VideoController.vcnPal32G8[0] :
  5840:                               (p & 1) == 0 ?
  5841:                               VideoController.vcnPal32G8[p] :
  5842:                               VideoController.vcnPalTbl[
  5843:                                 VideoController.vcnMix2 (
  5844:                                   VideoController.vcnPal16G8[p & -2],
  5845:                                   0)]);
  5846:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  5847:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  5848:                               VideoController.vcnPal32G8[p] :
  5849:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2] :
  5850:                               p == 1 ?
  5851:                               VideoController.vcnPal32G8[0] :
  5852:                               (p & 1) == 0 ?
  5853:                               VideoController.vcnPal32G8[p] :
  5854:                               VideoController.vcnPalTbl[
  5855:                                 VideoController.vcnMix2 (
  5856:                                   VideoController.vcnPal16G8[p & -2],
  5857:                                   0)]);
  5858:         gx1st += 16;
  5859:         gx2nd += 16;
  5860:         gx3rd += 16;
  5861:         da += 8;
  5862:       }  //while da<db
  5863:     }  //drawRaster
  5864:   },  //E3_XHPT
  5865: 
  5866:   //================================================================================
  5867:   //E3_XHPG ($0000,$06xx,$1E07)
  5868:   //  概要
  5869:   //    E3  512ドット16色3プレーン
  5870:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  5871:   //  手順
  5872:   //    1番目のパレットが0のとき
  5873:   //      2番目のパレットを偶数化したパレットが0でないとき
  5874:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  5875:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  5876:   //        3番目のパレットを偶数化したパレットのカラー(0は黒)
  5877:   //    1番目のパレットが1のとき
  5878:   //      グラフィックパレット0のカラー(0は黒)
  5879:   //    1番目のパレットが2以上の偶数のとき
  5880:   //      1番目のカラー(0は黒)
  5881:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  5882:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  5883:   //  中間コード1
  5884:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):epc(tev(e3p()))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2q()))))
  5885:   //  中間コード2
  5886:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):epc(tev(e3p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2q())))
  5887:   //  中間コード3
  5888:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):epc(tev(e3p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),epc(tod(e2q())))
  5889:   //  中間コード4
  5890:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):epc(tev(e3p())):p==1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),epc(tod(e2q())))
  5891:   //  中間コード5
  5892:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):epc(e3p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),epc(e2q()|1))
  5893:   //  中間コード6
  5894:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):epo(e3p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),epc(e2q()|1)))
  5895:   E3_XHPG {
  5896:     @Override public void drawRaster (int src, int dst, boolean rh) {
  5897:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  5898:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  5899:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5900:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  5901:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  5902:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5903:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  5904:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  5905:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  5906:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  5907:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  5908:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  5909:       if (rh) {
  5910:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  5911:         gx1st += half << 1;
  5912:         gx2nd += half << 1;
  5913:         gx3rd += half << 1;
  5914:         da += half;
  5915:       }
  5916:       while (da < db) {
  5917:         int p;
  5918:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  5919:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  5920:                           VideoController.vcnPal32G8[p] :
  5921:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2] :
  5922:                           p == 1 ?
  5923:                           VideoController.vcnPal32G8[0] :
  5924:                           (p & 1) == 0 ?
  5925:                           VideoController.vcnPal32G8[p] :
  5926:                           VideoController.vcnPalTbl[
  5927:                             VideoController.vcnMix2 (
  5928:                               VideoController.vcnPal16G8[p & -2],
  5929:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])]);
  5930:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  5931:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  5932:                               VideoController.vcnPal32G8[p] :
  5933:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2] :
  5934:                               p == 1 ?
  5935:                               VideoController.vcnPal32G8[0] :
  5936:                               (p & 1) == 0 ?
  5937:                               VideoController.vcnPal32G8[p] :
  5938:                               VideoController.vcnPalTbl[
  5939:                                 VideoController.vcnMix2 (
  5940:                                   VideoController.vcnPal16G8[p & -2],
  5941:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])]);
  5942:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  5943:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  5944:                               VideoController.vcnPal32G8[p] :
  5945:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2] :
  5946:                               p == 1 ?
  5947:                               VideoController.vcnPal32G8[0] :
  5948:                               (p & 1) == 0 ?
  5949:                               VideoController.vcnPal32G8[p] :
  5950:                               VideoController.vcnPalTbl[
  5951:                                 VideoController.vcnMix2 (
  5952:                                   VideoController.vcnPal16G8[p & -2],
  5953:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])]);
  5954:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  5955:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  5956:                               VideoController.vcnPal32G8[p] :
  5957:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2] :
  5958:                               p == 1 ?
  5959:                               VideoController.vcnPal32G8[0] :
  5960:                               (p & 1) == 0 ?
  5961:                               VideoController.vcnPal32G8[p] :
  5962:                               VideoController.vcnPalTbl[
  5963:                                 VideoController.vcnMix2 (
  5964:                                   VideoController.vcnPal16G8[p & -2],
  5965:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])]);
  5966:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  5967:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  5968:                               VideoController.vcnPal32G8[p] :
  5969:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2] :
  5970:                               p == 1 ?
  5971:                               VideoController.vcnPal32G8[0] :
  5972:                               (p & 1) == 0 ?
  5973:                               VideoController.vcnPal32G8[p] :
  5974:                               VideoController.vcnPalTbl[
  5975:                                 VideoController.vcnMix2 (
  5976:                                   VideoController.vcnPal16G8[p & -2],
  5977:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])]);
  5978:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  5979:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  5980:                               VideoController.vcnPal32G8[p] :
  5981:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2] :
  5982:                               p == 1 ?
  5983:                               VideoController.vcnPal32G8[0] :
  5984:                               (p & 1) == 0 ?
  5985:                               VideoController.vcnPal32G8[p] :
  5986:                               VideoController.vcnPalTbl[
  5987:                                 VideoController.vcnMix2 (
  5988:                                   VideoController.vcnPal16G8[p & -2],
  5989:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])]);
  5990:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  5991:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  5992:                               VideoController.vcnPal32G8[p] :
  5993:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2] :
  5994:                               p == 1 ?
  5995:                               VideoController.vcnPal32G8[0] :
  5996:                               (p & 1) == 0 ?
  5997:                               VideoController.vcnPal32G8[p] :
  5998:                               VideoController.vcnPalTbl[
  5999:                                 VideoController.vcnMix2 (
  6000:                                   VideoController.vcnPal16G8[p & -2],
  6001:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])]);
  6002:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  6003:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  6004:                               VideoController.vcnPal32G8[p] :
  6005:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2] :
  6006:                               p == 1 ?
  6007:                               VideoController.vcnPal32G8[0] :
  6008:                               (p & 1) == 0 ?
  6009:                               VideoController.vcnPal32G8[p] :
  6010:                               VideoController.vcnPalTbl[
  6011:                                 VideoController.vcnMix2 (
  6012:                                   VideoController.vcnPal16G8[p & -2],
  6013:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])]);
  6014:         gx1st += 16;
  6015:         gx2nd += 16;
  6016:         gx3rd += 16;
  6017:         da += 8;
  6018:       }  //while da<db
  6019:     }  //drawRaster
  6020:   },  //E3_XHPG
  6021: 
  6022:   //================================================================================
  6023:   //E3_XHPGT ($0000,$06xx,$1F07)
  6024:   //  概要
  6025:   //    E3  512ドット16色3プレーン
  6026:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  6027:   //  手順
  6028:   //    1番目のパレットが0のとき
  6029:   //      2番目のパレットを偶数化したパレットが0でないとき
  6030:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  6031:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  6032:   //        3番目のパレットを偶数化したパレットのカラー(0は黒)
  6033:   //    1番目のパレットが1のとき
  6034:   //      グラフィックパレット0のカラー(0は黒)
  6035:   //    1番目のパレットが2以上の偶数のとき
  6036:   //      1番目のカラー(0は黒)
  6037:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  6038:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  6039:   //  中間コード1
  6040:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):epc(tev(e3p()))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0))
  6041:   //  中間コード2
  6042:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):epc(tev(e3p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0)
  6043:   //  中間コード3
  6044:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):epc(tev(e3p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(mix(epc(tev(v0)),epc(tod(e2q()))),0)
  6045:   //  中間コード4
  6046:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):epc(tev(e3p())):p==1?epc(0):ls1(p)==0?epc(p):mix(mix(epc(tev(p)),epc(tod(e2q()))),0)
  6047:   //  中間コード5
  6048:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):epc(e3p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(mix(epc(p&-2),epc(e2q()|1)),0)
  6049:   //  中間コード6
  6050:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):epo(e3p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(mix(epc(p&-2),epc(e2q()|1)),0))
  6051:   E3_XHPGT {
  6052:     @Override public void drawRaster (int src, int dst, boolean rh) {
  6053:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6054:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6055:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6056:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6057:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6058:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6059:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  6060:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6061:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6062:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6063:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6064:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6065:       if (rh) {
  6066:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6067:         gx1st += half << 1;
  6068:         gx2nd += half << 1;
  6069:         gx3rd += half << 1;
  6070:         da += half;
  6071:       }
  6072:       while (da < db) {
  6073:         int p;
  6074:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  6075:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  6076:                           VideoController.vcnPal32G8[p] :
  6077:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2] :
  6078:                           p == 1 ?
  6079:                           VideoController.vcnPal32G8[0] :
  6080:                           (p & 1) == 0 ?
  6081:                           VideoController.vcnPal32G8[p] :
  6082:                           VideoController.vcnPalTbl[
  6083:                             VideoController.vcnMix2 (
  6084:                               VideoController.vcnMix2 (
  6085:                                 VideoController.vcnPal16G8[p & -2],
  6086:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  6087:                               0)]);
  6088:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  6089:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  6090:                               VideoController.vcnPal32G8[p] :
  6091:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2] :
  6092:                               p == 1 ?
  6093:                               VideoController.vcnPal32G8[0] :
  6094:                               (p & 1) == 0 ?
  6095:                               VideoController.vcnPal32G8[p] :
  6096:                               VideoController.vcnPalTbl[
  6097:                                 VideoController.vcnMix2 (
  6098:                                   VideoController.vcnMix2 (
  6099:                                     VideoController.vcnPal16G8[p & -2],
  6100:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  6101:                                   0)]);
  6102:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  6103:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  6104:                               VideoController.vcnPal32G8[p] :
  6105:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2] :
  6106:                               p == 1 ?
  6107:                               VideoController.vcnPal32G8[0] :
  6108:                               (p & 1) == 0 ?
  6109:                               VideoController.vcnPal32G8[p] :
  6110:                               VideoController.vcnPalTbl[
  6111:                                 VideoController.vcnMix2 (
  6112:                                   VideoController.vcnMix2 (
  6113:                                     VideoController.vcnPal16G8[p & -2],
  6114:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  6115:                                   0)]);
  6116:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  6117:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  6118:                               VideoController.vcnPal32G8[p] :
  6119:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2] :
  6120:                               p == 1 ?
  6121:                               VideoController.vcnPal32G8[0] :
  6122:                               (p & 1) == 0 ?
  6123:                               VideoController.vcnPal32G8[p] :
  6124:                               VideoController.vcnPalTbl[
  6125:                                 VideoController.vcnMix2 (
  6126:                                   VideoController.vcnMix2 (
  6127:                                     VideoController.vcnPal16G8[p & -2],
  6128:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  6129:                                   0)]);
  6130:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  6131:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  6132:                               VideoController.vcnPal32G8[p] :
  6133:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2] :
  6134:                               p == 1 ?
  6135:                               VideoController.vcnPal32G8[0] :
  6136:                               (p & 1) == 0 ?
  6137:                               VideoController.vcnPal32G8[p] :
  6138:                               VideoController.vcnPalTbl[
  6139:                                 VideoController.vcnMix2 (
  6140:                                   VideoController.vcnMix2 (
  6141:                                     VideoController.vcnPal16G8[p & -2],
  6142:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  6143:                                   0)]);
  6144:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  6145:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  6146:                               VideoController.vcnPal32G8[p] :
  6147:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2] :
  6148:                               p == 1 ?
  6149:                               VideoController.vcnPal32G8[0] :
  6150:                               (p & 1) == 0 ?
  6151:                               VideoController.vcnPal32G8[p] :
  6152:                               VideoController.vcnPalTbl[
  6153:                                 VideoController.vcnMix2 (
  6154:                                   VideoController.vcnMix2 (
  6155:                                     VideoController.vcnPal16G8[p & -2],
  6156:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  6157:                                   0)]);
  6158:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  6159:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  6160:                               VideoController.vcnPal32G8[p] :
  6161:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2] :
  6162:                               p == 1 ?
  6163:                               VideoController.vcnPal32G8[0] :
  6164:                               (p & 1) == 0 ?
  6165:                               VideoController.vcnPal32G8[p] :
  6166:                               VideoController.vcnPalTbl[
  6167:                                 VideoController.vcnMix2 (
  6168:                                   VideoController.vcnMix2 (
  6169:                                     VideoController.vcnPal16G8[p & -2],
  6170:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  6171:                                   0)]);
  6172:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  6173:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  6174:                               VideoController.vcnPal32G8[p] :
  6175:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2] :
  6176:                               p == 1 ?
  6177:                               VideoController.vcnPal32G8[0] :
  6178:                               (p & 1) == 0 ?
  6179:                               VideoController.vcnPal32G8[p] :
  6180:                               VideoController.vcnPalTbl[
  6181:                                 VideoController.vcnMix2 (
  6182:                                   VideoController.vcnMix2 (
  6183:                                     VideoController.vcnPal16G8[p & -2],
  6184:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  6185:                                   0)]);
  6186:         gx1st += 16;
  6187:         gx2nd += 16;
  6188:         gx3rd += 16;
  6189:         da += 8;
  6190:       }  //while da<db
  6191:     }  //drawRaster
  6192:   },  //E3_XHPGT
  6193: 
  6194:   //================================================================================
  6195:   //E3_A ($0000,$06xx,$4007)
  6196:   //  概要
  6197:   //    E3  512ドット16色3プレーン
  6198:   //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
  6199:   //  手順
  6200:   //    1番目のパレットが0でないとき
  6201:   //      1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  6202:   //    さもなくば(1番目のパレットが0のとき)
  6203:   //      2番目のパレットが0でないとき
  6204:   //        2番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  6205:   //      さもなくば(2番目のパレットが0のとき)
  6206:   //        3番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  6207:   //  中間コード1
  6208:   //    (e1p()!=0?mix(epc(e1p()),tpc(0)):(e2p()!=0?mix(epc(e2p()),tpc(0)):mix(epc(e3p()),tpc(0))))
  6209:   //  中間コード2
  6210:   //    e1p()!=0?mix(epc(e1p()),tpc(0)):e2p()!=0?mix(epc(e2p()),tpc(0)):mix(epc(e3p()),tpc(0))
  6211:   //  中間コード3
  6212:   //    (v0=e1p())!=0?mix(epc(v0),tpc(0)):(v4=e2p())!=0?mix(epc(v4),tpc(0)):mix(epc(e3p()),tpc(0))
  6213:   //  中間コード4
  6214:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):mix(epc(e3p()),tpc(0))
  6215:   //  中間コード5
  6216:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):mix(epc(e3p()),tpc(0))
  6217:   //  中間コード6
  6218:   //    cto((p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):mix(epc(e3p()),tpc(0)))
  6219:   E3_A {
  6220:     @Override public void drawRaster (int src, int dst, boolean rh) {
  6221:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6222:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6223:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6224:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6225:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6226:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6227:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6228:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6229:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6230:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6231:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6232:       if (rh) {
  6233:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6234:         gx1st += half << 1;
  6235:         gx2nd += half << 1;
  6236:         gx3rd += half << 1;
  6237:         da += half;
  6238:       }
  6239:       while (da < db) {
  6240:         int p;
  6241:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  6242:                             (p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  6243:                             VideoController.vcnMix2 (
  6244:                               VideoController.vcnPal16G8[p],
  6245:                               VideoController.vcnPal16TS[0]) :
  6246:                             (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  6247:                             VideoController.vcnMix2 (
  6248:                               VideoController.vcnPal16G8[p],
  6249:                               VideoController.vcnPal16TS[0]) :
  6250:                             VideoController.vcnMix2 (
  6251:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023]],
  6252:                               VideoController.vcnPal16TS[0])]);
  6253:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  6254:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  6255:                                 VideoController.vcnMix2 (
  6256:                                   VideoController.vcnPal16G8[p],
  6257:                                   VideoController.vcnPal16TS[0]) :
  6258:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  6259:                                 VideoController.vcnMix2 (
  6260:                                   VideoController.vcnPal16G8[p],
  6261:                                   VideoController.vcnPal16TS[0]) :
  6262:                                 VideoController.vcnMix2 (
  6263:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]],
  6264:                                   VideoController.vcnPal16TS[0])]);
  6265:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  6266:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  6267:                                 VideoController.vcnMix2 (
  6268:                                   VideoController.vcnPal16G8[p],
  6269:                                   VideoController.vcnPal16TS[0]) :
  6270:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  6271:                                 VideoController.vcnMix2 (
  6272:                                   VideoController.vcnPal16G8[p],
  6273:                                   VideoController.vcnPal16TS[0]) :
  6274:                                 VideoController.vcnMix2 (
  6275:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]],
  6276:                                   VideoController.vcnPal16TS[0])]);
  6277:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  6278:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  6279:                                 VideoController.vcnMix2 (
  6280:                                   VideoController.vcnPal16G8[p],
  6281:                                   VideoController.vcnPal16TS[0]) :
  6282:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  6283:                                 VideoController.vcnMix2 (
  6284:                                   VideoController.vcnPal16G8[p],
  6285:                                   VideoController.vcnPal16TS[0]) :
  6286:                                 VideoController.vcnMix2 (
  6287:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]],
  6288:                                   VideoController.vcnPal16TS[0])]);
  6289:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  6290:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  6291:                                 VideoController.vcnMix2 (
  6292:                                   VideoController.vcnPal16G8[p],
  6293:                                   VideoController.vcnPal16TS[0]) :
  6294:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  6295:                                 VideoController.vcnMix2 (
  6296:                                   VideoController.vcnPal16G8[p],
  6297:                                   VideoController.vcnPal16TS[0]) :
  6298:                                 VideoController.vcnMix2 (
  6299:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]],
  6300:                                   VideoController.vcnPal16TS[0])]);
  6301:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  6302:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  6303:                                 VideoController.vcnMix2 (
  6304:                                   VideoController.vcnPal16G8[p],
  6305:                                   VideoController.vcnPal16TS[0]) :
  6306:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  6307:                                 VideoController.vcnMix2 (
  6308:                                   VideoController.vcnPal16G8[p],
  6309:                                   VideoController.vcnPal16TS[0]) :
  6310:                                 VideoController.vcnMix2 (
  6311:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]],
  6312:                                   VideoController.vcnPal16TS[0])]);
  6313:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  6314:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  6315:                                 VideoController.vcnMix2 (
  6316:                                   VideoController.vcnPal16G8[p],
  6317:                                   VideoController.vcnPal16TS[0]) :
  6318:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  6319:                                 VideoController.vcnMix2 (
  6320:                                   VideoController.vcnPal16G8[p],
  6321:                                   VideoController.vcnPal16TS[0]) :
  6322:                                 VideoController.vcnMix2 (
  6323:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]],
  6324:                                   VideoController.vcnPal16TS[0])]);
  6325:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  6326:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  6327:                                 VideoController.vcnMix2 (
  6328:                                   VideoController.vcnPal16G8[p],
  6329:                                   VideoController.vcnPal16TS[0]) :
  6330:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  6331:                                 VideoController.vcnMix2 (
  6332:                                   VideoController.vcnPal16G8[p],
  6333:                                   VideoController.vcnPal16TS[0]) :
  6334:                                 VideoController.vcnMix2 (
  6335:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]],
  6336:                                   VideoController.vcnPal16TS[0])]);
  6337:         gx1st += 16;
  6338:         gx2nd += 16;
  6339:         gx3rd += 16;
  6340:         da += 8;
  6341:       }  //while da<db
  6342:     }  //drawRaster
  6343:   },  //E3_A
  6344: 
  6345:   //================================================================================
  6346:   //E4 ($0000,$06xx,$000F)
  6347:   //  概要
  6348:   //    E4  512ドット16色4プレーン
  6349:   //    拡張なし
  6350:   //  手順
  6351:   //    1番目のパレットが0でないとき
  6352:   //      1番目のカラー(0は黒)
  6353:   //    さもなくば(1番目のパレットが0のとき)
  6354:   //      2番目のパレットが0でないとき
  6355:   //        2番目のカラー(0は黒)
  6356:   //      さもなくば(2番目のパレットが0のとき)
  6357:   //        3番目のパレットが0でないとき
  6358:   //          3番目のカラー(0は黒)
  6359:   //        さもなくば(3番目のパレットが0のとき)
  6360:   //          4番目のカラー(0は黒)
  6361:   //  中間コード1
  6362:   //    (e1p()!=0?epc(e1p()):(e2p()!=0?epc(e2p()):(e3p()!=0?epc(e3p()):epc(e4p()))))
  6363:   //  中間コード2
  6364:   //    e1p()!=0?epc(e1p()):e2p()!=0?epc(e2p()):e3p()!=0?epc(e3p()):epc(e4p())
  6365:   //  中間コード3
  6366:   //    (v0=e1p())!=0?epc(v0):(v2=e2p())!=0?epc(v2):(v4=e3p())!=0?epc(v4):epc(e4p())
  6367:   //  中間コード4
  6368:   //    (p=e1p())!=0?epc(p):(p=e2p())!=0?epc(p):(p=e3p())!=0?epc(p):epc(e4p())
  6369:   //  中間コード5
  6370:   //    (p=e1p())!=0?epc(p):(p=e2p())!=0?epc(p):(p=e3p())!=0?epc(p):epc(e4p())
  6371:   //  中間コード6
  6372:   //    (p=e1p())!=0?epo(p):(p=e2p())!=0?epo(p):(p=e3p())!=0?epo(p):epo(e4p())
  6373:   E4 {
  6374:     @Override public void drawRaster (int src, int dst, boolean rh) {
  6375:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6376:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6377:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6378:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6379:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6380:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6381:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6382:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6383:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6384:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  6385:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  6386:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6387:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6388:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6389:       if (rh) {
  6390:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6391:         gx1st += half << 1;
  6392:         gx2nd += half << 1;
  6393:         gx3rd += half << 1;
  6394:         gx4th += half << 1;
  6395:         da += half;
  6396:       }
  6397:       while (da < db) {
  6398:         int p;
  6399:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  6400:                           VideoController.vcnPal32G8[p] :
  6401:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  6402:                           VideoController.vcnPal32G8[p] :
  6403:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  6404:                           VideoController.vcnPal32G8[p] :
  6405:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023]]);
  6406:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  6407:                               VideoController.vcnPal32G8[p] :
  6408:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  6409:                               VideoController.vcnPal32G8[p] :
  6410:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  6411:                               VideoController.vcnPal32G8[p] :
  6412:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]]);
  6413:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  6414:                               VideoController.vcnPal32G8[p] :
  6415:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  6416:                               VideoController.vcnPal32G8[p] :
  6417:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  6418:                               VideoController.vcnPal32G8[p] :
  6419:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]]);
  6420:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  6421:                               VideoController.vcnPal32G8[p] :
  6422:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  6423:                               VideoController.vcnPal32G8[p] :
  6424:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  6425:                               VideoController.vcnPal32G8[p] :
  6426:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]]);
  6427:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  6428:                               VideoController.vcnPal32G8[p] :
  6429:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  6430:                               VideoController.vcnPal32G8[p] :
  6431:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  6432:                               VideoController.vcnPal32G8[p] :
  6433:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]]);
  6434:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  6435:                               VideoController.vcnPal32G8[p] :
  6436:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  6437:                               VideoController.vcnPal32G8[p] :
  6438:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  6439:                               VideoController.vcnPal32G8[p] :
  6440:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]]);
  6441:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  6442:                               VideoController.vcnPal32G8[p] :
  6443:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  6444:                               VideoController.vcnPal32G8[p] :
  6445:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  6446:                               VideoController.vcnPal32G8[p] :
  6447:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]]);
  6448:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  6449:                               VideoController.vcnPal32G8[p] :
  6450:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  6451:                               VideoController.vcnPal32G8[p] :
  6452:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  6453:                               VideoController.vcnPal32G8[p] :
  6454:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]]);
  6455:         gx1st += 16;
  6456:         gx2nd += 16;
  6457:         gx3rd += 16;
  6458:         gx4th += 16;
  6459:         da += 8;
  6460:       }  //while da<db
  6461:     }  //drawRaster
  6462:   },  //E4
  6463: 
  6464:   //================================================================================
  6465:   //XE4
  6466:   //  概要
  6467:   //    E4  512ドット16色4プレーン
  6468:   //    拡張あり
  6469:   XE4 {
  6470:     @Override public void drawRaster (int src, int dst, boolean rh) {
  6471:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  6472:         //   .A.XHPGT
  6473:       case 0b00010000:  //E4_XWC
  6474:       case 0b00010001:  //E4_XWC
  6475:       case 0b00010010:  //E4_XWC
  6476:       case 0b00010011:  //E4_XWC
  6477:         E4.drawRaster (src, dst, rh);
  6478:         break;
  6479:         //   .A.XHPGT
  6480:       case 0b00010100:  //E4_XWP
  6481:       case 0b00010101:  //E4_XWP
  6482:       case 0b00010110:  //E4_XWP
  6483:       case 0b00010111:  //E4_XWP
  6484:         E4_XWP.drawRaster (src, dst, rh);
  6485:         break;
  6486:         //   .A.XHPGT
  6487:       case 0b00011000:  //E4_XHC
  6488:         E4.drawRaster (src, dst, rh);
  6489:         break;
  6490:         //   .A.XHPGT
  6491:       case 0b00011001:  //E4_XHCT
  6492:         E4_XHCT.drawRaster (src, dst, rh);
  6493:         break;
  6494:         //   .A.XHPGT
  6495:       case 0b00011010:  //E4_XHCG
  6496:         E4_XHCG.drawRaster (src, dst, rh);
  6497:         break;
  6498:         //   .A.XHPGT
  6499:       case 0b00011011:  //E4_XHCGT
  6500:         E4_XHCGT.drawRaster (src, dst, rh);
  6501:         break;
  6502:         //   .A.XHPGT
  6503:       case 0b00011101:  //E4_XHPT
  6504:         E4_XHPT.drawRaster (src, dst, rh);
  6505:         break;
  6506:         //   .A.XHPGT
  6507:       case 0b00011110:  //E4_XHPG
  6508:         E4_XHPG.drawRaster (src, dst, rh);
  6509:         break;
  6510:         //   .A.XHPGT
  6511:       case 0b00011111:  //E4_XHPGT
  6512:         E4_XHPGT.drawRaster (src, dst, rh);
  6513:         break;
  6514:         //   .A.XHPGT
  6515:       case 0b01000000:  //E4_A
  6516:       case 0b01000001:  //E4_A
  6517:       case 0b01000010:  //E4_A
  6518:       case 0b01000011:  //E4_A
  6519:       case 0b01000100:  //E4_A
  6520:       case 0b01000101:  //E4_A
  6521:       case 0b01000110:  //E4_A
  6522:       case 0b01000111:  //E4_A
  6523:       case 0b01001000:  //E4_A
  6524:       case 0b01001001:  //E4_A
  6525:       case 0b01001010:  //E4_A
  6526:       case 0b01001011:  //E4_A
  6527:       case 0b01001100:  //E4_A
  6528:       case 0b01001101:  //E4_A
  6529:       case 0b01001110:  //E4_A
  6530:       case 0b01001111:  //E4_A
  6531:       case 0b01010000:  //E4_A
  6532:       case 0b01010001:  //E4_A
  6533:       case 0b01010010:  //E4_A
  6534:       case 0b01010011:  //E4_A
  6535:       case 0b01010100:  //E4_A
  6536:       case 0b01010101:  //E4_A
  6537:       case 0b01010110:  //E4_A
  6538:       case 0b01010111:  //E4_A
  6539:       case 0b01011000:  //E4_A
  6540:       case 0b01011001:  //E4_A
  6541:       case 0b01011010:  //E4_A
  6542:       case 0b01011011:  //E4_A
  6543:       case 0b01011100:  //E4_A
  6544:       case 0b01011101:  //E4_A
  6545:       case 0b01011110:  //E4_A
  6546:       case 0b01011111:  //E4_A
  6547:         E4_A.drawRaster (src, dst, rh);
  6548:         break;
  6549:       default:
  6550:         E4.drawRaster (src, dst, rh);
  6551:         VideoController.vcnReportUnimplemented (XE4);
  6552:       }  //switch
  6553:     }  //drawRaster
  6554:   },  //XE4
  6555: 
  6556:   //================================================================================
  6557:   //E4_XWP ($0000,$06xx,$140F)
  6558:   //  概要
  6559:   //    E4  512ドット16色4プレーン
  6560:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  6561:   //  手順
  6562:   //    1番目のパレットが0のとき
  6563:   //      2番目のパレットを偶数化したパレットが0でないとき
  6564:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  6565:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  6566:   //        3番目のパレットを偶数化したパレットが0でないとき
  6567:   //          3番目のパレットを偶数化したパレットのカラー(0は黒)
  6568:   //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
  6569:   //          4番目のパレットを偶数化したパレットのカラー(0は黒)
  6570:   //    1番目のパレットが1のとき
  6571:   //      グラフィックパレット0のカラー(0は黒)
  6572:   //    1番目のパレットが2以上の偶数のとき
  6573:   //      1番目のカラー(0は黒)
  6574:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  6575:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  6576:   //  中間コード1
  6577:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):((tev(e3p()))!=0?epc(tev(e3p())):epc(tev(e4p())))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p())))
  6578:   //  中間コード2
  6579:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):tev(e3p())!=0?epc(tev(e3p())):epc(tev(e4p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p()))
  6580:   //  中間コード3
  6581:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):(v4=tev(e3p()))!=0?epc(v4):epc(tev(e4p())):v0==1?epc(0):ls1(v0)==0?epc(v0):epc(tev(v0))
  6582:   //  中間コード4
  6583:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):(p=tev(e3p()))!=0?epc(p):epc(tev(e4p())):p==1?epc(0):ls1(p)==0?epc(p):epc(tev(p))
  6584:   //  中間コード5
  6585:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):(p=e3p()&-2)!=0?epc(p):epc(e4p()&-2):p==1?epc(0):(p&1)==0?epc(p):epc(p&-2)
  6586:   //  中間コード6
  6587:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):(p=e3p()&-2)!=0?epo(p):epo(e4p()&-2):p==1?epo(0):(p&1)==0?epo(p):epo(p&-2)
  6588:   E4_XWP {
  6589:     @Override public void drawRaster (int src, int dst, boolean rh) {
  6590:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6591:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6592:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6593:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6594:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6595:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6596:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6597:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6598:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6599:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  6600:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  6601:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6602:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6603:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6604:       if (rh) {
  6605:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6606:         gx1st += half << 1;
  6607:         gx2nd += half << 1;
  6608:         gx3rd += half << 1;
  6609:         gx4th += half << 1;
  6610:         da += half;
  6611:       }
  6612:       while (da < db) {
  6613:         int p;
  6614:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  6615:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  6616:                           VideoController.vcnPal32G8[p] :
  6617:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2) != 0 ?
  6618:                           VideoController.vcnPal32G8[p] :
  6619:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023] & -2] :
  6620:                           p == 1 ?
  6621:                           VideoController.vcnPal32G8[0] :
  6622:                           (p & 1) == 0 ?
  6623:                           VideoController.vcnPal32G8[p] :
  6624:                           VideoController.vcnPal32G8[p & -2]);
  6625:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  6626:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  6627:                               VideoController.vcnPal32G8[p] :
  6628:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2) != 0 ?
  6629:                               VideoController.vcnPal32G8[p] :
  6630:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] & -2] :
  6631:                               p == 1 ?
  6632:                               VideoController.vcnPal32G8[0] :
  6633:                               (p & 1) == 0 ?
  6634:                               VideoController.vcnPal32G8[p] :
  6635:                               VideoController.vcnPal32G8[p & -2]);
  6636:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  6637:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  6638:                               VideoController.vcnPal32G8[p] :
  6639:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2) != 0 ?
  6640:                               VideoController.vcnPal32G8[p] :
  6641:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] & -2] :
  6642:                               p == 1 ?
  6643:                               VideoController.vcnPal32G8[0] :
  6644:                               (p & 1) == 0 ?
  6645:                               VideoController.vcnPal32G8[p] :
  6646:                               VideoController.vcnPal32G8[p & -2]);
  6647:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  6648:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  6649:                               VideoController.vcnPal32G8[p] :
  6650:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2) != 0 ?
  6651:                               VideoController.vcnPal32G8[p] :
  6652:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] & -2] :
  6653:                               p == 1 ?
  6654:                               VideoController.vcnPal32G8[0] :
  6655:                               (p & 1) == 0 ?
  6656:                               VideoController.vcnPal32G8[p] :
  6657:                               VideoController.vcnPal32G8[p & -2]);
  6658:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  6659:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  6660:                               VideoController.vcnPal32G8[p] :
  6661:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2) != 0 ?
  6662:                               VideoController.vcnPal32G8[p] :
  6663:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] & -2] :
  6664:                               p == 1 ?
  6665:                               VideoController.vcnPal32G8[0] :
  6666:                               (p & 1) == 0 ?
  6667:                               VideoController.vcnPal32G8[p] :
  6668:                               VideoController.vcnPal32G8[p & -2]);
  6669:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  6670:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  6671:                               VideoController.vcnPal32G8[p] :
  6672:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2) != 0 ?
  6673:                               VideoController.vcnPal32G8[p] :
  6674:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] & -2] :
  6675:                               p == 1 ?
  6676:                               VideoController.vcnPal32G8[0] :
  6677:                               (p & 1) == 0 ?
  6678:                               VideoController.vcnPal32G8[p] :
  6679:                               VideoController.vcnPal32G8[p & -2]);
  6680:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  6681:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  6682:                               VideoController.vcnPal32G8[p] :
  6683:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2) != 0 ?
  6684:                               VideoController.vcnPal32G8[p] :
  6685:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] & -2] :
  6686:                               p == 1 ?
  6687:                               VideoController.vcnPal32G8[0] :
  6688:                               (p & 1) == 0 ?
  6689:                               VideoController.vcnPal32G8[p] :
  6690:                               VideoController.vcnPal32G8[p & -2]);
  6691:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  6692:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  6693:                               VideoController.vcnPal32G8[p] :
  6694:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2) != 0 ?
  6695:                               VideoController.vcnPal32G8[p] :
  6696:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] & -2] :
  6697:                               p == 1 ?
  6698:                               VideoController.vcnPal32G8[0] :
  6699:                               (p & 1) == 0 ?
  6700:                               VideoController.vcnPal32G8[p] :
  6701:                               VideoController.vcnPal32G8[p & -2]);
  6702:         gx1st += 16;
  6703:         gx2nd += 16;
  6704:         gx3rd += 16;
  6705:         gx4th += 16;
  6706:         da += 8;
  6707:       }  //while da<db
  6708:     }  //drawRaster
  6709:   },  //E4_XWP
  6710: 
  6711:   //================================================================================
  6712:   //E4_XHCT ($0000,$06xx,$190F)
  6713:   //  概要
  6714:   //    E4  512ドット16色4プレーン
  6715:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  6716:   //  手順
  6717:   //    1番目のパレットが0でないとき
  6718:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  6719:   //        1番目のカラーとカラー0を混ぜたカラー(0は黒)
  6720:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  6721:   //        1番目のカラー(0は黒)
  6722:   //    さもなくば(1番目のパレットが0のとき)
  6723:   //      2番目のパレットが0でないとき
  6724:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  6725:   //          2番目のカラーとカラー0を混ぜたカラー(0は黒)
  6726:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  6727:   //          2番目のカラー(0は黒)
  6728:   //      さもなくば(2番目のパレットが0のとき)
  6729:   //        3番目のパレットが0でないとき
  6730:   //          3番目のパレットを偶数化したパレットのカラーが奇数のとき
  6731:   //            3番目のカラーとカラー0を混ぜたカラー(0は黒)
  6732:   //          さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  6733:   //            3番目のカラー(0は黒)
  6734:   //        さもなくば(3番目のパレットが0のとき)
  6735:   //          4番目のパレットを偶数化したパレットのカラーが奇数のとき
  6736:   //            4番目のカラーとカラー0を混ぜたカラー(0は黒)
  6737:   //          さもなくば(4番目のパレットを偶数化したパレットのカラーが偶数のとき)
  6738:   //            4番目のカラー(0は黒)
  6739:   //  中間コード1
  6740:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p())):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),0):epc(e2p())):(e3p()!=0?(ls1(epc(tev(e3p())))!=0?mix(epc(e3p()),0):epc(e3p())):(ls1(epc(tev(e4p())))!=0?mix(epc(e4p()),0):epc(e4p())))))
  6741:   //  中間コード2
  6742:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p()):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),0):epc(e2p()):e3p()!=0?ls1(epc(tev(e3p())))!=0?mix(epc(e3p()),0):epc(e3p()):ls1(epc(tev(e4p())))!=0?mix(epc(e4p()),0):epc(e4p())
  6743:   //  中間コード3
  6744:   //    (v0=e1p())!=0?ls1(epc(tev(v0)))!=0?mix(epc(v0),0):epc(v0):(v7=e2p())!=0?ls1(epc(tev(v7)))!=0?mix(epc(v7),0):epc(v7):(v14=e3p())!=0?ls1(epc(tev(v14)))!=0?mix(epc(v14),0):epc(v14):ls1(epc(tev(v24=e4p())))!=0?mix(epc(v24),0):epc(v24)
  6745:   //  中間コード4
  6746:   //    (p=e1p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),0):epc(p):(p=e2p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),0):epc(p):(p=e3p())!=0?ls1(epc(tev(p)))!=0?mix(epc(p),0):epc(p):ls1(epc(tev(p=e4p())))!=0?mix(epc(p),0):epc(p)
  6747:   //  中間コード5
  6748:   //    (p=e1p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),0):epc(p):(p=e2p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),0):epc(p):(p=e3p())!=0?(epc(p&-2)&1)!=0?mix(epc(p),0):epc(p):(epc((p=e4p())&-2)&1)!=0?mix(epc(p),0):epc(p)
  6749:   //  中間コード6
  6750:   //    (p=e1p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),0)):epo(p):(p=e2p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),0)):epo(p):(p=e3p())!=0?(epc(p&-2)&1)!=0?cto(mix(epc(p),0)):epo(p):(epc((p=e4p())&-2)&1)!=0?cto(mix(epc(p),0)):epo(p)
  6751:   E4_XHCT {
  6752:     @Override public void drawRaster (int src, int dst, boolean rh) {
  6753:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6754:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6755:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6756:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6757:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6758:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6759:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6760:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6761:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6762:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  6763:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  6764:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  6765:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6766:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6767:       if (rh) {
  6768:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6769:         gx1st += half << 1;
  6770:         gx2nd += half << 1;
  6771:         gx3rd += half << 1;
  6772:         gx4th += half << 1;
  6773:         da += half;
  6774:       }
  6775:       while (da < db) {
  6776:         int p;
  6777:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  6778:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6779:                           VideoController.vcnPalTbl[
  6780:                             VideoController.vcnMix2 (
  6781:                               VideoController.vcnPal16G8[p],
  6782:                               0)] :
  6783:                           VideoController.vcnPal32G8[p] :
  6784:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  6785:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6786:                           VideoController.vcnPalTbl[
  6787:                             VideoController.vcnMix2 (
  6788:                               VideoController.vcnPal16G8[p],
  6789:                               0)] :
  6790:                           VideoController.vcnPal32G8[p] :
  6791:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  6792:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6793:                           VideoController.vcnPalTbl[
  6794:                             VideoController.vcnMix2 (
  6795:                               VideoController.vcnPal16G8[p],
  6796:                               0)] :
  6797:                           VideoController.vcnPal32G8[p] :
  6798:                           (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th & 1023]) & -2] & 1) != 0 ?
  6799:                           VideoController.vcnPalTbl[
  6800:                             VideoController.vcnMix2 (
  6801:                               VideoController.vcnPal16G8[p],
  6802:                               0)] :
  6803:                           VideoController.vcnPal32G8[p]);
  6804:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  6805:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6806:                               VideoController.vcnPalTbl[
  6807:                                 VideoController.vcnMix2 (
  6808:                                   VideoController.vcnPal16G8[p],
  6809:                                   0)] :
  6810:                               VideoController.vcnPal32G8[p] :
  6811:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  6812:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6813:                               VideoController.vcnPalTbl[
  6814:                                 VideoController.vcnMix2 (
  6815:                                   VideoController.vcnPal16G8[p],
  6816:                                   0)] :
  6817:                               VideoController.vcnPal32G8[p] :
  6818:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  6819:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6820:                               VideoController.vcnPalTbl[
  6821:                                 VideoController.vcnMix2 (
  6822:                                   VideoController.vcnPal16G8[p],
  6823:                                   0)] :
  6824:                               VideoController.vcnPal32G8[p] :
  6825:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]) & -2] & 1) != 0 ?
  6826:                               VideoController.vcnPalTbl[
  6827:                                 VideoController.vcnMix2 (
  6828:                                   VideoController.vcnPal16G8[p],
  6829:                                   0)] :
  6830:                               VideoController.vcnPal32G8[p]);
  6831:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  6832:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6833:                               VideoController.vcnPalTbl[
  6834:                                 VideoController.vcnMix2 (
  6835:                                   VideoController.vcnPal16G8[p],
  6836:                                   0)] :
  6837:                               VideoController.vcnPal32G8[p] :
  6838:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  6839:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6840:                               VideoController.vcnPalTbl[
  6841:                                 VideoController.vcnMix2 (
  6842:                                   VideoController.vcnPal16G8[p],
  6843:                                   0)] :
  6844:                               VideoController.vcnPal32G8[p] :
  6845:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  6846:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6847:                               VideoController.vcnPalTbl[
  6848:                                 VideoController.vcnMix2 (
  6849:                                   VideoController.vcnPal16G8[p],
  6850:                                   0)] :
  6851:                               VideoController.vcnPal32G8[p] :
  6852:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]) & -2] & 1) != 0 ?
  6853:                               VideoController.vcnPalTbl[
  6854:                                 VideoController.vcnMix2 (
  6855:                                   VideoController.vcnPal16G8[p],
  6856:                                   0)] :
  6857:                               VideoController.vcnPal32G8[p]);
  6858:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  6859:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6860:                               VideoController.vcnPalTbl[
  6861:                                 VideoController.vcnMix2 (
  6862:                                   VideoController.vcnPal16G8[p],
  6863:                                   0)] :
  6864:                               VideoController.vcnPal32G8[p] :
  6865:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  6866:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6867:                               VideoController.vcnPalTbl[
  6868:                                 VideoController.vcnMix2 (
  6869:                                   VideoController.vcnPal16G8[p],
  6870:                                   0)] :
  6871:                               VideoController.vcnPal32G8[p] :
  6872:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  6873:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6874:                               VideoController.vcnPalTbl[
  6875:                                 VideoController.vcnMix2 (
  6876:                                   VideoController.vcnPal16G8[p],
  6877:                                   0)] :
  6878:                               VideoController.vcnPal32G8[p] :
  6879:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]) & -2] & 1) != 0 ?
  6880:                               VideoController.vcnPalTbl[
  6881:                                 VideoController.vcnMix2 (
  6882:                                   VideoController.vcnPal16G8[p],
  6883:                                   0)] :
  6884:                               VideoController.vcnPal32G8[p]);
  6885:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  6886:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6887:                               VideoController.vcnPalTbl[
  6888:                                 VideoController.vcnMix2 (
  6889:                                   VideoController.vcnPal16G8[p],
  6890:                                   0)] :
  6891:                               VideoController.vcnPal32G8[p] :
  6892:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  6893:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6894:                               VideoController.vcnPalTbl[
  6895:                                 VideoController.vcnMix2 (
  6896:                                   VideoController.vcnPal16G8[p],
  6897:                                   0)] :
  6898:                               VideoController.vcnPal32G8[p] :
  6899:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  6900:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6901:                               VideoController.vcnPalTbl[
  6902:                                 VideoController.vcnMix2 (
  6903:                                   VideoController.vcnPal16G8[p],
  6904:                                   0)] :
  6905:                               VideoController.vcnPal32G8[p] :
  6906:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]) & -2] & 1) != 0 ?
  6907:                               VideoController.vcnPalTbl[
  6908:                                 VideoController.vcnMix2 (
  6909:                                   VideoController.vcnPal16G8[p],
  6910:                                   0)] :
  6911:                               VideoController.vcnPal32G8[p]);
  6912:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  6913:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6914:                               VideoController.vcnPalTbl[
  6915:                                 VideoController.vcnMix2 (
  6916:                                   VideoController.vcnPal16G8[p],
  6917:                                   0)] :
  6918:                               VideoController.vcnPal32G8[p] :
  6919:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  6920:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6921:                               VideoController.vcnPalTbl[
  6922:                                 VideoController.vcnMix2 (
  6923:                                   VideoController.vcnPal16G8[p],
  6924:                                   0)] :
  6925:                               VideoController.vcnPal32G8[p] :
  6926:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  6927:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6928:                               VideoController.vcnPalTbl[
  6929:                                 VideoController.vcnMix2 (
  6930:                                   VideoController.vcnPal16G8[p],
  6931:                                   0)] :
  6932:                               VideoController.vcnPal32G8[p] :
  6933:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]) & -2] & 1) != 0 ?
  6934:                               VideoController.vcnPalTbl[
  6935:                                 VideoController.vcnMix2 (
  6936:                                   VideoController.vcnPal16G8[p],
  6937:                                   0)] :
  6938:                               VideoController.vcnPal32G8[p]);
  6939:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  6940:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6941:                               VideoController.vcnPalTbl[
  6942:                                 VideoController.vcnMix2 (
  6943:                                   VideoController.vcnPal16G8[p],
  6944:                                   0)] :
  6945:                               VideoController.vcnPal32G8[p] :
  6946:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  6947:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6948:                               VideoController.vcnPalTbl[
  6949:                                 VideoController.vcnMix2 (
  6950:                                   VideoController.vcnPal16G8[p],
  6951:                                   0)] :
  6952:                               VideoController.vcnPal32G8[p] :
  6953:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  6954:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6955:                               VideoController.vcnPalTbl[
  6956:                                 VideoController.vcnMix2 (
  6957:                                   VideoController.vcnPal16G8[p],
  6958:                                   0)] :
  6959:                               VideoController.vcnPal32G8[p] :
  6960:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]) & -2] & 1) != 0 ?
  6961:                               VideoController.vcnPalTbl[
  6962:                                 VideoController.vcnMix2 (
  6963:                                   VideoController.vcnPal16G8[p],
  6964:                                   0)] :
  6965:                               VideoController.vcnPal32G8[p]);
  6966:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  6967:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6968:                               VideoController.vcnPalTbl[
  6969:                                 VideoController.vcnMix2 (
  6970:                                   VideoController.vcnPal16G8[p],
  6971:                                   0)] :
  6972:                               VideoController.vcnPal32G8[p] :
  6973:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  6974:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6975:                               VideoController.vcnPalTbl[
  6976:                                 VideoController.vcnMix2 (
  6977:                                   VideoController.vcnPal16G8[p],
  6978:                                   0)] :
  6979:                               VideoController.vcnPal32G8[p] :
  6980:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  6981:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6982:                               VideoController.vcnPalTbl[
  6983:                                 VideoController.vcnMix2 (
  6984:                                   VideoController.vcnPal16G8[p],
  6985:                                   0)] :
  6986:                               VideoController.vcnPal32G8[p] :
  6987:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]) & -2] & 1) != 0 ?
  6988:                               VideoController.vcnPalTbl[
  6989:                                 VideoController.vcnMix2 (
  6990:                                   VideoController.vcnPal16G8[p],
  6991:                                   0)] :
  6992:                               VideoController.vcnPal32G8[p]);
  6993:         gx1st += 16;
  6994:         gx2nd += 16;
  6995:         gx3rd += 16;
  6996:         gx4th += 16;
  6997:         da += 8;
  6998:       }  //while da<db
  6999:     }  //drawRaster
  7000:   },  //E4_XHCT
  7001: 
  7002:   //================================================================================
  7003:   //E4_XHCG ($0000,$06xx,$1A0F)
  7004:   //  概要
  7005:   //    E4  512ドット16色4プレーン
  7006:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  7007:   //  手順
  7008:   //    1番目のパレットが0でないとき
  7009:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  7010:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  7011:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7012:   //        1番目のパレットが奇数のとき
  7013:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  7014:   //        さもなくば(1番目のパレットが偶数のとき)
  7015:   //          1番目のカラー(0は黒)
  7016:   //    さもなくば(1番目のパレットが0のとき)
  7017:   //      2番目のパレットが0でないとき
  7018:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  7019:   //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  7020:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7021:   //          2番目のカラー(0は黒)
  7022:   //      さもなくば(2番目のパレットが0のとき)
  7023:   //        3番目のパレットが0でないとき
  7024:   //          3番目のパレットを偶数化したパレットのカラーが奇数のとき
  7025:   //            3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラー(0は黒)
  7026:   //          さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7027:   //            3番目のパレットが奇数のとき
  7028:   //              パレット1のカラー(0は黒)
  7029:   //            さもなくば(3番目のパレットが偶数のとき)
  7030:   //              3番目のカラー(0は黒)
  7031:   //        さもなくば(3番目のパレットが0のとき)
  7032:   //          4番目のパレットを偶数化したパレットのカラーが奇数のとき
  7033:   //            4番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラー(0は黒)
  7034:   //          さもなくば(4番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7035:   //            4番目のパレットが奇数のとき
  7036:   //              パレット1のカラー(0は黒)
  7037:   //            さもなくば(4番目のパレットが偶数のとき)
  7038:   //              4番目のカラー(0は黒)
  7039:   //  中間コード1
  7040:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()))):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p())):(e3p()!=0?(ls1(epc(tev(e3p())))!=0?mix(epc(tev(e3p())),epc(1)):(ls1(e3p())!=0?epc(1):epc(e3p()))):(ls1(epc(tev(e4p())))!=0?mix(epc(tev(e4p())),epc(1)):(ls1(e4p())!=0?epc(1):epc(e4p()))))))
  7041:   //  中間コード2
  7042:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(epc(tev(e2p())),epc(tod(e2q()))):epc(e2p()):e3p()!=0?ls1(epc(tev(e3p())))!=0?mix(epc(tev(e3p())),epc(1)):ls1(e3p())!=0?epc(1):epc(e3p()):ls1(epc(tev(e4p())))!=0?mix(epc(tev(e4p())),epc(1)):ls1(e4p())!=0?epc(1):epc(e4p())
  7043:   //  中間コード3
  7044:   //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(v2,epc(tod(e2q()))):ls1(v0)!=0?epc(tod(e2q())):epc(v0):(v13=e2p())!=0?ls1(v15=epc(tev(v13)))!=0?mix(v15,epc(tod(e2q()))):epc(v13):(v22=e3p())!=0?ls1(v24=epc(tev(v22)))!=0?mix(v24,epc(1)):ls1(v22)!=0?epc(1):epc(v22):ls1(v32=epc(tev(v34=e4p())))!=0?mix(v32,epc(1)):ls1(v34)!=0?epc(1):epc(v34)
  7045:   //  中間コード4
  7046:   //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(tod(e2q()))):ls1(p)!=0?epc(tod(e2q())):epc(p):(p=e2p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(tod(e2q()))):epc(p):(p=e3p())!=0?ls1(q=epc(tev(p)))!=0?mix(q,epc(1)):ls1(p)!=0?epc(1):epc(p):ls1(p=epc(tev(q=e4p())))!=0?mix(p,epc(1)):ls1(q)!=0?epc(1):epc(q)
  7047:   //  中間コード5
  7048:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(e2q()|1)):(p&1)!=0?epc(e2q()|1):epc(p):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(e2q()|1)):epc(p):(p=e3p())!=0?((q=epc(p&-2))&1)!=0?mix(q,epc(1)):(p&1)!=0?epc(1):epc(p):((p=epc((q=e4p())&-2))&1)!=0?mix(p,epc(1)):(q&1)!=0?epc(1):epc(q)
  7049:   //  中間コード6
  7050:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(e2q()|1))):(p&1)!=0?epo(e2q()|1):epo(p):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(e2q()|1))):epo(p):(p=e3p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(q,epc(1))):(p&1)!=0?epo(1):epo(p):((p=epc((q=e4p())&-2))&1)!=0?cto(mix(p,epc(1))):(q&1)!=0?epo(1):epo(q)
  7051:   E4_XHCG {
  7052:     @Override public void drawRaster (int src, int dst, boolean rh) {
  7053:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  7054:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  7055:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7056:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  7057:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  7058:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7059:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  7060:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  7061:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  7062:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7063:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  7064:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  7065:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7066:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  7067:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  7068:       if (rh) {
  7069:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  7070:         gx1st += half << 1;
  7071:         gx2nd += half << 1;
  7072:         gx3rd += half << 1;
  7073:         gx4th += half << 1;
  7074:         da += half;
  7075:       }
  7076:       while (da < db) {
  7077:         int p, q;
  7078:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  7079:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7080:                           VideoController.vcnPalTbl[
  7081:                             VideoController.vcnMix2 (
  7082:                               q,
  7083:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  7084:                           (p & 1) != 0 ?
  7085:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  7086:                           VideoController.vcnPal32G8[p] :
  7087:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  7088:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7089:                           VideoController.vcnPalTbl[
  7090:                             VideoController.vcnMix2 (
  7091:                               q,
  7092:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  7093:                           VideoController.vcnPal32G8[p] :
  7094:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  7095:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7096:                           VideoController.vcnPalTbl[
  7097:                             VideoController.vcnMix2 (
  7098:                               q,
  7099:                               VideoController.vcnPal16G8[1])] :
  7100:                           (p & 1) != 0 ?
  7101:                           VideoController.vcnPal32G8[1] :
  7102:                           VideoController.vcnPal32G8[p] :
  7103:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th & 1023]) & -2]) & 1) != 0 ?
  7104:                           VideoController.vcnPalTbl[
  7105:                             VideoController.vcnMix2 (
  7106:                               p,
  7107:                               VideoController.vcnPal16G8[1])] :
  7108:                           (q & 1) != 0 ?
  7109:                           VideoController.vcnPal32G8[1] :
  7110:                           VideoController.vcnPal32G8[q]);
  7111:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  7112:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7113:                               VideoController.vcnPalTbl[
  7114:                                 VideoController.vcnMix2 (
  7115:                                   q,
  7116:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  7117:                               (p & 1) != 0 ?
  7118:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  7119:                               VideoController.vcnPal32G8[p] :
  7120:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  7121:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7122:                               VideoController.vcnPalTbl[
  7123:                                 VideoController.vcnMix2 (
  7124:                                   q,
  7125:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  7126:                               VideoController.vcnPal32G8[p] :
  7127:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  7128:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7129:                               VideoController.vcnPalTbl[
  7130:                                 VideoController.vcnMix2 (
  7131:                                   q,
  7132:                                   VideoController.vcnPal16G8[1])] :
  7133:                               (p & 1) != 0 ?
  7134:                               VideoController.vcnPal32G8[1] :
  7135:                               VideoController.vcnPal32G8[p] :
  7136:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]) & -2]) & 1) != 0 ?
  7137:                               VideoController.vcnPalTbl[
  7138:                                 VideoController.vcnMix2 (
  7139:                                   p,
  7140:                                   VideoController.vcnPal16G8[1])] :
  7141:                               (q & 1) != 0 ?
  7142:                               VideoController.vcnPal32G8[1] :
  7143:                               VideoController.vcnPal32G8[q]);
  7144:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  7145:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7146:                               VideoController.vcnPalTbl[
  7147:                                 VideoController.vcnMix2 (
  7148:                                   q,
  7149:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  7150:                               (p & 1) != 0 ?
  7151:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  7152:                               VideoController.vcnPal32G8[p] :
  7153:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  7154:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7155:                               VideoController.vcnPalTbl[
  7156:                                 VideoController.vcnMix2 (
  7157:                                   q,
  7158:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  7159:                               VideoController.vcnPal32G8[p] :
  7160:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  7161:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7162:                               VideoController.vcnPalTbl[
  7163:                                 VideoController.vcnMix2 (
  7164:                                   q,
  7165:                                   VideoController.vcnPal16G8[1])] :
  7166:                               (p & 1) != 0 ?
  7167:                               VideoController.vcnPal32G8[1] :
  7168:                               VideoController.vcnPal32G8[p] :
  7169:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]) & -2]) & 1) != 0 ?
  7170:                               VideoController.vcnPalTbl[
  7171:                                 VideoController.vcnMix2 (
  7172:                                   p,
  7173:                                   VideoController.vcnPal16G8[1])] :
  7174:                               (q & 1) != 0 ?
  7175:                               VideoController.vcnPal32G8[1] :
  7176:                               VideoController.vcnPal32G8[q]);
  7177:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  7178:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7179:                               VideoController.vcnPalTbl[
  7180:                                 VideoController.vcnMix2 (
  7181:                                   q,
  7182:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  7183:                               (p & 1) != 0 ?
  7184:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  7185:                               VideoController.vcnPal32G8[p] :
  7186:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  7187:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7188:                               VideoController.vcnPalTbl[
  7189:                                 VideoController.vcnMix2 (
  7190:                                   q,
  7191:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  7192:                               VideoController.vcnPal32G8[p] :
  7193:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  7194:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7195:                               VideoController.vcnPalTbl[
  7196:                                 VideoController.vcnMix2 (
  7197:                                   q,
  7198:                                   VideoController.vcnPal16G8[1])] :
  7199:                               (p & 1) != 0 ?
  7200:                               VideoController.vcnPal32G8[1] :
  7201:                               VideoController.vcnPal32G8[p] :
  7202:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]) & -2]) & 1) != 0 ?
  7203:                               VideoController.vcnPalTbl[
  7204:                                 VideoController.vcnMix2 (
  7205:                                   p,
  7206:                                   VideoController.vcnPal16G8[1])] :
  7207:                               (q & 1) != 0 ?
  7208:                               VideoController.vcnPal32G8[1] :
  7209:                               VideoController.vcnPal32G8[q]);
  7210:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  7211:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7212:                               VideoController.vcnPalTbl[
  7213:                                 VideoController.vcnMix2 (
  7214:                                   q,
  7215:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  7216:                               (p & 1) != 0 ?
  7217:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  7218:                               VideoController.vcnPal32G8[p] :
  7219:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  7220:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7221:                               VideoController.vcnPalTbl[
  7222:                                 VideoController.vcnMix2 (
  7223:                                   q,
  7224:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  7225:                               VideoController.vcnPal32G8[p] :
  7226:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  7227:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7228:                               VideoController.vcnPalTbl[
  7229:                                 VideoController.vcnMix2 (
  7230:                                   q,
  7231:                                   VideoController.vcnPal16G8[1])] :
  7232:                               (p & 1) != 0 ?
  7233:                               VideoController.vcnPal32G8[1] :
  7234:                               VideoController.vcnPal32G8[p] :
  7235:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]) & -2]) & 1) != 0 ?
  7236:                               VideoController.vcnPalTbl[
  7237:                                 VideoController.vcnMix2 (
  7238:                                   p,
  7239:                                   VideoController.vcnPal16G8[1])] :
  7240:                               (q & 1) != 0 ?
  7241:                               VideoController.vcnPal32G8[1] :
  7242:                               VideoController.vcnPal32G8[q]);
  7243:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  7244:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7245:                               VideoController.vcnPalTbl[
  7246:                                 VideoController.vcnMix2 (
  7247:                                   q,
  7248:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  7249:                               (p & 1) != 0 ?
  7250:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  7251:                               VideoController.vcnPal32G8[p] :
  7252:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  7253:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7254:                               VideoController.vcnPalTbl[
  7255:                                 VideoController.vcnMix2 (
  7256:                                   q,
  7257:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  7258:                               VideoController.vcnPal32G8[p] :
  7259:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  7260:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7261:                               VideoController.vcnPalTbl[
  7262:                                 VideoController.vcnMix2 (
  7263:                                   q,
  7264:                                   VideoController.vcnPal16G8[1])] :
  7265:                               (p & 1) != 0 ?
  7266:                               VideoController.vcnPal32G8[1] :
  7267:                               VideoController.vcnPal32G8[p] :
  7268:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]) & -2]) & 1) != 0 ?
  7269:                               VideoController.vcnPalTbl[
  7270:                                 VideoController.vcnMix2 (
  7271:                                   p,
  7272:                                   VideoController.vcnPal16G8[1])] :
  7273:                               (q & 1) != 0 ?
  7274:                               VideoController.vcnPal32G8[1] :
  7275:                               VideoController.vcnPal32G8[q]);
  7276:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  7277:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7278:                               VideoController.vcnPalTbl[
  7279:                                 VideoController.vcnMix2 (
  7280:                                   q,
  7281:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  7282:                               (p & 1) != 0 ?
  7283:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  7284:                               VideoController.vcnPal32G8[p] :
  7285:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  7286:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7287:                               VideoController.vcnPalTbl[
  7288:                                 VideoController.vcnMix2 (
  7289:                                   q,
  7290:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  7291:                               VideoController.vcnPal32G8[p] :
  7292:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  7293:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7294:                               VideoController.vcnPalTbl[
  7295:                                 VideoController.vcnMix2 (
  7296:                                   q,
  7297:                                   VideoController.vcnPal16G8[1])] :
  7298:                               (p & 1) != 0 ?
  7299:                               VideoController.vcnPal32G8[1] :
  7300:                               VideoController.vcnPal32G8[p] :
  7301:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]) & -2]) & 1) != 0 ?
  7302:                               VideoController.vcnPalTbl[
  7303:                                 VideoController.vcnMix2 (
  7304:                                   p,
  7305:                                   VideoController.vcnPal16G8[1])] :
  7306:                               (q & 1) != 0 ?
  7307:                               VideoController.vcnPal32G8[1] :
  7308:                               VideoController.vcnPal32G8[q]);
  7309:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  7310:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7311:                               VideoController.vcnPalTbl[
  7312:                                 VideoController.vcnMix2 (
  7313:                                   q,
  7314:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  7315:                               (p & 1) != 0 ?
  7316:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  7317:                               VideoController.vcnPal32G8[p] :
  7318:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  7319:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7320:                               VideoController.vcnPalTbl[
  7321:                                 VideoController.vcnMix2 (
  7322:                                   q,
  7323:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  7324:                               VideoController.vcnPal32G8[p] :
  7325:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  7326:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7327:                               VideoController.vcnPalTbl[
  7328:                                 VideoController.vcnMix2 (
  7329:                                   q,
  7330:                                   VideoController.vcnPal16G8[1])] :
  7331:                               (p & 1) != 0 ?
  7332:                               VideoController.vcnPal32G8[1] :
  7333:                               VideoController.vcnPal32G8[p] :
  7334:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]) & -2]) & 1) != 0 ?
  7335:                               VideoController.vcnPalTbl[
  7336:                                 VideoController.vcnMix2 (
  7337:                                   p,
  7338:                                   VideoController.vcnPal16G8[1])] :
  7339:                               (q & 1) != 0 ?
  7340:                               VideoController.vcnPal32G8[1] :
  7341:                               VideoController.vcnPal32G8[q]);
  7342:         gx1st += 16;
  7343:         gx2nd += 16;
  7344:         gx3rd += 16;
  7345:         gx4th += 16;
  7346:         da += 8;
  7347:       }  //while da<db
  7348:     }  //drawRaster
  7349:   },  //E4_XHCG
  7350: 
  7351:   //================================================================================
  7352:   //E4_XHCGT ($0000,$06xx,$1B0F)
  7353:   //  概要
  7354:   //    E4  512ドット16色4プレーン
  7355:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  7356:   //  手順
  7357:   //    1番目のパレットが0でないとき
  7358:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  7359:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  7360:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7361:   //        1番目のパレットが奇数のとき
  7362:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  7363:   //        さもなくば(1番目のパレットが偶数のとき)
  7364:   //          1番目のカラー(0は黒)
  7365:   //    さもなくば(1番目のパレットが0のとき)
  7366:   //      2番目のパレットが0でないとき
  7367:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  7368:   //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  7369:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7370:   //          2番目のカラー(0は黒)
  7371:   //      さもなくば(2番目のパレットが0のとき)
  7372:   //        3番目のパレットが0でないとき
  7373:   //          3番目のパレットを偶数化したパレットのカラーが奇数のとき
  7374:   //            3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  7375:   //          さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7376:   //            3番目のパレットが奇数のとき
  7377:   //              パレット1のカラー(0は黒)
  7378:   //            さもなくば(3番目のパレットが偶数のとき)
  7379:   //              3番目のカラー(0は黒)
  7380:   //        さもなくば(3番目のパレットが0のとき)
  7381:   //          4番目のパレットを偶数化したパレットのカラーが奇数のとき
  7382:   //            4番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  7383:   //          さもなくば(4番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7384:   //            4番目のパレットが奇数のとき
  7385:   //              パレット1のカラー(0は黒)
  7386:   //            さもなくば(4番目のパレットが偶数のとき)
  7387:   //              4番目のカラー(0は黒)
  7388:   //  中間コード1
  7389:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()))):(e2p()!=0?(ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),0):epc(e2p())):(e3p()!=0?(ls1(epc(tev(e3p())))!=0?mix(mix(epc(tev(e3p())),epc(1)),0):(ls1(e3p())!=0?epc(1):epc(e3p()))):(ls1(epc(tev(e4p())))!=0?mix(mix(epc(tev(e4p())),epc(1)),0):(ls1(e4p())!=0?epc(1):epc(e4p()))))))
  7390:   //  中間コード2
  7391:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p()):e2p()!=0?ls1(epc(tev(e2p())))!=0?mix(mix(epc(tev(e2p())),epc(tod(e2q()))),0):epc(e2p()):e3p()!=0?ls1(epc(tev(e3p())))!=0?mix(mix(epc(tev(e3p())),epc(1)),0):ls1(e3p())!=0?epc(1):epc(e3p()):ls1(epc(tev(e4p())))!=0?mix(mix(epc(tev(e4p())),epc(1)),0):ls1(e4p())!=0?epc(1):epc(e4p())
  7392:   //  中間コード3
  7393:   //    (v0=e1p())!=0?ls1(v2=epc(tev(v0)))!=0?mix(mix(v2,epc(tod(e2q()))),0):ls1(v0)!=0?epc(tod(e2q())):epc(v0):(v14=e2p())!=0?ls1(v16=epc(tev(v14)))!=0?mix(mix(v16,epc(tod(e2q()))),0):epc(v14):(v24=e3p())!=0?ls1(v26=epc(tev(v24)))!=0?mix(mix(v26,epc(1)),0):ls1(v24)!=0?epc(1):epc(v24):ls1(v35=epc(tev(v37=e4p())))!=0?mix(mix(v35,epc(1)),0):ls1(v37)!=0?epc(1):epc(v37)
  7394:   //  中間コード4
  7395:   //    (p=e1p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(tod(e2q()))),0):ls1(p)!=0?epc(tod(e2q())):epc(p):(p=e2p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(tod(e2q()))),0):epc(p):(p=e3p())!=0?ls1(q=epc(tev(p)))!=0?mix(mix(q,epc(1)),0):ls1(p)!=0?epc(1):epc(p):ls1(p=epc(tev(q=e4p())))!=0?mix(mix(p,epc(1)),0):ls1(q)!=0?epc(1):epc(q)
  7396:   //  中間コード5
  7397:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(e2q()|1)),0):(p&1)!=0?epc(e2q()|1):epc(p):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(e2q()|1)),0):epc(p):(p=e3p())!=0?((q=epc(p&-2))&1)!=0?mix(mix(q,epc(1)),0):(p&1)!=0?epc(1):epc(p):((p=epc((q=e4p())&-2))&1)!=0?mix(mix(p,epc(1)),0):(q&1)!=0?epc(1):epc(q)
  7398:   //  中間コード6
  7399:   //    (p=e1p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(e2q()|1)),0)):(p&1)!=0?epo(e2q()|1):epo(p):(p=e2p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(e2q()|1)),0)):epo(p):(p=e3p())!=0?((q=epc(p&-2))&1)!=0?cto(mix(mix(q,epc(1)),0)):(p&1)!=0?epo(1):epo(p):((p=epc((q=e4p())&-2))&1)!=0?cto(mix(mix(p,epc(1)),0)):(q&1)!=0?epo(1):epo(q)
  7400:   E4_XHCGT {
  7401:     @Override public void drawRaster (int src, int dst, boolean rh) {
  7402:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  7403:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  7404:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7405:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  7406:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  7407:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7408:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  7409:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  7410:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  7411:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7412:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  7413:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  7414:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7415:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  7416:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  7417:       if (rh) {
  7418:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  7419:         gx1st += half << 1;
  7420:         gx2nd += half << 1;
  7421:         gx3rd += half << 1;
  7422:         gx4th += half << 1;
  7423:         da += half;
  7424:       }
  7425:       while (da < db) {
  7426:         int p, q;
  7427:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  7428:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7429:                           VideoController.vcnPalTbl[
  7430:                             VideoController.vcnMix2 (
  7431:                               VideoController.vcnMix2 (
  7432:                                 q,
  7433:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  7434:                               0)] :
  7435:                           (p & 1) != 0 ?
  7436:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  7437:                           VideoController.vcnPal32G8[p] :
  7438:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  7439:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7440:                           VideoController.vcnPalTbl[
  7441:                             VideoController.vcnMix2 (
  7442:                               VideoController.vcnMix2 (
  7443:                                 q,
  7444:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  7445:                               0)] :
  7446:                           VideoController.vcnPal32G8[p] :
  7447:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  7448:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7449:                           VideoController.vcnPalTbl[
  7450:                             VideoController.vcnMix2 (
  7451:                               VideoController.vcnMix2 (
  7452:                                 q,
  7453:                                 VideoController.vcnPal16G8[1]),
  7454:                               0)] :
  7455:                           (p & 1) != 0 ?
  7456:                           VideoController.vcnPal32G8[1] :
  7457:                           VideoController.vcnPal32G8[p] :
  7458:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th & 1023]) & -2]) & 1) != 0 ?
  7459:                           VideoController.vcnPalTbl[
  7460:                             VideoController.vcnMix2 (
  7461:                               VideoController.vcnMix2 (
  7462:                                 p,
  7463:                                 VideoController.vcnPal16G8[1]),
  7464:                               0)] :
  7465:                           (q & 1) != 0 ?
  7466:                           VideoController.vcnPal32G8[1] :
  7467:                           VideoController.vcnPal32G8[q]);
  7468:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  7469:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7470:                               VideoController.vcnPalTbl[
  7471:                                 VideoController.vcnMix2 (
  7472:                                   VideoController.vcnMix2 (
  7473:                                     q,
  7474:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  7475:                                   0)] :
  7476:                               (p & 1) != 0 ?
  7477:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  7478:                               VideoController.vcnPal32G8[p] :
  7479:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  7480:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7481:                               VideoController.vcnPalTbl[
  7482:                                 VideoController.vcnMix2 (
  7483:                                   VideoController.vcnMix2 (
  7484:                                     q,
  7485:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  7486:                                   0)] :
  7487:                               VideoController.vcnPal32G8[p] :
  7488:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  7489:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7490:                               VideoController.vcnPalTbl[
  7491:                                 VideoController.vcnMix2 (
  7492:                                   VideoController.vcnMix2 (
  7493:                                     q,
  7494:                                     VideoController.vcnPal16G8[1]),
  7495:                                   0)] :
  7496:                               (p & 1) != 0 ?
  7497:                               VideoController.vcnPal32G8[1] :
  7498:                               VideoController.vcnPal32G8[p] :
  7499:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]) & -2]) & 1) != 0 ?
  7500:                               VideoController.vcnPalTbl[
  7501:                                 VideoController.vcnMix2 (
  7502:                                   VideoController.vcnMix2 (
  7503:                                     p,
  7504:                                     VideoController.vcnPal16G8[1]),
  7505:                                   0)] :
  7506:                               (q & 1) != 0 ?
  7507:                               VideoController.vcnPal32G8[1] :
  7508:                               VideoController.vcnPal32G8[q]);
  7509:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  7510:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7511:                               VideoController.vcnPalTbl[
  7512:                                 VideoController.vcnMix2 (
  7513:                                   VideoController.vcnMix2 (
  7514:                                     q,
  7515:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  7516:                                   0)] :
  7517:                               (p & 1) != 0 ?
  7518:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  7519:                               VideoController.vcnPal32G8[p] :
  7520:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  7521:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7522:                               VideoController.vcnPalTbl[
  7523:                                 VideoController.vcnMix2 (
  7524:                                   VideoController.vcnMix2 (
  7525:                                     q,
  7526:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  7527:                                   0)] :
  7528:                               VideoController.vcnPal32G8[p] :
  7529:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  7530:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7531:                               VideoController.vcnPalTbl[
  7532:                                 VideoController.vcnMix2 (
  7533:                                   VideoController.vcnMix2 (
  7534:                                     q,
  7535:                                     VideoController.vcnPal16G8[1]),
  7536:                                   0)] :
  7537:                               (p & 1) != 0 ?
  7538:                               VideoController.vcnPal32G8[1] :
  7539:                               VideoController.vcnPal32G8[p] :
  7540:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]) & -2]) & 1) != 0 ?
  7541:                               VideoController.vcnPalTbl[
  7542:                                 VideoController.vcnMix2 (
  7543:                                   VideoController.vcnMix2 (
  7544:                                     p,
  7545:                                     VideoController.vcnPal16G8[1]),
  7546:                                   0)] :
  7547:                               (q & 1) != 0 ?
  7548:                               VideoController.vcnPal32G8[1] :
  7549:                               VideoController.vcnPal32G8[q]);
  7550:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  7551:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7552:                               VideoController.vcnPalTbl[
  7553:                                 VideoController.vcnMix2 (
  7554:                                   VideoController.vcnMix2 (
  7555:                                     q,
  7556:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  7557:                                   0)] :
  7558:                               (p & 1) != 0 ?
  7559:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  7560:                               VideoController.vcnPal32G8[p] :
  7561:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  7562:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7563:                               VideoController.vcnPalTbl[
  7564:                                 VideoController.vcnMix2 (
  7565:                                   VideoController.vcnMix2 (
  7566:                                     q,
  7567:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  7568:                                   0)] :
  7569:                               VideoController.vcnPal32G8[p] :
  7570:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  7571:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7572:                               VideoController.vcnPalTbl[
  7573:                                 VideoController.vcnMix2 (
  7574:                                   VideoController.vcnMix2 (
  7575:                                     q,
  7576:                                     VideoController.vcnPal16G8[1]),
  7577:                                   0)] :
  7578:                               (p & 1) != 0 ?
  7579:                               VideoController.vcnPal32G8[1] :
  7580:                               VideoController.vcnPal32G8[p] :
  7581:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]) & -2]) & 1) != 0 ?
  7582:                               VideoController.vcnPalTbl[
  7583:                                 VideoController.vcnMix2 (
  7584:                                   VideoController.vcnMix2 (
  7585:                                     p,
  7586:                                     VideoController.vcnPal16G8[1]),
  7587:                                   0)] :
  7588:                               (q & 1) != 0 ?
  7589:                               VideoController.vcnPal32G8[1] :
  7590:                               VideoController.vcnPal32G8[q]);
  7591:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  7592:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7593:                               VideoController.vcnPalTbl[
  7594:                                 VideoController.vcnMix2 (
  7595:                                   VideoController.vcnMix2 (
  7596:                                     q,
  7597:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  7598:                                   0)] :
  7599:                               (p & 1) != 0 ?
  7600:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  7601:                               VideoController.vcnPal32G8[p] :
  7602:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  7603:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7604:                               VideoController.vcnPalTbl[
  7605:                                 VideoController.vcnMix2 (
  7606:                                   VideoController.vcnMix2 (
  7607:                                     q,
  7608:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  7609:                                   0)] :
  7610:                               VideoController.vcnPal32G8[p] :
  7611:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  7612:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7613:                               VideoController.vcnPalTbl[
  7614:                                 VideoController.vcnMix2 (
  7615:                                   VideoController.vcnMix2 (
  7616:                                     q,
  7617:                                     VideoController.vcnPal16G8[1]),
  7618:                                   0)] :
  7619:                               (p & 1) != 0 ?
  7620:                               VideoController.vcnPal32G8[1] :
  7621:                               VideoController.vcnPal32G8[p] :
  7622:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]) & -2]) & 1) != 0 ?
  7623:                               VideoController.vcnPalTbl[
  7624:                                 VideoController.vcnMix2 (
  7625:                                   VideoController.vcnMix2 (
  7626:                                     p,
  7627:                                     VideoController.vcnPal16G8[1]),
  7628:                                   0)] :
  7629:                               (q & 1) != 0 ?
  7630:                               VideoController.vcnPal32G8[1] :
  7631:                               VideoController.vcnPal32G8[q]);
  7632:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  7633:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7634:                               VideoController.vcnPalTbl[
  7635:                                 VideoController.vcnMix2 (
  7636:                                   VideoController.vcnMix2 (
  7637:                                     q,
  7638:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  7639:                                   0)] :
  7640:                               (p & 1) != 0 ?
  7641:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  7642:                               VideoController.vcnPal32G8[p] :
  7643:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  7644:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7645:                               VideoController.vcnPalTbl[
  7646:                                 VideoController.vcnMix2 (
  7647:                                   VideoController.vcnMix2 (
  7648:                                     q,
  7649:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  7650:                                   0)] :
  7651:                               VideoController.vcnPal32G8[p] :
  7652:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  7653:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7654:                               VideoController.vcnPalTbl[
  7655:                                 VideoController.vcnMix2 (
  7656:                                   VideoController.vcnMix2 (
  7657:                                     q,
  7658:                                     VideoController.vcnPal16G8[1]),
  7659:                                   0)] :
  7660:                               (p & 1) != 0 ?
  7661:                               VideoController.vcnPal32G8[1] :
  7662:                               VideoController.vcnPal32G8[p] :
  7663:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]) & -2]) & 1) != 0 ?
  7664:                               VideoController.vcnPalTbl[
  7665:                                 VideoController.vcnMix2 (
  7666:                                   VideoController.vcnMix2 (
  7667:                                     p,
  7668:                                     VideoController.vcnPal16G8[1]),
  7669:                                   0)] :
  7670:                               (q & 1) != 0 ?
  7671:                               VideoController.vcnPal32G8[1] :
  7672:                               VideoController.vcnPal32G8[q]);
  7673:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  7674:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7675:                               VideoController.vcnPalTbl[
  7676:                                 VideoController.vcnMix2 (
  7677:                                   VideoController.vcnMix2 (
  7678:                                     q,
  7679:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  7680:                                   0)] :
  7681:                               (p & 1) != 0 ?
  7682:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  7683:                               VideoController.vcnPal32G8[p] :
  7684:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  7685:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7686:                               VideoController.vcnPalTbl[
  7687:                                 VideoController.vcnMix2 (
  7688:                                   VideoController.vcnMix2 (
  7689:                                     q,
  7690:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  7691:                                   0)] :
  7692:                               VideoController.vcnPal32G8[p] :
  7693:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  7694:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7695:                               VideoController.vcnPalTbl[
  7696:                                 VideoController.vcnMix2 (
  7697:                                   VideoController.vcnMix2 (
  7698:                                     q,
  7699:                                     VideoController.vcnPal16G8[1]),
  7700:                                   0)] :
  7701:                               (p & 1) != 0 ?
  7702:                               VideoController.vcnPal32G8[1] :
  7703:                               VideoController.vcnPal32G8[p] :
  7704:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]) & -2]) & 1) != 0 ?
  7705:                               VideoController.vcnPalTbl[
  7706:                                 VideoController.vcnMix2 (
  7707:                                   VideoController.vcnMix2 (
  7708:                                     p,
  7709:                                     VideoController.vcnPal16G8[1]),
  7710:                                   0)] :
  7711:                               (q & 1) != 0 ?
  7712:                               VideoController.vcnPal32G8[1] :
  7713:                               VideoController.vcnPal32G8[q]);
  7714:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  7715:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7716:                               VideoController.vcnPalTbl[
  7717:                                 VideoController.vcnMix2 (
  7718:                                   VideoController.vcnMix2 (
  7719:                                     q,
  7720:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  7721:                                   0)] :
  7722:                               (p & 1) != 0 ?
  7723:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  7724:                               VideoController.vcnPal32G8[p] :
  7725:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  7726:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7727:                               VideoController.vcnPalTbl[
  7728:                                 VideoController.vcnMix2 (
  7729:                                   VideoController.vcnMix2 (
  7730:                                     q,
  7731:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  7732:                                   0)] :
  7733:                               VideoController.vcnPal32G8[p] :
  7734:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  7735:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7736:                               VideoController.vcnPalTbl[
  7737:                                 VideoController.vcnMix2 (
  7738:                                   VideoController.vcnMix2 (
  7739:                                     q,
  7740:                                     VideoController.vcnPal16G8[1]),
  7741:                                   0)] :
  7742:                               (p & 1) != 0 ?
  7743:                               VideoController.vcnPal32G8[1] :
  7744:                               VideoController.vcnPal32G8[p] :
  7745:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]) & -2]) & 1) != 0 ?
  7746:                               VideoController.vcnPalTbl[
  7747:                                 VideoController.vcnMix2 (
  7748:                                   VideoController.vcnMix2 (
  7749:                                     p,
  7750:                                     VideoController.vcnPal16G8[1]),
  7751:                                   0)] :
  7752:                               (q & 1) != 0 ?
  7753:                               VideoController.vcnPal32G8[1] :
  7754:                               VideoController.vcnPal32G8[q]);
  7755:         gx1st += 16;
  7756:         gx2nd += 16;
  7757:         gx3rd += 16;
  7758:         gx4th += 16;
  7759:         da += 8;
  7760:       }  //while da<db
  7761:     }  //drawRaster
  7762:   },  //E4_XHCGT
  7763: 
  7764:   //================================================================================
  7765:   //E4_XHPT ($0000,$06xx,$1D0F)
  7766:   //  概要
  7767:   //    E4  512ドット16色4プレーン
  7768:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  7769:   //  手順
  7770:   //    1番目のパレットが0のとき
  7771:   //      2番目のパレットを偶数化したパレットが0でないとき
  7772:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  7773:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  7774:   //        3番目のパレットを偶数化したパレットが0でないとき
  7775:   //          3番目のパレットを偶数化したパレットのカラー(0は黒)
  7776:   //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
  7777:   //          4番目のパレットを偶数化したパレットのカラー(0は黒)
  7778:   //    1番目のパレットが1のとき
  7779:   //      グラフィックパレット0のカラー(0は黒)
  7780:   //    1番目のパレットが2以上の偶数のとき
  7781:   //      1番目のカラー(0は黒)
  7782:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  7783:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  7784:   //  中間コード1
  7785:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):((tev(e3p()))!=0?epc(tev(e3p())):epc(tev(e4p())))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0))
  7786:   //  中間コード2
  7787:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):tev(e3p())!=0?epc(tev(e3p())):epc(tev(e4p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0)
  7788:   //  中間コード3
  7789:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):(v4=tev(e3p()))!=0?epc(v4):epc(tev(e4p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),0)
  7790:   //  中間コード4
  7791:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):(p=tev(e3p()))!=0?epc(p):epc(tev(e4p())):p==1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),0)
  7792:   //  中間コード5
  7793:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):(p=e3p()&-2)!=0?epc(p):epc(e4p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),0)
  7794:   //  中間コード6
  7795:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):(p=e3p()&-2)!=0?epo(p):epo(e4p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),0))
  7796:   E4_XHPT {
  7797:     @Override public void drawRaster (int src, int dst, boolean rh) {
  7798:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  7799:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  7800:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7801:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  7802:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  7803:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7804:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  7805:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  7806:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7807:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  7808:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  7809:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7810:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  7811:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  7812:       if (rh) {
  7813:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  7814:         gx1st += half << 1;
  7815:         gx2nd += half << 1;
  7816:         gx3rd += half << 1;
  7817:         gx4th += half << 1;
  7818:         da += half;
  7819:       }
  7820:       while (da < db) {
  7821:         int p;
  7822:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  7823:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  7824:                           VideoController.vcnPal32G8[p] :
  7825:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2) != 0 ?
  7826:                           VideoController.vcnPal32G8[p] :
  7827:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023] & -2] :
  7828:                           p == 1 ?
  7829:                           VideoController.vcnPal32G8[0] :
  7830:                           (p & 1) == 0 ?
  7831:                           VideoController.vcnPal32G8[p] :
  7832:                           VideoController.vcnPalTbl[
  7833:                             VideoController.vcnMix2 (
  7834:                               VideoController.vcnPal16G8[p & -2],
  7835:                               0)]);
  7836:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  7837:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  7838:                               VideoController.vcnPal32G8[p] :
  7839:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2) != 0 ?
  7840:                               VideoController.vcnPal32G8[p] :
  7841:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] & -2] :
  7842:                               p == 1 ?
  7843:                               VideoController.vcnPal32G8[0] :
  7844:                               (p & 1) == 0 ?
  7845:                               VideoController.vcnPal32G8[p] :
  7846:                               VideoController.vcnPalTbl[
  7847:                                 VideoController.vcnMix2 (
  7848:                                   VideoController.vcnPal16G8[p & -2],
  7849:                                   0)]);
  7850:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  7851:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  7852:                               VideoController.vcnPal32G8[p] :
  7853:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2) != 0 ?
  7854:                               VideoController.vcnPal32G8[p] :
  7855:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] & -2] :
  7856:                               p == 1 ?
  7857:                               VideoController.vcnPal32G8[0] :
  7858:                               (p & 1) == 0 ?
  7859:                               VideoController.vcnPal32G8[p] :
  7860:                               VideoController.vcnPalTbl[
  7861:                                 VideoController.vcnMix2 (
  7862:                                   VideoController.vcnPal16G8[p & -2],
  7863:                                   0)]);
  7864:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  7865:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  7866:                               VideoController.vcnPal32G8[p] :
  7867:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2) != 0 ?
  7868:                               VideoController.vcnPal32G8[p] :
  7869:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] & -2] :
  7870:                               p == 1 ?
  7871:                               VideoController.vcnPal32G8[0] :
  7872:                               (p & 1) == 0 ?
  7873:                               VideoController.vcnPal32G8[p] :
  7874:                               VideoController.vcnPalTbl[
  7875:                                 VideoController.vcnMix2 (
  7876:                                   VideoController.vcnPal16G8[p & -2],
  7877:                                   0)]);
  7878:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  7879:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  7880:                               VideoController.vcnPal32G8[p] :
  7881:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2) != 0 ?
  7882:                               VideoController.vcnPal32G8[p] :
  7883:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] & -2] :
  7884:                               p == 1 ?
  7885:                               VideoController.vcnPal32G8[0] :
  7886:                               (p & 1) == 0 ?
  7887:                               VideoController.vcnPal32G8[p] :
  7888:                               VideoController.vcnPalTbl[
  7889:                                 VideoController.vcnMix2 (
  7890:                                   VideoController.vcnPal16G8[p & -2],
  7891:                                   0)]);
  7892:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  7893:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  7894:                               VideoController.vcnPal32G8[p] :
  7895:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2) != 0 ?
  7896:                               VideoController.vcnPal32G8[p] :
  7897:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] & -2] :
  7898:                               p == 1 ?
  7899:                               VideoController.vcnPal32G8[0] :
  7900:                               (p & 1) == 0 ?
  7901:                               VideoController.vcnPal32G8[p] :
  7902:                               VideoController.vcnPalTbl[
  7903:                                 VideoController.vcnMix2 (
  7904:                                   VideoController.vcnPal16G8[p & -2],
  7905:                                   0)]);
  7906:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  7907:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  7908:                               VideoController.vcnPal32G8[p] :
  7909:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2) != 0 ?
  7910:                               VideoController.vcnPal32G8[p] :
  7911:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] & -2] :
  7912:                               p == 1 ?
  7913:                               VideoController.vcnPal32G8[0] :
  7914:                               (p & 1) == 0 ?
  7915:                               VideoController.vcnPal32G8[p] :
  7916:                               VideoController.vcnPalTbl[
  7917:                                 VideoController.vcnMix2 (
  7918:                                   VideoController.vcnPal16G8[p & -2],
  7919:                                   0)]);
  7920:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  7921:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  7922:                               VideoController.vcnPal32G8[p] :
  7923:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2) != 0 ?
  7924:                               VideoController.vcnPal32G8[p] :
  7925:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] & -2] :
  7926:                               p == 1 ?
  7927:                               VideoController.vcnPal32G8[0] :
  7928:                               (p & 1) == 0 ?
  7929:                               VideoController.vcnPal32G8[p] :
  7930:                               VideoController.vcnPalTbl[
  7931:                                 VideoController.vcnMix2 (
  7932:                                   VideoController.vcnPal16G8[p & -2],
  7933:                                   0)]);
  7934:         gx1st += 16;
  7935:         gx2nd += 16;
  7936:         gx3rd += 16;
  7937:         gx4th += 16;
  7938:         da += 8;
  7939:       }  //while da<db
  7940:     }  //drawRaster
  7941:   },  //E4_XHPT
  7942: 
  7943:   //================================================================================
  7944:   //E4_XHPG ($0000,$06xx,$1E0F)
  7945:   //  概要
  7946:   //    E4  512ドット16色4プレーン
  7947:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  7948:   //  手順
  7949:   //    1番目のパレットが0のとき
  7950:   //      2番目のパレットを偶数化したパレットが0でないとき
  7951:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  7952:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  7953:   //        3番目のパレットを偶数化したパレットが0でないとき
  7954:   //          3番目のパレットを偶数化したパレットのカラー(0は黒)
  7955:   //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
  7956:   //          4番目のパレットを偶数化したパレットのカラー(0は黒)
  7957:   //    1番目のパレットが1のとき
  7958:   //      グラフィックパレット0のカラー(0は黒)
  7959:   //    1番目のパレットが2以上の偶数のとき
  7960:   //      1番目のカラー(0は黒)
  7961:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  7962:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  7963:   //  中間コード1
  7964:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):((tev(e3p()))!=0?epc(tev(e3p())):epc(tev(e4p())))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2q()))))
  7965:   //  中間コード2
  7966:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):tev(e3p())!=0?epc(tev(e3p())):epc(tev(e4p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2q())))
  7967:   //  中間コード3
  7968:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):(v4=tev(e3p()))!=0?epc(v4):epc(tev(e4p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),epc(tod(e2q())))
  7969:   //  中間コード4
  7970:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):(p=tev(e3p()))!=0?epc(p):epc(tev(e4p())):p==1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),epc(tod(e2q())))
  7971:   //  中間コード5
  7972:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):(p=e3p()&-2)!=0?epc(p):epc(e4p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),epc(e2q()|1))
  7973:   //  中間コード6
  7974:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):(p=e3p()&-2)!=0?epo(p):epo(e4p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),epc(e2q()|1)))
  7975:   E4_XHPG {
  7976:     @Override public void drawRaster (int src, int dst, boolean rh) {
  7977:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  7978:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  7979:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7980:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  7981:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  7982:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7983:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  7984:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  7985:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  7986:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7987:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  7988:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  7989:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  7990:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  7991:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  7992:       if (rh) {
  7993:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  7994:         gx1st += half << 1;
  7995:         gx2nd += half << 1;
  7996:         gx3rd += half << 1;
  7997:         gx4th += half << 1;
  7998:         da += half;
  7999:       }
  8000:       while (da < db) {
  8001:         int p;
  8002:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  8003:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  8004:                           VideoController.vcnPal32G8[p] :
  8005:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2) != 0 ?
  8006:                           VideoController.vcnPal32G8[p] :
  8007:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023] & -2] :
  8008:                           p == 1 ?
  8009:                           VideoController.vcnPal32G8[0] :
  8010:                           (p & 1) == 0 ?
  8011:                           VideoController.vcnPal32G8[p] :
  8012:                           VideoController.vcnPalTbl[
  8013:                             VideoController.vcnMix2 (
  8014:                               VideoController.vcnPal16G8[p & -2],
  8015:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])]);
  8016:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  8017:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  8018:                               VideoController.vcnPal32G8[p] :
  8019:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2) != 0 ?
  8020:                               VideoController.vcnPal32G8[p] :
  8021:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] & -2] :
  8022:                               p == 1 ?
  8023:                               VideoController.vcnPal32G8[0] :
  8024:                               (p & 1) == 0 ?
  8025:                               VideoController.vcnPal32G8[p] :
  8026:                               VideoController.vcnPalTbl[
  8027:                                 VideoController.vcnMix2 (
  8028:                                   VideoController.vcnPal16G8[p & -2],
  8029:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])]);
  8030:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  8031:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  8032:                               VideoController.vcnPal32G8[p] :
  8033:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2) != 0 ?
  8034:                               VideoController.vcnPal32G8[p] :
  8035:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] & -2] :
  8036:                               p == 1 ?
  8037:                               VideoController.vcnPal32G8[0] :
  8038:                               (p & 1) == 0 ?
  8039:                               VideoController.vcnPal32G8[p] :
  8040:                               VideoController.vcnPalTbl[
  8041:                                 VideoController.vcnMix2 (
  8042:                                   VideoController.vcnPal16G8[p & -2],
  8043:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])]);
  8044:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  8045:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  8046:                               VideoController.vcnPal32G8[p] :
  8047:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2) != 0 ?
  8048:                               VideoController.vcnPal32G8[p] :
  8049:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] & -2] :
  8050:                               p == 1 ?
  8051:                               VideoController.vcnPal32G8[0] :
  8052:                               (p & 1) == 0 ?
  8053:                               VideoController.vcnPal32G8[p] :
  8054:                               VideoController.vcnPalTbl[
  8055:                                 VideoController.vcnMix2 (
  8056:                                   VideoController.vcnPal16G8[p & -2],
  8057:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])]);
  8058:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  8059:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  8060:                               VideoController.vcnPal32G8[p] :
  8061:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2) != 0 ?
  8062:                               VideoController.vcnPal32G8[p] :
  8063:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] & -2] :
  8064:                               p == 1 ?
  8065:                               VideoController.vcnPal32G8[0] :
  8066:                               (p & 1) == 0 ?
  8067:                               VideoController.vcnPal32G8[p] :
  8068:                               VideoController.vcnPalTbl[
  8069:                                 VideoController.vcnMix2 (
  8070:                                   VideoController.vcnPal16G8[p & -2],
  8071:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])]);
  8072:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  8073:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  8074:                               VideoController.vcnPal32G8[p] :
  8075:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2) != 0 ?
  8076:                               VideoController.vcnPal32G8[p] :
  8077:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] & -2] :
  8078:                               p == 1 ?
  8079:                               VideoController.vcnPal32G8[0] :
  8080:                               (p & 1) == 0 ?
  8081:                               VideoController.vcnPal32G8[p] :
  8082:                               VideoController.vcnPalTbl[
  8083:                                 VideoController.vcnMix2 (
  8084:                                   VideoController.vcnPal16G8[p & -2],
  8085:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])]);
  8086:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  8087:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  8088:                               VideoController.vcnPal32G8[p] :
  8089:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2) != 0 ?
  8090:                               VideoController.vcnPal32G8[p] :
  8091:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] & -2] :
  8092:                               p == 1 ?
  8093:                               VideoController.vcnPal32G8[0] :
  8094:                               (p & 1) == 0 ?
  8095:                               VideoController.vcnPal32G8[p] :
  8096:                               VideoController.vcnPalTbl[
  8097:                                 VideoController.vcnMix2 (
  8098:                                   VideoController.vcnPal16G8[p & -2],
  8099:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])]);
  8100:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  8101:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  8102:                               VideoController.vcnPal32G8[p] :
  8103:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2) != 0 ?
  8104:                               VideoController.vcnPal32G8[p] :
  8105:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] & -2] :
  8106:                               p == 1 ?
  8107:                               VideoController.vcnPal32G8[0] :
  8108:                               (p & 1) == 0 ?
  8109:                               VideoController.vcnPal32G8[p] :
  8110:                               VideoController.vcnPalTbl[
  8111:                                 VideoController.vcnMix2 (
  8112:                                   VideoController.vcnPal16G8[p & -2],
  8113:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])]);
  8114:         gx1st += 16;
  8115:         gx2nd += 16;
  8116:         gx3rd += 16;
  8117:         gx4th += 16;
  8118:         da += 8;
  8119:       }  //while da<db
  8120:     }  //drawRaster
  8121:   },  //E4_XHPG
  8122: 
  8123:   //================================================================================
  8124:   //E4_XHPGT ($0000,$06xx,$1F0F)
  8125:   //  概要
  8126:   //    E4  512ドット16色4プレーン
  8127:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  8128:   //  手順
  8129:   //    1番目のパレットが0のとき
  8130:   //      2番目のパレットを偶数化したパレットが0でないとき
  8131:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  8132:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  8133:   //        3番目のパレットを偶数化したパレットが0でないとき
  8134:   //          3番目のパレットを偶数化したパレットのカラー(0は黒)
  8135:   //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
  8136:   //          4番目のパレットを偶数化したパレットのカラー(0は黒)
  8137:   //    1番目のパレットが1のとき
  8138:   //      グラフィックパレット0のカラー(0は黒)
  8139:   //    1番目のパレットが2以上の偶数のとき
  8140:   //      1番目のカラー(0は黒)
  8141:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  8142:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  8143:   //  中間コード1
  8144:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):((tev(e3p()))!=0?epc(tev(e3p())):epc(tev(e4p())))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0))
  8145:   //  中間コード2
  8146:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):tev(e3p())!=0?epc(tev(e3p())):epc(tev(e4p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0)
  8147:   //  中間コード3
  8148:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):(v4=tev(e3p()))!=0?epc(v4):epc(tev(e4p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(mix(epc(tev(v0)),epc(tod(e2q()))),0)
  8149:   //  中間コード4
  8150:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):(p=tev(e3p()))!=0?epc(p):epc(tev(e4p())):p==1?epc(0):ls1(p)==0?epc(p):mix(mix(epc(tev(p)),epc(tod(e2q()))),0)
  8151:   //  中間コード5
  8152:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):(p=e3p()&-2)!=0?epc(p):epc(e4p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(mix(epc(p&-2),epc(e2q()|1)),0)
  8153:   //  中間コード6
  8154:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):(p=e3p()&-2)!=0?epo(p):epo(e4p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(mix(epc(p&-2),epc(e2q()|1)),0))
  8155:   E4_XHPGT {
  8156:     @Override public void drawRaster (int src, int dst, boolean rh) {
  8157:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  8158:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8159:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8160:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  8161:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8162:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8163:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);  //ONとみなす
  8164:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  8165:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  8166:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8167:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  8168:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  8169:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8170:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8171:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8172:       if (rh) {
  8173:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8174:         gx1st += half << 1;
  8175:         gx2nd += half << 1;
  8176:         gx3rd += half << 1;
  8177:         gx4th += half << 1;
  8178:         da += half;
  8179:       }
  8180:       while (da < db) {
  8181:         int p;
  8182:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  8183:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  8184:                           VideoController.vcnPal32G8[p] :
  8185:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2) != 0 ?
  8186:                           VideoController.vcnPal32G8[p] :
  8187:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023] & -2] :
  8188:                           p == 1 ?
  8189:                           VideoController.vcnPal32G8[0] :
  8190:                           (p & 1) == 0 ?
  8191:                           VideoController.vcnPal32G8[p] :
  8192:                           VideoController.vcnPalTbl[
  8193:                             VideoController.vcnMix2 (
  8194:                               VideoController.vcnMix2 (
  8195:                                 VideoController.vcnPal16G8[p & -2],
  8196:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  8197:                               0)]);
  8198:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  8199:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  8200:                               VideoController.vcnPal32G8[p] :
  8201:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2) != 0 ?
  8202:                               VideoController.vcnPal32G8[p] :
  8203:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] & -2] :
  8204:                               p == 1 ?
  8205:                               VideoController.vcnPal32G8[0] :
  8206:                               (p & 1) == 0 ?
  8207:                               VideoController.vcnPal32G8[p] :
  8208:                               VideoController.vcnPalTbl[
  8209:                                 VideoController.vcnMix2 (
  8210:                                   VideoController.vcnMix2 (
  8211:                                     VideoController.vcnPal16G8[p & -2],
  8212:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  8213:                                   0)]);
  8214:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  8215:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  8216:                               VideoController.vcnPal32G8[p] :
  8217:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2) != 0 ?
  8218:                               VideoController.vcnPal32G8[p] :
  8219:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] & -2] :
  8220:                               p == 1 ?
  8221:                               VideoController.vcnPal32G8[0] :
  8222:                               (p & 1) == 0 ?
  8223:                               VideoController.vcnPal32G8[p] :
  8224:                               VideoController.vcnPalTbl[
  8225:                                 VideoController.vcnMix2 (
  8226:                                   VideoController.vcnMix2 (
  8227:                                     VideoController.vcnPal16G8[p & -2],
  8228:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  8229:                                   0)]);
  8230:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  8231:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  8232:                               VideoController.vcnPal32G8[p] :
  8233:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2) != 0 ?
  8234:                               VideoController.vcnPal32G8[p] :
  8235:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] & -2] :
  8236:                               p == 1 ?
  8237:                               VideoController.vcnPal32G8[0] :
  8238:                               (p & 1) == 0 ?
  8239:                               VideoController.vcnPal32G8[p] :
  8240:                               VideoController.vcnPalTbl[
  8241:                                 VideoController.vcnMix2 (
  8242:                                   VideoController.vcnMix2 (
  8243:                                     VideoController.vcnPal16G8[p & -2],
  8244:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  8245:                                   0)]);
  8246:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  8247:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  8248:                               VideoController.vcnPal32G8[p] :
  8249:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2) != 0 ?
  8250:                               VideoController.vcnPal32G8[p] :
  8251:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] & -2] :
  8252:                               p == 1 ?
  8253:                               VideoController.vcnPal32G8[0] :
  8254:                               (p & 1) == 0 ?
  8255:                               VideoController.vcnPal32G8[p] :
  8256:                               VideoController.vcnPalTbl[
  8257:                                 VideoController.vcnMix2 (
  8258:                                   VideoController.vcnMix2 (
  8259:                                     VideoController.vcnPal16G8[p & -2],
  8260:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  8261:                                   0)]);
  8262:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  8263:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  8264:                               VideoController.vcnPal32G8[p] :
  8265:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2) != 0 ?
  8266:                               VideoController.vcnPal32G8[p] :
  8267:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] & -2] :
  8268:                               p == 1 ?
  8269:                               VideoController.vcnPal32G8[0] :
  8270:                               (p & 1) == 0 ?
  8271:                               VideoController.vcnPal32G8[p] :
  8272:                               VideoController.vcnPalTbl[
  8273:                                 VideoController.vcnMix2 (
  8274:                                   VideoController.vcnMix2 (
  8275:                                     VideoController.vcnPal16G8[p & -2],
  8276:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  8277:                                   0)]);
  8278:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  8279:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  8280:                               VideoController.vcnPal32G8[p] :
  8281:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2) != 0 ?
  8282:                               VideoController.vcnPal32G8[p] :
  8283:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] & -2] :
  8284:                               p == 1 ?
  8285:                               VideoController.vcnPal32G8[0] :
  8286:                               (p & 1) == 0 ?
  8287:                               VideoController.vcnPal32G8[p] :
  8288:                               VideoController.vcnPalTbl[
  8289:                                 VideoController.vcnMix2 (
  8290:                                   VideoController.vcnMix2 (
  8291:                                     VideoController.vcnPal16G8[p & -2],
  8292:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  8293:                                   0)]);
  8294:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  8295:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  8296:                               VideoController.vcnPal32G8[p] :
  8297:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2) != 0 ?
  8298:                               VideoController.vcnPal32G8[p] :
  8299:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] & -2] :
  8300:                               p == 1 ?
  8301:                               VideoController.vcnPal32G8[0] :
  8302:                               (p & 1) == 0 ?
  8303:                               VideoController.vcnPal32G8[p] :
  8304:                               VideoController.vcnPalTbl[
  8305:                                 VideoController.vcnMix2 (
  8306:                                   VideoController.vcnMix2 (
  8307:                                     VideoController.vcnPal16G8[p & -2],
  8308:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  8309:                                   0)]);
  8310:         gx1st += 16;
  8311:         gx2nd += 16;
  8312:         gx3rd += 16;
  8313:         gx4th += 16;
  8314:         da += 8;
  8315:       }  //while da<db
  8316:     }  //drawRaster
  8317:   },  //E4_XHPGT
  8318: 
  8319:   //================================================================================
  8320:   //E4_A ($0000,$06xx,$400F)
  8321:   //  概要
  8322:   //    E4  512ドット16色4プレーン
  8323:   //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
  8324:   //  手順
  8325:   //    1番目のパレットが0でないとき
  8326:   //      1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  8327:   //    さもなくば(1番目のパレットが0のとき)
  8328:   //      2番目のパレットが0でないとき
  8329:   //        2番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  8330:   //      さもなくば(2番目のパレットが0のとき)
  8331:   //        3番目のパレットが0でないとき
  8332:   //          3番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  8333:   //        さもなくば(3番目のパレットが0のとき)
  8334:   //          4番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  8335:   //  中間コード1
  8336:   //    (e1p()!=0?mix(epc(e1p()),tpc(0)):(e2p()!=0?mix(epc(e2p()),tpc(0)):(e3p()!=0?mix(epc(e3p()),tpc(0)):mix(epc(e4p()),tpc(0)))))
  8337:   //  中間コード2
  8338:   //    e1p()!=0?mix(epc(e1p()),tpc(0)):e2p()!=0?mix(epc(e2p()),tpc(0)):e3p()!=0?mix(epc(e3p()),tpc(0)):mix(epc(e4p()),tpc(0))
  8339:   //  中間コード3
  8340:   //    (v0=e1p())!=0?mix(epc(v0),tpc(0)):(v4=e2p())!=0?mix(epc(v4),tpc(0)):(v8=e3p())!=0?mix(epc(v8),tpc(0)):mix(epc(e4p()),tpc(0))
  8341:   //  中間コード4
  8342:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):(p=e3p())!=0?mix(epc(p),tpc(0)):mix(epc(e4p()),tpc(0))
  8343:   //  中間コード5
  8344:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):(p=e3p())!=0?mix(epc(p),tpc(0)):mix(epc(e4p()),tpc(0))
  8345:   //  中間コード6
  8346:   //    cto((p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):(p=e3p())!=0?mix(epc(p),tpc(0)):mix(epc(e4p()),tpc(0)))
  8347:   E4_A {
  8348:     @Override public void drawRaster (int src, int dst, boolean rh) {
  8349:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  8350:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8351:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8352:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  8353:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8354:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8355:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  8356:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  8357:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8358:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  8359:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  8360:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8361:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8362:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8363:       if (rh) {
  8364:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8365:         gx1st += half << 1;
  8366:         gx2nd += half << 1;
  8367:         gx3rd += half << 1;
  8368:         gx4th += half << 1;
  8369:         da += half;
  8370:       }
  8371:       while (da < db) {
  8372:         int p;
  8373:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  8374:                             (p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  8375:                             VideoController.vcnMix2 (
  8376:                               VideoController.vcnPal16G8[p],
  8377:                               VideoController.vcnPal16TS[0]) :
  8378:                             (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  8379:                             VideoController.vcnMix2 (
  8380:                               VideoController.vcnPal16G8[p],
  8381:                               VideoController.vcnPal16TS[0]) :
  8382:                             (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  8383:                             VideoController.vcnMix2 (
  8384:                               VideoController.vcnPal16G8[p],
  8385:                               VideoController.vcnPal16TS[0]) :
  8386:                             VideoController.vcnMix2 (
  8387:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th & 1023]],
  8388:                               VideoController.vcnPal16TS[0])]);
  8389:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  8390:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  8391:                                 VideoController.vcnMix2 (
  8392:                                   VideoController.vcnPal16G8[p],
  8393:                                   VideoController.vcnPal16TS[0]) :
  8394:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  8395:                                 VideoController.vcnMix2 (
  8396:                                   VideoController.vcnPal16G8[p],
  8397:                                   VideoController.vcnPal16TS[0]) :
  8398:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  8399:                                 VideoController.vcnMix2 (
  8400:                                   VideoController.vcnPal16G8[p],
  8401:                                   VideoController.vcnPal16TS[0]) :
  8402:                                 VideoController.vcnMix2 (
  8403:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]],
  8404:                                   VideoController.vcnPal16TS[0])]);
  8405:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  8406:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  8407:                                 VideoController.vcnMix2 (
  8408:                                   VideoController.vcnPal16G8[p],
  8409:                                   VideoController.vcnPal16TS[0]) :
  8410:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  8411:                                 VideoController.vcnMix2 (
  8412:                                   VideoController.vcnPal16G8[p],
  8413:                                   VideoController.vcnPal16TS[0]) :
  8414:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  8415:                                 VideoController.vcnMix2 (
  8416:                                   VideoController.vcnPal16G8[p],
  8417:                                   VideoController.vcnPal16TS[0]) :
  8418:                                 VideoController.vcnMix2 (
  8419:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]],
  8420:                                   VideoController.vcnPal16TS[0])]);
  8421:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  8422:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  8423:                                 VideoController.vcnMix2 (
  8424:                                   VideoController.vcnPal16G8[p],
  8425:                                   VideoController.vcnPal16TS[0]) :
  8426:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  8427:                                 VideoController.vcnMix2 (
  8428:                                   VideoController.vcnPal16G8[p],
  8429:                                   VideoController.vcnPal16TS[0]) :
  8430:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  8431:                                 VideoController.vcnMix2 (
  8432:                                   VideoController.vcnPal16G8[p],
  8433:                                   VideoController.vcnPal16TS[0]) :
  8434:                                 VideoController.vcnMix2 (
  8435:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]],
  8436:                                   VideoController.vcnPal16TS[0])]);
  8437:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  8438:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  8439:                                 VideoController.vcnMix2 (
  8440:                                   VideoController.vcnPal16G8[p],
  8441:                                   VideoController.vcnPal16TS[0]) :
  8442:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  8443:                                 VideoController.vcnMix2 (
  8444:                                   VideoController.vcnPal16G8[p],
  8445:                                   VideoController.vcnPal16TS[0]) :
  8446:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  8447:                                 VideoController.vcnMix2 (
  8448:                                   VideoController.vcnPal16G8[p],
  8449:                                   VideoController.vcnPal16TS[0]) :
  8450:                                 VideoController.vcnMix2 (
  8451:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]],
  8452:                                   VideoController.vcnPal16TS[0])]);
  8453:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  8454:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  8455:                                 VideoController.vcnMix2 (
  8456:                                   VideoController.vcnPal16G8[p],
  8457:                                   VideoController.vcnPal16TS[0]) :
  8458:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  8459:                                 VideoController.vcnMix2 (
  8460:                                   VideoController.vcnPal16G8[p],
  8461:                                   VideoController.vcnPal16TS[0]) :
  8462:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  8463:                                 VideoController.vcnMix2 (
  8464:                                   VideoController.vcnPal16G8[p],
  8465:                                   VideoController.vcnPal16TS[0]) :
  8466:                                 VideoController.vcnMix2 (
  8467:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]],
  8468:                                   VideoController.vcnPal16TS[0])]);
  8469:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  8470:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  8471:                                 VideoController.vcnMix2 (
  8472:                                   VideoController.vcnPal16G8[p],
  8473:                                   VideoController.vcnPal16TS[0]) :
  8474:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  8475:                                 VideoController.vcnMix2 (
  8476:                                   VideoController.vcnPal16G8[p],
  8477:                                   VideoController.vcnPal16TS[0]) :
  8478:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  8479:                                 VideoController.vcnMix2 (
  8480:                                   VideoController.vcnPal16G8[p],
  8481:                                   VideoController.vcnPal16TS[0]) :
  8482:                                 VideoController.vcnMix2 (
  8483:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]],
  8484:                                   VideoController.vcnPal16TS[0])]);
  8485:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  8486:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  8487:                                 VideoController.vcnMix2 (
  8488:                                   VideoController.vcnPal16G8[p],
  8489:                                   VideoController.vcnPal16TS[0]) :
  8490:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  8491:                                 VideoController.vcnMix2 (
  8492:                                   VideoController.vcnPal16G8[p],
  8493:                                   VideoController.vcnPal16TS[0]) :
  8494:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  8495:                                 VideoController.vcnMix2 (
  8496:                                   VideoController.vcnPal16G8[p],
  8497:                                   VideoController.vcnPal16TS[0]) :
  8498:                                 VideoController.vcnMix2 (
  8499:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]],
  8500:                                   VideoController.vcnPal16TS[0])]);
  8501:         gx1st += 16;
  8502:         gx2nd += 16;
  8503:         gx3rd += 16;
  8504:         gx4th += 16;
  8505:         da += 8;
  8506:       }  //while da<db
  8507:     }  //drawRaster
  8508:   },  //E4_A
  8509: 
  8510:   //================================================================================
  8511:   //F1 ($0001,$06xx,$0003)
  8512:   //  概要
  8513:   //    F1  512ドット256色1プレーン
  8514:   //    拡張なし
  8515:   //  手順
  8516:   //    1番目のカラー(0は黒)
  8517:   //  中間コード1
  8518:   //    fpc(f1p())
  8519:   //  中間コード2
  8520:   //    fpc(f1p())
  8521:   //  中間コード3
  8522:   //    fpc(f1p())
  8523:   //  中間コード4
  8524:   //    fpc(f1p())
  8525:   //  中間コード5
  8526:   //    fpc(f1p())
  8527:   //  中間コード6
  8528:   //    fpo(f1p())
  8529:   F1 {
  8530:     @Override public void drawRaster (int src, int dst, boolean rh) {
  8531:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  8532:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8533:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8534:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  8535:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8536:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8537:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8538:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8539:       if (rh) {
  8540:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8541:         gx1st += half << 1;
  8542:         gx2nd += half << 1;
  8543:         da += half;
  8544:       }
  8545:       while (da < db) {
  8546:         XEiJ.pnlBM[da] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  8547:                                                       MainMemory.mmrM8[gy1st | gx1st & 1023])]);
  8548:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  8549:                                                           MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])]);
  8550:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  8551:                                                           MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])]);
  8552:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  8553:                                                           MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])]);
  8554:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  8555:                                                           MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])]);
  8556:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  8557:                                                           MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])]);
  8558:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  8559:                                                           MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])]);
  8560:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  8561:                                                           MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])]);
  8562:         gx1st += 16;
  8563:         gx2nd += 16;
  8564:         da += 8;
  8565:       }  //while da<db
  8566:     }  //drawRaster
  8567:   },  //F1
  8568: 
  8569:   //================================================================================
  8570:   //XF1
  8571:   //  概要
  8572:   //    F1  512ドット256色1プレーン
  8573:   //    拡張あり
  8574:   XF1 {
  8575:     @Override public void drawRaster (int src, int dst, boolean rh) {
  8576:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  8577:         //   .A.XHPGT
  8578:       case 0b00010000:  //F1_XWC
  8579:       case 0b00010001:  //F1_XWC
  8580:       case 0b00010010:  //F1_XWC
  8581:       case 0b00010011:  //F1_XWC
  8582:         F1.drawRaster (src, dst, rh);
  8583:         break;
  8584:         //   .A.XHPGT
  8585:       case 0b00010100:  //F1_XWP
  8586:       case 0b00010101:  //F1_XWP
  8587:       case 0b00010110:  //F1_XWP
  8588:       case 0b00010111:  //F1_XWP
  8589:         F1_XWP.drawRaster (src, dst, rh);
  8590:         break;
  8591:         //   .A.XHPGT
  8592:       case 0b00011000:  //F1_XHC
  8593:         F1.drawRaster (src, dst, rh);
  8594:         break;
  8595:         //   .A.XHPGT
  8596:       case 0b00011001:  //F1_XHCT
  8597:         F1_XHCT.drawRaster (src, dst, rh);
  8598:         break;
  8599:         //   .A.XHPGT
  8600:       case 0b00011010:  //F1_XHCG
  8601:         F1_XHCG.drawRaster (src, dst, rh);
  8602:         break;
  8603:         //   .A.XHPGT
  8604:       case 0b00011011:  //F1_XHCGT
  8605:         F1_XHCGT.drawRaster (src, dst, rh);
  8606:         break;
  8607:         //   .A.XHPGT
  8608:       case 0b00011101:  //F1_XHPT
  8609:         F1_XHPT.drawRaster (src, dst, rh);
  8610:         break;
  8611:         //   .A.XHPGT
  8612:       case 0b00011110:  //F1_XHPG
  8613:         F1_XHPG.drawRaster (src, dst, rh);
  8614:         break;
  8615:         //   .A.XHPGT
  8616:       case 0b00011111:  //F1_XHPGT
  8617:         F1_XHPGT.drawRaster (src, dst, rh);
  8618:         break;
  8619:         //   .A.XHPGT
  8620:       case 0b01000000:  //F1_A
  8621:       case 0b01000001:  //F1_A
  8622:       case 0b01000010:  //F1_A
  8623:       case 0b01000011:  //F1_A
  8624:       case 0b01000100:  //F1_A
  8625:       case 0b01000101:  //F1_A
  8626:       case 0b01000110:  //F1_A
  8627:       case 0b01000111:  //F1_A
  8628:       case 0b01001000:  //F1_A
  8629:       case 0b01001001:  //F1_A
  8630:       case 0b01001010:  //F1_A
  8631:       case 0b01001011:  //F1_A
  8632:       case 0b01001100:  //F1_A
  8633:       case 0b01001101:  //F1_A
  8634:       case 0b01001110:  //F1_A
  8635:       case 0b01001111:  //F1_A
  8636:       case 0b01010000:  //F1_A
  8637:       case 0b01010001:  //F1_A
  8638:       case 0b01010010:  //F1_A
  8639:       case 0b01010011:  //F1_A
  8640:       case 0b01010100:  //F1_A
  8641:       case 0b01010101:  //F1_A
  8642:       case 0b01010110:  //F1_A
  8643:       case 0b01010111:  //F1_A
  8644:       case 0b01011000:  //F1_A
  8645:       case 0b01011001:  //F1_A
  8646:       case 0b01011010:  //F1_A
  8647:       case 0b01011011:  //F1_A
  8648:       case 0b01011100:  //F1_A
  8649:       case 0b01011101:  //F1_A
  8650:       case 0b01011110:  //F1_A
  8651:       case 0b01011111:  //F1_A
  8652:         F1_A.drawRaster (src, dst, rh);
  8653:         break;
  8654:       default:
  8655:         F1.drawRaster (src, dst, rh);
  8656:         VideoController.vcnReportUnimplemented (XF1);
  8657:       }  //switch
  8658:     }  //drawRaster
  8659:   },  //XF1
  8660: 
  8661:   //================================================================================
  8662:   //F1_XWP ($0001,$06xx,$1403)
  8663:   //  概要
  8664:   //    F1  512ドット256色1プレーン
  8665:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  8666:   //  手順
  8667:   //    1番目のパレットが1以下のとき
  8668:   //      グラフィックパレット0のカラー(0は黒)
  8669:   //    1番目のパレットが2以上の偶数のとき
  8670:   //      1番目のカラー(0は黒)
  8671:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  8672:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  8673:   //  中間コード1
  8674:   //    (f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):fpc(tev(f1p())))
  8675:   //  中間コード2
  8676:   //    f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):fpc(tev(f1p()))
  8677:   //  中間コード3
  8678:   //    (v0=f1p())<=1?fpc(0):ls1(v0)==0?fpc(v0):fpc(tev(v0))
  8679:   //  中間コード4
  8680:   //    (p=f1p())<=1?fpc(0):ls1(p)==0?fpc(p):fpc(tev(p))
  8681:   //  中間コード5
  8682:   //    (p=f1p())<=1?fpc(0):(p&1)==0?fpc(p):fpc(p&-2)
  8683:   //  中間コード6
  8684:   //    (p=f1p())<=1?fpo(0):(p&1)==0?fpo(p):fpo(p&-2)
  8685:   F1_XWP {
  8686:     @Override public void drawRaster (int src, int dst, boolean rh) {
  8687:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  8688:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8689:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8690:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  8691:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8692:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8693:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8694:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8695:       if (rh) {
  8696:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8697:         gx1st += half << 1;
  8698:         gx2nd += half << 1;
  8699:         da += half;
  8700:       }
  8701:       while (da < db) {
  8702:         int p;
  8703:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  8704:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) <= 1 ?
  8705:                           VideoController.vcnPal32G8[0] :
  8706:                           (p & 1) == 0 ?
  8707:                           VideoController.vcnPal32G8[p] :
  8708:                           VideoController.vcnPal32G8[p & -2]);
  8709:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  8710:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) <= 1 ?
  8711:                               VideoController.vcnPal32G8[0] :
  8712:                               (p & 1) == 0 ?
  8713:                               VideoController.vcnPal32G8[p] :
  8714:                               VideoController.vcnPal32G8[p & -2]);
  8715:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  8716:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) <= 1 ?
  8717:                               VideoController.vcnPal32G8[0] :
  8718:                               (p & 1) == 0 ?
  8719:                               VideoController.vcnPal32G8[p] :
  8720:                               VideoController.vcnPal32G8[p & -2]);
  8721:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  8722:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) <= 1 ?
  8723:                               VideoController.vcnPal32G8[0] :
  8724:                               (p & 1) == 0 ?
  8725:                               VideoController.vcnPal32G8[p] :
  8726:                               VideoController.vcnPal32G8[p & -2]);
  8727:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  8728:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) <= 1 ?
  8729:                               VideoController.vcnPal32G8[0] :
  8730:                               (p & 1) == 0 ?
  8731:                               VideoController.vcnPal32G8[p] :
  8732:                               VideoController.vcnPal32G8[p & -2]);
  8733:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  8734:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) <= 1 ?
  8735:                               VideoController.vcnPal32G8[0] :
  8736:                               (p & 1) == 0 ?
  8737:                               VideoController.vcnPal32G8[p] :
  8738:                               VideoController.vcnPal32G8[p & -2]);
  8739:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  8740:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) <= 1 ?
  8741:                               VideoController.vcnPal32G8[0] :
  8742:                               (p & 1) == 0 ?
  8743:                               VideoController.vcnPal32G8[p] :
  8744:                               VideoController.vcnPal32G8[p & -2]);
  8745:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  8746:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) <= 1 ?
  8747:                               VideoController.vcnPal32G8[0] :
  8748:                               (p & 1) == 0 ?
  8749:                               VideoController.vcnPal32G8[p] :
  8750:                               VideoController.vcnPal32G8[p & -2]);
  8751:         gx1st += 16;
  8752:         gx2nd += 16;
  8753:         da += 8;
  8754:       }  //while da<db
  8755:     }  //drawRaster
  8756:   },  //F1_XWP
  8757: 
  8758:   //================================================================================
  8759:   //F1_XHCT ($0001,$06xx,$1903)
  8760:   //  概要
  8761:   //    F1  512ドット256色1プレーン
  8762:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  8763:   //  手順
  8764:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  8765:   //      1番目のカラーとカラー0を混ぜたカラー(0は黒)
  8766:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  8767:   //      1番目のカラー(0は黒)
  8768:   //  中間コード1
  8769:   //    (ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),0):fpc(f1p()))
  8770:   //  中間コード2
  8771:   //    ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),0):fpc(f1p())
  8772:   //  中間コード3
  8773:   //    ls1(fpc(tev(v3=f1p())))!=0?mix(fpc(v3),0):fpc(v3)
  8774:   //  中間コード4
  8775:   //    ls1(fpc(tev(p=f1p())))!=0?mix(fpc(p),0):fpc(p)
  8776:   //  中間コード5
  8777:   //    (fpc((p=f1p())&-2)&1)!=0?mix(fpc(p),0):fpc(p)
  8778:   //  中間コード6
  8779:   //    (fpc((p=f1p())&-2)&1)!=0?cto(mix(fpc(p),0)):fpo(p)
  8780:   F1_XHCT {
  8781:     @Override public void drawRaster (int src, int dst, boolean rh) {
  8782:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  8783:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8784:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8785:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  8786:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8787:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8788:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8789:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8790:       if (rh) {
  8791:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8792:         gx1st += half << 1;
  8793:         gx2nd += half << 1;
  8794:         da += half;
  8795:       }
  8796:       while (da < db) {
  8797:         int p;
  8798:         XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  8799:                                                             MainMemory.mmrM8[gy1st | gx1st & 1023])) & -2] & 1) != 0 ?
  8800:                           VideoController.vcnPalTbl[
  8801:                             VideoController.vcnMix2 (
  8802:                               VideoController.vcnPal16G8[p],
  8803:                               0)] :
  8804:                           VideoController.vcnPal32G8[p]);
  8805:         XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  8806:                                                                 MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) & -2] & 1) != 0 ?
  8807:                               VideoController.vcnPalTbl[
  8808:                                 VideoController.vcnMix2 (
  8809:                                   VideoController.vcnPal16G8[p],
  8810:                                   0)] :
  8811:                               VideoController.vcnPal32G8[p]);
  8812:         XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  8813:                                                                 MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) & -2] & 1) != 0 ?
  8814:                               VideoController.vcnPalTbl[
  8815:                                 VideoController.vcnMix2 (
  8816:                                   VideoController.vcnPal16G8[p],
  8817:                                   0)] :
  8818:                               VideoController.vcnPal32G8[p]);
  8819:         XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  8820:                                                                 MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) & -2] & 1) != 0 ?
  8821:                               VideoController.vcnPalTbl[
  8822:                                 VideoController.vcnMix2 (
  8823:                                   VideoController.vcnPal16G8[p],
  8824:                                   0)] :
  8825:                               VideoController.vcnPal32G8[p]);
  8826:         XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  8827:                                                                 MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) & -2] & 1) != 0 ?
  8828:                               VideoController.vcnPalTbl[
  8829:                                 VideoController.vcnMix2 (
  8830:                                   VideoController.vcnPal16G8[p],
  8831:                                   0)] :
  8832:                               VideoController.vcnPal32G8[p]);
  8833:         XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  8834:                                                                 MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) & -2] & 1) != 0 ?
  8835:                               VideoController.vcnPalTbl[
  8836:                                 VideoController.vcnMix2 (
  8837:                                   VideoController.vcnPal16G8[p],
  8838:                                   0)] :
  8839:                               VideoController.vcnPal32G8[p]);
  8840:         XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  8841:                                                                 MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) & -2] & 1) != 0 ?
  8842:                               VideoController.vcnPalTbl[
  8843:                                 VideoController.vcnMix2 (
  8844:                                   VideoController.vcnPal16G8[p],
  8845:                                   0)] :
  8846:                               VideoController.vcnPal32G8[p]);
  8847:         XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  8848:                                                                 MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) & -2] & 1) != 0 ?
  8849:                               VideoController.vcnPalTbl[
  8850:                                 VideoController.vcnMix2 (
  8851:                                   VideoController.vcnPal16G8[p],
  8852:                                   0)] :
  8853:                               VideoController.vcnPal32G8[p]);
  8854:         gx1st += 16;
  8855:         gx2nd += 16;
  8856:         da += 8;
  8857:       }  //while da<db
  8858:     }  //drawRaster
  8859:   },  //F1_XHCT
  8860: 
  8861:   //================================================================================
  8862:   //F1_XHCG ($0001,$06xx,$1A03)
  8863:   //  概要
  8864:   //    F1  512ドット256色1プレーン
  8865:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  8866:   //  手順
  8867:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  8868:   //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  8869:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  8870:   //      1番目のパレットが奇数のとき
  8871:   //        2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  8872:   //      さもなくば(1番目のパレットが偶数のとき)
  8873:   //        1番目のカラー(0は黒)
  8874:   //  中間コード1
  8875:   //    (ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):(ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p())))
  8876:   //  中間コード2
  8877:   //    ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p())
  8878:   //  中間コード3
  8879:   //    ls1(v1=fpc(tev(v3=f1p())))!=0?mix(v1,fpc(tod(f2q()))):ls1(v3)!=0?fpc(tod(f2q())):fpc(v3)
  8880:   //  中間コード4
  8881:   //    ls1(p=fpc(tev(q=f1p())))!=0?mix(p,fpc(tod(f2q()))):ls1(q)!=0?fpc(tod(f2q())):fpc(q)
  8882:   //  中間コード5
  8883:   //    ((p=fpc((q=f1p())&-2))&1)!=0?mix(p,fpc(f2q()|1)):(q&1)!=0?fpc(f2q()|1):fpc(q)
  8884:   //  中間コード6
  8885:   //    ((p=fpc((q=f1p())&-2))&1)!=0?cto(mix(p,fpc(f2q()|1))):(q&1)!=0?fpo(f2q()|1):fpo(q)
  8886:   F1_XHCG {
  8887:     @Override public void drawRaster (int src, int dst, boolean rh) {
  8888:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  8889:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8890:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8891:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  8892:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8893:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8894:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  8895:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  8896:       int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8897:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  8898:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  8899:       int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  8900:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8901:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8902:       if (rh) {
  8903:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8904:         gx1st += half << 1;
  8905:         gx2nd += half << 1;
  8906:         gx3rd += half << 1;
  8907:         gx4th += half << 1;
  8908:         da += half;
  8909:       }
  8910:       while (da < db) {
  8911:         int p, q;
  8912:         XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  8913:                                                                  MainMemory.mmrM8[gy1st | gx1st & 1023])) & -2]) & 1) != 0 ?
  8914:                           VideoController.vcnPalTbl[
  8915:                             VideoController.vcnMix2 (
  8916:                               p,
  8917:                               VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  8918:                                                           MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1])] :
  8919:                           (q & 1) != 0 ?
  8920:                           VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  8921:                                                       MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1] :
  8922:                           VideoController.vcnPal32G8[q]);
  8923:         XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  8924:                                                                      MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) & -2]) & 1) != 0 ?
  8925:                               VideoController.vcnPalTbl[
  8926:                                 VideoController.vcnMix2 (
  8927:                                   p,
  8928:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  8929:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1])] :
  8930:                               (q & 1) != 0 ?
  8931:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  8932:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1] :
  8933:                               VideoController.vcnPal32G8[q]);
  8934:         XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  8935:                                                                      MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) & -2]) & 1) != 0 ?
  8936:                               VideoController.vcnPalTbl[
  8937:                                 VideoController.vcnMix2 (
  8938:                                   p,
  8939:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  8940:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1])] :
  8941:                               (q & 1) != 0 ?
  8942:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  8943:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1] :
  8944:                               VideoController.vcnPal32G8[q]);
  8945:         XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  8946:                                                                      MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) & -2]) & 1) != 0 ?
  8947:                               VideoController.vcnPalTbl[
  8948:                                 VideoController.vcnMix2 (
  8949:                                   p,
  8950:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  8951:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1])] :
  8952:                               (q & 1) != 0 ?
  8953:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  8954:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1] :
  8955:                               VideoController.vcnPal32G8[q]);
  8956:         XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  8957:                                                                      MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) & -2]) & 1) != 0 ?
  8958:                               VideoController.vcnPalTbl[
  8959:                                 VideoController.vcnMix2 (
  8960:                                   p,
  8961:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  8962:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1])] :
  8963:                               (q & 1) != 0 ?
  8964:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  8965:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1] :
  8966:                               VideoController.vcnPal32G8[q]);
  8967:         XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  8968:                                                                      MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) & -2]) & 1) != 0 ?
  8969:                               VideoController.vcnPalTbl[
  8970:                                 VideoController.vcnMix2 (
  8971:                                   p,
  8972:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  8973:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1])] :
  8974:                               (q & 1) != 0 ?
  8975:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  8976:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1] :
  8977:                               VideoController.vcnPal32G8[q]);
  8978:         XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  8979:                                                                      MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) & -2]) & 1) != 0 ?
  8980:                               VideoController.vcnPalTbl[
  8981:                                 VideoController.vcnMix2 (
  8982:                                   p,
  8983:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  8984:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1])] :
  8985:                               (q & 1) != 0 ?
  8986:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  8987:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1] :
  8988:                               VideoController.vcnPal32G8[q]);
  8989:         XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  8990:                                                                      MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) & -2]) & 1) != 0 ?
  8991:                               VideoController.vcnPalTbl[
  8992:                                 VideoController.vcnMix2 (
  8993:                                   p,
  8994:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  8995:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1])] :
  8996:                               (q & 1) != 0 ?
  8997:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  8998:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1] :
  8999:                               VideoController.vcnPal32G8[q]);
  9000:         gx1st += 16;
  9001:         gx2nd += 16;
  9002:         gx3rd += 16;
  9003:         gx4th += 16;
  9004:         da += 8;
  9005:       }  //while da<db
  9006:     }  //drawRaster
  9007:   },  //F1_XHCG
  9008: 
  9009:   //================================================================================
  9010:   //F1_XHCGT ($0001,$06xx,$1B03)
  9011:   //  概要
  9012:   //    F1  512ドット256色1プレーン
  9013:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  9014:   //  手順
  9015:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  9016:   //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  9017:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  9018:   //      1番目のパレットが奇数のとき
  9019:   //        2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  9020:   //      さもなくば(1番目のパレットが偶数のとき)
  9021:   //        1番目のカラー(0は黒)
  9022:   //  中間コード1
  9023:   //    (ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0):(ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p())))
  9024:   //  中間コード2
  9025:   //    ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0):ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p())
  9026:   //  中間コード3
  9027:   //    ls1(v1=fpc(tev(v3=f1p())))!=0?mix(mix(v1,fpc(tod(f2q()))),0):ls1(v3)!=0?fpc(tod(f2q())):fpc(v3)
  9028:   //  中間コード4
  9029:   //    ls1(p=fpc(tev(q=f1p())))!=0?mix(mix(p,fpc(tod(f2q()))),0):ls1(q)!=0?fpc(tod(f2q())):fpc(q)
  9030:   //  中間コード5
  9031:   //    ((p=fpc((q=f1p())&-2))&1)!=0?mix(mix(p,fpc(f2q()|1)),0):(q&1)!=0?fpc(f2q()|1):fpc(q)
  9032:   //  中間コード6
  9033:   //    ((p=fpc((q=f1p())&-2))&1)!=0?cto(mix(mix(p,fpc(f2q()|1)),0)):(q&1)!=0?fpo(f2q()|1):fpo(q)
  9034:   F1_XHCGT {
  9035:     @Override public void drawRaster (int src, int dst, boolean rh) {
  9036:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9037:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9038:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9039:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9040:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9041:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9042:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  9043:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  9044:       int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9045:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  9046:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  9047:       int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9048:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9049:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9050:       if (rh) {
  9051:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9052:         gx1st += half << 1;
  9053:         gx2nd += half << 1;
  9054:         gx3rd += half << 1;
  9055:         gx4th += half << 1;
  9056:         da += half;
  9057:       }
  9058:       while (da < db) {
  9059:         int p, q;
  9060:         XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9061:                                                                  MainMemory.mmrM8[gy1st | gx1st & 1023])) & -2]) & 1) != 0 ?
  9062:                           VideoController.vcnPalTbl[
  9063:                             VideoController.vcnMix2 (
  9064:                               VideoController.vcnMix2 (
  9065:                                 p,
  9066:                                 VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  9067:                                                             MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1]),
  9068:                               0)] :
  9069:                           (q & 1) != 0 ?
  9070:                           VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  9071:                                                       MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1] :
  9072:                           VideoController.vcnPal32G8[q]);
  9073:         XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9074:                                                                      MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) & -2]) & 1) != 0 ?
  9075:                               VideoController.vcnPalTbl[
  9076:                                 VideoController.vcnMix2 (
  9077:                                   VideoController.vcnMix2 (
  9078:                                     p,
  9079:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  9080:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1]),
  9081:                                   0)] :
  9082:                               (q & 1) != 0 ?
  9083:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  9084:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1] :
  9085:                               VideoController.vcnPal32G8[q]);
  9086:         XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9087:                                                                      MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) & -2]) & 1) != 0 ?
  9088:                               VideoController.vcnPalTbl[
  9089:                                 VideoController.vcnMix2 (
  9090:                                   VideoController.vcnMix2 (
  9091:                                     p,
  9092:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  9093:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1]),
  9094:                                   0)] :
  9095:                               (q & 1) != 0 ?
  9096:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  9097:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1] :
  9098:                               VideoController.vcnPal32G8[q]);
  9099:         XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9100:                                                                      MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) & -2]) & 1) != 0 ?
  9101:                               VideoController.vcnPalTbl[
  9102:                                 VideoController.vcnMix2 (
  9103:                                   VideoController.vcnMix2 (
  9104:                                     p,
  9105:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  9106:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1]),
  9107:                                   0)] :
  9108:                               (q & 1) != 0 ?
  9109:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  9110:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1] :
  9111:                               VideoController.vcnPal32G8[q]);
  9112:         XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9113:                                                                      MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) & -2]) & 1) != 0 ?
  9114:                               VideoController.vcnPalTbl[
  9115:                                 VideoController.vcnMix2 (
  9116:                                   VideoController.vcnMix2 (
  9117:                                     p,
  9118:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  9119:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1]),
  9120:                                   0)] :
  9121:                               (q & 1) != 0 ?
  9122:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  9123:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1] :
  9124:                               VideoController.vcnPal32G8[q]);
  9125:         XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9126:                                                                      MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) & -2]) & 1) != 0 ?
  9127:                               VideoController.vcnPalTbl[
  9128:                                 VideoController.vcnMix2 (
  9129:                                   VideoController.vcnMix2 (
  9130:                                     p,
  9131:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  9132:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1]),
  9133:                                   0)] :
  9134:                               (q & 1) != 0 ?
  9135:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  9136:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1] :
  9137:                               VideoController.vcnPal32G8[q]);
  9138:         XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9139:                                                                      MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) & -2]) & 1) != 0 ?
  9140:                               VideoController.vcnPalTbl[
  9141:                                 VideoController.vcnMix2 (
  9142:                                   VideoController.vcnMix2 (
  9143:                                     p,
  9144:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  9145:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1]),
  9146:                                   0)] :
  9147:                               (q & 1) != 0 ?
  9148:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  9149:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1] :
  9150:                               VideoController.vcnPal32G8[q]);
  9151:         XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9152:                                                                      MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) & -2]) & 1) != 0 ?
  9153:                               VideoController.vcnPalTbl[
  9154:                                 VideoController.vcnMix2 (
  9155:                                   VideoController.vcnMix2 (
  9156:                                     p,
  9157:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  9158:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1]),
  9159:                                   0)] :
  9160:                               (q & 1) != 0 ?
  9161:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  9162:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1] :
  9163:                               VideoController.vcnPal32G8[q]);
  9164:         gx1st += 16;
  9165:         gx2nd += 16;
  9166:         gx3rd += 16;
  9167:         gx4th += 16;
  9168:         da += 8;
  9169:       }  //while da<db
  9170:     }  //drawRaster
  9171:   },  //F1_XHCGT
  9172: 
  9173:   //================================================================================
  9174:   //F1_XHPT ($0001,$06xx,$1D03)
  9175:   //  概要
  9176:   //    F1  512ドット256色1プレーン
  9177:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  9178:   //  手順
  9179:   //    1番目のパレットが1以下のとき
  9180:   //      グラフィックパレット0のカラー(0は黒)
  9181:   //    1番目のパレットが2以上の偶数のとき
  9182:   //      1番目のカラー(0は黒)
  9183:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  9184:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  9185:   //  中間コード1
  9186:   //    (f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),0))
  9187:   //  中間コード2
  9188:   //    f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),0)
  9189:   //  中間コード3
  9190:   //    (v0=f1p())<=1?fpc(0):ls1(v0)==0?fpc(v0):mix(fpc(tev(v0)),0)
  9191:   //  中間コード4
  9192:   //    (p=f1p())<=1?fpc(0):ls1(p)==0?fpc(p):mix(fpc(tev(p)),0)
  9193:   //  中間コード5
  9194:   //    (p=f1p())<=1?fpc(0):(p&1)==0?fpc(p):mix(fpc(p&-2),0)
  9195:   //  中間コード6
  9196:   //    (p=f1p())<=1?fpo(0):(p&1)==0?fpo(p):cto(mix(fpc(p&-2),0))
  9197:   F1_XHPT {
  9198:     @Override public void drawRaster (int src, int dst, boolean rh) {
  9199:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9200:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9201:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9202:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9203:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9204:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9205:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9206:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9207:       if (rh) {
  9208:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9209:         gx1st += half << 1;
  9210:         gx2nd += half << 1;
  9211:         da += half;
  9212:       }
  9213:       while (da < db) {
  9214:         int p;
  9215:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9216:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) <= 1 ?
  9217:                           VideoController.vcnPal32G8[0] :
  9218:                           (p & 1) == 0 ?
  9219:                           VideoController.vcnPal32G8[p] :
  9220:                           VideoController.vcnPalTbl[
  9221:                             VideoController.vcnMix2 (
  9222:                               VideoController.vcnPal16G8[p & -2],
  9223:                               0)]);
  9224:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9225:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) <= 1 ?
  9226:                               VideoController.vcnPal32G8[0] :
  9227:                               (p & 1) == 0 ?
  9228:                               VideoController.vcnPal32G8[p] :
  9229:                               VideoController.vcnPalTbl[
  9230:                                 VideoController.vcnMix2 (
  9231:                                   VideoController.vcnPal16G8[p & -2],
  9232:                                   0)]);
  9233:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9234:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) <= 1 ?
  9235:                               VideoController.vcnPal32G8[0] :
  9236:                               (p & 1) == 0 ?
  9237:                               VideoController.vcnPal32G8[p] :
  9238:                               VideoController.vcnPalTbl[
  9239:                                 VideoController.vcnMix2 (
  9240:                                   VideoController.vcnPal16G8[p & -2],
  9241:                                   0)]);
  9242:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9243:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) <= 1 ?
  9244:                               VideoController.vcnPal32G8[0] :
  9245:                               (p & 1) == 0 ?
  9246:                               VideoController.vcnPal32G8[p] :
  9247:                               VideoController.vcnPalTbl[
  9248:                                 VideoController.vcnMix2 (
  9249:                                   VideoController.vcnPal16G8[p & -2],
  9250:                                   0)]);
  9251:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9252:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) <= 1 ?
  9253:                               VideoController.vcnPal32G8[0] :
  9254:                               (p & 1) == 0 ?
  9255:                               VideoController.vcnPal32G8[p] :
  9256:                               VideoController.vcnPalTbl[
  9257:                                 VideoController.vcnMix2 (
  9258:                                   VideoController.vcnPal16G8[p & -2],
  9259:                                   0)]);
  9260:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9261:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) <= 1 ?
  9262:                               VideoController.vcnPal32G8[0] :
  9263:                               (p & 1) == 0 ?
  9264:                               VideoController.vcnPal32G8[p] :
  9265:                               VideoController.vcnPalTbl[
  9266:                                 VideoController.vcnMix2 (
  9267:                                   VideoController.vcnPal16G8[p & -2],
  9268:                                   0)]);
  9269:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9270:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) <= 1 ?
  9271:                               VideoController.vcnPal32G8[0] :
  9272:                               (p & 1) == 0 ?
  9273:                               VideoController.vcnPal32G8[p] :
  9274:                               VideoController.vcnPalTbl[
  9275:                                 VideoController.vcnMix2 (
  9276:                                   VideoController.vcnPal16G8[p & -2],
  9277:                                   0)]);
  9278:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9279:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) <= 1 ?
  9280:                               VideoController.vcnPal32G8[0] :
  9281:                               (p & 1) == 0 ?
  9282:                               VideoController.vcnPal32G8[p] :
  9283:                               VideoController.vcnPalTbl[
  9284:                                 VideoController.vcnMix2 (
  9285:                                   VideoController.vcnPal16G8[p & -2],
  9286:                                   0)]);
  9287:         gx1st += 16;
  9288:         gx2nd += 16;
  9289:         da += 8;
  9290:       }  //while da<db
  9291:     }  //drawRaster
  9292:   },  //F1_XHPT
  9293: 
  9294:   //================================================================================
  9295:   //F1_XHPG ($0001,$06xx,$1E03)
  9296:   //  概要
  9297:   //    F1  512ドット256色1プレーン
  9298:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  9299:   //  手順
  9300:   //    1番目のパレットが1以下のとき
  9301:   //      グラフィックパレット0のカラー(0は黒)
  9302:   //    1番目のパレットが2以上の偶数のとき
  9303:   //      1番目のカラー(0は黒)
  9304:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  9305:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  9306:   //  中間コード1
  9307:   //    (f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),fpc(tod(f2q()))))
  9308:   //  中間コード2
  9309:   //    f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),fpc(tod(f2q())))
  9310:   //  中間コード3
  9311:   //    (v0=f1p())<=1?fpc(0):ls1(v0)==0?fpc(v0):mix(fpc(tev(v0)),fpc(tod(f2q())))
  9312:   //  中間コード4
  9313:   //    (p=f1p())<=1?fpc(0):ls1(p)==0?fpc(p):mix(fpc(tev(p)),fpc(tod(f2q())))
  9314:   //  中間コード5
  9315:   //    (p=f1p())<=1?fpc(0):(p&1)==0?fpc(p):mix(fpc(p&-2),fpc(f2q()|1))
  9316:   //  中間コード6
  9317:   //    (p=f1p())<=1?fpo(0):(p&1)==0?fpo(p):cto(mix(fpc(p&-2),fpc(f2q()|1)))
  9318:   F1_XHPG {
  9319:     @Override public void drawRaster (int src, int dst, boolean rh) {
  9320:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9321:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9322:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9323:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9324:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9325:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9326:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  9327:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  9328:       int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9329:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  9330:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  9331:       int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9332:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9333:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9334:       if (rh) {
  9335:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9336:         gx1st += half << 1;
  9337:         gx2nd += half << 1;
  9338:         gx3rd += half << 1;
  9339:         gx4th += half << 1;
  9340:         da += half;
  9341:       }
  9342:       while (da < db) {
  9343:         int p;
  9344:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9345:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) <= 1 ?
  9346:                           VideoController.vcnPal32G8[0] :
  9347:                           (p & 1) == 0 ?
  9348:                           VideoController.vcnPal32G8[p] :
  9349:                           VideoController.vcnPalTbl[
  9350:                             VideoController.vcnMix2 (
  9351:                               VideoController.vcnPal16G8[p & -2],
  9352:                               VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  9353:                                                           MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1])]);
  9354:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9355:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) <= 1 ?
  9356:                               VideoController.vcnPal32G8[0] :
  9357:                               (p & 1) == 0 ?
  9358:                               VideoController.vcnPal32G8[p] :
  9359:                               VideoController.vcnPalTbl[
  9360:                                 VideoController.vcnMix2 (
  9361:                                   VideoController.vcnPal16G8[p & -2],
  9362:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  9363:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1])]);
  9364:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9365:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) <= 1 ?
  9366:                               VideoController.vcnPal32G8[0] :
  9367:                               (p & 1) == 0 ?
  9368:                               VideoController.vcnPal32G8[p] :
  9369:                               VideoController.vcnPalTbl[
  9370:                                 VideoController.vcnMix2 (
  9371:                                   VideoController.vcnPal16G8[p & -2],
  9372:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  9373:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1])]);
  9374:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9375:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) <= 1 ?
  9376:                               VideoController.vcnPal32G8[0] :
  9377:                               (p & 1) == 0 ?
  9378:                               VideoController.vcnPal32G8[p] :
  9379:                               VideoController.vcnPalTbl[
  9380:                                 VideoController.vcnMix2 (
  9381:                                   VideoController.vcnPal16G8[p & -2],
  9382:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  9383:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1])]);
  9384:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9385:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) <= 1 ?
  9386:                               VideoController.vcnPal32G8[0] :
  9387:                               (p & 1) == 0 ?
  9388:                               VideoController.vcnPal32G8[p] :
  9389:                               VideoController.vcnPalTbl[
  9390:                                 VideoController.vcnMix2 (
  9391:                                   VideoController.vcnPal16G8[p & -2],
  9392:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  9393:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1])]);
  9394:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9395:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) <= 1 ?
  9396:                               VideoController.vcnPal32G8[0] :
  9397:                               (p & 1) == 0 ?
  9398:                               VideoController.vcnPal32G8[p] :
  9399:                               VideoController.vcnPalTbl[
  9400:                                 VideoController.vcnMix2 (
  9401:                                   VideoController.vcnPal16G8[p & -2],
  9402:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  9403:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1])]);
  9404:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9405:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) <= 1 ?
  9406:                               VideoController.vcnPal32G8[0] :
  9407:                               (p & 1) == 0 ?
  9408:                               VideoController.vcnPal32G8[p] :
  9409:                               VideoController.vcnPalTbl[
  9410:                                 VideoController.vcnMix2 (
  9411:                                   VideoController.vcnPal16G8[p & -2],
  9412:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  9413:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1])]);
  9414:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9415:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) <= 1 ?
  9416:                               VideoController.vcnPal32G8[0] :
  9417:                               (p & 1) == 0 ?
  9418:                               VideoController.vcnPal32G8[p] :
  9419:                               VideoController.vcnPalTbl[
  9420:                                 VideoController.vcnMix2 (
  9421:                                   VideoController.vcnPal16G8[p & -2],
  9422:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  9423:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1])]);
  9424:         gx1st += 16;
  9425:         gx2nd += 16;
  9426:         gx3rd += 16;
  9427:         gx4th += 16;
  9428:         da += 8;
  9429:       }  //while da<db
  9430:     }  //drawRaster
  9431:   },  //F1_XHPG
  9432: 
  9433:   //================================================================================
  9434:   //F1_XHPGT ($0001,$06xx,$1F03)
  9435:   //  概要
  9436:   //    F1  512ドット256色1プレーン
  9437:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  9438:   //  手順
  9439:   //    1番目のパレットが1以下のとき
  9440:   //      グラフィックパレット0のカラー(0は黒)
  9441:   //    1番目のパレットが2以上の偶数のとき
  9442:   //      1番目のカラー(0は黒)
  9443:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  9444:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  9445:   //  中間コード1
  9446:   //    (f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0))
  9447:   //  中間コード2
  9448:   //    f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0)
  9449:   //  中間コード3
  9450:   //    (v0=f1p())<=1?fpc(0):ls1(v0)==0?fpc(v0):mix(mix(fpc(tev(v0)),fpc(tod(f2q()))),0)
  9451:   //  中間コード4
  9452:   //    (p=f1p())<=1?fpc(0):ls1(p)==0?fpc(p):mix(mix(fpc(tev(p)),fpc(tod(f2q()))),0)
  9453:   //  中間コード5
  9454:   //    (p=f1p())<=1?fpc(0):(p&1)==0?fpc(p):mix(mix(fpc(p&-2),fpc(f2q()|1)),0)
  9455:   //  中間コード6
  9456:   //    (p=f1p())<=1?fpo(0):(p&1)==0?fpo(p):cto(mix(mix(fpc(p&-2),fpc(f2q()|1)),0))
  9457:   F1_XHPGT {
  9458:     @Override public void drawRaster (int src, int dst, boolean rh) {
  9459:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9460:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9461:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9462:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9463:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9464:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9465:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  9466:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  9467:       int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9468:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  9469:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  9470:       int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9471:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9472:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9473:       if (rh) {
  9474:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9475:         gx1st += half << 1;
  9476:         gx2nd += half << 1;
  9477:         gx3rd += half << 1;
  9478:         gx4th += half << 1;
  9479:         da += half;
  9480:       }
  9481:       while (da < db) {
  9482:         int p;
  9483:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9484:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) <= 1 ?
  9485:                           VideoController.vcnPal32G8[0] :
  9486:                           (p & 1) == 0 ?
  9487:                           VideoController.vcnPal32G8[p] :
  9488:                           VideoController.vcnPalTbl[
  9489:                             VideoController.vcnMix2 (
  9490:                               VideoController.vcnMix2 (
  9491:                                 VideoController.vcnPal16G8[p & -2],
  9492:                                 VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  9493:                                                             MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1]),
  9494:                               0)]);
  9495:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9496:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) <= 1 ?
  9497:                               VideoController.vcnPal32G8[0] :
  9498:                               (p & 1) == 0 ?
  9499:                               VideoController.vcnPal32G8[p] :
  9500:                               VideoController.vcnPalTbl[
  9501:                                 VideoController.vcnMix2 (
  9502:                                   VideoController.vcnMix2 (
  9503:                                     VideoController.vcnPal16G8[p & -2],
  9504:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  9505:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1]),
  9506:                                   0)]);
  9507:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9508:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) <= 1 ?
  9509:                               VideoController.vcnPal32G8[0] :
  9510:                               (p & 1) == 0 ?
  9511:                               VideoController.vcnPal32G8[p] :
  9512:                               VideoController.vcnPalTbl[
  9513:                                 VideoController.vcnMix2 (
  9514:                                   VideoController.vcnMix2 (
  9515:                                     VideoController.vcnPal16G8[p & -2],
  9516:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  9517:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1]),
  9518:                                   0)]);
  9519:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9520:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) <= 1 ?
  9521:                               VideoController.vcnPal32G8[0] :
  9522:                               (p & 1) == 0 ?
  9523:                               VideoController.vcnPal32G8[p] :
  9524:                               VideoController.vcnPalTbl[
  9525:                                 VideoController.vcnMix2 (
  9526:                                   VideoController.vcnMix2 (
  9527:                                     VideoController.vcnPal16G8[p & -2],
  9528:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  9529:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1]),
  9530:                                   0)]);
  9531:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9532:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) <= 1 ?
  9533:                               VideoController.vcnPal32G8[0] :
  9534:                               (p & 1) == 0 ?
  9535:                               VideoController.vcnPal32G8[p] :
  9536:                               VideoController.vcnPalTbl[
  9537:                                 VideoController.vcnMix2 (
  9538:                                   VideoController.vcnMix2 (
  9539:                                     VideoController.vcnPal16G8[p & -2],
  9540:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  9541:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1]),
  9542:                                   0)]);
  9543:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9544:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) <= 1 ?
  9545:                               VideoController.vcnPal32G8[0] :
  9546:                               (p & 1) == 0 ?
  9547:                               VideoController.vcnPal32G8[p] :
  9548:                               VideoController.vcnPalTbl[
  9549:                                 VideoController.vcnMix2 (
  9550:                                   VideoController.vcnMix2 (
  9551:                                     VideoController.vcnPal16G8[p & -2],
  9552:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  9553:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1]),
  9554:                                   0)]);
  9555:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9556:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) <= 1 ?
  9557:                               VideoController.vcnPal32G8[0] :
  9558:                               (p & 1) == 0 ?
  9559:                               VideoController.vcnPal32G8[p] :
  9560:                               VideoController.vcnPalTbl[
  9561:                                 VideoController.vcnMix2 (
  9562:                                   VideoController.vcnMix2 (
  9563:                                     VideoController.vcnPal16G8[p & -2],
  9564:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  9565:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1]),
  9566:                                   0)]);
  9567:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9568:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) <= 1 ?
  9569:                               VideoController.vcnPal32G8[0] :
  9570:                               (p & 1) == 0 ?
  9571:                               VideoController.vcnPal32G8[p] :
  9572:                               VideoController.vcnPalTbl[
  9573:                                 VideoController.vcnMix2 (
  9574:                                   VideoController.vcnMix2 (
  9575:                                     VideoController.vcnPal16G8[p & -2],
  9576:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  9577:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1]),
  9578:                                   0)]);
  9579:         gx1st += 16;
  9580:         gx2nd += 16;
  9581:         gx3rd += 16;
  9582:         gx4th += 16;
  9583:         da += 8;
  9584:       }  //while da<db
  9585:     }  //drawRaster
  9586:   },  //F1_XHPGT
  9587: 
  9588:   //================================================================================
  9589:   //F1_A ($0001,$06xx,$4003)
  9590:   //  概要
  9591:   //    F1  512ドット256色1プレーン
  9592:   //    A  グラフィックカラーとテキストパレット0のカラーを混ぜる
  9593:   //  手順
  9594:   //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  9595:   //  中間コード1
  9596:   //    mix(fpc(f1p()),tpc(0))
  9597:   //  中間コード2
  9598:   //    mix(fpc(f1p()),tpc(0))
  9599:   //  中間コード3
  9600:   //    mix(fpc(f1p()),tpc(0))
  9601:   //  中間コード4
  9602:   //    mix(fpc(f1p()),tpc(0))
  9603:   //  中間コード5
  9604:   //    mix(fpc(f1p()),tpc(0))
  9605:   //  中間コード6
  9606:   //    cto(mix(fpc(f1p()),tpc(0)))
  9607:   F1_A {
  9608:     @Override public void drawRaster (int src, int dst, boolean rh) {
  9609:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9610:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9611:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9612:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9613:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9614:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9615:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9616:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9617:       if (rh) {
  9618:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9619:         gx1st += half << 1;
  9620:         gx2nd += half << 1;
  9621:         da += half;
  9622:       }
  9623:       while (da < db) {
  9624:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  9625:                             VideoController.vcnMix2 (
  9626:                               VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9627:                                                           MainMemory.mmrM8[gy1st | gx1st & 1023])],
  9628:                               VideoController.vcnPal16TS[0])]);
  9629:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  9630:                                 VideoController.vcnMix2 (
  9631:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9632:                                                               MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])],
  9633:                                   VideoController.vcnPal16TS[0])]);
  9634:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  9635:                                 VideoController.vcnMix2 (
  9636:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9637:                                                               MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])],
  9638:                                   VideoController.vcnPal16TS[0])]);
  9639:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  9640:                                 VideoController.vcnMix2 (
  9641:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9642:                                                               MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])],
  9643:                                   VideoController.vcnPal16TS[0])]);
  9644:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  9645:                                 VideoController.vcnMix2 (
  9646:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9647:                                                               MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])],
  9648:                                   VideoController.vcnPal16TS[0])]);
  9649:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  9650:                                 VideoController.vcnMix2 (
  9651:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9652:                                                               MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])],
  9653:                                   VideoController.vcnPal16TS[0])]);
  9654:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  9655:                                 VideoController.vcnMix2 (
  9656:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9657:                                                               MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])],
  9658:                                   VideoController.vcnPal16TS[0])]);
  9659:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  9660:                                 VideoController.vcnMix2 (
  9661:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9662:                                                               MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])],
  9663:                                   VideoController.vcnPal16TS[0])]);
  9664:         gx1st += 16;
  9665:         gx2nd += 16;
  9666:         da += 8;
  9667:       }  //while da<db
  9668:     }  //drawRaster
  9669:   },  //F1_A
  9670: 
  9671:   //================================================================================
  9672:   //F2 ($0001,$06xx,$000F)
  9673:   //  概要
  9674:   //    F2  512ドット256色2プレーン
  9675:   //    拡張なし
  9676:   //  手順
  9677:   //    1番目のパレットが0でないとき
  9678:   //      1番目のカラー(0は黒)
  9679:   //    さもなくば(1番目のパレットが0のとき)
  9680:   //      2番目のカラー(0は黒)
  9681:   //  中間コード1
  9682:   //    (f1p()!=0?fpc(f1p()):fpc(f2p()))
  9683:   //  中間コード2
  9684:   //    f1p()!=0?fpc(f1p()):fpc(f2p())
  9685:   //  中間コード3
  9686:   //    (v0=f1p())!=0?fpc(v0):fpc(f2p())
  9687:   //  中間コード4
  9688:   //    (p=f1p())!=0?fpc(p):fpc(f2p())
  9689:   //  中間コード5
  9690:   //    (p=f1p())!=0?fpc(p):fpc(f2p())
  9691:   //  中間コード6
  9692:   //    (p=f1p())!=0?fpo(p):fpo(f2p())
  9693:   F2 {
  9694:     @Override public void drawRaster (int src, int dst, boolean rh) {
  9695:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9696:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9697:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9698:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9699:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9700:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9701:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  9702:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  9703:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9704:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  9705:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  9706:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYZero[pn] + src & 511) << 10);
  9707:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9708:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9709:       if (rh) {
  9710:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9711:         gx1st += half << 1;
  9712:         gx2nd += half << 1;
  9713:         gx3rd += half << 1;
  9714:         gx4th += half << 1;
  9715:         da += half;
  9716:       }
  9717:       while (da < db) {
  9718:         int p;
  9719:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9720:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) != 0 ?
  9721:                           VideoController.vcnPal32G8[p] :
  9722:                           VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th & 1023] << 4 |
  9723:                                                       MainMemory.mmrM8[gy3rd | gx3rd & 1023])]);
  9724:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9725:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) != 0 ?
  9726:                               VideoController.vcnPal32G8[p] :
  9727:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] << 4 |
  9728:                                                           MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023])]);
  9729:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9730:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) != 0 ?
  9731:                               VideoController.vcnPal32G8[p] :
  9732:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] << 4 |
  9733:                                                           MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023])]);
  9734:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9735:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) != 0 ?
  9736:                               VideoController.vcnPal32G8[p] :
  9737:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] << 4 |
  9738:                                                           MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023])]);
  9739:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9740:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) != 0 ?
  9741:                               VideoController.vcnPal32G8[p] :
  9742:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] << 4 |
  9743:                                                           MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023])]);
  9744:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9745:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) != 0 ?
  9746:                               VideoController.vcnPal32G8[p] :
  9747:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] << 4 |
  9748:                                                           MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023])]);
  9749:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9750:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) != 0 ?
  9751:                               VideoController.vcnPal32G8[p] :
  9752:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] << 4 |
  9753:                                                           MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023])]);
  9754:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9755:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) != 0 ?
  9756:                               VideoController.vcnPal32G8[p] :
  9757:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] << 4 |
  9758:                                                           MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023])]);
  9759:         gx1st += 16;
  9760:         gx2nd += 16;
  9761:         gx3rd += 16;
  9762:         gx4th += 16;
  9763:         da += 8;
  9764:       }  //while da<db
  9765:     }  //drawRaster
  9766:   },  //F2
  9767: 
  9768:   //================================================================================
  9769:   //XF2
  9770:   //  概要
  9771:   //    F2  512ドット256色2プレーン
  9772:   //    拡張あり
  9773:   XF2 {
  9774:     @Override public void drawRaster (int src, int dst, boolean rh) {
  9775:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  9776:         //   .A.XHPGT
  9777:       case 0b00010000:  //F2_XWC
  9778:       case 0b00010001:  //F2_XWC
  9779:       case 0b00010010:  //F2_XWC
  9