DrawingMode.java
     1: //========================================================================================
     2: //  DrawingMode.java
     3: //    en:Drawing mode -- It superimposes a raster of the sprite screen, the text screen and the graphics screen according to the drawing mode.
     4: //    ja:描画モード -- 描画モードに従って1ラスタ分のスプライト画面、テキスト画面およびグラフィックス画面を重ね合わせます。
     5: //  Copyright (C) 2003-2017 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: //  http://stdkmd.com/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) {
  1413:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  1414:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  1415:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  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(int,int)
  1431:   },  //N
  1432: 
  1433:   //================================================================================
  1434:   //XN
  1435:   //  概要
  1436:   //    N  表示画面なし
  1437:   //    拡張あり
  1438:   XN {
  1439:     @Override public void drawRaster (int src, int dst) {
  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);
  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);
  1454:         break;
  1455:         //   .A.XHPGT
  1456:       case 0b00011000:  //N_XHC
  1457:         N.drawRaster (src, dst);
  1458:         break;
  1459:         //   .A.XHPGT
  1460:       case 0b00011001:  //N_XHCT
  1461:         N.drawRaster (src, dst);
  1462:         break;
  1463:         //   .A.XHPGT
  1464:       case 0b00011010:  //N_XHCG
  1465:         N.drawRaster (src, dst);
  1466:         break;
  1467:         //   .A.XHPGT
  1468:       case 0b00011011:  //N_XHCGT
  1469:         N.drawRaster (src, dst);
  1470:         break;
  1471:         //   .A.XHPGT
  1472:       case 0b00011101:  //N_XHPT
  1473:         N.drawRaster (src, dst);
  1474:         break;
  1475:         //   .A.XHPGT
  1476:       case 0b00011110:  //N_XHPG
  1477:         N.drawRaster (src, dst);
  1478:         break;
  1479:         //   .A.XHPGT
  1480:       case 0b00011111:  //N_XHPGT
  1481:         N.drawRaster (src, dst);
  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);
  1517:         break;
  1518:       default:
  1519:         N.drawRaster (src, dst);
  1520:         VideoController.vcnReportUnimplemented (XN);
  1521:       }  //switch
  1522:     }  //drawRaster(int,int)
  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) {
  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 (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  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(int,int)
  1568:   },  //S
  1569: 
  1570:   //================================================================================
  1571:   //XS
  1572:   //  概要
  1573:   //    S  スプライト
  1574:   //    拡張あり
  1575:   XS {
  1576:     @Override public void drawRaster (int src, int dst) {
  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);
  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);
  1591:         break;
  1592:         //   .A.XHPGT
  1593:       case 0b00011000:  //S_XHC
  1594:         S.drawRaster (src, dst);
  1595:         break;
  1596:         //   .A.XHPGT
  1597:       case 0b00011001:  //S_XHCT
  1598:         S.drawRaster (src, dst);
  1599:         break;
  1600:         //   .A.XHPGT
  1601:       case 0b00011010:  //S_XHCG
  1602:         S.drawRaster (src, dst);
  1603:         break;
  1604:         //   .A.XHPGT
  1605:       case 0b00011011:  //S_XHCGT
  1606:         S.drawRaster (src, dst);
  1607:         break;
  1608:         //   .A.XHPGT
  1609:       case 0b00011101:  //S_XHPT
  1610:         S.drawRaster (src, dst);
  1611:         break;
  1612:         //   .A.XHPGT
  1613:       case 0b00011110:  //S_XHPG
  1614:         S.drawRaster (src, dst);
  1615:         break;
  1616:         //   .A.XHPGT
  1617:       case 0b00011111:  //S_XHPGT
  1618:         S.drawRaster (src, dst);
  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);
  1654:         break;
  1655:       default:
  1656:         S.drawRaster (src, dst);
  1657:         VideoController.vcnReportUnimplemented (XS);
  1658:       }  //switch
  1659:     }  //drawRaster(int,int)
  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) {
  1683:       int tc = CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
  1684:       int ta0 = 0x00e00000 + ((CRTC.crtR11TxYCurr + src & 1023) << 7);  //桁0のテキストアドレス
  1685:       int ta1 = 0x00020000 + ta0;
  1686:       int ta2 = 0x00040000 + ta0;
  1687:       int ta3 = 0x00060000 + ta0;
  1688:       int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
  1689:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  1690:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  1691:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  1692:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  1693:         tc = tc + (half >> 3) & 127;
  1694:         da += half;
  1695:       }
  1696:       if (ts == 0) {  //テキスト桁境界に合っているとき
  1697:         while (da < db) {
  1698:           int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
  1699:                     VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
  1700:                     VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
  1701:                     VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
  1702:           tc = tc + 1 & 127;  //次回のテキスト桁位置
  1703:           XEiJ.pnlBM[da] = (VideoController.vcnPal32TS[tp >>> 28]);
  1704:           XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32TS[tp >>> 24 & 15]);
  1705:           XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32TS[tp >>> 20 & 15]);
  1706:           XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32TS[tp >>> 16 & 15]);
  1707:           XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32TS[tp >>> 12 & 15]);
  1708:           XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32TS[tp >>> 8 & 15]);
  1709:           XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32TS[tp >>> 4 & 15]);
  1710:           XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32TS[tp & 15]);
  1711:           da += 8;
  1712:         }  //while da<db
  1713:       } else {  //テキスト桁境界に合っていないとき
  1714:         //                                                             ts=1のとき
  1715:         int tt = ts + 8;                                             //tt=9
  1716:         ts += 16;                                                    //ts=17
  1717:         //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
  1718:         int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
  1719:         int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
  1720:         int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
  1721:         int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
  1722:         tc = tc + 1 & 127;  //次回のテキスト桁位置
  1723:         while (da < db) {
  1724:           //                                                           ........ ........ .1234567 ________  p0>>tt
  1725:           //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
  1726:           p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
  1727:           p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
  1728:           p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
  1729:           p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
  1730:           int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
  1731:                     VideoController.VCN_TXP2[p2 >>> 24] |
  1732:                     VideoController.VCN_TXP1[p1 >>> 24] |
  1733:                     VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
  1734:           tc = tc + 1 & 127;  //次回のテキスト桁位置
  1735:           XEiJ.pnlBM[da] = (VideoController.vcnPal32TS[tp >>> 28]);
  1736:           XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32TS[tp >>> 24 & 15]);
  1737:           XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32TS[tp >>> 20 & 15]);
  1738:           XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32TS[tp >>> 16 & 15]);
  1739:           XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32TS[tp >>> 12 & 15]);
  1740:           XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32TS[tp >>> 8 & 15]);
  1741:           XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32TS[tp >>> 4 & 15]);
  1742:           XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32TS[tp & 15]);
  1743:           da += 8;
  1744:         }  //while da<db
  1745:       }  //if ts==0
  1746:     }  //drawRaster(int,int)
  1747:   },  //T
  1748: 
  1749:   //================================================================================
  1750:   //XT
  1751:   //  概要
  1752:   //    T  テキスト
  1753:   //    拡張あり
  1754:   XT {
  1755:     @Override public void drawRaster (int src, int dst) {
  1756:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  1757:         //   .A.XHPGT
  1758:       case 0b00010000:  //T_XWC
  1759:       case 0b00010001:  //T_XWC
  1760:       case 0b00010010:  //T_XWC
  1761:       case 0b00010011:  //T_XWC
  1762:         T.drawRaster (src, dst);
  1763:         break;
  1764:         //   .A.XHPGT
  1765:       case 0b00010100:  //T_XWP
  1766:       case 0b00010101:  //T_XWP
  1767:       case 0b00010110:  //T_XWP
  1768:       case 0b00010111:  //T_XWP
  1769:         T.drawRaster (src, dst);
  1770:         break;
  1771:         //   .A.XHPGT
  1772:       case 0b00011000:  //T_XHC
  1773:         T.drawRaster (src, dst);
  1774:         break;
  1775:         //   .A.XHPGT
  1776:       case 0b00011001:  //T_XHCT
  1777:         T.drawRaster (src, dst);
  1778:         break;
  1779:         //   .A.XHPGT
  1780:       case 0b00011010:  //T_XHCG
  1781:         T.drawRaster (src, dst);
  1782:         break;
  1783:         //   .A.XHPGT
  1784:       case 0b00011011:  //T_XHCGT
  1785:         T.drawRaster (src, dst);
  1786:         break;
  1787:         //   .A.XHPGT
  1788:       case 0b00011101:  //T_XHPT
  1789:         T.drawRaster (src, dst);
  1790:         break;
  1791:         //   .A.XHPGT
  1792:       case 0b00011110:  //T_XHPG
  1793:         T.drawRaster (src, dst);
  1794:         break;
  1795:         //   .A.XHPGT
  1796:       case 0b00011111:  //T_XHPGT
  1797:         T.drawRaster (src, dst);
  1798:         break;
  1799:         //   .A.XHPGT
  1800:       case 0b01000000:  //T_A
  1801:       case 0b01000001:  //T_A
  1802:       case 0b01000010:  //T_A
  1803:       case 0b01000011:  //T_A
  1804:       case 0b01000100:  //T_A
  1805:       case 0b01000101:  //T_A
  1806:       case 0b01000110:  //T_A
  1807:       case 0b01000111:  //T_A
  1808:       case 0b01001000:  //T_A
  1809:       case 0b01001001:  //T_A
  1810:       case 0b01001010:  //T_A
  1811:       case 0b01001011:  //T_A
  1812:       case 0b01001100:  //T_A
  1813:       case 0b01001101:  //T_A
  1814:       case 0b01001110:  //T_A
  1815:       case 0b01001111:  //T_A
  1816:       case 0b01010000:  //T_A
  1817:       case 0b01010001:  //T_A
  1818:       case 0b01010010:  //T_A
  1819:       case 0b01010011:  //T_A
  1820:       case 0b01010100:  //T_A
  1821:       case 0b01010101:  //T_A
  1822:       case 0b01010110:  //T_A
  1823:       case 0b01010111:  //T_A
  1824:       case 0b01011000:  //T_A
  1825:       case 0b01011001:  //T_A
  1826:       case 0b01011010:  //T_A
  1827:       case 0b01011011:  //T_A
  1828:       case 0b01011100:  //T_A
  1829:       case 0b01011101:  //T_A
  1830:       case 0b01011110:  //T_A
  1831:       case 0b01011111:  //T_A
  1832:         N.drawRaster (src, dst);
  1833:         break;
  1834:       default:
  1835:         T.drawRaster (src, dst);
  1836:         VideoController.vcnReportUnimplemented (XT);
  1837:       }  //switch
  1838:     }  //drawRaster(int,int)
  1839:   },  //XT
  1840: 
  1841:   //================================================================================
  1842:   //ST ($0000,$06xx,$0060)
  1843:   //  概要
  1844:   //    ST  スプライト>テキスト
  1845:   //    拡張なし
  1846:   //  手順
  1847:   //    スプライトパレットの下位4bitが0でないまたはテキストパレットが0のとき
  1848:   //      スプライトカラー(0は黒)
  1849:   //    さもなくば(スプライトパレットの下位4bitが0かつテキストパレットが0でないとき)
  1850:   //      テキストカラー(0は黒)
  1851:   //  中間コード1
  1852:   //    (ls4(spp())!=0||txp()==0?spc(spp()):tpc(txp()))
  1853:   //  中間コード2
  1854:   //    ls4(spp())!=0||txp()==0?spc(spp()):tpc(txp())
  1855:   //  中間コード3
  1856:   //    ls4(v1=spp())!=0||(v2=txp())==0?spc(v1):tpc(v2)
  1857:   //  中間コード4
  1858:   //    ls4(p=spp())!=0||(q=txp())==0?spc(p):tpc(q)
  1859:   //  中間コード5
  1860:   //    ((p=spp())&15)!=0||(q=txp())==0?spc(p):tpc(q)
  1861:   //  中間コード6
  1862:   //    ((p=spp())&15)!=0||(q=txp())==0?spo(p):tpo(q)
  1863:   ST {
  1864:     @Override public void drawRaster (int src, int dst) {
  1865:       SpriteScreen.sprStep3 ();
  1866:       int sx = 16;  //スプライトx座標
  1867:       int tc = CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
  1868:       int ta0 = 0x00e00000 + ((CRTC.crtR11TxYCurr + src & 1023) << 7);  //桁0のテキストアドレス
  1869:       int ta1 = 0x00020000 + ta0;
  1870:       int ta2 = 0x00040000 + ta0;
  1871:       int ta3 = 0x00060000 + ta0;
  1872:       int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
  1873:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  1874:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  1875:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  1876:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  1877:         sx += half;
  1878:         tc = tc + (half >> 3) & 127;
  1879:         da += half;
  1880:       }
  1881:       if (ts == 0) {  //テキスト桁境界に合っているとき
  1882:         while (da < db) {
  1883:           int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
  1884:                     VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
  1885:                     VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
  1886:                     VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
  1887:           tc = tc + 1 & 127;  //次回のテキスト桁位置
  1888:           int p, q;
  1889:           XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
  1890:                             VideoController.vcnPal32TS[p] :
  1891:                             VideoController.vcnPal32TS[q]);
  1892:           XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
  1893:                                 VideoController.vcnPal32TS[p] :
  1894:                                 VideoController.vcnPal32TS[q]);
  1895:           XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
  1896:                                 VideoController.vcnPal32TS[p] :
  1897:                                 VideoController.vcnPal32TS[q]);
  1898:           XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
  1899:                                 VideoController.vcnPal32TS[p] :
  1900:                                 VideoController.vcnPal32TS[q]);
  1901:           XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
  1902:                                 VideoController.vcnPal32TS[p] :
  1903:                                 VideoController.vcnPal32TS[q]);
  1904:           XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
  1905:                                 VideoController.vcnPal32TS[p] :
  1906:                                 VideoController.vcnPal32TS[q]);
  1907:           XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
  1908:                                 VideoController.vcnPal32TS[p] :
  1909:                                 VideoController.vcnPal32TS[q]);
  1910:           XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
  1911:                                 VideoController.vcnPal32TS[p] :
  1912:                                 VideoController.vcnPal32TS[q]);
  1913:           sx += 8;
  1914:           da += 8;
  1915:         }  //while da<db
  1916:       } else {  //テキスト桁境界に合っていないとき
  1917:         //                                                             ts=1のとき
  1918:         int tt = ts + 8;                                             //tt=9
  1919:         ts += 16;                                                    //ts=17
  1920:         //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
  1921:         int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
  1922:         int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
  1923:         int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
  1924:         int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
  1925:         tc = tc + 1 & 127;  //次回のテキスト桁位置
  1926:         while (da < db) {
  1927:           //                                                           ........ ........ .1234567 ________  p0>>tt
  1928:           //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
  1929:           p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
  1930:           p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
  1931:           p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
  1932:           p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
  1933:           int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
  1934:                     VideoController.VCN_TXP2[p2 >>> 24] |
  1935:                     VideoController.VCN_TXP1[p1 >>> 24] |
  1936:                     VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
  1937:           tc = tc + 1 & 127;  //次回のテキスト桁位置
  1938:           int p, q;
  1939:           XEiJ.pnlBM[da] = (((p = SpriteScreen.sprBuffer[sx]) & 15) != 0 || (q = tp >>> 28) == 0 ?
  1940:                             VideoController.vcnPal32TS[p] :
  1941:                             VideoController.vcnPal32TS[q]);
  1942:           XEiJ.pnlBM[da + 1] = (((p = SpriteScreen.sprBuffer[sx + 1]) & 15) != 0 || (q = tp >>> 24 & 15) == 0 ?
  1943:                                 VideoController.vcnPal32TS[p] :
  1944:                                 VideoController.vcnPal32TS[q]);
  1945:           XEiJ.pnlBM[da + 2] = (((p = SpriteScreen.sprBuffer[sx + 2]) & 15) != 0 || (q = tp >>> 20 & 15) == 0 ?
  1946:                                 VideoController.vcnPal32TS[p] :
  1947:                                 VideoController.vcnPal32TS[q]);
  1948:           XEiJ.pnlBM[da + 3] = (((p = SpriteScreen.sprBuffer[sx + 3]) & 15) != 0 || (q = tp >>> 16 & 15) == 0 ?
  1949:                                 VideoController.vcnPal32TS[p] :
  1950:                                 VideoController.vcnPal32TS[q]);
  1951:           XEiJ.pnlBM[da + 4] = (((p = SpriteScreen.sprBuffer[sx + 4]) & 15) != 0 || (q = tp >>> 12 & 15) == 0 ?
  1952:                                 VideoController.vcnPal32TS[p] :
  1953:                                 VideoController.vcnPal32TS[q]);
  1954:           XEiJ.pnlBM[da + 5] = (((p = SpriteScreen.sprBuffer[sx + 5]) & 15) != 0 || (q = tp >>> 8 & 15) == 0 ?
  1955:                                 VideoController.vcnPal32TS[p] :
  1956:                                 VideoController.vcnPal32TS[q]);
  1957:           XEiJ.pnlBM[da + 6] = (((p = SpriteScreen.sprBuffer[sx + 6]) & 15) != 0 || (q = tp >>> 4 & 15) == 0 ?
  1958:                                 VideoController.vcnPal32TS[p] :
  1959:                                 VideoController.vcnPal32TS[q]);
  1960:           XEiJ.pnlBM[da + 7] = (((p = SpriteScreen.sprBuffer[sx + 7]) & 15) != 0 || (q = tp & 15) == 0 ?
  1961:                                 VideoController.vcnPal32TS[p] :
  1962:                                 VideoController.vcnPal32TS[q]);
  1963:           sx += 8;
  1964:           da += 8;
  1965:         }  //while da<db
  1966:       }  //if ts==0
  1967:     }  //drawRaster(int,int)
  1968:   },  //ST
  1969: 
  1970:   //================================================================================
  1971:   //XST
  1972:   //  概要
  1973:   //    ST  スプライト>テキスト
  1974:   //    拡張あり
  1975:   XST {
  1976:     @Override public void drawRaster (int src, int dst) {
  1977:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  1978:         //   .A.XHPGT
  1979:       case 0b00010000:  //ST_XWC
  1980:       case 0b00010001:  //ST_XWC
  1981:       case 0b00010010:  //ST_XWC
  1982:       case 0b00010011:  //ST_XWC
  1983:         ST.drawRaster (src, dst);
  1984:         break;
  1985:         //   .A.XHPGT
  1986:       case 0b00010100:  //ST_XWP
  1987:       case 0b00010101:  //ST_XWP
  1988:       case 0b00010110:  //ST_XWP
  1989:       case 0b00010111:  //ST_XWP
  1990:         ST.drawRaster (src, dst);
  1991:         break;
  1992:         //   .A.XHPGT
  1993:       case 0b00011000:  //ST_XHC
  1994:         ST.drawRaster (src, dst);
  1995:         break;
  1996:         //   .A.XHPGT
  1997:       case 0b00011001:  //ST_XHCT
  1998:         ST.drawRaster (src, dst);
  1999:         break;
  2000:         //   .A.XHPGT
  2001:       case 0b00011010:  //ST_XHCG
  2002:         ST.drawRaster (src, dst);
  2003:         break;
  2004:         //   .A.XHPGT
  2005:       case 0b00011011:  //ST_XHCGT
  2006:         ST.drawRaster (src, dst);
  2007:         break;
  2008:         //   .A.XHPGT
  2009:       case 0b00011101:  //ST_XHPT
  2010:         ST.drawRaster (src, dst);
  2011:         break;
  2012:         //   .A.XHPGT
  2013:       case 0b00011110:  //ST_XHPG
  2014:         ST.drawRaster (src, dst);
  2015:         break;
  2016:         //   .A.XHPGT
  2017:       case 0b00011111:  //ST_XHPGT
  2018:         ST.drawRaster (src, dst);
  2019:         break;
  2020:         //   .A.XHPGT
  2021:       case 0b01000000:  //ST_A
  2022:       case 0b01000001:  //ST_A
  2023:       case 0b01000010:  //ST_A
  2024:       case 0b01000011:  //ST_A
  2025:       case 0b01000100:  //ST_A
  2026:       case 0b01000101:  //ST_A
  2027:       case 0b01000110:  //ST_A
  2028:       case 0b01000111:  //ST_A
  2029:       case 0b01001000:  //ST_A
  2030:       case 0b01001001:  //ST_A
  2031:       case 0b01001010:  //ST_A
  2032:       case 0b01001011:  //ST_A
  2033:       case 0b01001100:  //ST_A
  2034:       case 0b01001101:  //ST_A
  2035:       case 0b01001110:  //ST_A
  2036:       case 0b01001111:  //ST_A
  2037:       case 0b01010000:  //ST_A
  2038:       case 0b01010001:  //ST_A
  2039:       case 0b01010010:  //ST_A
  2040:       case 0b01010011:  //ST_A
  2041:       case 0b01010100:  //ST_A
  2042:       case 0b01010101:  //ST_A
  2043:       case 0b01010110:  //ST_A
  2044:       case 0b01010111:  //ST_A
  2045:       case 0b01011000:  //ST_A
  2046:       case 0b01011001:  //ST_A
  2047:       case 0b01011010:  //ST_A
  2048:       case 0b01011011:  //ST_A
  2049:       case 0b01011100:  //ST_A
  2050:       case 0b01011101:  //ST_A
  2051:       case 0b01011110:  //ST_A
  2052:       case 0b01011111:  //ST_A
  2053:         N.drawRaster (src, dst);
  2054:         break;
  2055:       default:
  2056:         ST.drawRaster (src, dst);
  2057:         VideoController.vcnReportUnimplemented (XST);
  2058:       }  //switch
  2059:     }  //drawRaster(int,int)
  2060:   },  //XST
  2061: 
  2062:   //================================================================================
  2063:   //TS ($0000,$12xx,$0060)
  2064:   //  概要
  2065:   //    TS  テキスト>スプライト
  2066:   //    拡張なし
  2067:   //  手順
  2068:   //    テキストパレットが0でないとき
  2069:   //      テキストカラー(0は黒)
  2070:   //    さもなくば(テキストパレットが0のとき)
  2071:   //      スプライトカラー(0は黒)
  2072:   //  中間コード1
  2073:   //    (txp()!=0?tpc(txp()):spc(spp()))
  2074:   //  中間コード2
  2075:   //    txp()!=0?tpc(txp()):spc(spp())
  2076:   //  中間コード3
  2077:   //    (v0=txp())!=0?tpc(v0):spc(spp())
  2078:   //  中間コード4
  2079:   //    (p=txp())!=0?tpc(p):spc(spp())
  2080:   //  中間コード5
  2081:   //    (p=txp())!=0?tpc(p):spc(spp())
  2082:   //  中間コード6
  2083:   //    (p=txp())!=0?tpo(p):spo(spp())
  2084:   TS {
  2085:     @Override public void drawRaster (int src, int dst) {
  2086:       SpriteScreen.sprStep3 ();
  2087:       int sx = 16;  //スプライトx座標
  2088:       int tc = CRTC.crtR10TxXCurr >> 3;  //テキスト桁位置
  2089:       int ta0 = 0x00e00000 + ((CRTC.crtR11TxYCurr + src & 1023) << 7);  //桁0のテキストアドレス
  2090:       int ta1 = 0x00020000 + ta0;
  2091:       int ta2 = 0x00040000 + ta0;
  2092:       int ta3 = 0x00060000 + ta0;
  2093:       int ts = CRTC.crtR10TxXCurr & 7;  //テキスト桁境界からのずれ
  2094:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2095:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2096:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  2097:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2098:         sx += half;
  2099:         tc = tc + (half >> 3) & 127;
  2100:         da += half;
  2101:       }
  2102:       if (ts == 0) {  //テキスト桁境界に合っているとき
  2103:         while (da < db) {
  2104:           int tp = (VideoController.VCN_TXP3[MainMemory.mmrM8[ta3 + tc] & 255] |
  2105:                     VideoController.VCN_TXP2[MainMemory.mmrM8[ta2 + tc] & 255] |
  2106:                     VideoController.VCN_TXP1[MainMemory.mmrM8[ta1 + tc] & 255] |
  2107:                     VideoController.VCN_TXP0[MainMemory.mmrM8[ta0 + tc] & 255]);
  2108:           tc = tc + 1 & 127;  //次回のテキスト桁位置
  2109:           int p;
  2110:           XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
  2111:                             VideoController.vcnPal32TS[p] :
  2112:                             VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
  2113:           XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
  2114:                                 VideoController.vcnPal32TS[p] :
  2115:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
  2116:           XEiJ.pnlBM[da + 2] = ((p = tp >>> 20 & 15) != 0 ?
  2117:                                 VideoController.vcnPal32TS[p] :
  2118:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
  2119:           XEiJ.pnlBM[da + 3] = ((p = tp >>> 16 & 15) != 0 ?
  2120:                                 VideoController.vcnPal32TS[p] :
  2121:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
  2122:           XEiJ.pnlBM[da + 4] = ((p = tp >>> 12 & 15) != 0 ?
  2123:                                 VideoController.vcnPal32TS[p] :
  2124:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
  2125:           XEiJ.pnlBM[da + 5] = ((p = tp >>> 8 & 15) != 0 ?
  2126:                                 VideoController.vcnPal32TS[p] :
  2127:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
  2128:           XEiJ.pnlBM[da + 6] = ((p = tp >>> 4 & 15) != 0 ?
  2129:                                 VideoController.vcnPal32TS[p] :
  2130:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
  2131:           XEiJ.pnlBM[da + 7] = ((p = tp & 15) != 0 ?
  2132:                                 VideoController.vcnPal32TS[p] :
  2133:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
  2134:           sx += 8;
  2135:           da += 8;
  2136:         }  //while da<db
  2137:       } else {  //テキスト桁境界に合っていないとき
  2138:         //                                                             ts=1のとき
  2139:         int tt = ts + 8;                                             //tt=9
  2140:         ts += 16;                                                    //ts=17
  2141:         //                                                             ........ ........ ........ 01234567  m8[ta0+tc]
  2142:         int p0 = MainMemory.mmrM8[ta0 + tc] << ts;                   //.......0 1234567_ ________ ________  p0=m8[ta0+tc]<<ts
  2143:         int p1 = MainMemory.mmrM8[ta1 + tc] << ts;
  2144:         int p2 = MainMemory.mmrM8[ta2 + tc] << ts;
  2145:         int p3 = MainMemory.mmrM8[ta3 + tc] << ts;
  2146:         tc = tc + 1 & 127;  //次回のテキスト桁位置
  2147:         while (da < db) {
  2148:           //                                                           ........ ........ .1234567 ________  p0>>tt
  2149:           //                                                           ........ ........ .1234567 89abcdef  p0>>tt|m8[ta0+tc]&255
  2150:           p0 = (p0 >> tt | MainMemory.mmrM8[ta0 + tc] & 255) << ts;  //12345678 9abcdef_ ________ ________  p0=(p0>>tt|m8[ta0+tc]&255)<<ts
  2151:           p1 = (p1 >> tt | MainMemory.mmrM8[ta1 + tc] & 255) << ts;  //~~~~~~~~
  2152:           p2 = (p2 >> tt | MainMemory.mmrM8[ta2 + tc] & 255) << ts;  //ここを使う
  2153:           p3 = (p3 >> tt | MainMemory.mmrM8[ta3 + tc] & 255) << ts;
  2154:           int tp = (VideoController.VCN_TXP3[p3 >>> 24] |
  2155:                     VideoController.VCN_TXP2[p2 >>> 24] |
  2156:                     VideoController.VCN_TXP1[p1 >>> 24] |
  2157:                     VideoController.VCN_TXP0[p0 >>> 24]);  //符号なし右シフトで&255を省略
  2158:           tc = tc + 1 & 127;  //次回のテキスト桁位置
  2159:           int p;
  2160:           XEiJ.pnlBM[da] = ((p = tp >>> 28) != 0 ?
  2161:                             VideoController.vcnPal32TS[p] :
  2162:                             VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx]]);
  2163:           XEiJ.pnlBM[da + 1] = ((p = tp >>> 24 & 15) != 0 ?
  2164:                                 VideoController.vcnPal32TS[p] :
  2165:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 1]]);
  2166:           XEiJ.pnlBM[da + 2] = ((p = tp >>> 20 & 15) != 0 ?
  2167:                                 VideoController.vcnPal32TS[p] :
  2168:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 2]]);
  2169:           XEiJ.pnlBM[da + 3] = ((p = tp >>> 16 & 15) != 0 ?
  2170:                                 VideoController.vcnPal32TS[p] :
  2171:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 3]]);
  2172:           XEiJ.pnlBM[da + 4] = ((p = tp >>> 12 & 15) != 0 ?
  2173:                                 VideoController.vcnPal32TS[p] :
  2174:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 4]]);
  2175:           XEiJ.pnlBM[da + 5] = ((p = tp >>> 8 & 15) != 0 ?
  2176:                                 VideoController.vcnPal32TS[p] :
  2177:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 5]]);
  2178:           XEiJ.pnlBM[da + 6] = ((p = tp >>> 4 & 15) != 0 ?
  2179:                                 VideoController.vcnPal32TS[p] :
  2180:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 6]]);
  2181:           XEiJ.pnlBM[da + 7] = ((p = tp & 15) != 0 ?
  2182:                                 VideoController.vcnPal32TS[p] :
  2183:                                 VideoController.vcnPal32TS[SpriteScreen.sprBuffer[sx + 7]]);
  2184:           sx += 8;
  2185:           da += 8;
  2186:         }  //while da<db
  2187:       }  //if ts==0
  2188:     }  //drawRaster(int,int)
  2189:   },  //TS
  2190: 
  2191:   //================================================================================
  2192:   //XTS
  2193:   //  概要
  2194:   //    TS  テキスト>スプライト
  2195:   //    拡張あり
  2196:   XTS {
  2197:     @Override public void drawRaster (int src, int dst) {
  2198:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  2199:         //   .A.XHPGT
  2200:       case 0b00010000:  //TS_XWC
  2201:       case 0b00010001:  //TS_XWC
  2202:       case 0b00010010:  //TS_XWC
  2203:       case 0b00010011:  //TS_XWC
  2204:         TS.drawRaster (src, dst);
  2205:         break;
  2206:         //   .A.XHPGT
  2207:       case 0b00010100:  //TS_XWP
  2208:       case 0b00010101:  //TS_XWP
  2209:       case 0b00010110:  //TS_XWP
  2210:       case 0b00010111:  //TS_XWP
  2211:         TS.drawRaster (src, dst);
  2212:         break;
  2213:         //   .A.XHPGT
  2214:       case 0b00011000:  //TS_XHC
  2215:         TS.drawRaster (src, dst);
  2216:         break;
  2217:         //   .A.XHPGT
  2218:       case 0b00011001:  //TS_XHCT
  2219:         TS.drawRaster (src, dst);
  2220:         break;
  2221:         //   .A.XHPGT
  2222:       case 0b00011010:  //TS_XHCG
  2223:         TS.drawRaster (src, dst);
  2224:         break;
  2225:         //   .A.XHPGT
  2226:       case 0b00011011:  //TS_XHCGT
  2227:         TS.drawRaster (src, dst);
  2228:         break;
  2229:         //   .A.XHPGT
  2230:       case 0b00011101:  //TS_XHPT
  2231:         TS.drawRaster (src, dst);
  2232:         break;
  2233:         //   .A.XHPGT
  2234:       case 0b00011110:  //TS_XHPG
  2235:         TS.drawRaster (src, dst);
  2236:         break;
  2237:         //   .A.XHPGT
  2238:       case 0b00011111:  //TS_XHPGT
  2239:         TS.drawRaster (src, dst);
  2240:         break;
  2241:         //   .A.XHPGT
  2242:       case 0b01000000:  //TS_A
  2243:       case 0b01000001:  //TS_A
  2244:       case 0b01000010:  //TS_A
  2245:       case 0b01000011:  //TS_A
  2246:       case 0b01000100:  //TS_A
  2247:       case 0b01000101:  //TS_A
  2248:       case 0b01000110:  //TS_A
  2249:       case 0b01000111:  //TS_A
  2250:       case 0b01001000:  //TS_A
  2251:       case 0b01001001:  //TS_A
  2252:       case 0b01001010:  //TS_A
  2253:       case 0b01001011:  //TS_A
  2254:       case 0b01001100:  //TS_A
  2255:       case 0b01001101:  //TS_A
  2256:       case 0b01001110:  //TS_A
  2257:       case 0b01001111:  //TS_A
  2258:       case 0b01010000:  //TS_A
  2259:       case 0b01010001:  //TS_A
  2260:       case 0b01010010:  //TS_A
  2261:       case 0b01010011:  //TS_A
  2262:       case 0b01010100:  //TS_A
  2263:       case 0b01010101:  //TS_A
  2264:       case 0b01010110:  //TS_A
  2265:       case 0b01010111:  //TS_A
  2266:       case 0b01011000:  //TS_A
  2267:       case 0b01011001:  //TS_A
  2268:       case 0b01011010:  //TS_A
  2269:       case 0b01011011:  //TS_A
  2270:       case 0b01011100:  //TS_A
  2271:       case 0b01011101:  //TS_A
  2272:       case 0b01011110:  //TS_A
  2273:       case 0b01011111:  //TS_A
  2274:         N.drawRaster (src, dst);
  2275:         break;
  2276:       default:
  2277:         TS.drawRaster (src, dst);
  2278:         VideoController.vcnReportUnimplemented (XTS);
  2279:       }  //switch
  2280:     }  //drawRaster(int,int)
  2281:   },  //XTS
  2282: 
  2283:   //================================================================================
  2284:   //E1 ($0000,$06xx,$0001)
  2285:   //  概要
  2286:   //    E1  512ドット16色1プレーン
  2287:   //    拡張なし
  2288:   //  手順
  2289:   //    1番目のカラー(0は黒)
  2290:   //  中間コード1
  2291:   //    epc(e1p())
  2292:   //  中間コード2
  2293:   //    epc(e1p())
  2294:   //  中間コード3
  2295:   //    epc(e1p())
  2296:   //  中間コード4
  2297:   //    epc(e1p())
  2298:   //  中間コード5
  2299:   //    epc(e1p())
  2300:   //  中間コード6
  2301:   //    epo(e1p())
  2302:   E1 {
  2303:     @Override public void drawRaster (int src, int dst) {
  2304:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2305:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2306:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  2307:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2308:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2309:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  2310:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2311:         gx1st += half << 1;
  2312:         da += half;
  2313:       }
  2314:       while (da < db) {
  2315:         XEiJ.pnlBM[da] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st & 1023]]);
  2316:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]]);
  2317:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]]);
  2318:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]]);
  2319:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]]);
  2320:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]]);
  2321:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]]);
  2322:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32G8[MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]]);
  2323:         gx1st += 16;
  2324:         da += 8;
  2325:       }  //while da<db
  2326:     }  //drawRaster(int,int)
  2327:   },  //E1
  2328: 
  2329:   //================================================================================
  2330:   //XE1
  2331:   //  概要
  2332:   //    E1  512ドット16色1プレーン
  2333:   //    拡張あり
  2334:   XE1 {
  2335:     @Override public void drawRaster (int src, int dst) {
  2336:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  2337:         //   .A.XHPGT
  2338:       case 0b00010000:  //E1_XWC
  2339:       case 0b00010001:  //E1_XWC
  2340:       case 0b00010010:  //E1_XWC
  2341:       case 0b00010011:  //E1_XWC
  2342:         E1.drawRaster (src, dst);
  2343:         break;
  2344:         //   .A.XHPGT
  2345:       case 0b00010100:  //E1_XWP
  2346:       case 0b00010101:  //E1_XWP
  2347:       case 0b00010110:  //E1_XWP
  2348:       case 0b00010111:  //E1_XWP
  2349:         E1_XWP.drawRaster (src, dst);
  2350:         break;
  2351:         //   .A.XHPGT
  2352:       case 0b00011000:  //E1_XHC
  2353:         E1.drawRaster (src, dst);
  2354:         break;
  2355:         //   .A.XHPGT
  2356:       case 0b00011001:  //E1_XHCT
  2357:         E1_XHCT.drawRaster (src, dst);
  2358:         break;
  2359:         //   .A.XHPGT
  2360:       case 0b00011010:  //E1_XHCG
  2361:         E1_XHCG.drawRaster (src, dst);
  2362:         break;
  2363:         //   .A.XHPGT
  2364:       case 0b00011011:  //E1_XHCGT
  2365:         E1_XHCGT.drawRaster (src, dst);
  2366:         break;
  2367:         //   .A.XHPGT
  2368:       case 0b00011101:  //E1_XHPT
  2369:         E1_XHPT.drawRaster (src, dst);
  2370:         break;
  2371:         //   .A.XHPGT
  2372:       case 0b00011110:  //E1_XHPG
  2373:         E1_XHPG.drawRaster (src, dst);
  2374:         break;
  2375:         //   .A.XHPGT
  2376:       case 0b00011111:  //E1_XHPGT
  2377:         E1_XHPGT.drawRaster (src, dst);
  2378:         break;
  2379:         //   .A.XHPGT
  2380:       case 0b01000000:  //E1_A
  2381:       case 0b01000001:  //E1_A
  2382:       case 0b01000010:  //E1_A
  2383:       case 0b01000011:  //E1_A
  2384:       case 0b01000100:  //E1_A
  2385:       case 0b01000101:  //E1_A
  2386:       case 0b01000110:  //E1_A
  2387:       case 0b01000111:  //E1_A
  2388:       case 0b01001000:  //E1_A
  2389:       case 0b01001001:  //E1_A
  2390:       case 0b01001010:  //E1_A
  2391:       case 0b01001011:  //E1_A
  2392:       case 0b01001100:  //E1_A
  2393:       case 0b01001101:  //E1_A
  2394:       case 0b01001110:  //E1_A
  2395:       case 0b01001111:  //E1_A
  2396:       case 0b01010000:  //E1_A
  2397:       case 0b01010001:  //E1_A
  2398:       case 0b01010010:  //E1_A
  2399:       case 0b01010011:  //E1_A
  2400:       case 0b01010100:  //E1_A
  2401:       case 0b01010101:  //E1_A
  2402:       case 0b01010110:  //E1_A
  2403:       case 0b01010111:  //E1_A
  2404:       case 0b01011000:  //E1_A
  2405:       case 0b01011001:  //E1_A
  2406:       case 0b01011010:  //E1_A
  2407:       case 0b01011011:  //E1_A
  2408:       case 0b01011100:  //E1_A
  2409:       case 0b01011101:  //E1_A
  2410:       case 0b01011110:  //E1_A
  2411:       case 0b01011111:  //E1_A
  2412:         E1_A.drawRaster (src, dst);
  2413:         break;
  2414:       default:
  2415:         E1.drawRaster (src, dst);
  2416:         VideoController.vcnReportUnimplemented (XE1);
  2417:       }  //switch
  2418:     }  //drawRaster(int,int)
  2419:   },  //XE1
  2420: 
  2421:   //================================================================================
  2422:   //E1_XWP ($0000,$06xx,$1401)
  2423:   //  概要
  2424:   //    E1  512ドット16色1プレーン
  2425:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  2426:   //  手順
  2427:   //    1番目のパレットが1以下のとき
  2428:   //      グラフィックスパレット0のカラー(0は黒)
  2429:   //    1番目のパレットが2以上の偶数のとき
  2430:   //      1番目のカラー(0は黒)
  2431:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  2432:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  2433:   //  中間コード1
  2434:   //    (e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p())))
  2435:   //  中間コード2
  2436:   //    e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p()))
  2437:   //  中間コード3
  2438:   //    (v0=e1p())<=1?epc(0):ls1(v0)==0?epc(v0):epc(tev(v0))
  2439:   //  中間コード4
  2440:   //    (p=e1p())<=1?epc(0):ls1(p)==0?epc(p):epc(tev(p))
  2441:   //  中間コード5
  2442:   //    (p=e1p())<=1?epc(0):(p&1)==0?epc(p):epc(p&-2)
  2443:   //  中間コード6
  2444:   //    (p=e1p())<=1?epo(0):(p&1)==0?epo(p):epo(p&-2)
  2445:   E1_XWP {
  2446:     @Override public void drawRaster (int src, int dst) {
  2447:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2448:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2449:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  2450:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2451:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2452:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  2453:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2454:         gx1st += half << 1;
  2455:         da += half;
  2456:       }
  2457:       while (da < db) {
  2458:         int p;
  2459:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) <= 1 ?
  2460:                           VideoController.vcnPal32G8[0] :
  2461:                           (p & 1) == 0 ?
  2462:                           VideoController.vcnPal32G8[p] :
  2463:                           VideoController.vcnPal32G8[p & -2]);
  2464:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) <= 1 ?
  2465:                               VideoController.vcnPal32G8[0] :
  2466:                               (p & 1) == 0 ?
  2467:                               VideoController.vcnPal32G8[p] :
  2468:                               VideoController.vcnPal32G8[p & -2]);
  2469:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) <= 1 ?
  2470:                               VideoController.vcnPal32G8[0] :
  2471:                               (p & 1) == 0 ?
  2472:                               VideoController.vcnPal32G8[p] :
  2473:                               VideoController.vcnPal32G8[p & -2]);
  2474:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) <= 1 ?
  2475:                               VideoController.vcnPal32G8[0] :
  2476:                               (p & 1) == 0 ?
  2477:                               VideoController.vcnPal32G8[p] :
  2478:                               VideoController.vcnPal32G8[p & -2]);
  2479:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) <= 1 ?
  2480:                               VideoController.vcnPal32G8[0] :
  2481:                               (p & 1) == 0 ?
  2482:                               VideoController.vcnPal32G8[p] :
  2483:                               VideoController.vcnPal32G8[p & -2]);
  2484:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) <= 1 ?
  2485:                               VideoController.vcnPal32G8[0] :
  2486:                               (p & 1) == 0 ?
  2487:                               VideoController.vcnPal32G8[p] :
  2488:                               VideoController.vcnPal32G8[p & -2]);
  2489:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) <= 1 ?
  2490:                               VideoController.vcnPal32G8[0] :
  2491:                               (p & 1) == 0 ?
  2492:                               VideoController.vcnPal32G8[p] :
  2493:                               VideoController.vcnPal32G8[p & -2]);
  2494:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) <= 1 ?
  2495:                               VideoController.vcnPal32G8[0] :
  2496:                               (p & 1) == 0 ?
  2497:                               VideoController.vcnPal32G8[p] :
  2498:                               VideoController.vcnPal32G8[p & -2]);
  2499:         gx1st += 16;
  2500:         da += 8;
  2501:       }  //while da<db
  2502:     }  //drawRaster(int,int)
  2503:   },  //E1_XWP
  2504: 
  2505:   //================================================================================
  2506:   //E1_XHCT ($0000,$06xx,$1901)
  2507:   //  概要
  2508:   //    E1  512ドット16色1プレーン
  2509:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  2510:   //  手順
  2511:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  2512:   //      1番目のカラーとカラー0を混ぜたカラー(0は黒)
  2513:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  2514:   //      1番目のカラー(0は黒)
  2515:   //  中間コード1
  2516:   //    (ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p()))
  2517:   //  中間コード2
  2518:   //    ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p())
  2519:   //  中間コード3
  2520:   //    ls1(epc(tev(v3=e1p())))!=0?mix(epc(v3),0):epc(v3)
  2521:   //  中間コード4
  2522:   //    ls1(epc(tev(p=e1p())))!=0?mix(epc(p),0):epc(p)
  2523:   //  中間コード5
  2524:   //    (epc((p=e1p())&-2)&1)!=0?mix(epc(p),0):epc(p)
  2525:   //  中間コード6
  2526:   //    (epc((p=e1p())&-2)&1)!=0?cto(mix(epc(p),0)):epo(p)
  2527:   E1_XHCT {
  2528:     @Override public void drawRaster (int src, int dst) {
  2529:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2530:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2531:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  2532:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2533:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2534:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  2535:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2536:         gx1st += half << 1;
  2537:         da += half;
  2538:       }
  2539:       while (da < db) {
  2540:         int p;
  2541:         XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st & 1023]) & -2] & 1) != 0 ?
  2542:                           VideoController.vcnPalTbl[
  2543:                             VideoController.vcnMix2 (
  2544:                               VideoController.vcnPal16G8[p],
  2545:                               0)] :
  2546:                           VideoController.vcnPal32G8[p]);
  2547:         XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) & -2] & 1) != 0 ?
  2548:                               VideoController.vcnPalTbl[
  2549:                                 VideoController.vcnMix2 (
  2550:                                   VideoController.vcnPal16G8[p],
  2551:                                   0)] :
  2552:                               VideoController.vcnPal32G8[p]);
  2553:         XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) & -2] & 1) != 0 ?
  2554:                               VideoController.vcnPalTbl[
  2555:                                 VideoController.vcnMix2 (
  2556:                                   VideoController.vcnPal16G8[p],
  2557:                                   0)] :
  2558:                               VideoController.vcnPal32G8[p]);
  2559:         XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) & -2] & 1) != 0 ?
  2560:                               VideoController.vcnPalTbl[
  2561:                                 VideoController.vcnMix2 (
  2562:                                   VideoController.vcnPal16G8[p],
  2563:                                   0)] :
  2564:                               VideoController.vcnPal32G8[p]);
  2565:         XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) & -2] & 1) != 0 ?
  2566:                               VideoController.vcnPalTbl[
  2567:                                 VideoController.vcnMix2 (
  2568:                                   VideoController.vcnPal16G8[p],
  2569:                                   0)] :
  2570:                               VideoController.vcnPal32G8[p]);
  2571:         XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) & -2] & 1) != 0 ?
  2572:                               VideoController.vcnPalTbl[
  2573:                                 VideoController.vcnMix2 (
  2574:                                   VideoController.vcnPal16G8[p],
  2575:                                   0)] :
  2576:                               VideoController.vcnPal32G8[p]);
  2577:         XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) & -2] & 1) != 0 ?
  2578:                               VideoController.vcnPalTbl[
  2579:                                 VideoController.vcnMix2 (
  2580:                                   VideoController.vcnPal16G8[p],
  2581:                                   0)] :
  2582:                               VideoController.vcnPal32G8[p]);
  2583:         XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) & -2] & 1) != 0 ?
  2584:                               VideoController.vcnPalTbl[
  2585:                                 VideoController.vcnMix2 (
  2586:                                   VideoController.vcnPal16G8[p],
  2587:                                   0)] :
  2588:                               VideoController.vcnPal32G8[p]);
  2589:         gx1st += 16;
  2590:         da += 8;
  2591:       }  //while da<db
  2592:     }  //drawRaster(int,int)
  2593:   },  //E1_XHCT
  2594: 
  2595:   //================================================================================
  2596:   //E1_XHCG ($0000,$06xx,$1A01)
  2597:   //  概要
  2598:   //    E1  512ドット16色1プレーン
  2599:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  2600:   //  手順
  2601:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  2602:   //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  2603:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  2604:   //      1番目のパレットが奇数のとき
  2605:   //        2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  2606:   //      さもなくば(1番目のパレットが偶数のとき)
  2607:   //        1番目のカラー(0は黒)
  2608:   //  中間コード1
  2609:   //    (ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p())))
  2610:   //  中間コード2
  2611:   //    ls1(epc(tev(e1p())))!=0?mix(epc(tev(e1p())),epc(tod(e2q()))):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p())
  2612:   //  中間コード3
  2613:   //    ls1(v1=epc(tev(v3=e1p())))!=0?mix(v1,epc(tod(e2q()))):ls1(v3)!=0?epc(tod(e2q())):epc(v3)
  2614:   //  中間コード4
  2615:   //    ls1(p=epc(tev(q=e1p())))!=0?mix(p,epc(tod(e2q()))):ls1(q)!=0?epc(tod(e2q())):epc(q)
  2616:   //  中間コード5
  2617:   //    ((p=epc((q=e1p())&-2))&1)!=0?mix(p,epc(e2q()|1)):(q&1)!=0?epc(e2q()|1):epc(q)
  2618:   //  中間コード6
  2619:   //    ((p=epc((q=e1p())&-2))&1)!=0?cto(mix(p,epc(e2q()|1))):(q&1)!=0?epo(e2q()|1):epo(q)
  2620:   E1_XHCG {
  2621:     @Override public void drawRaster (int src, int dst) {
  2622:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2623:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2624:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  2625:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  2626:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  2627:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  2628:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2629:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2630:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  2631:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2632:         gx1st += half << 1;
  2633:         gx2nd += half << 1;
  2634:         da += half;
  2635:       }
  2636:       while (da < db) {
  2637:         int p, q;
  2638:         XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st & 1023]) & -2]) & 1) != 0 ?
  2639:                           VideoController.vcnPalTbl[
  2640:                             VideoController.vcnMix2 (
  2641:                               p,
  2642:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  2643:                           (q & 1) != 0 ?
  2644:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  2645:                           VideoController.vcnPal32G8[q]);
  2646:         XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) & -2]) & 1) != 0 ?
  2647:                               VideoController.vcnPalTbl[
  2648:                                 VideoController.vcnMix2 (
  2649:                                   p,
  2650:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  2651:                               (q & 1) != 0 ?
  2652:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  2653:                               VideoController.vcnPal32G8[q]);
  2654:         XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) & -2]) & 1) != 0 ?
  2655:                               VideoController.vcnPalTbl[
  2656:                                 VideoController.vcnMix2 (
  2657:                                   p,
  2658:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  2659:                               (q & 1) != 0 ?
  2660:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  2661:                               VideoController.vcnPal32G8[q]);
  2662:         XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) & -2]) & 1) != 0 ?
  2663:                               VideoController.vcnPalTbl[
  2664:                                 VideoController.vcnMix2 (
  2665:                                   p,
  2666:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  2667:                               (q & 1) != 0 ?
  2668:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  2669:                               VideoController.vcnPal32G8[q]);
  2670:         XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) & -2]) & 1) != 0 ?
  2671:                               VideoController.vcnPalTbl[
  2672:                                 VideoController.vcnMix2 (
  2673:                                   p,
  2674:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  2675:                               (q & 1) != 0 ?
  2676:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  2677:                               VideoController.vcnPal32G8[q]);
  2678:         XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) & -2]) & 1) != 0 ?
  2679:                               VideoController.vcnPalTbl[
  2680:                                 VideoController.vcnMix2 (
  2681:                                   p,
  2682:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  2683:                               (q & 1) != 0 ?
  2684:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  2685:                               VideoController.vcnPal32G8[q]);
  2686:         XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) & -2]) & 1) != 0 ?
  2687:                               VideoController.vcnPalTbl[
  2688:                                 VideoController.vcnMix2 (
  2689:                                   p,
  2690:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  2691:                               (q & 1) != 0 ?
  2692:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  2693:                               VideoController.vcnPal32G8[q]);
  2694:         XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) & -2]) & 1) != 0 ?
  2695:                               VideoController.vcnPalTbl[
  2696:                                 VideoController.vcnMix2 (
  2697:                                   p,
  2698:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  2699:                               (q & 1) != 0 ?
  2700:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  2701:                               VideoController.vcnPal32G8[q]);
  2702:         gx1st += 16;
  2703:         gx2nd += 16;
  2704:         da += 8;
  2705:       }  //while da<db
  2706:     }  //drawRaster(int,int)
  2707:   },  //E1_XHCG
  2708: 
  2709:   //================================================================================
  2710:   //E1_XHCGT ($0000,$06xx,$1B01)
  2711:   //  概要
  2712:   //    E1  512ドット16色1プレーン
  2713:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  2714:   //  手順
  2715:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  2716:   //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  2717:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  2718:   //      1番目のパレットが奇数のとき
  2719:   //        2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  2720:   //      さもなくば(1番目のパレットが偶数のとき)
  2721:   //        1番目のカラー(0は黒)
  2722:   //  中間コード1
  2723:   //    (ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):(ls1(e1p())!=0?epc(tod(e2q())):epc(e1p())))
  2724:   //  中間コード2
  2725:   //    ls1(epc(tev(e1p())))!=0?mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0):ls1(e1p())!=0?epc(tod(e2q())):epc(e1p())
  2726:   //  中間コード3
  2727:   //    ls1(v1=epc(tev(v3=e1p())))!=0?mix(mix(v1,epc(tod(e2q()))),0):ls1(v3)!=0?epc(tod(e2q())):epc(v3)
  2728:   //  中間コード4
  2729:   //    ls1(p=epc(tev(q=e1p())))!=0?mix(mix(p,epc(tod(e2q()))),0):ls1(q)!=0?epc(tod(e2q())):epc(q)
  2730:   //  中間コード5
  2731:   //    ((p=epc((q=e1p())&-2))&1)!=0?mix(mix(p,epc(e2q()|1)),0):(q&1)!=0?epc(e2q()|1):epc(q)
  2732:   //  中間コード6
  2733:   //    ((p=epc((q=e1p())&-2))&1)!=0?cto(mix(mix(p,epc(e2q()|1)),0)):(q&1)!=0?epo(e2q()|1):epo(q)
  2734:   E1_XHCGT {
  2735:     @Override public void drawRaster (int src, int dst) {
  2736:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2737:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2738:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  2739:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  2740:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  2741:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  2742:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2743:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2744:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  2745:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2746:         gx1st += half << 1;
  2747:         gx2nd += half << 1;
  2748:         da += half;
  2749:       }
  2750:       while (da < db) {
  2751:         int p, q;
  2752:         XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st & 1023]) & -2]) & 1) != 0 ?
  2753:                           VideoController.vcnPalTbl[
  2754:                             VideoController.vcnMix2 (
  2755:                               VideoController.vcnMix2 (
  2756:                                 p,
  2757:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  2758:                               0)] :
  2759:                           (q & 1) != 0 ?
  2760:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  2761:                           VideoController.vcnPal32G8[q]);
  2762:         XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) & -2]) & 1) != 0 ?
  2763:                               VideoController.vcnPalTbl[
  2764:                                 VideoController.vcnMix2 (
  2765:                                   VideoController.vcnMix2 (
  2766:                                     p,
  2767:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  2768:                                   0)] :
  2769:                               (q & 1) != 0 ?
  2770:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  2771:                               VideoController.vcnPal32G8[q]);
  2772:         XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) & -2]) & 1) != 0 ?
  2773:                               VideoController.vcnPalTbl[
  2774:                                 VideoController.vcnMix2 (
  2775:                                   VideoController.vcnMix2 (
  2776:                                     p,
  2777:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  2778:                                   0)] :
  2779:                               (q & 1) != 0 ?
  2780:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  2781:                               VideoController.vcnPal32G8[q]);
  2782:         XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) & -2]) & 1) != 0 ?
  2783:                               VideoController.vcnPalTbl[
  2784:                                 VideoController.vcnMix2 (
  2785:                                   VideoController.vcnMix2 (
  2786:                                     p,
  2787:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  2788:                                   0)] :
  2789:                               (q & 1) != 0 ?
  2790:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  2791:                               VideoController.vcnPal32G8[q]);
  2792:         XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) & -2]) & 1) != 0 ?
  2793:                               VideoController.vcnPalTbl[
  2794:                                 VideoController.vcnMix2 (
  2795:                                   VideoController.vcnMix2 (
  2796:                                     p,
  2797:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  2798:                                   0)] :
  2799:                               (q & 1) != 0 ?
  2800:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  2801:                               VideoController.vcnPal32G8[q]);
  2802:         XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) & -2]) & 1) != 0 ?
  2803:                               VideoController.vcnPalTbl[
  2804:                                 VideoController.vcnMix2 (
  2805:                                   VideoController.vcnMix2 (
  2806:                                     p,
  2807:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  2808:                                   0)] :
  2809:                               (q & 1) != 0 ?
  2810:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  2811:                               VideoController.vcnPal32G8[q]);
  2812:         XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) & -2]) & 1) != 0 ?
  2813:                               VideoController.vcnPalTbl[
  2814:                                 VideoController.vcnMix2 (
  2815:                                   VideoController.vcnMix2 (
  2816:                                     p,
  2817:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  2818:                                   0)] :
  2819:                               (q & 1) != 0 ?
  2820:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  2821:                               VideoController.vcnPal32G8[q]);
  2822:         XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) & -2]) & 1) != 0 ?
  2823:                               VideoController.vcnPalTbl[
  2824:                                 VideoController.vcnMix2 (
  2825:                                   VideoController.vcnMix2 (
  2826:                                     p,
  2827:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  2828:                                   0)] :
  2829:                               (q & 1) != 0 ?
  2830:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  2831:                               VideoController.vcnPal32G8[q]);
  2832:         gx1st += 16;
  2833:         gx2nd += 16;
  2834:         da += 8;
  2835:       }  //while da<db
  2836:     }  //drawRaster(int,int)
  2837:   },  //E1_XHCGT
  2838: 
  2839:   //================================================================================
  2840:   //E1_XHPT ($0000,$06xx,$1D01)
  2841:   //  概要
  2842:   //    E1  512ドット16色1プレーン
  2843:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  2844:   //  手順
  2845:   //    1番目のパレットが1以下のとき
  2846:   //      グラフィックスパレット0のカラー(0は黒)
  2847:   //    1番目のパレットが2以上の偶数のとき
  2848:   //      1番目のカラー(0は黒)
  2849:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  2850:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  2851:   //  中間コード1
  2852:   //    (e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0))
  2853:   //  中間コード2
  2854:   //    e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0)
  2855:   //  中間コード3
  2856:   //    (v0=e1p())<=1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),0)
  2857:   //  中間コード4
  2858:   //    (p=e1p())<=1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),0)
  2859:   //  中間コード5
  2860:   //    (p=e1p())<=1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),0)
  2861:   //  中間コード6
  2862:   //    (p=e1p())<=1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),0))
  2863:   E1_XHPT {
  2864:     @Override public void drawRaster (int src, int dst) {
  2865:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2866:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2867:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  2868:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2869:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2870:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  2871:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2872:         gx1st += half << 1;
  2873:         da += half;
  2874:       }
  2875:       while (da < db) {
  2876:         int p;
  2877:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) <= 1 ?
  2878:                           VideoController.vcnPal32G8[0] :
  2879:                           (p & 1) == 0 ?
  2880:                           VideoController.vcnPal32G8[p] :
  2881:                           VideoController.vcnPalTbl[
  2882:                             VideoController.vcnMix2 (
  2883:                               VideoController.vcnPal16G8[p & -2],
  2884:                               0)]);
  2885:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) <= 1 ?
  2886:                               VideoController.vcnPal32G8[0] :
  2887:                               (p & 1) == 0 ?
  2888:                               VideoController.vcnPal32G8[p] :
  2889:                               VideoController.vcnPalTbl[
  2890:                                 VideoController.vcnMix2 (
  2891:                                   VideoController.vcnPal16G8[p & -2],
  2892:                                   0)]);
  2893:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) <= 1 ?
  2894:                               VideoController.vcnPal32G8[0] :
  2895:                               (p & 1) == 0 ?
  2896:                               VideoController.vcnPal32G8[p] :
  2897:                               VideoController.vcnPalTbl[
  2898:                                 VideoController.vcnMix2 (
  2899:                                   VideoController.vcnPal16G8[p & -2],
  2900:                                   0)]);
  2901:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) <= 1 ?
  2902:                               VideoController.vcnPal32G8[0] :
  2903:                               (p & 1) == 0 ?
  2904:                               VideoController.vcnPal32G8[p] :
  2905:                               VideoController.vcnPalTbl[
  2906:                                 VideoController.vcnMix2 (
  2907:                                   VideoController.vcnPal16G8[p & -2],
  2908:                                   0)]);
  2909:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) <= 1 ?
  2910:                               VideoController.vcnPal32G8[0] :
  2911:                               (p & 1) == 0 ?
  2912:                               VideoController.vcnPal32G8[p] :
  2913:                               VideoController.vcnPalTbl[
  2914:                                 VideoController.vcnMix2 (
  2915:                                   VideoController.vcnPal16G8[p & -2],
  2916:                                   0)]);
  2917:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) <= 1 ?
  2918:                               VideoController.vcnPal32G8[0] :
  2919:                               (p & 1) == 0 ?
  2920:                               VideoController.vcnPal32G8[p] :
  2921:                               VideoController.vcnPalTbl[
  2922:                                 VideoController.vcnMix2 (
  2923:                                   VideoController.vcnPal16G8[p & -2],
  2924:                                   0)]);
  2925:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) <= 1 ?
  2926:                               VideoController.vcnPal32G8[0] :
  2927:                               (p & 1) == 0 ?
  2928:                               VideoController.vcnPal32G8[p] :
  2929:                               VideoController.vcnPalTbl[
  2930:                                 VideoController.vcnMix2 (
  2931:                                   VideoController.vcnPal16G8[p & -2],
  2932:                                   0)]);
  2933:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) <= 1 ?
  2934:                               VideoController.vcnPal32G8[0] :
  2935:                               (p & 1) == 0 ?
  2936:                               VideoController.vcnPal32G8[p] :
  2937:                               VideoController.vcnPalTbl[
  2938:                                 VideoController.vcnMix2 (
  2939:                                   VideoController.vcnPal16G8[p & -2],
  2940:                                   0)]);
  2941:         gx1st += 16;
  2942:         da += 8;
  2943:       }  //while da<db
  2944:     }  //drawRaster(int,int)
  2945:   },  //E1_XHPT
  2946: 
  2947:   //================================================================================
  2948:   //E1_XHPG ($0000,$06xx,$1E01)
  2949:   //  概要
  2950:   //    E1  512ドット16色1プレーン
  2951:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  2952:   //  手順
  2953:   //    1番目のパレットが1以下のとき
  2954:   //      グラフィックスパレット0のカラー(0は黒)
  2955:   //    1番目のパレットが2以上の偶数のとき
  2956:   //      1番目のカラー(0は黒)
  2957:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  2958:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  2959:   //  中間コード1
  2960:   //    (e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2q()))))
  2961:   //  中間コード2
  2962:   //    e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2q())))
  2963:   //  中間コード3
  2964:   //    (v0=e1p())<=1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),epc(tod(e2q())))
  2965:   //  中間コード4
  2966:   //    (p=e1p())<=1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),epc(tod(e2q())))
  2967:   //  中間コード5
  2968:   //    (p=e1p())<=1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),epc(e2q()|1))
  2969:   //  中間コード6
  2970:   //    (p=e1p())<=1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),epc(e2q()|1)))
  2971:   E1_XHPG {
  2972:     @Override public void drawRaster (int src, int dst) {
  2973:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  2974:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  2975:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  2976:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  2977:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  2978:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  2979:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  2980:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  2981:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  2982:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  2983:         gx1st += half << 1;
  2984:         gx2nd += half << 1;
  2985:         da += half;
  2986:       }
  2987:       while (da < db) {
  2988:         int p;
  2989:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) <= 1 ?
  2990:                           VideoController.vcnPal32G8[0] :
  2991:                           (p & 1) == 0 ?
  2992:                           VideoController.vcnPal32G8[p] :
  2993:                           VideoController.vcnPalTbl[
  2994:                             VideoController.vcnMix2 (
  2995:                               VideoController.vcnPal16G8[p & -2],
  2996:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])]);
  2997:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) <= 1 ?
  2998:                               VideoController.vcnPal32G8[0] :
  2999:                               (p & 1) == 0 ?
  3000:                               VideoController.vcnPal32G8[p] :
  3001:                               VideoController.vcnPalTbl[
  3002:                                 VideoController.vcnMix2 (
  3003:                                   VideoController.vcnPal16G8[p & -2],
  3004:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])]);
  3005:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) <= 1 ?
  3006:                               VideoController.vcnPal32G8[0] :
  3007:                               (p & 1) == 0 ?
  3008:                               VideoController.vcnPal32G8[p] :
  3009:                               VideoController.vcnPalTbl[
  3010:                                 VideoController.vcnMix2 (
  3011:                                   VideoController.vcnPal16G8[p & -2],
  3012:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])]);
  3013:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) <= 1 ?
  3014:                               VideoController.vcnPal32G8[0] :
  3015:                               (p & 1) == 0 ?
  3016:                               VideoController.vcnPal32G8[p] :
  3017:                               VideoController.vcnPalTbl[
  3018:                                 VideoController.vcnMix2 (
  3019:                                   VideoController.vcnPal16G8[p & -2],
  3020:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])]);
  3021:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) <= 1 ?
  3022:                               VideoController.vcnPal32G8[0] :
  3023:                               (p & 1) == 0 ?
  3024:                               VideoController.vcnPal32G8[p] :
  3025:                               VideoController.vcnPalTbl[
  3026:                                 VideoController.vcnMix2 (
  3027:                                   VideoController.vcnPal16G8[p & -2],
  3028:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])]);
  3029:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) <= 1 ?
  3030:                               VideoController.vcnPal32G8[0] :
  3031:                               (p & 1) == 0 ?
  3032:                               VideoController.vcnPal32G8[p] :
  3033:                               VideoController.vcnPalTbl[
  3034:                                 VideoController.vcnMix2 (
  3035:                                   VideoController.vcnPal16G8[p & -2],
  3036:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])]);
  3037:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) <= 1 ?
  3038:                               VideoController.vcnPal32G8[0] :
  3039:                               (p & 1) == 0 ?
  3040:                               VideoController.vcnPal32G8[p] :
  3041:                               VideoController.vcnPalTbl[
  3042:                                 VideoController.vcnMix2 (
  3043:                                   VideoController.vcnPal16G8[p & -2],
  3044:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])]);
  3045:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) <= 1 ?
  3046:                               VideoController.vcnPal32G8[0] :
  3047:                               (p & 1) == 0 ?
  3048:                               VideoController.vcnPal32G8[p] :
  3049:                               VideoController.vcnPalTbl[
  3050:                                 VideoController.vcnMix2 (
  3051:                                   VideoController.vcnPal16G8[p & -2],
  3052:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])]);
  3053:         gx1st += 16;
  3054:         gx2nd += 16;
  3055:         da += 8;
  3056:       }  //while da<db
  3057:     }  //drawRaster(int,int)
  3058:   },  //E1_XHPG
  3059: 
  3060:   //================================================================================
  3061:   //E1_XHPGT ($0000,$06xx,$1F01)
  3062:   //  概要
  3063:   //    E1  512ドット16色1プレーン
  3064:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  3065:   //  手順
  3066:   //    1番目のパレットが1以下のとき
  3067:   //      グラフィックスパレット0のカラー(0は黒)
  3068:   //    1番目のパレットが2以上の偶数のとき
  3069:   //      1番目のカラー(0は黒)
  3070:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  3071:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  3072:   //  中間コード1
  3073:   //    (e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0))
  3074:   //  中間コード2
  3075:   //    e1p()<=1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2q()))),0)
  3076:   //  中間コード3
  3077:   //    (v0=e1p())<=1?epc(0):ls1(v0)==0?epc(v0):mix(mix(epc(tev(v0)),epc(tod(e2q()))),0)
  3078:   //  中間コード4
  3079:   //    (p=e1p())<=1?epc(0):ls1(p)==0?epc(p):mix(mix(epc(tev(p)),epc(tod(e2q()))),0)
  3080:   //  中間コード5
  3081:   //    (p=e1p())<=1?epc(0):(p&1)==0?epc(p):mix(mix(epc(p&-2),epc(e2q()|1)),0)
  3082:   //  中間コード6
  3083:   //    (p=e1p())<=1?epo(0):(p&1)==0?epo(p):cto(mix(mix(epc(p&-2),epc(e2q()|1)),0))
  3084:   E1_XHPGT {
  3085:     @Override public void drawRaster (int src, int dst) {
  3086:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3087:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3088:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3089:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3090:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3091:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  3092:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3093:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3094:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  3095:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3096:         gx1st += half << 1;
  3097:         gx2nd += half << 1;
  3098:         da += half;
  3099:       }
  3100:       while (da < db) {
  3101:         int p;
  3102:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) <= 1 ?
  3103:                           VideoController.vcnPal32G8[0] :
  3104:                           (p & 1) == 0 ?
  3105:                           VideoController.vcnPal32G8[p] :
  3106:                           VideoController.vcnPalTbl[
  3107:                             VideoController.vcnMix2 (
  3108:                               VideoController.vcnMix2 (
  3109:                                 VideoController.vcnPal16G8[p & -2],
  3110:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  3111:                               0)]);
  3112:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) <= 1 ?
  3113:                               VideoController.vcnPal32G8[0] :
  3114:                               (p & 1) == 0 ?
  3115:                               VideoController.vcnPal32G8[p] :
  3116:                               VideoController.vcnPalTbl[
  3117:                                 VideoController.vcnMix2 (
  3118:                                   VideoController.vcnMix2 (
  3119:                                     VideoController.vcnPal16G8[p & -2],
  3120:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  3121:                                   0)]);
  3122:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) <= 1 ?
  3123:                               VideoController.vcnPal32G8[0] :
  3124:                               (p & 1) == 0 ?
  3125:                               VideoController.vcnPal32G8[p] :
  3126:                               VideoController.vcnPalTbl[
  3127:                                 VideoController.vcnMix2 (
  3128:                                   VideoController.vcnMix2 (
  3129:                                     VideoController.vcnPal16G8[p & -2],
  3130:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  3131:                                   0)]);
  3132:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) <= 1 ?
  3133:                               VideoController.vcnPal32G8[0] :
  3134:                               (p & 1) == 0 ?
  3135:                               VideoController.vcnPal32G8[p] :
  3136:                               VideoController.vcnPalTbl[
  3137:                                 VideoController.vcnMix2 (
  3138:                                   VideoController.vcnMix2 (
  3139:                                     VideoController.vcnPal16G8[p & -2],
  3140:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  3141:                                   0)]);
  3142:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) <= 1 ?
  3143:                               VideoController.vcnPal32G8[0] :
  3144:                               (p & 1) == 0 ?
  3145:                               VideoController.vcnPal32G8[p] :
  3146:                               VideoController.vcnPalTbl[
  3147:                                 VideoController.vcnMix2 (
  3148:                                   VideoController.vcnMix2 (
  3149:                                     VideoController.vcnPal16G8[p & -2],
  3150:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  3151:                                   0)]);
  3152:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) <= 1 ?
  3153:                               VideoController.vcnPal32G8[0] :
  3154:                               (p & 1) == 0 ?
  3155:                               VideoController.vcnPal32G8[p] :
  3156:                               VideoController.vcnPalTbl[
  3157:                                 VideoController.vcnMix2 (
  3158:                                   VideoController.vcnMix2 (
  3159:                                     VideoController.vcnPal16G8[p & -2],
  3160:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  3161:                                   0)]);
  3162:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) <= 1 ?
  3163:                               VideoController.vcnPal32G8[0] :
  3164:                               (p & 1) == 0 ?
  3165:                               VideoController.vcnPal32G8[p] :
  3166:                               VideoController.vcnPalTbl[
  3167:                                 VideoController.vcnMix2 (
  3168:                                   VideoController.vcnMix2 (
  3169:                                     VideoController.vcnPal16G8[p & -2],
  3170:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  3171:                                   0)]);
  3172:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) <= 1 ?
  3173:                               VideoController.vcnPal32G8[0] :
  3174:                               (p & 1) == 0 ?
  3175:                               VideoController.vcnPal32G8[p] :
  3176:                               VideoController.vcnPalTbl[
  3177:                                 VideoController.vcnMix2 (
  3178:                                   VideoController.vcnMix2 (
  3179:                                     VideoController.vcnPal16G8[p & -2],
  3180:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  3181:                                   0)]);
  3182:         gx1st += 16;
  3183:         gx2nd += 16;
  3184:         da += 8;
  3185:       }  //while da<db
  3186:     }  //drawRaster(int,int)
  3187:   },  //E1_XHPGT
  3188: 
  3189:   //================================================================================
  3190:   //E1_A ($0000,$06xx,$4001)
  3191:   //  概要
  3192:   //    E1  512ドット16色1プレーン
  3193:   //    A  グラフィックスカラーとテキストパレット0のカラーを混ぜる
  3194:   //  手順
  3195:   //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  3196:   //  中間コード1
  3197:   //    mix(epc(e1p()),tpc(0))
  3198:   //  中間コード2
  3199:   //    mix(epc(e1p()),tpc(0))
  3200:   //  中間コード3
  3201:   //    mix(epc(e1p()),tpc(0))
  3202:   //  中間コード4
  3203:   //    mix(epc(e1p()),tpc(0))
  3204:   //  中間コード5
  3205:   //    mix(epc(e1p()),tpc(0))
  3206:   //  中間コード6
  3207:   //    cto(mix(epc(e1p()),tpc(0)))
  3208:   E1_A {
  3209:     @Override public void drawRaster (int src, int dst) {
  3210:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3211:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3212:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3213:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3214:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3215:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  3216:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3217:         gx1st += half << 1;
  3218:         da += half;
  3219:       }
  3220:       while (da < db) {
  3221:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  3222:                             VideoController.vcnMix2 (
  3223:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st & 1023]],
  3224:                               VideoController.vcnPal16TS[0])]);
  3225:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  3226:                                 VideoController.vcnMix2 (
  3227:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]],
  3228:                                   VideoController.vcnPal16TS[0])]);
  3229:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  3230:                                 VideoController.vcnMix2 (
  3231:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]],
  3232:                                   VideoController.vcnPal16TS[0])]);
  3233:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  3234:                                 VideoController.vcnMix2 (
  3235:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]],
  3236:                                   VideoController.vcnPal16TS[0])]);
  3237:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  3238:                                 VideoController.vcnMix2 (
  3239:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]],
  3240:                                   VideoController.vcnPal16TS[0])]);
  3241:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  3242:                                 VideoController.vcnMix2 (
  3243:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]],
  3244:                                   VideoController.vcnPal16TS[0])]);
  3245:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  3246:                                 VideoController.vcnMix2 (
  3247:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]],
  3248:                                   VideoController.vcnPal16TS[0])]);
  3249:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  3250:                                 VideoController.vcnMix2 (
  3251:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]],
  3252:                                   VideoController.vcnPal16TS[0])]);
  3253:         gx1st += 16;
  3254:         da += 8;
  3255:       }  //while da<db
  3256:     }  //drawRaster(int,int)
  3257:   },  //E1_A
  3258: 
  3259:   //================================================================================
  3260:   //E2 ($0000,$06xx,$0003)
  3261:   //  概要
  3262:   //    E2  512ドット16色2プレーン
  3263:   //    拡張なし
  3264:   //  手順
  3265:   //    1番目のパレットが0でないとき
  3266:   //      1番目のカラー(0は黒)
  3267:   //    さもなくば(1番目のパレットが0のとき)
  3268:   //      2番目のカラー(0は黒)
  3269:   //  中間コード1
  3270:   //    (e1p()!=0?epc(e1p()):epc(e2p()))
  3271:   //  中間コード2
  3272:   //    e1p()!=0?epc(e1p()):epc(e2p())
  3273:   //  中間コード3
  3274:   //    (v0=e1p())!=0?epc(v0):epc(e2p())
  3275:   //  中間コード4
  3276:   //    (p=e1p())!=0?epc(p):epc(e2p())
  3277:   //  中間コード5
  3278:   //    (p=e1p())!=0?epc(p):epc(e2p())
  3279:   //  中間コード6
  3280:   //    (p=e1p())!=0?epo(p):epo(e2p())
  3281:   E2 {
  3282:     @Override public void drawRaster (int src, int dst) {
  3283:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3284:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3285:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3286:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3287:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3288:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3289:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3290:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3291:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  3292:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3293:         gx1st += half << 1;
  3294:         gx2nd += half << 1;
  3295:         da += half;
  3296:       }
  3297:       while (da < db) {
  3298:         int p;
  3299:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  3300:                           VideoController.vcnPal32G8[p] :
  3301:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023]]);
  3302:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  3303:                               VideoController.vcnPal32G8[p] :
  3304:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]]);
  3305:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  3306:                               VideoController.vcnPal32G8[p] :
  3307:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]]);
  3308:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  3309:                               VideoController.vcnPal32G8[p] :
  3310:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]]);
  3311:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  3312:                               VideoController.vcnPal32G8[p] :
  3313:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]]);
  3314:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  3315:                               VideoController.vcnPal32G8[p] :
  3316:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]]);
  3317:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  3318:                               VideoController.vcnPal32G8[p] :
  3319:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]]);
  3320:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  3321:                               VideoController.vcnPal32G8[p] :
  3322:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]]);
  3323:         gx1st += 16;
  3324:         gx2nd += 16;
  3325:         da += 8;
  3326:       }  //while da<db
  3327:     }  //drawRaster(int,int)
  3328:   },  //E2
  3329: 
  3330:   //================================================================================
  3331:   //XE2
  3332:   //  概要
  3333:   //    E2  512ドット16色2プレーン
  3334:   //    拡張あり
  3335:   XE2 {
  3336:     @Override public void drawRaster (int src, int dst) {
  3337:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  3338:         //   .A.XHPGT
  3339:       case 0b00010000:  //E2_XWC
  3340:       case 0b00010001:  //E2_XWC
  3341:       case 0b00010010:  //E2_XWC
  3342:       case 0b00010011:  //E2_XWC
  3343:         E2.drawRaster (src, dst);
  3344:         break;
  3345:         //   .A.XHPGT
  3346:       case 0b00010100:  //E2_XWP
  3347:       case 0b00010101:  //E2_XWP
  3348:       case 0b00010110:  //E2_XWP
  3349:       case 0b00010111:  //E2_XWP
  3350:         E2_XWP.drawRaster (src, dst);
  3351:         break;
  3352:         //   .A.XHPGT
  3353:       case 0b00011000:  //E2_XHC
  3354:         E2.drawRaster (src, dst);
  3355:         break;
  3356:         //   .A.XHPGT
  3357:       case 0b00011001:  //E2_XHCT
  3358:         E2_XHCT.drawRaster (src, dst);
  3359:         break;
  3360:         //   .A.XHPGT
  3361:       case 0b00011010:  //E2_XHCG
  3362:         E2_XHCG.drawRaster (src, dst);
  3363:         break;
  3364:         //   .A.XHPGT
  3365:       case 0b00011011:  //E2_XHCGT
  3366:         E2_XHCGT.drawRaster (src, dst);
  3367:         break;
  3368:         //   .A.XHPGT
  3369:       case 0b00011101:  //E2_XHPT
  3370:         E2_XHPT.drawRaster (src, dst);
  3371:         break;
  3372:         //   .A.XHPGT
  3373:       case 0b00011110:  //E2_XHPG
  3374:         E2_XHPG.drawRaster (src, dst);
  3375:         break;
  3376:         //   .A.XHPGT
  3377:       case 0b00011111:  //E2_XHPGT
  3378:         E2_XHPGT.drawRaster (src, dst);
  3379:         break;
  3380:         //   .A.XHPGT
  3381:       case 0b01000000:  //E2_A
  3382:       case 0b01000001:  //E2_A
  3383:       case 0b01000010:  //E2_A
  3384:       case 0b01000011:  //E2_A
  3385:       case 0b01000100:  //E2_A
  3386:       case 0b01000101:  //E2_A
  3387:       case 0b01000110:  //E2_A
  3388:       case 0b01000111:  //E2_A
  3389:       case 0b01001000:  //E2_A
  3390:       case 0b01001001:  //E2_A
  3391:       case 0b01001010:  //E2_A
  3392:       case 0b01001011:  //E2_A
  3393:       case 0b01001100:  //E2_A
  3394:       case 0b01001101:  //E2_A
  3395:       case 0b01001110:  //E2_A
  3396:       case 0b01001111:  //E2_A
  3397:       case 0b01010000:  //E2_A
  3398:       case 0b01010001:  //E2_A
  3399:       case 0b01010010:  //E2_A
  3400:       case 0b01010011:  //E2_A
  3401:       case 0b01010100:  //E2_A
  3402:       case 0b01010101:  //E2_A
  3403:       case 0b01010110:  //E2_A
  3404:       case 0b01010111:  //E2_A
  3405:       case 0b01011000:  //E2_A
  3406:       case 0b01011001:  //E2_A
  3407:       case 0b01011010:  //E2_A
  3408:       case 0b01011011:  //E2_A
  3409:       case 0b01011100:  //E2_A
  3410:       case 0b01011101:  //E2_A
  3411:       case 0b01011110:  //E2_A
  3412:       case 0b01011111:  //E2_A
  3413:         E2_A.drawRaster (src, dst);
  3414:         break;
  3415:       default:
  3416:         E2.drawRaster (src, dst);
  3417:         VideoController.vcnReportUnimplemented (XE2);
  3418:       }  //switch
  3419:     }  //drawRaster(int,int)
  3420:   },  //XE2
  3421: 
  3422:   //================================================================================
  3423:   //E2_XWP ($0000,$06xx,$1403)
  3424:   //  概要
  3425:   //    E2  512ドット16色2プレーン
  3426:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  3427:   //  手順
  3428:   //    1番目のパレットが0のとき
  3429:   //      2番目のパレットを偶数化したパレットのカラー(0は黒)
  3430:   //    1番目のパレットが1のとき
  3431:   //      グラフィックスパレット0のカラー(0は黒)
  3432:   //    1番目のパレットが2以上の偶数のとき
  3433:   //      1番目のカラー(0は黒)
  3434:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  3435:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  3436:   //  中間コード1
  3437:   //    (e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p())))
  3438:   //  中間コード2
  3439:   //    e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p()))
  3440:   //  中間コード3
  3441:   //    (v0=e1p())==0?epc(tev(e2p())):v0==1?epc(0):ls1(v0)==0?epc(v0):epc(tev(v0))
  3442:   //  中間コード4
  3443:   //    (p=e1p())==0?epc(tev(e2p())):p==1?epc(0):ls1(p)==0?epc(p):epc(tev(p))
  3444:   //  中間コード5
  3445:   //    (p=e1p())==0?epc(e2p()&-2):p==1?epc(0):(p&1)==0?epc(p):epc(p&-2)
  3446:   //  中間コード6
  3447:   //    (p=e1p())==0?epo(e2p()&-2):p==1?epo(0):(p&1)==0?epo(p):epo(p&-2)
  3448:   E2_XWP {
  3449:     @Override public void drawRaster (int src, int dst) {
  3450:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3451:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3452:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3453:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3454:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3455:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3456:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3457:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3458:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  3459:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3460:         gx1st += half << 1;
  3461:         gx2nd += half << 1;
  3462:         da += half;
  3463:       }
  3464:       while (da < db) {
  3465:         int p;
  3466:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  3467:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2] :
  3468:                           p == 1 ?
  3469:                           VideoController.vcnPal32G8[0] :
  3470:                           (p & 1) == 0 ?
  3471:                           VideoController.vcnPal32G8[p] :
  3472:                           VideoController.vcnPal32G8[p & -2]);
  3473:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  3474:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2] :
  3475:                               p == 1 ?
  3476:                               VideoController.vcnPal32G8[0] :
  3477:                               (p & 1) == 0 ?
  3478:                               VideoController.vcnPal32G8[p] :
  3479:                               VideoController.vcnPal32G8[p & -2]);
  3480:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  3481:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2] :
  3482:                               p == 1 ?
  3483:                               VideoController.vcnPal32G8[0] :
  3484:                               (p & 1) == 0 ?
  3485:                               VideoController.vcnPal32G8[p] :
  3486:                               VideoController.vcnPal32G8[p & -2]);
  3487:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  3488:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2] :
  3489:                               p == 1 ?
  3490:                               VideoController.vcnPal32G8[0] :
  3491:                               (p & 1) == 0 ?
  3492:                               VideoController.vcnPal32G8[p] :
  3493:                               VideoController.vcnPal32G8[p & -2]);
  3494:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  3495:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2] :
  3496:                               p == 1 ?
  3497:                               VideoController.vcnPal32G8[0] :
  3498:                               (p & 1) == 0 ?
  3499:                               VideoController.vcnPal32G8[p] :
  3500:                               VideoController.vcnPal32G8[p & -2]);
  3501:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  3502:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2] :
  3503:                               p == 1 ?
  3504:                               VideoController.vcnPal32G8[0] :
  3505:                               (p & 1) == 0 ?
  3506:                               VideoController.vcnPal32G8[p] :
  3507:                               VideoController.vcnPal32G8[p & -2]);
  3508:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  3509:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2] :
  3510:                               p == 1 ?
  3511:                               VideoController.vcnPal32G8[0] :
  3512:                               (p & 1) == 0 ?
  3513:                               VideoController.vcnPal32G8[p] :
  3514:                               VideoController.vcnPal32G8[p & -2]);
  3515:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  3516:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2] :
  3517:                               p == 1 ?
  3518:                               VideoController.vcnPal32G8[0] :
  3519:                               (p & 1) == 0 ?
  3520:                               VideoController.vcnPal32G8[p] :
  3521:                               VideoController.vcnPal32G8[p & -2]);
  3522:         gx1st += 16;
  3523:         gx2nd += 16;
  3524:         da += 8;
  3525:       }  //while da<db
  3526:     }  //drawRaster(int,int)
  3527:   },  //E2_XWP
  3528: 
  3529:   //================================================================================
  3530:   //E2_XHCT ($0000,$06xx,$1903)
  3531:   //  概要
  3532:   //    E2  512ドット16色2プレーン
  3533:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  3534:   //  手順
  3535:   //    1番目のパレットが0でないとき
  3536:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  3537:   //        1番目のカラーとカラー0を混ぜたカラー(0は黒)
  3538:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3539:   //        1番目のカラー(0は黒)
  3540:   //    さもなくば(1番目のパレットが0のとき)
  3541:   //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
  3542:   //        2番目のカラーとカラー0を混ぜたカラー(0は黒)
  3543:   //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3544:   //        2番目のカラー(0は黒)
  3545:   //  中間コード1
  3546:   //    (e1p()!=0?(ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p())):(ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),0):epc(e2p())))
  3547:   //  中間コード2
  3548:   //    e1p()!=0?ls1(epc(tev(e1p())))!=0?mix(epc(e1p()),0):epc(e1p()):ls1(epc(tev(e2p())))!=0?mix(epc(e2p()),0):epc(e2p())
  3549:   //  中間コード3
  3550:   //    (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)
  3551:   //  中間コード4
  3552:   //    (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)
  3553:   //  中間コード5
  3554:   //    (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)
  3555:   //  中間コード6
  3556:   //    (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)
  3557:   E2_XHCT {
  3558:     @Override public void drawRaster (int src, int dst) {
  3559:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3560:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3561:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3562:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3563:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3564:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3565:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3566:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3567:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  3568:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3569:         gx1st += half << 1;
  3570:         gx2nd += half << 1;
  3571:         da += half;
  3572:       }
  3573:       while (da < db) {
  3574:         int p;
  3575:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  3576:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3577:                           VideoController.vcnPalTbl[
  3578:                             VideoController.vcnMix2 (
  3579:                               VideoController.vcnPal16G8[p],
  3580:                               0)] :
  3581:                           VideoController.vcnPal32G8[p] :
  3582:                           (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) & -2] & 1) != 0 ?
  3583:                           VideoController.vcnPalTbl[
  3584:                             VideoController.vcnMix2 (
  3585:                               VideoController.vcnPal16G8[p],
  3586:                               0)] :
  3587:                           VideoController.vcnPal32G8[p]);
  3588:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  3589:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3590:                               VideoController.vcnPalTbl[
  3591:                                 VideoController.vcnMix2 (
  3592:                                   VideoController.vcnPal16G8[p],
  3593:                                   0)] :
  3594:                               VideoController.vcnPal32G8[p] :
  3595:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) & -2] & 1) != 0 ?
  3596:                               VideoController.vcnPalTbl[
  3597:                                 VideoController.vcnMix2 (
  3598:                                   VideoController.vcnPal16G8[p],
  3599:                                   0)] :
  3600:                               VideoController.vcnPal32G8[p]);
  3601:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  3602:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3603:                               VideoController.vcnPalTbl[
  3604:                                 VideoController.vcnMix2 (
  3605:                                   VideoController.vcnPal16G8[p],
  3606:                                   0)] :
  3607:                               VideoController.vcnPal32G8[p] :
  3608:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) & -2] & 1) != 0 ?
  3609:                               VideoController.vcnPalTbl[
  3610:                                 VideoController.vcnMix2 (
  3611:                                   VideoController.vcnPal16G8[p],
  3612:                                   0)] :
  3613:                               VideoController.vcnPal32G8[p]);
  3614:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  3615:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3616:                               VideoController.vcnPalTbl[
  3617:                                 VideoController.vcnMix2 (
  3618:                                   VideoController.vcnPal16G8[p],
  3619:                                   0)] :
  3620:                               VideoController.vcnPal32G8[p] :
  3621:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) & -2] & 1) != 0 ?
  3622:                               VideoController.vcnPalTbl[
  3623:                                 VideoController.vcnMix2 (
  3624:                                   VideoController.vcnPal16G8[p],
  3625:                                   0)] :
  3626:                               VideoController.vcnPal32G8[p]);
  3627:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  3628:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3629:                               VideoController.vcnPalTbl[
  3630:                                 VideoController.vcnMix2 (
  3631:                                   VideoController.vcnPal16G8[p],
  3632:                                   0)] :
  3633:                               VideoController.vcnPal32G8[p] :
  3634:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) & -2] & 1) != 0 ?
  3635:                               VideoController.vcnPalTbl[
  3636:                                 VideoController.vcnMix2 (
  3637:                                   VideoController.vcnPal16G8[p],
  3638:                                   0)] :
  3639:                               VideoController.vcnPal32G8[p]);
  3640:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  3641:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3642:                               VideoController.vcnPalTbl[
  3643:                                 VideoController.vcnMix2 (
  3644:                                   VideoController.vcnPal16G8[p],
  3645:                                   0)] :
  3646:                               VideoController.vcnPal32G8[p] :
  3647:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) & -2] & 1) != 0 ?
  3648:                               VideoController.vcnPalTbl[
  3649:                                 VideoController.vcnMix2 (
  3650:                                   VideoController.vcnPal16G8[p],
  3651:                                   0)] :
  3652:                               VideoController.vcnPal32G8[p]);
  3653:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  3654:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3655:                               VideoController.vcnPalTbl[
  3656:                                 VideoController.vcnMix2 (
  3657:                                   VideoController.vcnPal16G8[p],
  3658:                                   0)] :
  3659:                               VideoController.vcnPal32G8[p] :
  3660:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) & -2] & 1) != 0 ?
  3661:                               VideoController.vcnPalTbl[
  3662:                                 VideoController.vcnMix2 (
  3663:                                   VideoController.vcnPal16G8[p],
  3664:                                   0)] :
  3665:                               VideoController.vcnPal32G8[p]);
  3666:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  3667:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  3668:                               VideoController.vcnPalTbl[
  3669:                                 VideoController.vcnMix2 (
  3670:                                   VideoController.vcnPal16G8[p],
  3671:                                   0)] :
  3672:                               VideoController.vcnPal32G8[p] :
  3673:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) & -2] & 1) != 0 ?
  3674:                               VideoController.vcnPalTbl[
  3675:                                 VideoController.vcnMix2 (
  3676:                                   VideoController.vcnPal16G8[p],
  3677:                                   0)] :
  3678:                               VideoController.vcnPal32G8[p]);
  3679:         gx1st += 16;
  3680:         gx2nd += 16;
  3681:         da += 8;
  3682:       }  //while da<db
  3683:     }  //drawRaster(int,int)
  3684:   },  //E2_XHCT
  3685: 
  3686:   //================================================================================
  3687:   //E2_XHCG ($0000,$06xx,$1A03)
  3688:   //  概要
  3689:   //    E2  512ドット16色2プレーン
  3690:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  3691:   //  手順
  3692:   //    1番目のパレットが0でないとき
  3693:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  3694:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  3695:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3696:   //        1番目のパレットが奇数のとき
  3697:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  3698:   //        さもなくば(1番目のパレットが偶数のとき)
  3699:   //          1番目のカラー(0は黒)
  3700:   //    さもなくば(1番目のパレットが0のとき)
  3701:   //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
  3702:   //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  3703:   //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3704:   //        2番目のカラー(0は黒)
  3705:   //  中間コード1
  3706:   //    (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())))
  3707:   //  中間コード2
  3708:   //    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())
  3709:   //  中間コード3
  3710:   //    (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)
  3711:   //  中間コード4
  3712:   //    (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)
  3713:   //  中間コード5
  3714:   //    (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)
  3715:   //  中間コード6
  3716:   //    (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)
  3717:   E2_XHCG {
  3718:     @Override public void drawRaster (int src, int dst) {
  3719:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3720:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3721:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3722:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3723:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3724:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3725:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  3726:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3727:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3728:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  3729:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3730:         gx1st += half << 1;
  3731:         gx2nd += half << 1;
  3732:         da += half;
  3733:       }
  3734:       while (da < db) {
  3735:         int p, q;
  3736:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  3737:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3738:                           VideoController.vcnPalTbl[
  3739:                             VideoController.vcnMix2 (
  3740:                               q,
  3741:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  3742:                           (p & 1) != 0 ?
  3743:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  3744:                           VideoController.vcnPal32G8[p] :
  3745:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) & -2]) & 1) != 0 ?
  3746:                           VideoController.vcnPalTbl[
  3747:                             VideoController.vcnMix2 (
  3748:                               p,
  3749:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  3750:                           VideoController.vcnPal32G8[q]);
  3751:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  3752:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3753:                               VideoController.vcnPalTbl[
  3754:                                 VideoController.vcnMix2 (
  3755:                                   q,
  3756:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  3757:                               (p & 1) != 0 ?
  3758:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  3759:                               VideoController.vcnPal32G8[p] :
  3760:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) & -2]) & 1) != 0 ?
  3761:                               VideoController.vcnPalTbl[
  3762:                                 VideoController.vcnMix2 (
  3763:                                   p,
  3764:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  3765:                               VideoController.vcnPal32G8[q]);
  3766:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  3767:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3768:                               VideoController.vcnPalTbl[
  3769:                                 VideoController.vcnMix2 (
  3770:                                   q,
  3771:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  3772:                               (p & 1) != 0 ?
  3773:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  3774:                               VideoController.vcnPal32G8[p] :
  3775:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) & -2]) & 1) != 0 ?
  3776:                               VideoController.vcnPalTbl[
  3777:                                 VideoController.vcnMix2 (
  3778:                                   p,
  3779:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  3780:                               VideoController.vcnPal32G8[q]);
  3781:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  3782:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3783:                               VideoController.vcnPalTbl[
  3784:                                 VideoController.vcnMix2 (
  3785:                                   q,
  3786:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  3787:                               (p & 1) != 0 ?
  3788:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  3789:                               VideoController.vcnPal32G8[p] :
  3790:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) & -2]) & 1) != 0 ?
  3791:                               VideoController.vcnPalTbl[
  3792:                                 VideoController.vcnMix2 (
  3793:                                   p,
  3794:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  3795:                               VideoController.vcnPal32G8[q]);
  3796:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  3797:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3798:                               VideoController.vcnPalTbl[
  3799:                                 VideoController.vcnMix2 (
  3800:                                   q,
  3801:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  3802:                               (p & 1) != 0 ?
  3803:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  3804:                               VideoController.vcnPal32G8[p] :
  3805:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) & -2]) & 1) != 0 ?
  3806:                               VideoController.vcnPalTbl[
  3807:                                 VideoController.vcnMix2 (
  3808:                                   p,
  3809:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  3810:                               VideoController.vcnPal32G8[q]);
  3811:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  3812:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3813:                               VideoController.vcnPalTbl[
  3814:                                 VideoController.vcnMix2 (
  3815:                                   q,
  3816:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  3817:                               (p & 1) != 0 ?
  3818:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  3819:                               VideoController.vcnPal32G8[p] :
  3820:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) & -2]) & 1) != 0 ?
  3821:                               VideoController.vcnPalTbl[
  3822:                                 VideoController.vcnMix2 (
  3823:                                   p,
  3824:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  3825:                               VideoController.vcnPal32G8[q]);
  3826:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  3827:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3828:                               VideoController.vcnPalTbl[
  3829:                                 VideoController.vcnMix2 (
  3830:                                   q,
  3831:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  3832:                               (p & 1) != 0 ?
  3833:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  3834:                               VideoController.vcnPal32G8[p] :
  3835:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) & -2]) & 1) != 0 ?
  3836:                               VideoController.vcnPalTbl[
  3837:                                 VideoController.vcnMix2 (
  3838:                                   p,
  3839:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  3840:                               VideoController.vcnPal32G8[q]);
  3841:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  3842:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3843:                               VideoController.vcnPalTbl[
  3844:                                 VideoController.vcnMix2 (
  3845:                                   q,
  3846:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  3847:                               (p & 1) != 0 ?
  3848:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  3849:                               VideoController.vcnPal32G8[p] :
  3850:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) & -2]) & 1) != 0 ?
  3851:                               VideoController.vcnPalTbl[
  3852:                                 VideoController.vcnMix2 (
  3853:                                   p,
  3854:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  3855:                               VideoController.vcnPal32G8[q]);
  3856:         gx1st += 16;
  3857:         gx2nd += 16;
  3858:         da += 8;
  3859:       }  //while da<db
  3860:     }  //drawRaster(int,int)
  3861:   },  //E2_XHCG
  3862: 
  3863:   //================================================================================
  3864:   //E2_XHCGT ($0000,$06xx,$1B03)
  3865:   //  概要
  3866:   //    E2  512ドット16色2プレーン
  3867:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  3868:   //  手順
  3869:   //    1番目のパレットが0でないとき
  3870:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  3871:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  3872:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3873:   //        1番目のパレットが奇数のとき
  3874:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  3875:   //        さもなくば(1番目のパレットが偶数のとき)
  3876:   //          1番目のカラー(0は黒)
  3877:   //    さもなくば(1番目のパレットが0のとき)
  3878:   //      2番目のパレットを偶数化したパレットのカラーが奇数のとき
  3879:   //        2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  3880:   //      さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  3881:   //        2番目のカラー(0は黒)
  3882:   //  中間コード1
  3883:   //    (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())))
  3884:   //  中間コード2
  3885:   //    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())
  3886:   //  中間コード3
  3887:   //    (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)
  3888:   //  中間コード4
  3889:   //    (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)
  3890:   //  中間コード5
  3891:   //    (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)
  3892:   //  中間コード6
  3893:   //    (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)
  3894:   E2_XHCGT {
  3895:     @Override public void drawRaster (int src, int dst) {
  3896:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  3897:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  3898:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3899:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  3900:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  3901:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  3902:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  3903:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  3904:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  3905:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  3906:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  3907:         gx1st += half << 1;
  3908:         gx2nd += half << 1;
  3909:         da += half;
  3910:       }
  3911:       while (da < db) {
  3912:         int p, q;
  3913:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  3914:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3915:                           VideoController.vcnPalTbl[
  3916:                             VideoController.vcnMix2 (
  3917:                               VideoController.vcnMix2 (
  3918:                                 q,
  3919:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  3920:                               0)] :
  3921:                           (p & 1) != 0 ?
  3922:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  3923:                           VideoController.vcnPal32G8[p] :
  3924:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) & -2]) & 1) != 0 ?
  3925:                           VideoController.vcnPalTbl[
  3926:                             VideoController.vcnMix2 (
  3927:                               VideoController.vcnMix2 (
  3928:                                 p,
  3929:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  3930:                               0)] :
  3931:                           VideoController.vcnPal32G8[q]);
  3932:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  3933:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3934:                               VideoController.vcnPalTbl[
  3935:                                 VideoController.vcnMix2 (
  3936:                                   VideoController.vcnMix2 (
  3937:                                     q,
  3938:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  3939:                                   0)] :
  3940:                               (p & 1) != 0 ?
  3941:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  3942:                               VideoController.vcnPal32G8[p] :
  3943:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) & -2]) & 1) != 0 ?
  3944:                               VideoController.vcnPalTbl[
  3945:                                 VideoController.vcnMix2 (
  3946:                                   VideoController.vcnMix2 (
  3947:                                     p,
  3948:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  3949:                                   0)] :
  3950:                               VideoController.vcnPal32G8[q]);
  3951:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  3952:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3953:                               VideoController.vcnPalTbl[
  3954:                                 VideoController.vcnMix2 (
  3955:                                   VideoController.vcnMix2 (
  3956:                                     q,
  3957:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  3958:                                   0)] :
  3959:                               (p & 1) != 0 ?
  3960:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  3961:                               VideoController.vcnPal32G8[p] :
  3962:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) & -2]) & 1) != 0 ?
  3963:                               VideoController.vcnPalTbl[
  3964:                                 VideoController.vcnMix2 (
  3965:                                   VideoController.vcnMix2 (
  3966:                                     p,
  3967:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  3968:                                   0)] :
  3969:                               VideoController.vcnPal32G8[q]);
  3970:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  3971:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3972:                               VideoController.vcnPalTbl[
  3973:                                 VideoController.vcnMix2 (
  3974:                                   VideoController.vcnMix2 (
  3975:                                     q,
  3976:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  3977:                                   0)] :
  3978:                               (p & 1) != 0 ?
  3979:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  3980:                               VideoController.vcnPal32G8[p] :
  3981:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) & -2]) & 1) != 0 ?
  3982:                               VideoController.vcnPalTbl[
  3983:                                 VideoController.vcnMix2 (
  3984:                                   VideoController.vcnMix2 (
  3985:                                     p,
  3986:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  3987:                                   0)] :
  3988:                               VideoController.vcnPal32G8[q]);
  3989:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  3990:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  3991:                               VideoController.vcnPalTbl[
  3992:                                 VideoController.vcnMix2 (
  3993:                                   VideoController.vcnMix2 (
  3994:                                     q,
  3995:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  3996:                                   0)] :
  3997:                               (p & 1) != 0 ?
  3998:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  3999:                               VideoController.vcnPal32G8[p] :
  4000:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) & -2]) & 1) != 0 ?
  4001:                               VideoController.vcnPalTbl[
  4002:                                 VideoController.vcnMix2 (
  4003:                                   VideoController.vcnMix2 (
  4004:                                     p,
  4005:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  4006:                                   0)] :
  4007:                               VideoController.vcnPal32G8[q]);
  4008:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  4009:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  4010:                               VideoController.vcnPalTbl[
  4011:                                 VideoController.vcnMix2 (
  4012:                                   VideoController.vcnMix2 (
  4013:                                     q,
  4014:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  4015:                                   0)] :
  4016:                               (p & 1) != 0 ?
  4017:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  4018:                               VideoController.vcnPal32G8[p] :
  4019:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) & -2]) & 1) != 0 ?
  4020:                               VideoController.vcnPalTbl[
  4021:                                 VideoController.vcnMix2 (
  4022:                                   VideoController.vcnMix2 (
  4023:                                     p,
  4024:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  4025:                                   0)] :
  4026:                               VideoController.vcnPal32G8[q]);
  4027:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  4028:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  4029:                               VideoController.vcnPalTbl[
  4030:                                 VideoController.vcnMix2 (
  4031:                                   VideoController.vcnMix2 (
  4032:                                     q,
  4033:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  4034:                                   0)] :
  4035:                               (p & 1) != 0 ?
  4036:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  4037:                               VideoController.vcnPal32G8[p] :
  4038:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) & -2]) & 1) != 0 ?
  4039:                               VideoController.vcnPalTbl[
  4040:                                 VideoController.vcnMix2 (
  4041:                                   VideoController.vcnMix2 (
  4042:                                     p,
  4043:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  4044:                                   0)] :
  4045:                               VideoController.vcnPal32G8[q]);
  4046:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  4047:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  4048:                               VideoController.vcnPalTbl[
  4049:                                 VideoController.vcnMix2 (
  4050:                                   VideoController.vcnMix2 (
  4051:                                     q,
  4052:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  4053:                                   0)] :
  4054:                               (p & 1) != 0 ?
  4055:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  4056:                               VideoController.vcnPal32G8[p] :
  4057:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) & -2]) & 1) != 0 ?
  4058:                               VideoController.vcnPalTbl[
  4059:                                 VideoController.vcnMix2 (
  4060:                                   VideoController.vcnMix2 (
  4061:                                     p,
  4062:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  4063:                                   0)] :
  4064:                               VideoController.vcnPal32G8[q]);
  4065:         gx1st += 16;
  4066:         gx2nd += 16;
  4067:         da += 8;
  4068:       }  //while da<db
  4069:     }  //drawRaster(int,int)
  4070:   },  //E2_XHCGT
  4071: 
  4072:   //================================================================================
  4073:   //E2_XHPT ($0000,$06xx,$1D03)
  4074:   //  概要
  4075:   //    E2  512ドット16色2プレーン
  4076:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  4077:   //  手順
  4078:   //    1番目のパレットが0のとき
  4079:   //      2番目のパレットを偶数化したパレットのカラー(0は黒)
  4080:   //    1番目のパレットが1のとき
  4081:   //      グラフィックスパレット0のカラー(0は黒)
  4082:   //    1番目のパレットが2以上の偶数のとき
  4083:   //      1番目のカラー(0は黒)
  4084:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  4085:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  4086:   //  中間コード1
  4087:   //    (e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0))
  4088:   //  中間コード2
  4089:   //    e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),0)
  4090:   //  中間コード3
  4091:   //    (v0=e1p())==0?epc(tev(e2p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),0)
  4092:   //  中間コード4
  4093:   //    (p=e1p())==0?epc(tev(e2p())):p==1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),0)
  4094:   //  中間コード5
  4095:   //    (p=e1p())==0?epc(e2p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),0)
  4096:   //  中間コード6
  4097:   //    (p=e1p())==0?epo(e2p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),0))
  4098:   E2_XHPT {
  4099:     @Override public void drawRaster (int src, int dst) {
  4100:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4101:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4102:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4103:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4104:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4105:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4106:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4107:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4108:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  4109:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4110:         gx1st += half << 1;
  4111:         gx2nd += half << 1;
  4112:         da += half;
  4113:       }
  4114:       while (da < db) {
  4115:         int p;
  4116:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  4117:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2] :
  4118:                           p == 1 ?
  4119:                           VideoController.vcnPal32G8[0] :
  4120:                           (p & 1) == 0 ?
  4121:                           VideoController.vcnPal32G8[p] :
  4122:                           VideoController.vcnPalTbl[
  4123:                             VideoController.vcnMix2 (
  4124:                               VideoController.vcnPal16G8[p & -2],
  4125:                               0)]);
  4126:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  4127:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2] :
  4128:                               p == 1 ?
  4129:                               VideoController.vcnPal32G8[0] :
  4130:                               (p & 1) == 0 ?
  4131:                               VideoController.vcnPal32G8[p] :
  4132:                               VideoController.vcnPalTbl[
  4133:                                 VideoController.vcnMix2 (
  4134:                                   VideoController.vcnPal16G8[p & -2],
  4135:                                   0)]);
  4136:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  4137:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2] :
  4138:                               p == 1 ?
  4139:                               VideoController.vcnPal32G8[0] :
  4140:                               (p & 1) == 0 ?
  4141:                               VideoController.vcnPal32G8[p] :
  4142:                               VideoController.vcnPalTbl[
  4143:                                 VideoController.vcnMix2 (
  4144:                                   VideoController.vcnPal16G8[p & -2],
  4145:                                   0)]);
  4146:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  4147:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2] :
  4148:                               p == 1 ?
  4149:                               VideoController.vcnPal32G8[0] :
  4150:                               (p & 1) == 0 ?
  4151:                               VideoController.vcnPal32G8[p] :
  4152:                               VideoController.vcnPalTbl[
  4153:                                 VideoController.vcnMix2 (
  4154:                                   VideoController.vcnPal16G8[p & -2],
  4155:                                   0)]);
  4156:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  4157:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2] :
  4158:                               p == 1 ?
  4159:                               VideoController.vcnPal32G8[0] :
  4160:                               (p & 1) == 0 ?
  4161:                               VideoController.vcnPal32G8[p] :
  4162:                               VideoController.vcnPalTbl[
  4163:                                 VideoController.vcnMix2 (
  4164:                                   VideoController.vcnPal16G8[p & -2],
  4165:                                   0)]);
  4166:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  4167:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2] :
  4168:                               p == 1 ?
  4169:                               VideoController.vcnPal32G8[0] :
  4170:                               (p & 1) == 0 ?
  4171:                               VideoController.vcnPal32G8[p] :
  4172:                               VideoController.vcnPalTbl[
  4173:                                 VideoController.vcnMix2 (
  4174:                                   VideoController.vcnPal16G8[p & -2],
  4175:                                   0)]);
  4176:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  4177:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2] :
  4178:                               p == 1 ?
  4179:                               VideoController.vcnPal32G8[0] :
  4180:                               (p & 1) == 0 ?
  4181:                               VideoController.vcnPal32G8[p] :
  4182:                               VideoController.vcnPalTbl[
  4183:                                 VideoController.vcnMix2 (
  4184:                                   VideoController.vcnPal16G8[p & -2],
  4185:                                   0)]);
  4186:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  4187:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2] :
  4188:                               p == 1 ?
  4189:                               VideoController.vcnPal32G8[0] :
  4190:                               (p & 1) == 0 ?
  4191:                               VideoController.vcnPal32G8[p] :
  4192:                               VideoController.vcnPalTbl[
  4193:                                 VideoController.vcnMix2 (
  4194:                                   VideoController.vcnPal16G8[p & -2],
  4195:                                   0)]);
  4196:         gx1st += 16;
  4197:         gx2nd += 16;
  4198:         da += 8;
  4199:       }  //while da<db
  4200:     }  //drawRaster(int,int)
  4201:   },  //E2_XHPT
  4202: 
  4203:   //================================================================================
  4204:   //E2_XHPG ($0000,$06xx,$1E03)
  4205:   //  概要
  4206:   //    E2  512ドット16色2プレーン
  4207:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  4208:   //  手順
  4209:   //    1番目のパレットが0のとき
  4210:   //      2番目のパレットを偶数化したパレットのカラー(0は黒)
  4211:   //    1番目のパレットが1のとき
  4212:   //      グラフィックスパレット0のカラー(0は黒)
  4213:   //    1番目のパレットが2以上の偶数のとき
  4214:   //      1番目のカラー(0は黒)
  4215:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  4216:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  4217:   //  中間コード1
  4218:   //    (e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2p()))))
  4219:   //  中間コード2
  4220:   //    e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(epc(tev(e1p())),epc(tod(e2p())))
  4221:   //  中間コード3
  4222:   //    (v0=e1p())==0?epc(tev(e2p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(epc(tev(v0)),epc(tod(e2p())))
  4223:   //  中間コード4
  4224:   //    (p=e1p())==0?epc(tev(e2p())):p==1?epc(0):ls1(p)==0?epc(p):mix(epc(tev(p)),epc(tod(e2p())))
  4225:   //  中間コード5
  4226:   //    (p=e1p())==0?epc(e2p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(epc(p&-2),epc(e2p()|1))
  4227:   //  中間コード6
  4228:   //    (p=e1p())==0?epo(e2p()&-2):p==1?epo(0):(p&1)==0?epo(p):cto(mix(epc(p&-2),epc(e2p()|1)))
  4229:   E2_XHPG {
  4230:     @Override public void drawRaster (int src, int dst) {
  4231:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4232:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4233:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4234:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4235:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4236:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4237:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4238:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4239:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  4240:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4241:         gx1st += half << 1;
  4242:         gx2nd += half << 1;
  4243:         da += half;
  4244:       }
  4245:       while (da < db) {
  4246:         int p;
  4247:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  4248:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2] :
  4249:                           p == 1 ?
  4250:                           VideoController.vcnPal32G8[0] :
  4251:                           (p & 1) == 0 ?
  4252:                           VideoController.vcnPal32G8[p] :
  4253:                           VideoController.vcnPalTbl[
  4254:                             VideoController.vcnMix2 (
  4255:                               VideoController.vcnPal16G8[p & -2],
  4256:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] | 1])]);
  4257:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  4258:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2] :
  4259:                               p == 1 ?
  4260:                               VideoController.vcnPal32G8[0] :
  4261:                               (p & 1) == 0 ?
  4262:                               VideoController.vcnPal32G8[p] :
  4263:                               VideoController.vcnPalTbl[
  4264:                                 VideoController.vcnMix2 (
  4265:                                   VideoController.vcnPal16G8[p & -2],
  4266:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] | 1])]);
  4267:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  4268:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2] :
  4269:                               p == 1 ?
  4270:                               VideoController.vcnPal32G8[0] :
  4271:                               (p & 1) == 0 ?
  4272:                               VideoController.vcnPal32G8[p] :
  4273:                               VideoController.vcnPalTbl[
  4274:                                 VideoController.vcnMix2 (
  4275:                                   VideoController.vcnPal16G8[p & -2],
  4276:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] | 1])]);
  4277:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  4278:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2] :
  4279:                               p == 1 ?
  4280:                               VideoController.vcnPal32G8[0] :
  4281:                               (p & 1) == 0 ?
  4282:                               VideoController.vcnPal32G8[p] :
  4283:                               VideoController.vcnPalTbl[
  4284:                                 VideoController.vcnMix2 (
  4285:                                   VideoController.vcnPal16G8[p & -2],
  4286:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] | 1])]);
  4287:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  4288:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2] :
  4289:                               p == 1 ?
  4290:                               VideoController.vcnPal32G8[0] :
  4291:                               (p & 1) == 0 ?
  4292:                               VideoController.vcnPal32G8[p] :
  4293:                               VideoController.vcnPalTbl[
  4294:                                 VideoController.vcnMix2 (
  4295:                                   VideoController.vcnPal16G8[p & -2],
  4296:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] | 1])]);
  4297:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  4298:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2] :
  4299:                               p == 1 ?
  4300:                               VideoController.vcnPal32G8[0] :
  4301:                               (p & 1) == 0 ?
  4302:                               VideoController.vcnPal32G8[p] :
  4303:                               VideoController.vcnPalTbl[
  4304:                                 VideoController.vcnMix2 (
  4305:                                   VideoController.vcnPal16G8[p & -2],
  4306:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] | 1])]);
  4307:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  4308:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2] :
  4309:                               p == 1 ?
  4310:                               VideoController.vcnPal32G8[0] :
  4311:                               (p & 1) == 0 ?
  4312:                               VideoController.vcnPal32G8[p] :
  4313:                               VideoController.vcnPalTbl[
  4314:                                 VideoController.vcnMix2 (
  4315:                                   VideoController.vcnPal16G8[p & -2],
  4316:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] | 1])]);
  4317:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  4318:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2] :
  4319:                               p == 1 ?
  4320:                               VideoController.vcnPal32G8[0] :
  4321:                               (p & 1) == 0 ?
  4322:                               VideoController.vcnPal32G8[p] :
  4323:                               VideoController.vcnPalTbl[
  4324:                                 VideoController.vcnMix2 (
  4325:                                   VideoController.vcnPal16G8[p & -2],
  4326:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] | 1])]);
  4327:         gx1st += 16;
  4328:         gx2nd += 16;
  4329:         da += 8;
  4330:       }  //while da<db
  4331:     }  //drawRaster(int,int)
  4332:   },  //E2_XHPG
  4333: 
  4334:   //================================================================================
  4335:   //E2_XHPGT ($0000,$06xx,$1F03)
  4336:   //  概要
  4337:   //    E2  512ドット16色2プレーン
  4338:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  4339:   //  手順
  4340:   //    1番目のパレットが0のとき
  4341:   //      2番目のパレットを偶数化したパレットのカラー(0は黒)
  4342:   //    1番目のパレットが1のとき
  4343:   //      グラフィックスパレット0のカラー(0は黒)
  4344:   //    1番目のパレットが2以上の偶数のとき
  4345:   //      1番目のカラー(0は黒)
  4346:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  4347:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  4348:   //  中間コード1
  4349:   //    (e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2p()))),0))
  4350:   //  中間コード2
  4351:   //    e1p()==0?epc(tev(e2p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):mix(mix(epc(tev(e1p())),epc(tod(e2p()))),0)
  4352:   //  中間コード3
  4353:   //    (v0=e1p())==0?epc(tev(e2p())):v0==1?epc(0):ls1(v0)==0?epc(v0):mix(mix(epc(tev(v0)),epc(tod(e2p()))),0)
  4354:   //  中間コード4
  4355:   //    (p=e1p())==0?epc(tev(e2p())):p==1?epc(0):ls1(p)==0?epc(p):mix(mix(epc(tev(p)),epc(tod(e2p()))),0)
  4356:   //  中間コード5
  4357:   //    (p=e1p())==0?epc(e2p()&-2):p==1?epc(0):(p&1)==0?epc(p):mix(mix(epc(p&-2),epc(e2p()|1)),0)
  4358:   //  中間コード6
  4359:   //    (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))
  4360:   E2_XHPGT {
  4361:     @Override public void drawRaster (int src, int dst) {
  4362:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4363:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4364:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4365:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4366:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4367:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4368:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4369:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4370:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  4371:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4372:         gx1st += half << 1;
  4373:         gx2nd += half << 1;
  4374:         da += half;
  4375:       }
  4376:       while (da < db) {
  4377:         int p;
  4378:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  4379:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2] :
  4380:                           p == 1 ?
  4381:                           VideoController.vcnPal32G8[0] :
  4382:                           (p & 1) == 0 ?
  4383:                           VideoController.vcnPal32G8[p] :
  4384:                           VideoController.vcnPalTbl[
  4385:                             VideoController.vcnMix2 (
  4386:                               VideoController.vcnMix2 (
  4387:                                 VideoController.vcnPal16G8[p & -2],
  4388:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023] | 1]),
  4389:                               0)]);
  4390:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  4391:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2] :
  4392:                               p == 1 ?
  4393:                               VideoController.vcnPal32G8[0] :
  4394:                               (p & 1) == 0 ?
  4395:                               VideoController.vcnPal32G8[p] :
  4396:                               VideoController.vcnPalTbl[
  4397:                                 VideoController.vcnMix2 (
  4398:                                   VideoController.vcnMix2 (
  4399:                                     VideoController.vcnPal16G8[p & -2],
  4400:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] | 1]),
  4401:                                   0)]);
  4402:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  4403:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2] :
  4404:                               p == 1 ?
  4405:                               VideoController.vcnPal32G8[0] :
  4406:                               (p & 1) == 0 ?
  4407:                               VideoController.vcnPal32G8[p] :
  4408:                               VideoController.vcnPalTbl[
  4409:                                 VideoController.vcnMix2 (
  4410:                                   VideoController.vcnMix2 (
  4411:                                     VideoController.vcnPal16G8[p & -2],
  4412:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] | 1]),
  4413:                                   0)]);
  4414:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  4415:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2] :
  4416:                               p == 1 ?
  4417:                               VideoController.vcnPal32G8[0] :
  4418:                               (p & 1) == 0 ?
  4419:                               VideoController.vcnPal32G8[p] :
  4420:                               VideoController.vcnPalTbl[
  4421:                                 VideoController.vcnMix2 (
  4422:                                   VideoController.vcnMix2 (
  4423:                                     VideoController.vcnPal16G8[p & -2],
  4424:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] | 1]),
  4425:                                   0)]);
  4426:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  4427:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2] :
  4428:                               p == 1 ?
  4429:                               VideoController.vcnPal32G8[0] :
  4430:                               (p & 1) == 0 ?
  4431:                               VideoController.vcnPal32G8[p] :
  4432:                               VideoController.vcnPalTbl[
  4433:                                 VideoController.vcnMix2 (
  4434:                                   VideoController.vcnMix2 (
  4435:                                     VideoController.vcnPal16G8[p & -2],
  4436:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] | 1]),
  4437:                                   0)]);
  4438:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  4439:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2] :
  4440:                               p == 1 ?
  4441:                               VideoController.vcnPal32G8[0] :
  4442:                               (p & 1) == 0 ?
  4443:                               VideoController.vcnPal32G8[p] :
  4444:                               VideoController.vcnPalTbl[
  4445:                                 VideoController.vcnMix2 (
  4446:                                   VideoController.vcnMix2 (
  4447:                                     VideoController.vcnPal16G8[p & -2],
  4448:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] | 1]),
  4449:                                   0)]);
  4450:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  4451:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2] :
  4452:                               p == 1 ?
  4453:                               VideoController.vcnPal32G8[0] :
  4454:                               (p & 1) == 0 ?
  4455:                               VideoController.vcnPal32G8[p] :
  4456:                               VideoController.vcnPalTbl[
  4457:                                 VideoController.vcnMix2 (
  4458:                                   VideoController.vcnMix2 (
  4459:                                     VideoController.vcnPal16G8[p & -2],
  4460:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] | 1]),
  4461:                                   0)]);
  4462:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  4463:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2] :
  4464:                               p == 1 ?
  4465:                               VideoController.vcnPal32G8[0] :
  4466:                               (p & 1) == 0 ?
  4467:                               VideoController.vcnPal32G8[p] :
  4468:                               VideoController.vcnPalTbl[
  4469:                                 VideoController.vcnMix2 (
  4470:                                   VideoController.vcnMix2 (
  4471:                                     VideoController.vcnPal16G8[p & -2],
  4472:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] | 1]),
  4473:                                   0)]);
  4474:         gx1st += 16;
  4475:         gx2nd += 16;
  4476:         da += 8;
  4477:       }  //while da<db
  4478:     }  //drawRaster(int,int)
  4479:   },  //E2_XHPGT
  4480: 
  4481:   //================================================================================
  4482:   //E2_A ($0000,$06xx,$4003)
  4483:   //  概要
  4484:   //    E2  512ドット16色2プレーン
  4485:   //    A  グラフィックスカラーとテキストパレット0のカラーを混ぜる
  4486:   //  手順
  4487:   //    1番目のパレットが0でないとき
  4488:   //      1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  4489:   //    さもなくば(1番目のパレットが0のとき)
  4490:   //      2番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  4491:   //  中間コード1
  4492:   //    (e1p()!=0?mix(epc(e1p()),tpc(0)):mix(epc(e2p()),tpc(0)))
  4493:   //  中間コード2
  4494:   //    e1p()!=0?mix(epc(e1p()),tpc(0)):mix(epc(e2p()),tpc(0))
  4495:   //  中間コード3
  4496:   //    (v0=e1p())!=0?mix(epc(v0),tpc(0)):mix(epc(e2p()),tpc(0))
  4497:   //  中間コード4
  4498:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0))
  4499:   //  中間コード5
  4500:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0))
  4501:   //  中間コード6
  4502:   //    cto((p=e1p())!=0?mix(epc(p),tpc(0)):mix(epc(e2p()),tpc(0)))
  4503:   E2_A {
  4504:     @Override public void drawRaster (int src, int dst) {
  4505:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4506:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4507:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4508:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4509:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4510:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4511:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4512:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4513:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  4514:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4515:         gx1st += half << 1;
  4516:         gx2nd += half << 1;
  4517:         da += half;
  4518:       }
  4519:       while (da < db) {
  4520:         int p;
  4521:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  4522:                             (p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  4523:                             VideoController.vcnMix2 (
  4524:                               VideoController.vcnPal16G8[p],
  4525:                               VideoController.vcnPal16TS[0]) :
  4526:                             VideoController.vcnMix2 (
  4527:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd & 1023]],
  4528:                               VideoController.vcnPal16TS[0])]);
  4529:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  4530:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  4531:                                 VideoController.vcnMix2 (
  4532:                                   VideoController.vcnPal16G8[p],
  4533:                                   VideoController.vcnPal16TS[0]) :
  4534:                                 VideoController.vcnMix2 (
  4535:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]],
  4536:                                   VideoController.vcnPal16TS[0])]);
  4537:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  4538:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  4539:                                 VideoController.vcnMix2 (
  4540:                                   VideoController.vcnPal16G8[p],
  4541:                                   VideoController.vcnPal16TS[0]) :
  4542:                                 VideoController.vcnMix2 (
  4543:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]],
  4544:                                   VideoController.vcnPal16TS[0])]);
  4545:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  4546:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  4547:                                 VideoController.vcnMix2 (
  4548:                                   VideoController.vcnPal16G8[p],
  4549:                                   VideoController.vcnPal16TS[0]) :
  4550:                                 VideoController.vcnMix2 (
  4551:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]],
  4552:                                   VideoController.vcnPal16TS[0])]);
  4553:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  4554:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  4555:                                 VideoController.vcnMix2 (
  4556:                                   VideoController.vcnPal16G8[p],
  4557:                                   VideoController.vcnPal16TS[0]) :
  4558:                                 VideoController.vcnMix2 (
  4559:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]],
  4560:                                   VideoController.vcnPal16TS[0])]);
  4561:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  4562:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  4563:                                 VideoController.vcnMix2 (
  4564:                                   VideoController.vcnPal16G8[p],
  4565:                                   VideoController.vcnPal16TS[0]) :
  4566:                                 VideoController.vcnMix2 (
  4567:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]],
  4568:                                   VideoController.vcnPal16TS[0])]);
  4569:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  4570:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  4571:                                 VideoController.vcnMix2 (
  4572:                                   VideoController.vcnPal16G8[p],
  4573:                                   VideoController.vcnPal16TS[0]) :
  4574:                                 VideoController.vcnMix2 (
  4575:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]],
  4576:                                   VideoController.vcnPal16TS[0])]);
  4577:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  4578:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  4579:                                 VideoController.vcnMix2 (
  4580:                                   VideoController.vcnPal16G8[p],
  4581:                                   VideoController.vcnPal16TS[0]) :
  4582:                                 VideoController.vcnMix2 (
  4583:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]],
  4584:                                   VideoController.vcnPal16TS[0])]);
  4585:         gx1st += 16;
  4586:         gx2nd += 16;
  4587:         da += 8;
  4588:       }  //while da<db
  4589:     }  //drawRaster(int,int)
  4590:   },  //E2_A
  4591: 
  4592:   //================================================================================
  4593:   //E3 ($0000,$06xx,$0007)
  4594:   //  概要
  4595:   //    E3  512ドット16色3プレーン
  4596:   //    拡張なし
  4597:   //  手順
  4598:   //    1番目のパレットが0でないとき
  4599:   //      1番目のカラー(0は黒)
  4600:   //    さもなくば(1番目のパレットが0のとき)
  4601:   //      2番目のパレットが0でないとき
  4602:   //        2番目のカラー(0は黒)
  4603:   //      さもなくば(2番目のパレットが0のとき)
  4604:   //        3番目のカラー(0は黒)
  4605:   //  中間コード1
  4606:   //    (e1p()!=0?epc(e1p()):(e2p()!=0?epc(e2p()):epc(e3p())))
  4607:   //  中間コード2
  4608:   //    e1p()!=0?epc(e1p()):e2p()!=0?epc(e2p()):epc(e3p())
  4609:   //  中間コード3
  4610:   //    (v0=e1p())!=0?epc(v0):(v2=e2p())!=0?epc(v2):epc(e3p())
  4611:   //  中間コード4
  4612:   //    (p=e1p())!=0?epc(p):(p=e2p())!=0?epc(p):epc(e3p())
  4613:   //  中間コード5
  4614:   //    (p=e1p())!=0?epc(p):(p=e2p())!=0?epc(p):epc(e3p())
  4615:   //  中間コード6
  4616:   //    (p=e1p())!=0?epo(p):(p=e2p())!=0?epo(p):epo(e3p())
  4617:   E3 {
  4618:     @Override public void drawRaster (int src, int dst) {
  4619:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4620:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4621:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4622:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4623:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4624:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4625:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  4626:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  4627:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4628:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4629:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4630:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  4631:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4632:         gx1st += half << 1;
  4633:         gx2nd += half << 1;
  4634:         gx3rd += half << 1;
  4635:         da += half;
  4636:       }
  4637:       while (da < db) {
  4638:         int p;
  4639:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  4640:                           VideoController.vcnPal32G8[p] :
  4641:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  4642:                           VideoController.vcnPal32G8[p] :
  4643:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023]]);
  4644:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  4645:                               VideoController.vcnPal32G8[p] :
  4646:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  4647:                               VideoController.vcnPal32G8[p] :
  4648:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]]);
  4649:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  4650:                               VideoController.vcnPal32G8[p] :
  4651:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  4652:                               VideoController.vcnPal32G8[p] :
  4653:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]]);
  4654:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  4655:                               VideoController.vcnPal32G8[p] :
  4656:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  4657:                               VideoController.vcnPal32G8[p] :
  4658:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]]);
  4659:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  4660:                               VideoController.vcnPal32G8[p] :
  4661:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  4662:                               VideoController.vcnPal32G8[p] :
  4663:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]]);
  4664:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  4665:                               VideoController.vcnPal32G8[p] :
  4666:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  4667:                               VideoController.vcnPal32G8[p] :
  4668:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]]);
  4669:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  4670:                               VideoController.vcnPal32G8[p] :
  4671:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  4672:                               VideoController.vcnPal32G8[p] :
  4673:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]]);
  4674:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  4675:                               VideoController.vcnPal32G8[p] :
  4676:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  4677:                               VideoController.vcnPal32G8[p] :
  4678:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]]);
  4679:         gx1st += 16;
  4680:         gx2nd += 16;
  4681:         gx3rd += 16;
  4682:         da += 8;
  4683:       }  //while da<db
  4684:     }  //drawRaster(int,int)
  4685:   },  //E3
  4686: 
  4687:   //================================================================================
  4688:   //XE3
  4689:   //  概要
  4690:   //    E3  512ドット16色3プレーン
  4691:   //    拡張あり
  4692:   XE3 {
  4693:     @Override public void drawRaster (int src, int dst) {
  4694:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  4695:         //   .A.XHPGT
  4696:       case 0b00010000:  //E3_XWC
  4697:       case 0b00010001:  //E3_XWC
  4698:       case 0b00010010:  //E3_XWC
  4699:       case 0b00010011:  //E3_XWC
  4700:         E3.drawRaster (src, dst);
  4701:         break;
  4702:         //   .A.XHPGT
  4703:       case 0b00010100:  //E3_XWP
  4704:       case 0b00010101:  //E3_XWP
  4705:       case 0b00010110:  //E3_XWP
  4706:       case 0b00010111:  //E3_XWP
  4707:         E3_XWP.drawRaster (src, dst);
  4708:         break;
  4709:         //   .A.XHPGT
  4710:       case 0b00011000:  //E3_XHC
  4711:         E3.drawRaster (src, dst);
  4712:         break;
  4713:         //   .A.XHPGT
  4714:       case 0b00011001:  //E3_XHCT
  4715:         E3_XHCT.drawRaster (src, dst);
  4716:         break;
  4717:         //   .A.XHPGT
  4718:       case 0b00011010:  //E3_XHCG
  4719:         E3_XHCG.drawRaster (src, dst);
  4720:         break;
  4721:         //   .A.XHPGT
  4722:       case 0b00011011:  //E3_XHCGT
  4723:         E3_XHCGT.drawRaster (src, dst);
  4724:         break;
  4725:         //   .A.XHPGT
  4726:       case 0b00011101:  //E3_XHPT
  4727:         E3_XHPT.drawRaster (src, dst);
  4728:         break;
  4729:         //   .A.XHPGT
  4730:       case 0b00011110:  //E3_XHPG
  4731:         E3_XHPG.drawRaster (src, dst);
  4732:         break;
  4733:         //   .A.XHPGT
  4734:       case 0b00011111:  //E3_XHPGT
  4735:         E3_XHPGT.drawRaster (src, dst);
  4736:         break;
  4737:         //   .A.XHPGT
  4738:       case 0b01000000:  //E3_A
  4739:       case 0b01000001:  //E3_A
  4740:       case 0b01000010:  //E3_A
  4741:       case 0b01000011:  //E3_A
  4742:       case 0b01000100:  //E3_A
  4743:       case 0b01000101:  //E3_A
  4744:       case 0b01000110:  //E3_A
  4745:       case 0b01000111:  //E3_A
  4746:       case 0b01001000:  //E3_A
  4747:       case 0b01001001:  //E3_A
  4748:       case 0b01001010:  //E3_A
  4749:       case 0b01001011:  //E3_A
  4750:       case 0b01001100:  //E3_A
  4751:       case 0b01001101:  //E3_A
  4752:       case 0b01001110:  //E3_A
  4753:       case 0b01001111:  //E3_A
  4754:       case 0b01010000:  //E3_A
  4755:       case 0b01010001:  //E3_A
  4756:       case 0b01010010:  //E3_A
  4757:       case 0b01010011:  //E3_A
  4758:       case 0b01010100:  //E3_A
  4759:       case 0b01010101:  //E3_A
  4760:       case 0b01010110:  //E3_A
  4761:       case 0b01010111:  //E3_A
  4762:       case 0b01011000:  //E3_A
  4763:       case 0b01011001:  //E3_A
  4764:       case 0b01011010:  //E3_A
  4765:       case 0b01011011:  //E3_A
  4766:       case 0b01011100:  //E3_A
  4767:       case 0b01011101:  //E3_A
  4768:       case 0b01011110:  //E3_A
  4769:       case 0b01011111:  //E3_A
  4770:         E3_A.drawRaster (src, dst);
  4771:         break;
  4772:       default:
  4773:         E3.drawRaster (src, dst);
  4774:         VideoController.vcnReportUnimplemented (XE3);
  4775:       }  //switch
  4776:     }  //drawRaster(int,int)
  4777:   },  //XE3
  4778: 
  4779:   //================================================================================
  4780:   //E3_XWP ($0000,$06xx,$1407)
  4781:   //  概要
  4782:   //    E3  512ドット16色3プレーン
  4783:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  4784:   //  手順
  4785:   //    1番目のパレットが0のとき
  4786:   //      2番目のパレットを偶数化したパレットが0でないとき
  4787:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  4788:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  4789:   //        3番目のパレットを偶数化したパレットのカラー(0は黒)
  4790:   //    1番目のパレットが1のとき
  4791:   //      グラフィックスパレット0のカラー(0は黒)
  4792:   //    1番目のパレットが2以上の偶数のとき
  4793:   //      1番目のカラー(0は黒)
  4794:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  4795:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  4796:   //  中間コード1
  4797:   //    (e1p()==0?((tev(e2p()))!=0?epc(tev(e2p())):epc(tev(e3p()))):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p())))
  4798:   //  中間コード2
  4799:   //    e1p()==0?tev(e2p())!=0?epc(tev(e2p())):epc(tev(e3p())):e1p()==1?epc(0):ls1(e1p())==0?epc(e1p()):epc(tev(e1p()))
  4800:   //  中間コード3
  4801:   //    (v0=e1p())==0?(v1=tev(e2p()))!=0?epc(v1):epc(tev(e3p())):v0==1?epc(0):ls1(v0)==0?epc(v0):epc(tev(v0))
  4802:   //  中間コード4
  4803:   //    (p=e1p())==0?(p=tev(e2p()))!=0?epc(p):epc(tev(e3p())):p==1?epc(0):ls1(p)==0?epc(p):epc(tev(p))
  4804:   //  中間コード5
  4805:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epc(p):epc(e3p()&-2):p==1?epc(0):(p&1)==0?epc(p):epc(p&-2)
  4806:   //  中間コード6
  4807:   //    (p=e1p())==0?(p=e2p()&-2)!=0?epo(p):epo(e3p()&-2):p==1?epo(0):(p&1)==0?epo(p):epo(p&-2)
  4808:   E3_XWP {
  4809:     @Override public void drawRaster (int src, int dst) {
  4810:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4811:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4812:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4813:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4814:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4815:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4816:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  4817:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  4818:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4819:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4820:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4821:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  4822:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4823:         gx1st += half << 1;
  4824:         gx2nd += half << 1;
  4825:         gx3rd += half << 1;
  4826:         da += half;
  4827:       }
  4828:       while (da < db) {
  4829:         int p;
  4830:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  4831:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  4832:                           VideoController.vcnPal32G8[p] :
  4833:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2] :
  4834:                           p == 1 ?
  4835:                           VideoController.vcnPal32G8[0] :
  4836:                           (p & 1) == 0 ?
  4837:                           VideoController.vcnPal32G8[p] :
  4838:                           VideoController.vcnPal32G8[p & -2]);
  4839:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  4840:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  4841:                               VideoController.vcnPal32G8[p] :
  4842:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2] :
  4843:                               p == 1 ?
  4844:                               VideoController.vcnPal32G8[0] :
  4845:                               (p & 1) == 0 ?
  4846:                               VideoController.vcnPal32G8[p] :
  4847:                               VideoController.vcnPal32G8[p & -2]);
  4848:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  4849:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  4850:                               VideoController.vcnPal32G8[p] :
  4851:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2] :
  4852:                               p == 1 ?
  4853:                               VideoController.vcnPal32G8[0] :
  4854:                               (p & 1) == 0 ?
  4855:                               VideoController.vcnPal32G8[p] :
  4856:                               VideoController.vcnPal32G8[p & -2]);
  4857:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  4858:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  4859:                               VideoController.vcnPal32G8[p] :
  4860:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2] :
  4861:                               p == 1 ?
  4862:                               VideoController.vcnPal32G8[0] :
  4863:                               (p & 1) == 0 ?
  4864:                               VideoController.vcnPal32G8[p] :
  4865:                               VideoController.vcnPal32G8[p & -2]);
  4866:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  4867:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  4868:                               VideoController.vcnPal32G8[p] :
  4869:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2] :
  4870:                               p == 1 ?
  4871:                               VideoController.vcnPal32G8[0] :
  4872:                               (p & 1) == 0 ?
  4873:                               VideoController.vcnPal32G8[p] :
  4874:                               VideoController.vcnPal32G8[p & -2]);
  4875:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  4876:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  4877:                               VideoController.vcnPal32G8[p] :
  4878:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2] :
  4879:                               p == 1 ?
  4880:                               VideoController.vcnPal32G8[0] :
  4881:                               (p & 1) == 0 ?
  4882:                               VideoController.vcnPal32G8[p] :
  4883:                               VideoController.vcnPal32G8[p & -2]);
  4884:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  4885:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  4886:                               VideoController.vcnPal32G8[p] :
  4887:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2] :
  4888:                               p == 1 ?
  4889:                               VideoController.vcnPal32G8[0] :
  4890:                               (p & 1) == 0 ?
  4891:                               VideoController.vcnPal32G8[p] :
  4892:                               VideoController.vcnPal32G8[p & -2]);
  4893:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  4894:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  4895:                               VideoController.vcnPal32G8[p] :
  4896:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2] :
  4897:                               p == 1 ?
  4898:                               VideoController.vcnPal32G8[0] :
  4899:                               (p & 1) == 0 ?
  4900:                               VideoController.vcnPal32G8[p] :
  4901:                               VideoController.vcnPal32G8[p & -2]);
  4902:         gx1st += 16;
  4903:         gx2nd += 16;
  4904:         gx3rd += 16;
  4905:         da += 8;
  4906:       }  //while da<db
  4907:     }  //drawRaster(int,int)
  4908:   },  //E3_XWP
  4909: 
  4910:   //================================================================================
  4911:   //E3_XHCT ($0000,$06xx,$1907)
  4912:   //  概要
  4913:   //    E3  512ドット16色3プレーン
  4914:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  4915:   //  手順
  4916:   //    1番目のパレットが0でないとき
  4917:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  4918:   //        1番目のカラーとカラー0を混ぜたカラー(0は黒)
  4919:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  4920:   //        1番目のカラー(0は黒)
  4921:   //    さもなくば(1番目のパレットが0のとき)
  4922:   //      2番目のパレットが0でないとき
  4923:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  4924:   //          2番目のカラーとカラー0を混ぜたカラー(0は黒)
  4925:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  4926:   //          2番目のカラー(0は黒)
  4927:   //      さもなくば(2番目のパレットが0のとき)
  4928:   //        3番目のパレットを偶数化したパレットのカラーが奇数のとき
  4929:   //          3番目のカラーとカラー0を混ぜたカラー(0は黒)
  4930:   //        さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  4931:   //          3番目のカラー(0は黒)
  4932:   //  中間コード1
  4933:   //    (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()))))
  4934:   //  中間コード2
  4935:   //    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())
  4936:   //  中間コード3
  4937:   //    (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)
  4938:   //  中間コード4
  4939:   //    (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)
  4940:   //  中間コード5
  4941:   //    (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)
  4942:   //  中間コード6
  4943:   //    (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)
  4944:   E3_XHCT {
  4945:     @Override public void drawRaster (int src, int dst) {
  4946:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  4947:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  4948:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4949:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  4950:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  4951:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4952:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  4953:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  4954:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  4955:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  4956:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  4957:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  4958:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  4959:         gx1st += half << 1;
  4960:         gx2nd += half << 1;
  4961:         gx3rd += half << 1;
  4962:         da += half;
  4963:       }
  4964:       while (da < db) {
  4965:         int p;
  4966:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  4967:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  4968:                           VideoController.vcnPalTbl[
  4969:                             VideoController.vcnMix2 (
  4970:                               VideoController.vcnPal16G8[p],
  4971:                               0)] :
  4972:                           VideoController.vcnPal32G8[p] :
  4973:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  4974:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  4975:                           VideoController.vcnPalTbl[
  4976:                             VideoController.vcnMix2 (
  4977:                               VideoController.vcnPal16G8[p],
  4978:                               0)] :
  4979:                           VideoController.vcnPal32G8[p] :
  4980:                           (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) & -2] & 1) != 0 ?
  4981:                           VideoController.vcnPalTbl[
  4982:                             VideoController.vcnMix2 (
  4983:                               VideoController.vcnPal16G8[p],
  4984:                               0)] :
  4985:                           VideoController.vcnPal32G8[p]);
  4986:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  4987:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  4988:                               VideoController.vcnPalTbl[
  4989:                                 VideoController.vcnMix2 (
  4990:                                   VideoController.vcnPal16G8[p],
  4991:                                   0)] :
  4992:                               VideoController.vcnPal32G8[p] :
  4993:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  4994:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  4995:                               VideoController.vcnPalTbl[
  4996:                                 VideoController.vcnMix2 (
  4997:                                   VideoController.vcnPal16G8[p],
  4998:                                   0)] :
  4999:                               VideoController.vcnPal32G8[p] :
  5000:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) & -2] & 1) != 0 ?
  5001:                               VideoController.vcnPalTbl[
  5002:                                 VideoController.vcnMix2 (
  5003:                                   VideoController.vcnPal16G8[p],
  5004:                                   0)] :
  5005:                               VideoController.vcnPal32G8[p]);
  5006:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  5007:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5008:                               VideoController.vcnPalTbl[
  5009:                                 VideoController.vcnMix2 (
  5010:                                   VideoController.vcnPal16G8[p],
  5011:                                   0)] :
  5012:                               VideoController.vcnPal32G8[p] :
  5013:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  5014:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5015:                               VideoController.vcnPalTbl[
  5016:                                 VideoController.vcnMix2 (
  5017:                                   VideoController.vcnPal16G8[p],
  5018:                                   0)] :
  5019:                               VideoController.vcnPal32G8[p] :
  5020:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) & -2] & 1) != 0 ?
  5021:                               VideoController.vcnPalTbl[
  5022:                                 VideoController.vcnMix2 (
  5023:                                   VideoController.vcnPal16G8[p],
  5024:                                   0)] :
  5025:                               VideoController.vcnPal32G8[p]);
  5026:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  5027:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5028:                               VideoController.vcnPalTbl[
  5029:                                 VideoController.vcnMix2 (
  5030:                                   VideoController.vcnPal16G8[p],
  5031:                                   0)] :
  5032:                               VideoController.vcnPal32G8[p] :
  5033:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  5034:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5035:                               VideoController.vcnPalTbl[
  5036:                                 VideoController.vcnMix2 (
  5037:                                   VideoController.vcnPal16G8[p],
  5038:                                   0)] :
  5039:                               VideoController.vcnPal32G8[p] :
  5040:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) & -2] & 1) != 0 ?
  5041:                               VideoController.vcnPalTbl[
  5042:                                 VideoController.vcnMix2 (
  5043:                                   VideoController.vcnPal16G8[p],
  5044:                                   0)] :
  5045:                               VideoController.vcnPal32G8[p]);
  5046:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  5047:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5048:                               VideoController.vcnPalTbl[
  5049:                                 VideoController.vcnMix2 (
  5050:                                   VideoController.vcnPal16G8[p],
  5051:                                   0)] :
  5052:                               VideoController.vcnPal32G8[p] :
  5053:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  5054:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5055:                               VideoController.vcnPalTbl[
  5056:                                 VideoController.vcnMix2 (
  5057:                                   VideoController.vcnPal16G8[p],
  5058:                                   0)] :
  5059:                               VideoController.vcnPal32G8[p] :
  5060:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) & -2] & 1) != 0 ?
  5061:                               VideoController.vcnPalTbl[
  5062:                                 VideoController.vcnMix2 (
  5063:                                   VideoController.vcnPal16G8[p],
  5064:                                   0)] :
  5065:                               VideoController.vcnPal32G8[p]);
  5066:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  5067:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5068:                               VideoController.vcnPalTbl[
  5069:                                 VideoController.vcnMix2 (
  5070:                                   VideoController.vcnPal16G8[p],
  5071:                                   0)] :
  5072:                               VideoController.vcnPal32G8[p] :
  5073:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  5074:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5075:                               VideoController.vcnPalTbl[
  5076:                                 VideoController.vcnMix2 (
  5077:                                   VideoController.vcnPal16G8[p],
  5078:                                   0)] :
  5079:                               VideoController.vcnPal32G8[p] :
  5080:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) & -2] & 1) != 0 ?
  5081:                               VideoController.vcnPalTbl[
  5082:                                 VideoController.vcnMix2 (
  5083:                                   VideoController.vcnPal16G8[p],
  5084:                                   0)] :
  5085:                               VideoController.vcnPal32G8[p]);
  5086:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  5087:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5088:                               VideoController.vcnPalTbl[
  5089:                                 VideoController.vcnMix2 (
  5090:                                   VideoController.vcnPal16G8[p],
  5091:                                   0)] :
  5092:                               VideoController.vcnPal32G8[p] :
  5093:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  5094:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5095:                               VideoController.vcnPalTbl[
  5096:                                 VideoController.vcnMix2 (
  5097:                                   VideoController.vcnPal16G8[p],
  5098:                                   0)] :
  5099:                               VideoController.vcnPal32G8[p] :
  5100:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) & -2] & 1) != 0 ?
  5101:                               VideoController.vcnPalTbl[
  5102:                                 VideoController.vcnMix2 (
  5103:                                   VideoController.vcnPal16G8[p],
  5104:                                   0)] :
  5105:                               VideoController.vcnPal32G8[p]);
  5106:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  5107:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5108:                               VideoController.vcnPalTbl[
  5109:                                 VideoController.vcnMix2 (
  5110:                                   VideoController.vcnPal16G8[p],
  5111:                                   0)] :
  5112:                               VideoController.vcnPal32G8[p] :
  5113:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  5114:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  5115:                               VideoController.vcnPalTbl[
  5116:                                 VideoController.vcnMix2 (
  5117:                                   VideoController.vcnPal16G8[p],
  5118:                                   0)] :
  5119:                               VideoController.vcnPal32G8[p] :
  5120:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) & -2] & 1) != 0 ?
  5121:                               VideoController.vcnPalTbl[
  5122:                                 VideoController.vcnMix2 (
  5123:                                   VideoController.vcnPal16G8[p],
  5124:                                   0)] :
  5125:                               VideoController.vcnPal32G8[p]);
  5126:         gx1st += 16;
  5127:         gx2nd += 16;
  5128:         gx3rd += 16;
  5129:         da += 8;
  5130:       }  //while da<db
  5131:     }  //drawRaster(int,int)
  5132:   },  //E3_XHCT
  5133: 
  5134:   //================================================================================
  5135:   //E3_XHCG ($0000,$06xx,$1A07)
  5136:   //  概要
  5137:   //    E3  512ドット16色3プレーン
  5138:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  5139:   //  手順
  5140:   //    1番目のパレットが0でないとき
  5141:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  5142:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  5143:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5144:   //        1番目のパレットが奇数のとき
  5145:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  5146:   //        さもなくば(1番目のパレットが偶数のとき)
  5147:   //          1番目のカラー(0は黒)
  5148:   //    さもなくば(1番目のパレットが0のとき)
  5149:   //      2番目のパレットが0でないとき
  5150:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  5151:   //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  5152:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5153:   //          2番目のカラー(0は黒)
  5154:   //      さもなくば(2番目のパレットが0のとき)
  5155:   //        3番目のパレットを偶数化したパレットのカラーが奇数のとき
  5156:   //          3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラー(0は黒)
  5157:   //        さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5158:   //          3番目のパレットが奇数のとき
  5159:   //            パレット1のカラー(0は黒)
  5160:   //          さもなくば(3番目のパレットが偶数のとき)
  5161:   //            3番目のカラー(0は黒)
  5162:   //  中間コード1
  5163:   //    (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())))))
  5164:   //  中間コード2
  5165:   //    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())
  5166:   //  中間コード3
  5167:   //    (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)
  5168:   //  中間コード4
  5169:   //    (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)
  5170:   //  中間コード5
  5171:   //    (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)
  5172:   //  中間コード6
  5173:   //    (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)
  5174:   E3_XHCG {
  5175:     @Override public void drawRaster (int src, int dst) {
  5176:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  5177:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  5178:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5179:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  5180:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  5181:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5182:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  5183:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  5184:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  5185:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5186:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  5187:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  5188:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  5189:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  5190:         gx1st += half << 1;
  5191:         gx2nd += half << 1;
  5192:         gx3rd += half << 1;
  5193:         da += half;
  5194:       }
  5195:       while (da < db) {
  5196:         int p, q;
  5197:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  5198:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5199:                           VideoController.vcnPalTbl[
  5200:                             VideoController.vcnMix2 (
  5201:                               q,
  5202:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  5203:                           (p & 1) != 0 ?
  5204:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  5205:                           VideoController.vcnPal32G8[p] :
  5206:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  5207:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5208:                           VideoController.vcnPalTbl[
  5209:                             VideoController.vcnMix2 (
  5210:                               q,
  5211:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  5212:                           VideoController.vcnPal32G8[p] :
  5213:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) & -2]) & 1) != 0 ?
  5214:                           VideoController.vcnPalTbl[
  5215:                             VideoController.vcnMix2 (
  5216:                               p,
  5217:                               VideoController.vcnPal16G8[1])] :
  5218:                           (q & 1) != 0 ?
  5219:                           VideoController.vcnPal32G8[1] :
  5220:                           VideoController.vcnPal32G8[q]);
  5221:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  5222:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5223:                               VideoController.vcnPalTbl[
  5224:                                 VideoController.vcnMix2 (
  5225:                                   q,
  5226:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  5227:                               (p & 1) != 0 ?
  5228:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  5229:                               VideoController.vcnPal32G8[p] :
  5230:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  5231:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5232:                               VideoController.vcnPalTbl[
  5233:                                 VideoController.vcnMix2 (
  5234:                                   q,
  5235:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  5236:                               VideoController.vcnPal32G8[p] :
  5237:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) & -2]) & 1) != 0 ?
  5238:                               VideoController.vcnPalTbl[
  5239:                                 VideoController.vcnMix2 (
  5240:                                   p,
  5241:                                   VideoController.vcnPal16G8[1])] :
  5242:                               (q & 1) != 0 ?
  5243:                               VideoController.vcnPal32G8[1] :
  5244:                               VideoController.vcnPal32G8[q]);
  5245:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  5246:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5247:                               VideoController.vcnPalTbl[
  5248:                                 VideoController.vcnMix2 (
  5249:                                   q,
  5250:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  5251:                               (p & 1) != 0 ?
  5252:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  5253:                               VideoController.vcnPal32G8[p] :
  5254:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  5255:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5256:                               VideoController.vcnPalTbl[
  5257:                                 VideoController.vcnMix2 (
  5258:                                   q,
  5259:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  5260:                               VideoController.vcnPal32G8[p] :
  5261:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) & -2]) & 1) != 0 ?
  5262:                               VideoController.vcnPalTbl[
  5263:                                 VideoController.vcnMix2 (
  5264:                                   p,
  5265:                                   VideoController.vcnPal16G8[1])] :
  5266:                               (q & 1) != 0 ?
  5267:                               VideoController.vcnPal32G8[1] :
  5268:                               VideoController.vcnPal32G8[q]);
  5269:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  5270:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5271:                               VideoController.vcnPalTbl[
  5272:                                 VideoController.vcnMix2 (
  5273:                                   q,
  5274:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  5275:                               (p & 1) != 0 ?
  5276:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  5277:                               VideoController.vcnPal32G8[p] :
  5278:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  5279:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5280:                               VideoController.vcnPalTbl[
  5281:                                 VideoController.vcnMix2 (
  5282:                                   q,
  5283:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  5284:                               VideoController.vcnPal32G8[p] :
  5285:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) & -2]) & 1) != 0 ?
  5286:                               VideoController.vcnPalTbl[
  5287:                                 VideoController.vcnMix2 (
  5288:                                   p,
  5289:                                   VideoController.vcnPal16G8[1])] :
  5290:                               (q & 1) != 0 ?
  5291:                               VideoController.vcnPal32G8[1] :
  5292:                               VideoController.vcnPal32G8[q]);
  5293:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  5294:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5295:                               VideoController.vcnPalTbl[
  5296:                                 VideoController.vcnMix2 (
  5297:                                   q,
  5298:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  5299:                               (p & 1) != 0 ?
  5300:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  5301:                               VideoController.vcnPal32G8[p] :
  5302:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  5303:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5304:                               VideoController.vcnPalTbl[
  5305:                                 VideoController.vcnMix2 (
  5306:                                   q,
  5307:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  5308:                               VideoController.vcnPal32G8[p] :
  5309:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) & -2]) & 1) != 0 ?
  5310:                               VideoController.vcnPalTbl[
  5311:                                 VideoController.vcnMix2 (
  5312:                                   p,
  5313:                                   VideoController.vcnPal16G8[1])] :
  5314:                               (q & 1) != 0 ?
  5315:                               VideoController.vcnPal32G8[1] :
  5316:                               VideoController.vcnPal32G8[q]);
  5317:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  5318:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5319:                               VideoController.vcnPalTbl[
  5320:                                 VideoController.vcnMix2 (
  5321:                                   q,
  5322:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  5323:                               (p & 1) != 0 ?
  5324:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  5325:                               VideoController.vcnPal32G8[p] :
  5326:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  5327:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5328:                               VideoController.vcnPalTbl[
  5329:                                 VideoController.vcnMix2 (
  5330:                                   q,
  5331:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  5332:                               VideoController.vcnPal32G8[p] :
  5333:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) & -2]) & 1) != 0 ?
  5334:                               VideoController.vcnPalTbl[
  5335:                                 VideoController.vcnMix2 (
  5336:                                   p,
  5337:                                   VideoController.vcnPal16G8[1])] :
  5338:                               (q & 1) != 0 ?
  5339:                               VideoController.vcnPal32G8[1] :
  5340:                               VideoController.vcnPal32G8[q]);
  5341:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  5342:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5343:                               VideoController.vcnPalTbl[
  5344:                                 VideoController.vcnMix2 (
  5345:                                   q,
  5346:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  5347:                               (p & 1) != 0 ?
  5348:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  5349:                               VideoController.vcnPal32G8[p] :
  5350:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  5351:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5352:                               VideoController.vcnPalTbl[
  5353:                                 VideoController.vcnMix2 (
  5354:                                   q,
  5355:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  5356:                               VideoController.vcnPal32G8[p] :
  5357:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) & -2]) & 1) != 0 ?
  5358:                               VideoController.vcnPalTbl[
  5359:                                 VideoController.vcnMix2 (
  5360:                                   p,
  5361:                                   VideoController.vcnPal16G8[1])] :
  5362:                               (q & 1) != 0 ?
  5363:                               VideoController.vcnPal32G8[1] :
  5364:                               VideoController.vcnPal32G8[q]);
  5365:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  5366:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5367:                               VideoController.vcnPalTbl[
  5368:                                 VideoController.vcnMix2 (
  5369:                                   q,
  5370:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  5371:                               (p & 1) != 0 ?
  5372:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  5373:                               VideoController.vcnPal32G8[p] :
  5374:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  5375:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5376:                               VideoController.vcnPalTbl[
  5377:                                 VideoController.vcnMix2 (
  5378:                                   q,
  5379:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  5380:                               VideoController.vcnPal32G8[p] :
  5381:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) & -2]) & 1) != 0 ?
  5382:                               VideoController.vcnPalTbl[
  5383:                                 VideoController.vcnMix2 (
  5384:                                   p,
  5385:                                   VideoController.vcnPal16G8[1])] :
  5386:                               (q & 1) != 0 ?
  5387:                               VideoController.vcnPal32G8[1] :
  5388:                               VideoController.vcnPal32G8[q]);
  5389:         gx1st += 16;
  5390:         gx2nd += 16;
  5391:         gx3rd += 16;
  5392:         da += 8;
  5393:       }  //while da<db
  5394:     }  //drawRaster(int,int)
  5395:   },  //E3_XHCG
  5396: 
  5397:   //================================================================================
  5398:   //E3_XHCGT ($0000,$06xx,$1B07)
  5399:   //  概要
  5400:   //    E3  512ドット16色3プレーン
  5401:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  5402:   //  手順
  5403:   //    1番目のパレットが0でないとき
  5404:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  5405:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  5406:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5407:   //        1番目のパレットが奇数のとき
  5408:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  5409:   //        さもなくば(1番目のパレットが偶数のとき)
  5410:   //          1番目のカラー(0は黒)
  5411:   //    さもなくば(1番目のパレットが0のとき)
  5412:   //      2番目のパレットが0でないとき
  5413:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  5414:   //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  5415:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5416:   //          2番目のカラー(0は黒)
  5417:   //      さもなくば(2番目のパレットが0のとき)
  5418:   //        3番目のパレットを偶数化したパレットのカラーが奇数のとき
  5419:   //          3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  5420:   //        さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  5421:   //          3番目のパレットが奇数のとき
  5422:   //            パレット1のカラー(0は黒)
  5423:   //          さもなくば(3番目のパレットが偶数のとき)
  5424:   //            3番目のカラー(0は黒)
  5425:   //  中間コード1
  5426:   //    (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())))))
  5427:   //  中間コード2
  5428:   //    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())
  5429:   //  中間コード3
  5430:   //    (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)
  5431:   //  中間コード4
  5432:   //    (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)
  5433:   //  中間コード5
  5434:   //    (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)
  5435:   //  中間コード6
  5436:   //    (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)
  5437:   E3_XHCGT {
  5438:     @Override public void drawRaster (int src, int dst) {
  5439:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  5440:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  5441:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5442:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  5443:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  5444:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5445:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  5446:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  5447:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  5448:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5449:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  5450:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  5451:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  5452:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  5453:         gx1st += half << 1;
  5454:         gx2nd += half << 1;
  5455:         gx3rd += half << 1;
  5456:         da += half;
  5457:       }
  5458:       while (da < db) {
  5459:         int p, q;
  5460:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  5461:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5462:                           VideoController.vcnPalTbl[
  5463:                             VideoController.vcnMix2 (
  5464:                               VideoController.vcnMix2 (
  5465:                                 q,
  5466:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  5467:                               0)] :
  5468:                           (p & 1) != 0 ?
  5469:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  5470:                           VideoController.vcnPal32G8[p] :
  5471:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  5472:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5473:                           VideoController.vcnPalTbl[
  5474:                             VideoController.vcnMix2 (
  5475:                               VideoController.vcnMix2 (
  5476:                                 q,
  5477:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  5478:                               0)] :
  5479:                           VideoController.vcnPal32G8[p] :
  5480:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) & -2]) & 1) != 0 ?
  5481:                           VideoController.vcnPalTbl[
  5482:                             VideoController.vcnMix2 (
  5483:                               VideoController.vcnMix2 (
  5484:                                 p,
  5485:                                 VideoController.vcnPal16G8[1]),
  5486:                               0)] :
  5487:                           (q & 1) != 0 ?
  5488:                           VideoController.vcnPal32G8[1] :
  5489:                           VideoController.vcnPal32G8[q]);
  5490:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  5491:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5492:                               VideoController.vcnPalTbl[
  5493:                                 VideoController.vcnMix2 (
  5494:                                   VideoController.vcnMix2 (
  5495:                                     q,
  5496:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  5497:                                   0)] :
  5498:                               (p & 1) != 0 ?
  5499:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  5500:                               VideoController.vcnPal32G8[p] :
  5501:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  5502:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5503:                               VideoController.vcnPalTbl[
  5504:                                 VideoController.vcnMix2 (
  5505:                                   VideoController.vcnMix2 (
  5506:                                     q,
  5507:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  5508:                                   0)] :
  5509:                               VideoController.vcnPal32G8[p] :
  5510:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) & -2]) & 1) != 0 ?
  5511:                               VideoController.vcnPalTbl[
  5512:                                 VideoController.vcnMix2 (
  5513:                                   VideoController.vcnMix2 (
  5514:                                     p,
  5515:                                     VideoController.vcnPal16G8[1]),
  5516:                                   0)] :
  5517:                               (q & 1) != 0 ?
  5518:                               VideoController.vcnPal32G8[1] :
  5519:                               VideoController.vcnPal32G8[q]);
  5520:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  5521:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5522:                               VideoController.vcnPalTbl[
  5523:                                 VideoController.vcnMix2 (
  5524:                                   VideoController.vcnMix2 (
  5525:                                     q,
  5526:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  5527:                                   0)] :
  5528:                               (p & 1) != 0 ?
  5529:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  5530:                               VideoController.vcnPal32G8[p] :
  5531:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  5532:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5533:                               VideoController.vcnPalTbl[
  5534:                                 VideoController.vcnMix2 (
  5535:                                   VideoController.vcnMix2 (
  5536:                                     q,
  5537:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  5538:                                   0)] :
  5539:                               VideoController.vcnPal32G8[p] :
  5540:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) & -2]) & 1) != 0 ?
  5541:                               VideoController.vcnPalTbl[
  5542:                                 VideoController.vcnMix2 (
  5543:                                   VideoController.vcnMix2 (
  5544:                                     p,
  5545:                                     VideoController.vcnPal16G8[1]),
  5546:                                   0)] :
  5547:                               (q & 1) != 0 ?
  5548:                               VideoController.vcnPal32G8[1] :
  5549:                               VideoController.vcnPal32G8[q]);
  5550:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  5551:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5552:                               VideoController.vcnPalTbl[
  5553:                                 VideoController.vcnMix2 (
  5554:                                   VideoController.vcnMix2 (
  5555:                                     q,
  5556:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  5557:                                   0)] :
  5558:                               (p & 1) != 0 ?
  5559:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  5560:                               VideoController.vcnPal32G8[p] :
  5561:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  5562:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5563:                               VideoController.vcnPalTbl[
  5564:                                 VideoController.vcnMix2 (
  5565:                                   VideoController.vcnMix2 (
  5566:                                     q,
  5567:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  5568:                                   0)] :
  5569:                               VideoController.vcnPal32G8[p] :
  5570:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) & -2]) & 1) != 0 ?
  5571:                               VideoController.vcnPalTbl[
  5572:                                 VideoController.vcnMix2 (
  5573:                                   VideoController.vcnMix2 (
  5574:                                     p,
  5575:                                     VideoController.vcnPal16G8[1]),
  5576:                                   0)] :
  5577:                               (q & 1) != 0 ?
  5578:                               VideoController.vcnPal32G8[1] :
  5579:                               VideoController.vcnPal32G8[q]);
  5580:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  5581:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5582:                               VideoController.vcnPalTbl[
  5583:                                 VideoController.vcnMix2 (
  5584:                                   VideoController.vcnMix2 (
  5585:                                     q,
  5586:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  5587:                                   0)] :
  5588:                               (p & 1) != 0 ?
  5589:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  5590:                               VideoController.vcnPal32G8[p] :
  5591:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  5592:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5593:                               VideoController.vcnPalTbl[
  5594:                                 VideoController.vcnMix2 (
  5595:                                   VideoController.vcnMix2 (
  5596:                                     q,
  5597:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  5598:                                   0)] :
  5599:                               VideoController.vcnPal32G8[p] :
  5600:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) & -2]) & 1) != 0 ?
  5601:                               VideoController.vcnPalTbl[
  5602:                                 VideoController.vcnMix2 (
  5603:                                   VideoController.vcnMix2 (
  5604:                                     p,
  5605:                                     VideoController.vcnPal16G8[1]),
  5606:                                   0)] :
  5607:                               (q & 1) != 0 ?
  5608:                               VideoController.vcnPal32G8[1] :
  5609:                               VideoController.vcnPal32G8[q]);
  5610:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  5611:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5612:                               VideoController.vcnPalTbl[
  5613:                                 VideoController.vcnMix2 (
  5614:                                   VideoController.vcnMix2 (
  5615:                                     q,
  5616:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  5617:                                   0)] :
  5618:                               (p & 1) != 0 ?
  5619:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  5620:                               VideoController.vcnPal32G8[p] :
  5621:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  5622:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5623:                               VideoController.vcnPalTbl[
  5624:                                 VideoController.vcnMix2 (
  5625:                                   VideoController.vcnMix2 (
  5626:                                     q,
  5627:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  5628:                                   0)] :
  5629:                               VideoController.vcnPal32G8[p] :
  5630:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) & -2]) & 1) != 0 ?
  5631:                               VideoController.vcnPalTbl[
  5632:                                 VideoController.vcnMix2 (
  5633:                                   VideoController.vcnMix2 (
  5634:                                     p,
  5635:                                     VideoController.vcnPal16G8[1]),
  5636:                                   0)] :
  5637:                               (q & 1) != 0 ?
  5638:                               VideoController.vcnPal32G8[1] :
  5639:                               VideoController.vcnPal32G8[q]);
  5640:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  5641:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5642:                               VideoController.vcnPalTbl[
  5643:                                 VideoController.vcnMix2 (
  5644:                                   VideoController.vcnMix2 (
  5645:                                     q,
  5646:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  5647:                                   0)] :
  5648:                               (p & 1) != 0 ?
  5649:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  5650:                               VideoController.vcnPal32G8[p] :
  5651:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  5652:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5653:                               VideoController.vcnPalTbl[
  5654:                                 VideoController.vcnMix2 (
  5655:                                   VideoController.vcnMix2 (
  5656:                                     q,
  5657:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  5658:                                   0)] :
  5659:                               VideoController.vcnPal32G8[p] :
  5660:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) & -2]) & 1) != 0 ?
  5661:                               VideoController.vcnPalTbl[
  5662:                                 VideoController.vcnMix2 (
  5663:                                   VideoController.vcnMix2 (
  5664:                                     p,
  5665:                                     VideoController.vcnPal16G8[1]),
  5666:                                   0)] :
  5667:                               (q & 1) != 0 ?
  5668:                               VideoController.vcnPal32G8[1] :
  5669:                               VideoController.vcnPal32G8[q]);
  5670:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  5671:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5672:                               VideoController.vcnPalTbl[
  5673:                                 VideoController.vcnMix2 (
  5674:                                   VideoController.vcnMix2 (
  5675:                                     q,
  5676:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  5677:                                   0)] :
  5678:                               (p & 1) != 0 ?
  5679:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  5680:                               VideoController.vcnPal32G8[p] :
  5681:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  5682:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  5683:                               VideoController.vcnPalTbl[
  5684:                                 VideoController.vcnMix2 (
  5685:                                   VideoController.vcnMix2 (
  5686:                                     q,
  5687:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  5688:                                   0)] :
  5689:                               VideoController.vcnPal32G8[p] :
  5690:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) & -2]) & 1) != 0 ?
  5691:                               VideoController.vcnPalTbl[
  5692:                                 VideoController.vcnMix2 (
  5693:                                   VideoController.vcnMix2 (
  5694:                                     p,
  5695:                                     VideoController.vcnPal16G8[1]),
  5696:                                   0)] :
  5697:                               (q & 1) != 0 ?
  5698:                               VideoController.vcnPal32G8[1] :
  5699:                               VideoController.vcnPal32G8[q]);
  5700:         gx1st += 16;
  5701:         gx2nd += 16;
  5702:         gx3rd += 16;
  5703:         da += 8;
  5704:       }  //while da<db
  5705:     }  //drawRaster(int,int)
  5706:   },  //E3_XHCGT
  5707: 
  5708:   //================================================================================
  5709:   //E3_XHPT ($0000,$06xx,$1D07)
  5710:   //  概要
  5711:   //    E3  512ドット16色3プレーン
  5712:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  5713:   //  手順
  5714:   //    1番目のパレットが0のとき
  5715:   //      2番目のパレットを偶数化したパレットが0でないとき
  5716:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  5717:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  5718:   //        3番目のパレットを偶数化したパレットのカラー(0は黒)
  5719:   //    1番目のパレットが1のとき
  5720:   //      グラフィックスパレット0のカラー(0は黒)
  5721:   //    1番目のパレットが2以上の偶数のとき
  5722:   //      1番目のカラー(0は黒)
  5723:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  5724:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  5725:   //  中間コード1
  5726:   //    (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))
  5727:   //  中間コード2
  5728:   //    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)
  5729:   //  中間コード3
  5730:   //    (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)
  5731:   //  中間コード4
  5732:   //    (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)
  5733:   //  中間コード5
  5734:   //    (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)
  5735:   //  中間コード6
  5736:   //    (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))
  5737:   E3_XHPT {
  5738:     @Override public void drawRaster (int src, int dst) {
  5739:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  5740:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  5741:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5742:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  5743:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  5744:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5745:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  5746:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  5747:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5748:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  5749:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  5750:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  5751:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  5752:         gx1st += half << 1;
  5753:         gx2nd += half << 1;
  5754:         gx3rd += half << 1;
  5755:         da += half;
  5756:       }
  5757:       while (da < db) {
  5758:         int p;
  5759:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  5760:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  5761:                           VideoController.vcnPal32G8[p] :
  5762:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2] :
  5763:                           p == 1 ?
  5764:                           VideoController.vcnPal32G8[0] :
  5765:                           (p & 1) == 0 ?
  5766:                           VideoController.vcnPal32G8[p] :
  5767:                           VideoController.vcnPalTbl[
  5768:                             VideoController.vcnMix2 (
  5769:                               VideoController.vcnPal16G8[p & -2],
  5770:                               0)]);
  5771:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  5772:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  5773:                               VideoController.vcnPal32G8[p] :
  5774:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2] :
  5775:                               p == 1 ?
  5776:                               VideoController.vcnPal32G8[0] :
  5777:                               (p & 1) == 0 ?
  5778:                               VideoController.vcnPal32G8[p] :
  5779:                               VideoController.vcnPalTbl[
  5780:                                 VideoController.vcnMix2 (
  5781:                                   VideoController.vcnPal16G8[p & -2],
  5782:                                   0)]);
  5783:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  5784:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  5785:                               VideoController.vcnPal32G8[p] :
  5786:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2] :
  5787:                               p == 1 ?
  5788:                               VideoController.vcnPal32G8[0] :
  5789:                               (p & 1) == 0 ?
  5790:                               VideoController.vcnPal32G8[p] :
  5791:                               VideoController.vcnPalTbl[
  5792:                                 VideoController.vcnMix2 (
  5793:                                   VideoController.vcnPal16G8[p & -2],
  5794:                                   0)]);
  5795:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  5796:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  5797:                               VideoController.vcnPal32G8[p] :
  5798:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2] :
  5799:                               p == 1 ?
  5800:                               VideoController.vcnPal32G8[0] :
  5801:                               (p & 1) == 0 ?
  5802:                               VideoController.vcnPal32G8[p] :
  5803:                               VideoController.vcnPalTbl[
  5804:                                 VideoController.vcnMix2 (
  5805:                                   VideoController.vcnPal16G8[p & -2],
  5806:                                   0)]);
  5807:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  5808:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  5809:                               VideoController.vcnPal32G8[p] :
  5810:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2] :
  5811:                               p == 1 ?
  5812:                               VideoController.vcnPal32G8[0] :
  5813:                               (p & 1) == 0 ?
  5814:                               VideoController.vcnPal32G8[p] :
  5815:                               VideoController.vcnPalTbl[
  5816:                                 VideoController.vcnMix2 (
  5817:                                   VideoController.vcnPal16G8[p & -2],
  5818:                                   0)]);
  5819:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  5820:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  5821:                               VideoController.vcnPal32G8[p] :
  5822:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2] :
  5823:                               p == 1 ?
  5824:                               VideoController.vcnPal32G8[0] :
  5825:                               (p & 1) == 0 ?
  5826:                               VideoController.vcnPal32G8[p] :
  5827:                               VideoController.vcnPalTbl[
  5828:                                 VideoController.vcnMix2 (
  5829:                                   VideoController.vcnPal16G8[p & -2],
  5830:                                   0)]);
  5831:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  5832:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  5833:                               VideoController.vcnPal32G8[p] :
  5834:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2] :
  5835:                               p == 1 ?
  5836:                               VideoController.vcnPal32G8[0] :
  5837:                               (p & 1) == 0 ?
  5838:                               VideoController.vcnPal32G8[p] :
  5839:                               VideoController.vcnPalTbl[
  5840:                                 VideoController.vcnMix2 (
  5841:                                   VideoController.vcnPal16G8[p & -2],
  5842:                                   0)]);
  5843:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  5844:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  5845:                               VideoController.vcnPal32G8[p] :
  5846:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2] :
  5847:                               p == 1 ?
  5848:                               VideoController.vcnPal32G8[0] :
  5849:                               (p & 1) == 0 ?
  5850:                               VideoController.vcnPal32G8[p] :
  5851:                               VideoController.vcnPalTbl[
  5852:                                 VideoController.vcnMix2 (
  5853:                                   VideoController.vcnPal16G8[p & -2],
  5854:                                   0)]);
  5855:         gx1st += 16;
  5856:         gx2nd += 16;
  5857:         gx3rd += 16;
  5858:         da += 8;
  5859:       }  //while da<db
  5860:     }  //drawRaster(int,int)
  5861:   },  //E3_XHPT
  5862: 
  5863:   //================================================================================
  5864:   //E3_XHPG ($0000,$06xx,$1E07)
  5865:   //  概要
  5866:   //    E3  512ドット16色3プレーン
  5867:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  5868:   //  手順
  5869:   //    1番目のパレットが0のとき
  5870:   //      2番目のパレットを偶数化したパレットが0でないとき
  5871:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  5872:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  5873:   //        3番目のパレットを偶数化したパレットのカラー(0は黒)
  5874:   //    1番目のパレットが1のとき
  5875:   //      グラフィックスパレット0のカラー(0は黒)
  5876:   //    1番目のパレットが2以上の偶数のとき
  5877:   //      1番目のカラー(0は黒)
  5878:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  5879:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  5880:   //  中間コード1
  5881:   //    (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()))))
  5882:   //  中間コード2
  5883:   //    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())))
  5884:   //  中間コード3
  5885:   //    (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())))
  5886:   //  中間コード4
  5887:   //    (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())))
  5888:   //  中間コード5
  5889:   //    (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))
  5890:   //  中間コード6
  5891:   //    (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)))
  5892:   E3_XHPG {
  5893:     @Override public void drawRaster (int src, int dst) {
  5894:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  5895:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  5896:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5897:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  5898:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  5899:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5900:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  5901:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  5902:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  5903:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  5904:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  5905:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  5906:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  5907:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  5908:         gx1st += half << 1;
  5909:         gx2nd += half << 1;
  5910:         gx3rd += half << 1;
  5911:         da += half;
  5912:       }
  5913:       while (da < db) {
  5914:         int p;
  5915:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  5916:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  5917:                           VideoController.vcnPal32G8[p] :
  5918:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2] :
  5919:                           p == 1 ?
  5920:                           VideoController.vcnPal32G8[0] :
  5921:                           (p & 1) == 0 ?
  5922:                           VideoController.vcnPal32G8[p] :
  5923:                           VideoController.vcnPalTbl[
  5924:                             VideoController.vcnMix2 (
  5925:                               VideoController.vcnPal16G8[p & -2],
  5926:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])]);
  5927:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  5928:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  5929:                               VideoController.vcnPal32G8[p] :
  5930:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2] :
  5931:                               p == 1 ?
  5932:                               VideoController.vcnPal32G8[0] :
  5933:                               (p & 1) == 0 ?
  5934:                               VideoController.vcnPal32G8[p] :
  5935:                               VideoController.vcnPalTbl[
  5936:                                 VideoController.vcnMix2 (
  5937:                                   VideoController.vcnPal16G8[p & -2],
  5938:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])]);
  5939:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  5940:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  5941:                               VideoController.vcnPal32G8[p] :
  5942:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2] :
  5943:                               p == 1 ?
  5944:                               VideoController.vcnPal32G8[0] :
  5945:                               (p & 1) == 0 ?
  5946:                               VideoController.vcnPal32G8[p] :
  5947:                               VideoController.vcnPalTbl[
  5948:                                 VideoController.vcnMix2 (
  5949:                                   VideoController.vcnPal16G8[p & -2],
  5950:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])]);
  5951:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  5952:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  5953:                               VideoController.vcnPal32G8[p] :
  5954:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2] :
  5955:                               p == 1 ?
  5956:                               VideoController.vcnPal32G8[0] :
  5957:                               (p & 1) == 0 ?
  5958:                               VideoController.vcnPal32G8[p] :
  5959:                               VideoController.vcnPalTbl[
  5960:                                 VideoController.vcnMix2 (
  5961:                                   VideoController.vcnPal16G8[p & -2],
  5962:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])]);
  5963:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  5964:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  5965:                               VideoController.vcnPal32G8[p] :
  5966:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2] :
  5967:                               p == 1 ?
  5968:                               VideoController.vcnPal32G8[0] :
  5969:                               (p & 1) == 0 ?
  5970:                               VideoController.vcnPal32G8[p] :
  5971:                               VideoController.vcnPalTbl[
  5972:                                 VideoController.vcnMix2 (
  5973:                                   VideoController.vcnPal16G8[p & -2],
  5974:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])]);
  5975:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  5976:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  5977:                               VideoController.vcnPal32G8[p] :
  5978:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2] :
  5979:                               p == 1 ?
  5980:                               VideoController.vcnPal32G8[0] :
  5981:                               (p & 1) == 0 ?
  5982:                               VideoController.vcnPal32G8[p] :
  5983:                               VideoController.vcnPalTbl[
  5984:                                 VideoController.vcnMix2 (
  5985:                                   VideoController.vcnPal16G8[p & -2],
  5986:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])]);
  5987:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  5988:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  5989:                               VideoController.vcnPal32G8[p] :
  5990:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2] :
  5991:                               p == 1 ?
  5992:                               VideoController.vcnPal32G8[0] :
  5993:                               (p & 1) == 0 ?
  5994:                               VideoController.vcnPal32G8[p] :
  5995:                               VideoController.vcnPalTbl[
  5996:                                 VideoController.vcnMix2 (
  5997:                                   VideoController.vcnPal16G8[p & -2],
  5998:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])]);
  5999:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  6000:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  6001:                               VideoController.vcnPal32G8[p] :
  6002:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2] :
  6003:                               p == 1 ?
  6004:                               VideoController.vcnPal32G8[0] :
  6005:                               (p & 1) == 0 ?
  6006:                               VideoController.vcnPal32G8[p] :
  6007:                               VideoController.vcnPalTbl[
  6008:                                 VideoController.vcnMix2 (
  6009:                                   VideoController.vcnPal16G8[p & -2],
  6010:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])]);
  6011:         gx1st += 16;
  6012:         gx2nd += 16;
  6013:         gx3rd += 16;
  6014:         da += 8;
  6015:       }  //while da<db
  6016:     }  //drawRaster(int,int)
  6017:   },  //E3_XHPG
  6018: 
  6019:   //================================================================================
  6020:   //E3_XHPGT ($0000,$06xx,$1F07)
  6021:   //  概要
  6022:   //    E3  512ドット16色3プレーン
  6023:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  6024:   //  手順
  6025:   //    1番目のパレットが0のとき
  6026:   //      2番目のパレットを偶数化したパレットが0でないとき
  6027:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  6028:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  6029:   //        3番目のパレットを偶数化したパレットのカラー(0は黒)
  6030:   //    1番目のパレットが1のとき
  6031:   //      グラフィックスパレット0のカラー(0は黒)
  6032:   //    1番目のパレットが2以上の偶数のとき
  6033:   //      1番目のカラー(0は黒)
  6034:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  6035:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  6036:   //  中間コード1
  6037:   //    (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))
  6038:   //  中間コード2
  6039:   //    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)
  6040:   //  中間コード3
  6041:   //    (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)
  6042:   //  中間コード4
  6043:   //    (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)
  6044:   //  中間コード5
  6045:   //    (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)
  6046:   //  中間コード6
  6047:   //    (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))
  6048:   E3_XHPGT {
  6049:     @Override public void drawRaster (int src, int dst) {
  6050:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6051:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6052:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6053:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6054:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6055:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6056:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  6057:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6058:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6059:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6060:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6061:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6062:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  6063:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6064:         gx1st += half << 1;
  6065:         gx2nd += half << 1;
  6066:         gx3rd += half << 1;
  6067:         da += half;
  6068:       }
  6069:       while (da < db) {
  6070:         int p;
  6071:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  6072:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  6073:                           VideoController.vcnPal32G8[p] :
  6074:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2] :
  6075:                           p == 1 ?
  6076:                           VideoController.vcnPal32G8[0] :
  6077:                           (p & 1) == 0 ?
  6078:                           VideoController.vcnPal32G8[p] :
  6079:                           VideoController.vcnPalTbl[
  6080:                             VideoController.vcnMix2 (
  6081:                               VideoController.vcnMix2 (
  6082:                                 VideoController.vcnPal16G8[p & -2],
  6083:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  6084:                               0)]);
  6085:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  6086:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  6087:                               VideoController.vcnPal32G8[p] :
  6088:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2] :
  6089:                               p == 1 ?
  6090:                               VideoController.vcnPal32G8[0] :
  6091:                               (p & 1) == 0 ?
  6092:                               VideoController.vcnPal32G8[p] :
  6093:                               VideoController.vcnPalTbl[
  6094:                                 VideoController.vcnMix2 (
  6095:                                   VideoController.vcnMix2 (
  6096:                                     VideoController.vcnPal16G8[p & -2],
  6097:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  6098:                                   0)]);
  6099:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  6100:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  6101:                               VideoController.vcnPal32G8[p] :
  6102:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2] :
  6103:                               p == 1 ?
  6104:                               VideoController.vcnPal32G8[0] :
  6105:                               (p & 1) == 0 ?
  6106:                               VideoController.vcnPal32G8[p] :
  6107:                               VideoController.vcnPalTbl[
  6108:                                 VideoController.vcnMix2 (
  6109:                                   VideoController.vcnMix2 (
  6110:                                     VideoController.vcnPal16G8[p & -2],
  6111:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  6112:                                   0)]);
  6113:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  6114:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  6115:                               VideoController.vcnPal32G8[p] :
  6116:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2] :
  6117:                               p == 1 ?
  6118:                               VideoController.vcnPal32G8[0] :
  6119:                               (p & 1) == 0 ?
  6120:                               VideoController.vcnPal32G8[p] :
  6121:                               VideoController.vcnPalTbl[
  6122:                                 VideoController.vcnMix2 (
  6123:                                   VideoController.vcnMix2 (
  6124:                                     VideoController.vcnPal16G8[p & -2],
  6125:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  6126:                                   0)]);
  6127:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  6128:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  6129:                               VideoController.vcnPal32G8[p] :
  6130:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2] :
  6131:                               p == 1 ?
  6132:                               VideoController.vcnPal32G8[0] :
  6133:                               (p & 1) == 0 ?
  6134:                               VideoController.vcnPal32G8[p] :
  6135:                               VideoController.vcnPalTbl[
  6136:                                 VideoController.vcnMix2 (
  6137:                                   VideoController.vcnMix2 (
  6138:                                     VideoController.vcnPal16G8[p & -2],
  6139:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  6140:                                   0)]);
  6141:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  6142:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  6143:                               VideoController.vcnPal32G8[p] :
  6144:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2] :
  6145:                               p == 1 ?
  6146:                               VideoController.vcnPal32G8[0] :
  6147:                               (p & 1) == 0 ?
  6148:                               VideoController.vcnPal32G8[p] :
  6149:                               VideoController.vcnPalTbl[
  6150:                                 VideoController.vcnMix2 (
  6151:                                   VideoController.vcnMix2 (
  6152:                                     VideoController.vcnPal16G8[p & -2],
  6153:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  6154:                                   0)]);
  6155:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  6156:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  6157:                               VideoController.vcnPal32G8[p] :
  6158:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2] :
  6159:                               p == 1 ?
  6160:                               VideoController.vcnPal32G8[0] :
  6161:                               (p & 1) == 0 ?
  6162:                               VideoController.vcnPal32G8[p] :
  6163:                               VideoController.vcnPalTbl[
  6164:                                 VideoController.vcnMix2 (
  6165:                                   VideoController.vcnMix2 (
  6166:                                     VideoController.vcnPal16G8[p & -2],
  6167:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  6168:                                   0)]);
  6169:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  6170:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  6171:                               VideoController.vcnPal32G8[p] :
  6172:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2] :
  6173:                               p == 1 ?
  6174:                               VideoController.vcnPal32G8[0] :
  6175:                               (p & 1) == 0 ?
  6176:                               VideoController.vcnPal32G8[p] :
  6177:                               VideoController.vcnPalTbl[
  6178:                                 VideoController.vcnMix2 (
  6179:                                   VideoController.vcnMix2 (
  6180:                                     VideoController.vcnPal16G8[p & -2],
  6181:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  6182:                                   0)]);
  6183:         gx1st += 16;
  6184:         gx2nd += 16;
  6185:         gx3rd += 16;
  6186:         da += 8;
  6187:       }  //while da<db
  6188:     }  //drawRaster(int,int)
  6189:   },  //E3_XHPGT
  6190: 
  6191:   //================================================================================
  6192:   //E3_A ($0000,$06xx,$4007)
  6193:   //  概要
  6194:   //    E3  512ドット16色3プレーン
  6195:   //    A  グラフィックスカラーとテキストパレット0のカラーを混ぜる
  6196:   //  手順
  6197:   //    1番目のパレットが0でないとき
  6198:   //      1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  6199:   //    さもなくば(1番目のパレットが0のとき)
  6200:   //      2番目のパレットが0でないとき
  6201:   //        2番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  6202:   //      さもなくば(2番目のパレットが0のとき)
  6203:   //        3番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  6204:   //  中間コード1
  6205:   //    (e1p()!=0?mix(epc(e1p()),tpc(0)):(e2p()!=0?mix(epc(e2p()),tpc(0)):mix(epc(e3p()),tpc(0))))
  6206:   //  中間コード2
  6207:   //    e1p()!=0?mix(epc(e1p()),tpc(0)):e2p()!=0?mix(epc(e2p()),tpc(0)):mix(epc(e3p()),tpc(0))
  6208:   //  中間コード3
  6209:   //    (v0=e1p())!=0?mix(epc(v0),tpc(0)):(v4=e2p())!=0?mix(epc(v4),tpc(0)):mix(epc(e3p()),tpc(0))
  6210:   //  中間コード4
  6211:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):mix(epc(e3p()),tpc(0))
  6212:   //  中間コード5
  6213:   //    (p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):mix(epc(e3p()),tpc(0))
  6214:   //  中間コード6
  6215:   //    cto((p=e1p())!=0?mix(epc(p),tpc(0)):(p=e2p())!=0?mix(epc(p),tpc(0)):mix(epc(e3p()),tpc(0)))
  6216:   E3_A {
  6217:     @Override public void drawRaster (int src, int dst) {
  6218:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6219:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6220:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6221:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6222:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6223:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6224:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6225:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6226:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6227:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6228:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6229:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  6230:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6231:         gx1st += half << 1;
  6232:         gx2nd += half << 1;
  6233:         gx3rd += half << 1;
  6234:         da += half;
  6235:       }
  6236:       while (da < db) {
  6237:         int p;
  6238:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  6239:                             (p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  6240:                             VideoController.vcnMix2 (
  6241:                               VideoController.vcnPal16G8[p],
  6242:                               VideoController.vcnPal16TS[0]) :
  6243:                             (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  6244:                             VideoController.vcnMix2 (
  6245:                               VideoController.vcnPal16G8[p],
  6246:                               VideoController.vcnPal16TS[0]) :
  6247:                             VideoController.vcnMix2 (
  6248:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd & 1023]],
  6249:                               VideoController.vcnPal16TS[0])]);
  6250:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  6251:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  6252:                                 VideoController.vcnMix2 (
  6253:                                   VideoController.vcnPal16G8[p],
  6254:                                   VideoController.vcnPal16TS[0]) :
  6255:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  6256:                                 VideoController.vcnMix2 (
  6257:                                   VideoController.vcnPal16G8[p],
  6258:                                   VideoController.vcnPal16TS[0]) :
  6259:                                 VideoController.vcnMix2 (
  6260:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]],
  6261:                                   VideoController.vcnPal16TS[0])]);
  6262:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  6263:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  6264:                                 VideoController.vcnMix2 (
  6265:                                   VideoController.vcnPal16G8[p],
  6266:                                   VideoController.vcnPal16TS[0]) :
  6267:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  6268:                                 VideoController.vcnMix2 (
  6269:                                   VideoController.vcnPal16G8[p],
  6270:                                   VideoController.vcnPal16TS[0]) :
  6271:                                 VideoController.vcnMix2 (
  6272:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]],
  6273:                                   VideoController.vcnPal16TS[0])]);
  6274:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  6275:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  6276:                                 VideoController.vcnMix2 (
  6277:                                   VideoController.vcnPal16G8[p],
  6278:                                   VideoController.vcnPal16TS[0]) :
  6279:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  6280:                                 VideoController.vcnMix2 (
  6281:                                   VideoController.vcnPal16G8[p],
  6282:                                   VideoController.vcnPal16TS[0]) :
  6283:                                 VideoController.vcnMix2 (
  6284:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]],
  6285:                                   VideoController.vcnPal16TS[0])]);
  6286:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  6287:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  6288:                                 VideoController.vcnMix2 (
  6289:                                   VideoController.vcnPal16G8[p],
  6290:                                   VideoController.vcnPal16TS[0]) :
  6291:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  6292:                                 VideoController.vcnMix2 (
  6293:                                   VideoController.vcnPal16G8[p],
  6294:                                   VideoController.vcnPal16TS[0]) :
  6295:                                 VideoController.vcnMix2 (
  6296:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]],
  6297:                                   VideoController.vcnPal16TS[0])]);
  6298:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  6299:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  6300:                                 VideoController.vcnMix2 (
  6301:                                   VideoController.vcnPal16G8[p],
  6302:                                   VideoController.vcnPal16TS[0]) :
  6303:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  6304:                                 VideoController.vcnMix2 (
  6305:                                   VideoController.vcnPal16G8[p],
  6306:                                   VideoController.vcnPal16TS[0]) :
  6307:                                 VideoController.vcnMix2 (
  6308:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]],
  6309:                                   VideoController.vcnPal16TS[0])]);
  6310:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  6311:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  6312:                                 VideoController.vcnMix2 (
  6313:                                   VideoController.vcnPal16G8[p],
  6314:                                   VideoController.vcnPal16TS[0]) :
  6315:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  6316:                                 VideoController.vcnMix2 (
  6317:                                   VideoController.vcnPal16G8[p],
  6318:                                   VideoController.vcnPal16TS[0]) :
  6319:                                 VideoController.vcnMix2 (
  6320:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]],
  6321:                                   VideoController.vcnPal16TS[0])]);
  6322:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  6323:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  6324:                                 VideoController.vcnMix2 (
  6325:                                   VideoController.vcnPal16G8[p],
  6326:                                   VideoController.vcnPal16TS[0]) :
  6327:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  6328:                                 VideoController.vcnMix2 (
  6329:                                   VideoController.vcnPal16G8[p],
  6330:                                   VideoController.vcnPal16TS[0]) :
  6331:                                 VideoController.vcnMix2 (
  6332:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]],
  6333:                                   VideoController.vcnPal16TS[0])]);
  6334:         gx1st += 16;
  6335:         gx2nd += 16;
  6336:         gx3rd += 16;
  6337:         da += 8;
  6338:       }  //while da<db
  6339:     }  //drawRaster(int,int)
  6340:   },  //E3_A
  6341: 
  6342:   //================================================================================
  6343:   //E4 ($0000,$06xx,$000F)
  6344:   //  概要
  6345:   //    E4  512ドット16色4プレーン
  6346:   //    拡張なし
  6347:   //  手順
  6348:   //    1番目のパレットが0でないとき
  6349:   //      1番目のカラー(0は黒)
  6350:   //    さもなくば(1番目のパレットが0のとき)
  6351:   //      2番目のパレットが0でないとき
  6352:   //        2番目のカラー(0は黒)
  6353:   //      さもなくば(2番目のパレットが0のとき)
  6354:   //        3番目のパレットが0でないとき
  6355:   //          3番目のカラー(0は黒)
  6356:   //        さもなくば(3番目のパレットが0のとき)
  6357:   //          4番目のカラー(0は黒)
  6358:   //  中間コード1
  6359:   //    (e1p()!=0?epc(e1p()):(e2p()!=0?epc(e2p()):(e3p()!=0?epc(e3p()):epc(e4p()))))
  6360:   //  中間コード2
  6361:   //    e1p()!=0?epc(e1p()):e2p()!=0?epc(e2p()):e3p()!=0?epc(e3p()):epc(e4p())
  6362:   //  中間コード3
  6363:   //    (v0=e1p())!=0?epc(v0):(v2=e2p())!=0?epc(v2):(v4=e3p())!=0?epc(v4):epc(e4p())
  6364:   //  中間コード4
  6365:   //    (p=e1p())!=0?epc(p):(p=e2p())!=0?epc(p):(p=e3p())!=0?epc(p):epc(e4p())
  6366:   //  中間コード5
  6367:   //    (p=e1p())!=0?epc(p):(p=e2p())!=0?epc(p):(p=e3p())!=0?epc(p):epc(e4p())
  6368:   //  中間コード6
  6369:   //    (p=e1p())!=0?epo(p):(p=e2p())!=0?epo(p):(p=e3p())!=0?epo(p):epo(e4p())
  6370:   E4 {
  6371:     @Override public void drawRaster (int src, int dst) {
  6372:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6373:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6374:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6375:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6376:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6377:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6378:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6379:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6380:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6381:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  6382:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  6383:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6384:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6385:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6386:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  6387:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6388:         gx1st += half << 1;
  6389:         gx2nd += half << 1;
  6390:         gx3rd += half << 1;
  6391:         gx4th += half << 1;
  6392:         da += half;
  6393:       }
  6394:       while (da < db) {
  6395:         int p;
  6396:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  6397:                           VideoController.vcnPal32G8[p] :
  6398:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  6399:                           VideoController.vcnPal32G8[p] :
  6400:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  6401:                           VideoController.vcnPal32G8[p] :
  6402:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023]]);
  6403:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  6404:                               VideoController.vcnPal32G8[p] :
  6405:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  6406:                               VideoController.vcnPal32G8[p] :
  6407:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  6408:                               VideoController.vcnPal32G8[p] :
  6409:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]]);
  6410:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  6411:                               VideoController.vcnPal32G8[p] :
  6412:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  6413:                               VideoController.vcnPal32G8[p] :
  6414:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  6415:                               VideoController.vcnPal32G8[p] :
  6416:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]]);
  6417:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  6418:                               VideoController.vcnPal32G8[p] :
  6419:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  6420:                               VideoController.vcnPal32G8[p] :
  6421:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  6422:                               VideoController.vcnPal32G8[p] :
  6423:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]]);
  6424:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  6425:                               VideoController.vcnPal32G8[p] :
  6426:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  6427:                               VideoController.vcnPal32G8[p] :
  6428:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  6429:                               VideoController.vcnPal32G8[p] :
  6430:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]]);
  6431:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  6432:                               VideoController.vcnPal32G8[p] :
  6433:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  6434:                               VideoController.vcnPal32G8[p] :
  6435:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  6436:                               VideoController.vcnPal32G8[p] :
  6437:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]]);
  6438:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  6439:                               VideoController.vcnPal32G8[p] :
  6440:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  6441:                               VideoController.vcnPal32G8[p] :
  6442:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  6443:                               VideoController.vcnPal32G8[p] :
  6444:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]]);
  6445:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  6446:                               VideoController.vcnPal32G8[p] :
  6447:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  6448:                               VideoController.vcnPal32G8[p] :
  6449:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  6450:                               VideoController.vcnPal32G8[p] :
  6451:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]]);
  6452:         gx1st += 16;
  6453:         gx2nd += 16;
  6454:         gx3rd += 16;
  6455:         gx4th += 16;
  6456:         da += 8;
  6457:       }  //while da<db
  6458:     }  //drawRaster(int,int)
  6459:   },  //E4
  6460: 
  6461:   //================================================================================
  6462:   //XE4
  6463:   //  概要
  6464:   //    E4  512ドット16色4プレーン
  6465:   //    拡張あり
  6466:   XE4 {
  6467:     @Override public void drawRaster (int src, int dst) {
  6468:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  6469:         //   .A.XHPGT
  6470:       case 0b00010000:  //E4_XWC
  6471:       case 0b00010001:  //E4_XWC
  6472:       case 0b00010010:  //E4_XWC
  6473:       case 0b00010011:  //E4_XWC
  6474:         E4.drawRaster (src, dst);
  6475:         break;
  6476:         //   .A.XHPGT
  6477:       case 0b00010100:  //E4_XWP
  6478:       case 0b00010101:  //E4_XWP
  6479:       case 0b00010110:  //E4_XWP
  6480:       case 0b00010111:  //E4_XWP
  6481:         E4_XWP.drawRaster (src, dst);
  6482:         break;
  6483:         //   .A.XHPGT
  6484:       case 0b00011000:  //E4_XHC
  6485:         E4.drawRaster (src, dst);
  6486:         break;
  6487:         //   .A.XHPGT
  6488:       case 0b00011001:  //E4_XHCT
  6489:         E4_XHCT.drawRaster (src, dst);
  6490:         break;
  6491:         //   .A.XHPGT
  6492:       case 0b00011010:  //E4_XHCG
  6493:         E4_XHCG.drawRaster (src, dst);
  6494:         break;
  6495:         //   .A.XHPGT
  6496:       case 0b00011011:  //E4_XHCGT
  6497:         E4_XHCGT.drawRaster (src, dst);
  6498:         break;
  6499:         //   .A.XHPGT
  6500:       case 0b00011101:  //E4_XHPT
  6501:         E4_XHPT.drawRaster (src, dst);
  6502:         break;
  6503:         //   .A.XHPGT
  6504:       case 0b00011110:  //E4_XHPG
  6505:         E4_XHPG.drawRaster (src, dst);
  6506:         break;
  6507:         //   .A.XHPGT
  6508:       case 0b00011111:  //E4_XHPGT
  6509:         E4_XHPGT.drawRaster (src, dst);
  6510:         break;
  6511:         //   .A.XHPGT
  6512:       case 0b01000000:  //E4_A
  6513:       case 0b01000001:  //E4_A
  6514:       case 0b01000010:  //E4_A
  6515:       case 0b01000011:  //E4_A
  6516:       case 0b01000100:  //E4_A
  6517:       case 0b01000101:  //E4_A
  6518:       case 0b01000110:  //E4_A
  6519:       case 0b01000111:  //E4_A
  6520:       case 0b01001000:  //E4_A
  6521:       case 0b01001001:  //E4_A
  6522:       case 0b01001010:  //E4_A
  6523:       case 0b01001011:  //E4_A
  6524:       case 0b01001100:  //E4_A
  6525:       case 0b01001101:  //E4_A
  6526:       case 0b01001110:  //E4_A
  6527:       case 0b01001111:  //E4_A
  6528:       case 0b01010000:  //E4_A
  6529:       case 0b01010001:  //E4_A
  6530:       case 0b01010010:  //E4_A
  6531:       case 0b01010011:  //E4_A
  6532:       case 0b01010100:  //E4_A
  6533:       case 0b01010101:  //E4_A
  6534:       case 0b01010110:  //E4_A
  6535:       case 0b01010111:  //E4_A
  6536:       case 0b01011000:  //E4_A
  6537:       case 0b01011001:  //E4_A
  6538:       case 0b01011010:  //E4_A
  6539:       case 0b01011011:  //E4_A
  6540:       case 0b01011100:  //E4_A
  6541:       case 0b01011101:  //E4_A
  6542:       case 0b01011110:  //E4_A
  6543:       case 0b01011111:  //E4_A
  6544:         E4_A.drawRaster (src, dst);
  6545:         break;
  6546:       default:
  6547:         E4.drawRaster (src, dst);
  6548:         VideoController.vcnReportUnimplemented (XE4);
  6549:       }  //switch
  6550:     }  //drawRaster(int,int)
  6551:   },  //XE4
  6552: 
  6553:   //================================================================================
  6554:   //E4_XWP ($0000,$06xx,$140F)
  6555:   //  概要
  6556:   //    E4  512ドット16色4プレーン
  6557:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  6558:   //  手順
  6559:   //    1番目のパレットが0のとき
  6560:   //      2番目のパレットを偶数化したパレットが0でないとき
  6561:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  6562:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  6563:   //        3番目のパレットを偶数化したパレットが0でないとき
  6564:   //          3番目のパレットを偶数化したパレットのカラー(0は黒)
  6565:   //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
  6566:   //          4番目のパレットを偶数化したパレットのカラー(0は黒)
  6567:   //    1番目のパレットが1のとき
  6568:   //      グラフィックスパレット0のカラー(0は黒)
  6569:   //    1番目のパレットが2以上の偶数のとき
  6570:   //      1番目のカラー(0は黒)
  6571:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  6572:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  6573:   //  中間コード1
  6574:   //    (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())))
  6575:   //  中間コード2
  6576:   //    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()))
  6577:   //  中間コード3
  6578:   //    (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))
  6579:   //  中間コード4
  6580:   //    (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))
  6581:   //  中間コード5
  6582:   //    (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)
  6583:   //  中間コード6
  6584:   //    (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)
  6585:   E4_XWP {
  6586:     @Override public void drawRaster (int src, int dst) {
  6587:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6588:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6589:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6590:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6591:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6592:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6593:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6594:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6595:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6596:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  6597:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  6598:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6599:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6600:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6601:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  6602:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6603:         gx1st += half << 1;
  6604:         gx2nd += half << 1;
  6605:         gx3rd += half << 1;
  6606:         gx4th += half << 1;
  6607:         da += half;
  6608:       }
  6609:       while (da < db) {
  6610:         int p;
  6611:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  6612:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  6613:                           VideoController.vcnPal32G8[p] :
  6614:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2) != 0 ?
  6615:                           VideoController.vcnPal32G8[p] :
  6616:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023] & -2] :
  6617:                           p == 1 ?
  6618:                           VideoController.vcnPal32G8[0] :
  6619:                           (p & 1) == 0 ?
  6620:                           VideoController.vcnPal32G8[p] :
  6621:                           VideoController.vcnPal32G8[p & -2]);
  6622:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  6623:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  6624:                               VideoController.vcnPal32G8[p] :
  6625:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2) != 0 ?
  6626:                               VideoController.vcnPal32G8[p] :
  6627:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] & -2] :
  6628:                               p == 1 ?
  6629:                               VideoController.vcnPal32G8[0] :
  6630:                               (p & 1) == 0 ?
  6631:                               VideoController.vcnPal32G8[p] :
  6632:                               VideoController.vcnPal32G8[p & -2]);
  6633:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  6634:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  6635:                               VideoController.vcnPal32G8[p] :
  6636:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2) != 0 ?
  6637:                               VideoController.vcnPal32G8[p] :
  6638:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] & -2] :
  6639:                               p == 1 ?
  6640:                               VideoController.vcnPal32G8[0] :
  6641:                               (p & 1) == 0 ?
  6642:                               VideoController.vcnPal32G8[p] :
  6643:                               VideoController.vcnPal32G8[p & -2]);
  6644:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  6645:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  6646:                               VideoController.vcnPal32G8[p] :
  6647:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2) != 0 ?
  6648:                               VideoController.vcnPal32G8[p] :
  6649:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] & -2] :
  6650:                               p == 1 ?
  6651:                               VideoController.vcnPal32G8[0] :
  6652:                               (p & 1) == 0 ?
  6653:                               VideoController.vcnPal32G8[p] :
  6654:                               VideoController.vcnPal32G8[p & -2]);
  6655:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  6656:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  6657:                               VideoController.vcnPal32G8[p] :
  6658:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2) != 0 ?
  6659:                               VideoController.vcnPal32G8[p] :
  6660:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] & -2] :
  6661:                               p == 1 ?
  6662:                               VideoController.vcnPal32G8[0] :
  6663:                               (p & 1) == 0 ?
  6664:                               VideoController.vcnPal32G8[p] :
  6665:                               VideoController.vcnPal32G8[p & -2]);
  6666:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  6667:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  6668:                               VideoController.vcnPal32G8[p] :
  6669:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2) != 0 ?
  6670:                               VideoController.vcnPal32G8[p] :
  6671:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] & -2] :
  6672:                               p == 1 ?
  6673:                               VideoController.vcnPal32G8[0] :
  6674:                               (p & 1) == 0 ?
  6675:                               VideoController.vcnPal32G8[p] :
  6676:                               VideoController.vcnPal32G8[p & -2]);
  6677:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  6678:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  6679:                               VideoController.vcnPal32G8[p] :
  6680:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2) != 0 ?
  6681:                               VideoController.vcnPal32G8[p] :
  6682:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] & -2] :
  6683:                               p == 1 ?
  6684:                               VideoController.vcnPal32G8[0] :
  6685:                               (p & 1) == 0 ?
  6686:                               VideoController.vcnPal32G8[p] :
  6687:                               VideoController.vcnPal32G8[p & -2]);
  6688:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  6689:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  6690:                               VideoController.vcnPal32G8[p] :
  6691:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2) != 0 ?
  6692:                               VideoController.vcnPal32G8[p] :
  6693:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] & -2] :
  6694:                               p == 1 ?
  6695:                               VideoController.vcnPal32G8[0] :
  6696:                               (p & 1) == 0 ?
  6697:                               VideoController.vcnPal32G8[p] :
  6698:                               VideoController.vcnPal32G8[p & -2]);
  6699:         gx1st += 16;
  6700:         gx2nd += 16;
  6701:         gx3rd += 16;
  6702:         gx4th += 16;
  6703:         da += 8;
  6704:       }  //while da<db
  6705:     }  //drawRaster(int,int)
  6706:   },  //E4_XWP
  6707: 
  6708:   //================================================================================
  6709:   //E4_XHCT ($0000,$06xx,$190F)
  6710:   //  概要
  6711:   //    E4  512ドット16色4プレーン
  6712:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  6713:   //  手順
  6714:   //    1番目のパレットが0でないとき
  6715:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  6716:   //        1番目のカラーとカラー0を混ぜたカラー(0は黒)
  6717:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  6718:   //        1番目のカラー(0は黒)
  6719:   //    さもなくば(1番目のパレットが0のとき)
  6720:   //      2番目のパレットが0でないとき
  6721:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  6722:   //          2番目のカラーとカラー0を混ぜたカラー(0は黒)
  6723:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  6724:   //          2番目のカラー(0は黒)
  6725:   //      さもなくば(2番目のパレットが0のとき)
  6726:   //        3番目のパレットが0でないとき
  6727:   //          3番目のパレットを偶数化したパレットのカラーが奇数のとき
  6728:   //            3番目のカラーとカラー0を混ぜたカラー(0は黒)
  6729:   //          さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  6730:   //            3番目のカラー(0は黒)
  6731:   //        さもなくば(3番目のパレットが0のとき)
  6732:   //          4番目のパレットを偶数化したパレットのカラーが奇数のとき
  6733:   //            4番目のカラーとカラー0を混ぜたカラー(0は黒)
  6734:   //          さもなくば(4番目のパレットを偶数化したパレットのカラーが偶数のとき)
  6735:   //            4番目のカラー(0は黒)
  6736:   //  中間コード1
  6737:   //    (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())))))
  6738:   //  中間コード2
  6739:   //    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())
  6740:   //  中間コード3
  6741:   //    (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)
  6742:   //  中間コード4
  6743:   //    (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)
  6744:   //  中間コード5
  6745:   //    (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)
  6746:   //  中間コード6
  6747:   //    (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)
  6748:   E4_XHCT {
  6749:     @Override public void drawRaster (int src, int dst) {
  6750:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  6751:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  6752:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6753:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  6754:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  6755:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6756:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  6757:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  6758:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6759:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  6760:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  6761:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  6762:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  6763:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  6764:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  6765:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  6766:         gx1st += half << 1;
  6767:         gx2nd += half << 1;
  6768:         gx3rd += half << 1;
  6769:         gx4th += half << 1;
  6770:         da += half;
  6771:       }
  6772:       while (da < db) {
  6773:         int p;
  6774:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  6775:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6776:                           VideoController.vcnPalTbl[
  6777:                             VideoController.vcnMix2 (
  6778:                               VideoController.vcnPal16G8[p],
  6779:                               0)] :
  6780:                           VideoController.vcnPal32G8[p] :
  6781:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  6782:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6783:                           VideoController.vcnPalTbl[
  6784:                             VideoController.vcnMix2 (
  6785:                               VideoController.vcnPal16G8[p],
  6786:                               0)] :
  6787:                           VideoController.vcnPal32G8[p] :
  6788:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  6789:                           (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6790:                           VideoController.vcnPalTbl[
  6791:                             VideoController.vcnMix2 (
  6792:                               VideoController.vcnPal16G8[p],
  6793:                               0)] :
  6794:                           VideoController.vcnPal32G8[p] :
  6795:                           (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th & 1023]) & -2] & 1) != 0 ?
  6796:                           VideoController.vcnPalTbl[
  6797:                             VideoController.vcnMix2 (
  6798:                               VideoController.vcnPal16G8[p],
  6799:                               0)] :
  6800:                           VideoController.vcnPal32G8[p]);
  6801:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  6802:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6803:                               VideoController.vcnPalTbl[
  6804:                                 VideoController.vcnMix2 (
  6805:                                   VideoController.vcnPal16G8[p],
  6806:                                   0)] :
  6807:                               VideoController.vcnPal32G8[p] :
  6808:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  6809:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6810:                               VideoController.vcnPalTbl[
  6811:                                 VideoController.vcnMix2 (
  6812:                                   VideoController.vcnPal16G8[p],
  6813:                                   0)] :
  6814:                               VideoController.vcnPal32G8[p] :
  6815:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  6816:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6817:                               VideoController.vcnPalTbl[
  6818:                                 VideoController.vcnMix2 (
  6819:                                   VideoController.vcnPal16G8[p],
  6820:                                   0)] :
  6821:                               VideoController.vcnPal32G8[p] :
  6822:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]) & -2] & 1) != 0 ?
  6823:                               VideoController.vcnPalTbl[
  6824:                                 VideoController.vcnMix2 (
  6825:                                   VideoController.vcnPal16G8[p],
  6826:                                   0)] :
  6827:                               VideoController.vcnPal32G8[p]);
  6828:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  6829:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6830:                               VideoController.vcnPalTbl[
  6831:                                 VideoController.vcnMix2 (
  6832:                                   VideoController.vcnPal16G8[p],
  6833:                                   0)] :
  6834:                               VideoController.vcnPal32G8[p] :
  6835:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  6836:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6837:                               VideoController.vcnPalTbl[
  6838:                                 VideoController.vcnMix2 (
  6839:                                   VideoController.vcnPal16G8[p],
  6840:                                   0)] :
  6841:                               VideoController.vcnPal32G8[p] :
  6842:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  6843:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6844:                               VideoController.vcnPalTbl[
  6845:                                 VideoController.vcnMix2 (
  6846:                                   VideoController.vcnPal16G8[p],
  6847:                                   0)] :
  6848:                               VideoController.vcnPal32G8[p] :
  6849:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]) & -2] & 1) != 0 ?
  6850:                               VideoController.vcnPalTbl[
  6851:                                 VideoController.vcnMix2 (
  6852:                                   VideoController.vcnPal16G8[p],
  6853:                                   0)] :
  6854:                               VideoController.vcnPal32G8[p]);
  6855:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  6856:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6857:                               VideoController.vcnPalTbl[
  6858:                                 VideoController.vcnMix2 (
  6859:                                   VideoController.vcnPal16G8[p],
  6860:                                   0)] :
  6861:                               VideoController.vcnPal32G8[p] :
  6862:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  6863:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6864:                               VideoController.vcnPalTbl[
  6865:                                 VideoController.vcnMix2 (
  6866:                                   VideoController.vcnPal16G8[p],
  6867:                                   0)] :
  6868:                               VideoController.vcnPal32G8[p] :
  6869:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  6870:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6871:                               VideoController.vcnPalTbl[
  6872:                                 VideoController.vcnMix2 (
  6873:                                   VideoController.vcnPal16G8[p],
  6874:                                   0)] :
  6875:                               VideoController.vcnPal32G8[p] :
  6876:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]) & -2] & 1) != 0 ?
  6877:                               VideoController.vcnPalTbl[
  6878:                                 VideoController.vcnMix2 (
  6879:                                   VideoController.vcnPal16G8[p],
  6880:                                   0)] :
  6881:                               VideoController.vcnPal32G8[p]);
  6882:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  6883:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6884:                               VideoController.vcnPalTbl[
  6885:                                 VideoController.vcnMix2 (
  6886:                                   VideoController.vcnPal16G8[p],
  6887:                                   0)] :
  6888:                               VideoController.vcnPal32G8[p] :
  6889:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  6890:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6891:                               VideoController.vcnPalTbl[
  6892:                                 VideoController.vcnMix2 (
  6893:                                   VideoController.vcnPal16G8[p],
  6894:                                   0)] :
  6895:                               VideoController.vcnPal32G8[p] :
  6896:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  6897:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6898:                               VideoController.vcnPalTbl[
  6899:                                 VideoController.vcnMix2 (
  6900:                                   VideoController.vcnPal16G8[p],
  6901:                                   0)] :
  6902:                               VideoController.vcnPal32G8[p] :
  6903:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]) & -2] & 1) != 0 ?
  6904:                               VideoController.vcnPalTbl[
  6905:                                 VideoController.vcnMix2 (
  6906:                                   VideoController.vcnPal16G8[p],
  6907:                                   0)] :
  6908:                               VideoController.vcnPal32G8[p]);
  6909:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  6910:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6911:                               VideoController.vcnPalTbl[
  6912:                                 VideoController.vcnMix2 (
  6913:                                   VideoController.vcnPal16G8[p],
  6914:                                   0)] :
  6915:                               VideoController.vcnPal32G8[p] :
  6916:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  6917:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6918:                               VideoController.vcnPalTbl[
  6919:                                 VideoController.vcnMix2 (
  6920:                                   VideoController.vcnPal16G8[p],
  6921:                                   0)] :
  6922:                               VideoController.vcnPal32G8[p] :
  6923:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  6924:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6925:                               VideoController.vcnPalTbl[
  6926:                                 VideoController.vcnMix2 (
  6927:                                   VideoController.vcnPal16G8[p],
  6928:                                   0)] :
  6929:                               VideoController.vcnPal32G8[p] :
  6930:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]) & -2] & 1) != 0 ?
  6931:                               VideoController.vcnPalTbl[
  6932:                                 VideoController.vcnMix2 (
  6933:                                   VideoController.vcnPal16G8[p],
  6934:                                   0)] :
  6935:                               VideoController.vcnPal32G8[p]);
  6936:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  6937:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6938:                               VideoController.vcnPalTbl[
  6939:                                 VideoController.vcnMix2 (
  6940:                                   VideoController.vcnPal16G8[p],
  6941:                                   0)] :
  6942:                               VideoController.vcnPal32G8[p] :
  6943:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  6944:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6945:                               VideoController.vcnPalTbl[
  6946:                                 VideoController.vcnMix2 (
  6947:                                   VideoController.vcnPal16G8[p],
  6948:                                   0)] :
  6949:                               VideoController.vcnPal32G8[p] :
  6950:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  6951:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6952:                               VideoController.vcnPalTbl[
  6953:                                 VideoController.vcnMix2 (
  6954:                                   VideoController.vcnPal16G8[p],
  6955:                                   0)] :
  6956:                               VideoController.vcnPal32G8[p] :
  6957:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]) & -2] & 1) != 0 ?
  6958:                               VideoController.vcnPalTbl[
  6959:                                 VideoController.vcnMix2 (
  6960:                                   VideoController.vcnPal16G8[p],
  6961:                                   0)] :
  6962:                               VideoController.vcnPal32G8[p]);
  6963:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  6964:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6965:                               VideoController.vcnPalTbl[
  6966:                                 VideoController.vcnMix2 (
  6967:                                   VideoController.vcnPal16G8[p],
  6968:                                   0)] :
  6969:                               VideoController.vcnPal32G8[p] :
  6970:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  6971:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6972:                               VideoController.vcnPalTbl[
  6973:                                 VideoController.vcnMix2 (
  6974:                                   VideoController.vcnPal16G8[p],
  6975:                                   0)] :
  6976:                               VideoController.vcnPal32G8[p] :
  6977:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  6978:                               (VideoController.vcnPal16G8[p & -2] & 1) != 0 ?
  6979:                               VideoController.vcnPalTbl[
  6980:                                 VideoController.vcnMix2 (
  6981:                                   VideoController.vcnPal16G8[p],
  6982:                                   0)] :
  6983:                               VideoController.vcnPal32G8[p] :
  6984:                               (VideoController.vcnPal16G8[(p = MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]) & -2] & 1) != 0 ?
  6985:                               VideoController.vcnPalTbl[
  6986:                                 VideoController.vcnMix2 (
  6987:                                   VideoController.vcnPal16G8[p],
  6988:                                   0)] :
  6989:                               VideoController.vcnPal32G8[p]);
  6990:         gx1st += 16;
  6991:         gx2nd += 16;
  6992:         gx3rd += 16;
  6993:         gx4th += 16;
  6994:         da += 8;
  6995:       }  //while da<db
  6996:     }  //drawRaster(int,int)
  6997:   },  //E4_XHCT
  6998: 
  6999:   //================================================================================
  7000:   //E4_XHCG ($0000,$06xx,$1A0F)
  7001:   //  概要
  7002:   //    E4  512ドット16色4プレーン
  7003:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  7004:   //  手順
  7005:   //    1番目のパレットが0でないとき
  7006:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  7007:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  7008:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7009:   //        1番目のパレットが奇数のとき
  7010:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  7011:   //        さもなくば(1番目のパレットが偶数のとき)
  7012:   //          1番目のカラー(0は黒)
  7013:   //    さもなくば(1番目のパレットが0のとき)
  7014:   //      2番目のパレットが0でないとき
  7015:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  7016:   //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  7017:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7018:   //          2番目のカラー(0は黒)
  7019:   //      さもなくば(2番目のパレットが0のとき)
  7020:   //        3番目のパレットが0でないとき
  7021:   //          3番目のパレットを偶数化したパレットのカラーが奇数のとき
  7022:   //            3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラー(0は黒)
  7023:   //          さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7024:   //            3番目のパレットが奇数のとき
  7025:   //              パレット1のカラー(0は黒)
  7026:   //            さもなくば(3番目のパレットが偶数のとき)
  7027:   //              3番目のカラー(0は黒)
  7028:   //        さもなくば(3番目のパレットが0のとき)
  7029:   //          4番目のパレットを偶数化したパレットのカラーが奇数のとき
  7030:   //            4番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラー(0は黒)
  7031:   //          さもなくば(4番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7032:   //            4番目のパレットが奇数のとき
  7033:   //              パレット1のカラー(0は黒)
  7034:   //            さもなくば(4番目のパレットが偶数のとき)
  7035:   //              4番目のカラー(0は黒)
  7036:   //  中間コード1
  7037:   //    (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()))))))
  7038:   //  中間コード2
  7039:   //    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())
  7040:   //  中間コード3
  7041:   //    (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)
  7042:   //  中間コード4
  7043:   //    (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)
  7044:   //  中間コード5
  7045:   //    (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)
  7046:   //  中間コード6
  7047:   //    (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)
  7048:   E4_XHCG {
  7049:     @Override public void drawRaster (int src, int dst) {
  7050:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  7051:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  7052:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7053:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  7054:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  7055:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7056:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  7057:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  7058:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  7059:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7060:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  7061:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  7062:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7063:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  7064:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  7065:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  7066:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  7067:         gx1st += half << 1;
  7068:         gx2nd += half << 1;
  7069:         gx3rd += half << 1;
  7070:         gx4th += half << 1;
  7071:         da += half;
  7072:       }
  7073:       while (da < db) {
  7074:         int p, q;
  7075:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  7076:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7077:                           VideoController.vcnPalTbl[
  7078:                             VideoController.vcnMix2 (
  7079:                               q,
  7080:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  7081:                           (p & 1) != 0 ?
  7082:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  7083:                           VideoController.vcnPal32G8[p] :
  7084:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  7085:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7086:                           VideoController.vcnPalTbl[
  7087:                             VideoController.vcnMix2 (
  7088:                               q,
  7089:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])] :
  7090:                           VideoController.vcnPal32G8[p] :
  7091:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  7092:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7093:                           VideoController.vcnPalTbl[
  7094:                             VideoController.vcnMix2 (
  7095:                               q,
  7096:                               VideoController.vcnPal16G8[1])] :
  7097:                           (p & 1) != 0 ?
  7098:                           VideoController.vcnPal32G8[1] :
  7099:                           VideoController.vcnPal32G8[p] :
  7100:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th & 1023]) & -2]) & 1) != 0 ?
  7101:                           VideoController.vcnPalTbl[
  7102:                             VideoController.vcnMix2 (
  7103:                               p,
  7104:                               VideoController.vcnPal16G8[1])] :
  7105:                           (q & 1) != 0 ?
  7106:                           VideoController.vcnPal32G8[1] :
  7107:                           VideoController.vcnPal32G8[q]);
  7108:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  7109:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7110:                               VideoController.vcnPalTbl[
  7111:                                 VideoController.vcnMix2 (
  7112:                                   q,
  7113:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  7114:                               (p & 1) != 0 ?
  7115:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  7116:                               VideoController.vcnPal32G8[p] :
  7117:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  7118:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7119:                               VideoController.vcnPalTbl[
  7120:                                 VideoController.vcnMix2 (
  7121:                                   q,
  7122:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])] :
  7123:                               VideoController.vcnPal32G8[p] :
  7124:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  7125:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7126:                               VideoController.vcnPalTbl[
  7127:                                 VideoController.vcnMix2 (
  7128:                                   q,
  7129:                                   VideoController.vcnPal16G8[1])] :
  7130:                               (p & 1) != 0 ?
  7131:                               VideoController.vcnPal32G8[1] :
  7132:                               VideoController.vcnPal32G8[p] :
  7133:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]) & -2]) & 1) != 0 ?
  7134:                               VideoController.vcnPalTbl[
  7135:                                 VideoController.vcnMix2 (
  7136:                                   p,
  7137:                                   VideoController.vcnPal16G8[1])] :
  7138:                               (q & 1) != 0 ?
  7139:                               VideoController.vcnPal32G8[1] :
  7140:                               VideoController.vcnPal32G8[q]);
  7141:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  7142:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7143:                               VideoController.vcnPalTbl[
  7144:                                 VideoController.vcnMix2 (
  7145:                                   q,
  7146:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  7147:                               (p & 1) != 0 ?
  7148:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  7149:                               VideoController.vcnPal32G8[p] :
  7150:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  7151:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7152:                               VideoController.vcnPalTbl[
  7153:                                 VideoController.vcnMix2 (
  7154:                                   q,
  7155:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])] :
  7156:                               VideoController.vcnPal32G8[p] :
  7157:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  7158:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7159:                               VideoController.vcnPalTbl[
  7160:                                 VideoController.vcnMix2 (
  7161:                                   q,
  7162:                                   VideoController.vcnPal16G8[1])] :
  7163:                               (p & 1) != 0 ?
  7164:                               VideoController.vcnPal32G8[1] :
  7165:                               VideoController.vcnPal32G8[p] :
  7166:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]) & -2]) & 1) != 0 ?
  7167:                               VideoController.vcnPalTbl[
  7168:                                 VideoController.vcnMix2 (
  7169:                                   p,
  7170:                                   VideoController.vcnPal16G8[1])] :
  7171:                               (q & 1) != 0 ?
  7172:                               VideoController.vcnPal32G8[1] :
  7173:                               VideoController.vcnPal32G8[q]);
  7174:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  7175:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7176:                               VideoController.vcnPalTbl[
  7177:                                 VideoController.vcnMix2 (
  7178:                                   q,
  7179:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  7180:                               (p & 1) != 0 ?
  7181:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  7182:                               VideoController.vcnPal32G8[p] :
  7183:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  7184:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7185:                               VideoController.vcnPalTbl[
  7186:                                 VideoController.vcnMix2 (
  7187:                                   q,
  7188:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])] :
  7189:                               VideoController.vcnPal32G8[p] :
  7190:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  7191:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7192:                               VideoController.vcnPalTbl[
  7193:                                 VideoController.vcnMix2 (
  7194:                                   q,
  7195:                                   VideoController.vcnPal16G8[1])] :
  7196:                               (p & 1) != 0 ?
  7197:                               VideoController.vcnPal32G8[1] :
  7198:                               VideoController.vcnPal32G8[p] :
  7199:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]) & -2]) & 1) != 0 ?
  7200:                               VideoController.vcnPalTbl[
  7201:                                 VideoController.vcnMix2 (
  7202:                                   p,
  7203:                                   VideoController.vcnPal16G8[1])] :
  7204:                               (q & 1) != 0 ?
  7205:                               VideoController.vcnPal32G8[1] :
  7206:                               VideoController.vcnPal32G8[q]);
  7207:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  7208:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7209:                               VideoController.vcnPalTbl[
  7210:                                 VideoController.vcnMix2 (
  7211:                                   q,
  7212:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  7213:                               (p & 1) != 0 ?
  7214:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  7215:                               VideoController.vcnPal32G8[p] :
  7216:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  7217:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7218:                               VideoController.vcnPalTbl[
  7219:                                 VideoController.vcnMix2 (
  7220:                                   q,
  7221:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])] :
  7222:                               VideoController.vcnPal32G8[p] :
  7223:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  7224:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7225:                               VideoController.vcnPalTbl[
  7226:                                 VideoController.vcnMix2 (
  7227:                                   q,
  7228:                                   VideoController.vcnPal16G8[1])] :
  7229:                               (p & 1) != 0 ?
  7230:                               VideoController.vcnPal32G8[1] :
  7231:                               VideoController.vcnPal32G8[p] :
  7232:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]) & -2]) & 1) != 0 ?
  7233:                               VideoController.vcnPalTbl[
  7234:                                 VideoController.vcnMix2 (
  7235:                                   p,
  7236:                                   VideoController.vcnPal16G8[1])] :
  7237:                               (q & 1) != 0 ?
  7238:                               VideoController.vcnPal32G8[1] :
  7239:                               VideoController.vcnPal32G8[q]);
  7240:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  7241:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7242:                               VideoController.vcnPalTbl[
  7243:                                 VideoController.vcnMix2 (
  7244:                                   q,
  7245:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  7246:                               (p & 1) != 0 ?
  7247:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  7248:                               VideoController.vcnPal32G8[p] :
  7249:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  7250:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7251:                               VideoController.vcnPalTbl[
  7252:                                 VideoController.vcnMix2 (
  7253:                                   q,
  7254:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])] :
  7255:                               VideoController.vcnPal32G8[p] :
  7256:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  7257:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7258:                               VideoController.vcnPalTbl[
  7259:                                 VideoController.vcnMix2 (
  7260:                                   q,
  7261:                                   VideoController.vcnPal16G8[1])] :
  7262:                               (p & 1) != 0 ?
  7263:                               VideoController.vcnPal32G8[1] :
  7264:                               VideoController.vcnPal32G8[p] :
  7265:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]) & -2]) & 1) != 0 ?
  7266:                               VideoController.vcnPalTbl[
  7267:                                 VideoController.vcnMix2 (
  7268:                                   p,
  7269:                                   VideoController.vcnPal16G8[1])] :
  7270:                               (q & 1) != 0 ?
  7271:                               VideoController.vcnPal32G8[1] :
  7272:                               VideoController.vcnPal32G8[q]);
  7273:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  7274:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7275:                               VideoController.vcnPalTbl[
  7276:                                 VideoController.vcnMix2 (
  7277:                                   q,
  7278:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  7279:                               (p & 1) != 0 ?
  7280:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  7281:                               VideoController.vcnPal32G8[p] :
  7282:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  7283:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7284:                               VideoController.vcnPalTbl[
  7285:                                 VideoController.vcnMix2 (
  7286:                                   q,
  7287:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])] :
  7288:                               VideoController.vcnPal32G8[p] :
  7289:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  7290:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7291:                               VideoController.vcnPalTbl[
  7292:                                 VideoController.vcnMix2 (
  7293:                                   q,
  7294:                                   VideoController.vcnPal16G8[1])] :
  7295:                               (p & 1) != 0 ?
  7296:                               VideoController.vcnPal32G8[1] :
  7297:                               VideoController.vcnPal32G8[p] :
  7298:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]) & -2]) & 1) != 0 ?
  7299:                               VideoController.vcnPalTbl[
  7300:                                 VideoController.vcnMix2 (
  7301:                                   p,
  7302:                                   VideoController.vcnPal16G8[1])] :
  7303:                               (q & 1) != 0 ?
  7304:                               VideoController.vcnPal32G8[1] :
  7305:                               VideoController.vcnPal32G8[q]);
  7306:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  7307:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7308:                               VideoController.vcnPalTbl[
  7309:                                 VideoController.vcnMix2 (
  7310:                                   q,
  7311:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  7312:                               (p & 1) != 0 ?
  7313:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  7314:                               VideoController.vcnPal32G8[p] :
  7315:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  7316:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7317:                               VideoController.vcnPalTbl[
  7318:                                 VideoController.vcnMix2 (
  7319:                                   q,
  7320:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])] :
  7321:                               VideoController.vcnPal32G8[p] :
  7322:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  7323:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7324:                               VideoController.vcnPalTbl[
  7325:                                 VideoController.vcnMix2 (
  7326:                                   q,
  7327:                                   VideoController.vcnPal16G8[1])] :
  7328:                               (p & 1) != 0 ?
  7329:                               VideoController.vcnPal32G8[1] :
  7330:                               VideoController.vcnPal32G8[p] :
  7331:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]) & -2]) & 1) != 0 ?
  7332:                               VideoController.vcnPalTbl[
  7333:                                 VideoController.vcnMix2 (
  7334:                                   p,
  7335:                                   VideoController.vcnPal16G8[1])] :
  7336:                               (q & 1) != 0 ?
  7337:                               VideoController.vcnPal32G8[1] :
  7338:                               VideoController.vcnPal32G8[q]);
  7339:         gx1st += 16;
  7340:         gx2nd += 16;
  7341:         gx3rd += 16;
  7342:         gx4th += 16;
  7343:         da += 8;
  7344:       }  //while da<db
  7345:     }  //drawRaster(int,int)
  7346:   },  //E4_XHCG
  7347: 
  7348:   //================================================================================
  7349:   //E4_XHCGT ($0000,$06xx,$1B0F)
  7350:   //  概要
  7351:   //    E4  512ドット16色4プレーン
  7352:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  7353:   //  手順
  7354:   //    1番目のパレットが0でないとき
  7355:   //      1番目のパレットを偶数化したパレットのカラーが奇数のとき
  7356:   //        1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  7357:   //      さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7358:   //        1番目のパレットが奇数のとき
  7359:   //          2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  7360:   //        さもなくば(1番目のパレットが偶数のとき)
  7361:   //          1番目のカラー(0は黒)
  7362:   //    さもなくば(1番目のパレットが0のとき)
  7363:   //      2番目のパレットが0でないとき
  7364:   //        2番目のパレットを偶数化したパレットのカラーが奇数のとき
  7365:   //          2番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  7366:   //        さもなくば(2番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7367:   //          2番目のカラー(0は黒)
  7368:   //      さもなくば(2番目のパレットが0のとき)
  7369:   //        3番目のパレットが0でないとき
  7370:   //          3番目のパレットを偶数化したパレットのカラーが奇数のとき
  7371:   //            3番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  7372:   //          さもなくば(3番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7373:   //            3番目のパレットが奇数のとき
  7374:   //              パレット1のカラー(0は黒)
  7375:   //            さもなくば(3番目のパレットが偶数のとき)
  7376:   //              3番目のカラー(0は黒)
  7377:   //        さもなくば(3番目のパレットが0のとき)
  7378:   //          4番目のパレットを偶数化したパレットのカラーが奇数のとき
  7379:   //            4番目のパレットを偶数化したパレットのカラーとパレット1のカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  7380:   //          さもなくば(4番目のパレットを偶数化したパレットのカラーが偶数のとき)
  7381:   //            4番目のパレットが奇数のとき
  7382:   //              パレット1のカラー(0は黒)
  7383:   //            さもなくば(4番目のパレットが偶数のとき)
  7384:   //              4番目のカラー(0は黒)
  7385:   //  中間コード1
  7386:   //    (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()))))))
  7387:   //  中間コード2
  7388:   //    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())
  7389:   //  中間コード3
  7390:   //    (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)
  7391:   //  中間コード4
  7392:   //    (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)
  7393:   //  中間コード5
  7394:   //    (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)
  7395:   //  中間コード6
  7396:   //    (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)
  7397:   E4_XHCGT {
  7398:     @Override public void drawRaster (int src, int dst) {
  7399:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  7400:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  7401:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7402:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  7403:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  7404:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7405:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  7406:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  7407:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  7408:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7409:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  7410:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  7411:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7412:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  7413:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  7414:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  7415:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  7416:         gx1st += half << 1;
  7417:         gx2nd += half << 1;
  7418:         gx3rd += half << 1;
  7419:         gx4th += half << 1;
  7420:         da += half;
  7421:       }
  7422:       while (da < db) {
  7423:         int p, q;
  7424:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  7425:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7426:                           VideoController.vcnPalTbl[
  7427:                             VideoController.vcnMix2 (
  7428:                               VideoController.vcnMix2 (
  7429:                                 q,
  7430:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  7431:                               0)] :
  7432:                           (p & 1) != 0 ?
  7433:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1] :
  7434:                           VideoController.vcnPal32G8[p] :
  7435:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  7436:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7437:                           VideoController.vcnPalTbl[
  7438:                             VideoController.vcnMix2 (
  7439:                               VideoController.vcnMix2 (
  7440:                                 q,
  7441:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  7442:                               0)] :
  7443:                           VideoController.vcnPal32G8[p] :
  7444:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  7445:                           ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7446:                           VideoController.vcnPalTbl[
  7447:                             VideoController.vcnMix2 (
  7448:                               VideoController.vcnMix2 (
  7449:                                 q,
  7450:                                 VideoController.vcnPal16G8[1]),
  7451:                               0)] :
  7452:                           (p & 1) != 0 ?
  7453:                           VideoController.vcnPal32G8[1] :
  7454:                           VideoController.vcnPal32G8[p] :
  7455:                           ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th & 1023]) & -2]) & 1) != 0 ?
  7456:                           VideoController.vcnPalTbl[
  7457:                             VideoController.vcnMix2 (
  7458:                               VideoController.vcnMix2 (
  7459:                                 p,
  7460:                                 VideoController.vcnPal16G8[1]),
  7461:                               0)] :
  7462:                           (q & 1) != 0 ?
  7463:                           VideoController.vcnPal32G8[1] :
  7464:                           VideoController.vcnPal32G8[q]);
  7465:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  7466:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7467:                               VideoController.vcnPalTbl[
  7468:                                 VideoController.vcnMix2 (
  7469:                                   VideoController.vcnMix2 (
  7470:                                     q,
  7471:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  7472:                                   0)] :
  7473:                               (p & 1) != 0 ?
  7474:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1] :
  7475:                               VideoController.vcnPal32G8[p] :
  7476:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  7477:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7478:                               VideoController.vcnPalTbl[
  7479:                                 VideoController.vcnMix2 (
  7480:                                   VideoController.vcnMix2 (
  7481:                                     q,
  7482:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  7483:                                   0)] :
  7484:                               VideoController.vcnPal32G8[p] :
  7485:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  7486:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7487:                               VideoController.vcnPalTbl[
  7488:                                 VideoController.vcnMix2 (
  7489:                                   VideoController.vcnMix2 (
  7490:                                     q,
  7491:                                     VideoController.vcnPal16G8[1]),
  7492:                                   0)] :
  7493:                               (p & 1) != 0 ?
  7494:                               VideoController.vcnPal32G8[1] :
  7495:                               VideoController.vcnPal32G8[p] :
  7496:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]) & -2]) & 1) != 0 ?
  7497:                               VideoController.vcnPalTbl[
  7498:                                 VideoController.vcnMix2 (
  7499:                                   VideoController.vcnMix2 (
  7500:                                     p,
  7501:                                     VideoController.vcnPal16G8[1]),
  7502:                                   0)] :
  7503:                               (q & 1) != 0 ?
  7504:                               VideoController.vcnPal32G8[1] :
  7505:                               VideoController.vcnPal32G8[q]);
  7506:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  7507:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7508:                               VideoController.vcnPalTbl[
  7509:                                 VideoController.vcnMix2 (
  7510:                                   VideoController.vcnMix2 (
  7511:                                     q,
  7512:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  7513:                                   0)] :
  7514:                               (p & 1) != 0 ?
  7515:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1] :
  7516:                               VideoController.vcnPal32G8[p] :
  7517:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  7518:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7519:                               VideoController.vcnPalTbl[
  7520:                                 VideoController.vcnMix2 (
  7521:                                   VideoController.vcnMix2 (
  7522:                                     q,
  7523:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  7524:                                   0)] :
  7525:                               VideoController.vcnPal32G8[p] :
  7526:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  7527:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7528:                               VideoController.vcnPalTbl[
  7529:                                 VideoController.vcnMix2 (
  7530:                                   VideoController.vcnMix2 (
  7531:                                     q,
  7532:                                     VideoController.vcnPal16G8[1]),
  7533:                                   0)] :
  7534:                               (p & 1) != 0 ?
  7535:                               VideoController.vcnPal32G8[1] :
  7536:                               VideoController.vcnPal32G8[p] :
  7537:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]) & -2]) & 1) != 0 ?
  7538:                               VideoController.vcnPalTbl[
  7539:                                 VideoController.vcnMix2 (
  7540:                                   VideoController.vcnMix2 (
  7541:                                     p,
  7542:                                     VideoController.vcnPal16G8[1]),
  7543:                                   0)] :
  7544:                               (q & 1) != 0 ?
  7545:                               VideoController.vcnPal32G8[1] :
  7546:                               VideoController.vcnPal32G8[q]);
  7547:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  7548:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7549:                               VideoController.vcnPalTbl[
  7550:                                 VideoController.vcnMix2 (
  7551:                                   VideoController.vcnMix2 (
  7552:                                     q,
  7553:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  7554:                                   0)] :
  7555:                               (p & 1) != 0 ?
  7556:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1] :
  7557:                               VideoController.vcnPal32G8[p] :
  7558:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  7559:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7560:                               VideoController.vcnPalTbl[
  7561:                                 VideoController.vcnMix2 (
  7562:                                   VideoController.vcnMix2 (
  7563:                                     q,
  7564:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  7565:                                   0)] :
  7566:                               VideoController.vcnPal32G8[p] :
  7567:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  7568:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7569:                               VideoController.vcnPalTbl[
  7570:                                 VideoController.vcnMix2 (
  7571:                                   VideoController.vcnMix2 (
  7572:                                     q,
  7573:                                     VideoController.vcnPal16G8[1]),
  7574:                                   0)] :
  7575:                               (p & 1) != 0 ?
  7576:                               VideoController.vcnPal32G8[1] :
  7577:                               VideoController.vcnPal32G8[p] :
  7578:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]) & -2]) & 1) != 0 ?
  7579:                               VideoController.vcnPalTbl[
  7580:                                 VideoController.vcnMix2 (
  7581:                                   VideoController.vcnMix2 (
  7582:                                     p,
  7583:                                     VideoController.vcnPal16G8[1]),
  7584:                                   0)] :
  7585:                               (q & 1) != 0 ?
  7586:                               VideoController.vcnPal32G8[1] :
  7587:                               VideoController.vcnPal32G8[q]);
  7588:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  7589:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7590:                               VideoController.vcnPalTbl[
  7591:                                 VideoController.vcnMix2 (
  7592:                                   VideoController.vcnMix2 (
  7593:                                     q,
  7594:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  7595:                                   0)] :
  7596:                               (p & 1) != 0 ?
  7597:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1] :
  7598:                               VideoController.vcnPal32G8[p] :
  7599:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  7600:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7601:                               VideoController.vcnPalTbl[
  7602:                                 VideoController.vcnMix2 (
  7603:                                   VideoController.vcnMix2 (
  7604:                                     q,
  7605:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  7606:                                   0)] :
  7607:                               VideoController.vcnPal32G8[p] :
  7608:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  7609:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7610:                               VideoController.vcnPalTbl[
  7611:                                 VideoController.vcnMix2 (
  7612:                                   VideoController.vcnMix2 (
  7613:                                     q,
  7614:                                     VideoController.vcnPal16G8[1]),
  7615:                                   0)] :
  7616:                               (p & 1) != 0 ?
  7617:                               VideoController.vcnPal32G8[1] :
  7618:                               VideoController.vcnPal32G8[p] :
  7619:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]) & -2]) & 1) != 0 ?
  7620:                               VideoController.vcnPalTbl[
  7621:                                 VideoController.vcnMix2 (
  7622:                                   VideoController.vcnMix2 (
  7623:                                     p,
  7624:                                     VideoController.vcnPal16G8[1]),
  7625:                                   0)] :
  7626:                               (q & 1) != 0 ?
  7627:                               VideoController.vcnPal32G8[1] :
  7628:                               VideoController.vcnPal32G8[q]);
  7629:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  7630:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7631:                               VideoController.vcnPalTbl[
  7632:                                 VideoController.vcnMix2 (
  7633:                                   VideoController.vcnMix2 (
  7634:                                     q,
  7635:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  7636:                                   0)] :
  7637:                               (p & 1) != 0 ?
  7638:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1] :
  7639:                               VideoController.vcnPal32G8[p] :
  7640:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  7641:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7642:                               VideoController.vcnPalTbl[
  7643:                                 VideoController.vcnMix2 (
  7644:                                   VideoController.vcnMix2 (
  7645:                                     q,
  7646:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  7647:                                   0)] :
  7648:                               VideoController.vcnPal32G8[p] :
  7649:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  7650:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7651:                               VideoController.vcnPalTbl[
  7652:                                 VideoController.vcnMix2 (
  7653:                                   VideoController.vcnMix2 (
  7654:                                     q,
  7655:                                     VideoController.vcnPal16G8[1]),
  7656:                                   0)] :
  7657:                               (p & 1) != 0 ?
  7658:                               VideoController.vcnPal32G8[1] :
  7659:                               VideoController.vcnPal32G8[p] :
  7660:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]) & -2]) & 1) != 0 ?
  7661:                               VideoController.vcnPalTbl[
  7662:                                 VideoController.vcnMix2 (
  7663:                                   VideoController.vcnMix2 (
  7664:                                     p,
  7665:                                     VideoController.vcnPal16G8[1]),
  7666:                                   0)] :
  7667:                               (q & 1) != 0 ?
  7668:                               VideoController.vcnPal32G8[1] :
  7669:                               VideoController.vcnPal32G8[q]);
  7670:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  7671:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7672:                               VideoController.vcnPalTbl[
  7673:                                 VideoController.vcnMix2 (
  7674:                                   VideoController.vcnMix2 (
  7675:                                     q,
  7676:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  7677:                                   0)] :
  7678:                               (p & 1) != 0 ?
  7679:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1] :
  7680:                               VideoController.vcnPal32G8[p] :
  7681:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  7682:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7683:                               VideoController.vcnPalTbl[
  7684:                                 VideoController.vcnMix2 (
  7685:                                   VideoController.vcnMix2 (
  7686:                                     q,
  7687:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  7688:                                   0)] :
  7689:                               VideoController.vcnPal32G8[p] :
  7690:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  7691:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7692:                               VideoController.vcnPalTbl[
  7693:                                 VideoController.vcnMix2 (
  7694:                                   VideoController.vcnMix2 (
  7695:                                     q,
  7696:                                     VideoController.vcnPal16G8[1]),
  7697:                                   0)] :
  7698:                               (p & 1) != 0 ?
  7699:                               VideoController.vcnPal32G8[1] :
  7700:                               VideoController.vcnPal32G8[p] :
  7701:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]) & -2]) & 1) != 0 ?
  7702:                               VideoController.vcnPalTbl[
  7703:                                 VideoController.vcnMix2 (
  7704:                                   VideoController.vcnMix2 (
  7705:                                     p,
  7706:                                     VideoController.vcnPal16G8[1]),
  7707:                                   0)] :
  7708:                               (q & 1) != 0 ?
  7709:                               VideoController.vcnPal32G8[1] :
  7710:                               VideoController.vcnPal32G8[q]);
  7711:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  7712:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7713:                               VideoController.vcnPalTbl[
  7714:                                 VideoController.vcnMix2 (
  7715:                                   VideoController.vcnMix2 (
  7716:                                     q,
  7717:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  7718:                                   0)] :
  7719:                               (p & 1) != 0 ?
  7720:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1] :
  7721:                               VideoController.vcnPal32G8[p] :
  7722:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  7723:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7724:                               VideoController.vcnPalTbl[
  7725:                                 VideoController.vcnMix2 (
  7726:                                   VideoController.vcnMix2 (
  7727:                                     q,
  7728:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  7729:                                   0)] :
  7730:                               VideoController.vcnPal32G8[p] :
  7731:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  7732:                               ((q = VideoController.vcnPal16G8[p & -2]) & 1) != 0 ?
  7733:                               VideoController.vcnPalTbl[
  7734:                                 VideoController.vcnMix2 (
  7735:                                   VideoController.vcnMix2 (
  7736:                                     q,
  7737:                                     VideoController.vcnPal16G8[1]),
  7738:                                   0)] :
  7739:                               (p & 1) != 0 ?
  7740:                               VideoController.vcnPal32G8[1] :
  7741:                               VideoController.vcnPal32G8[p] :
  7742:                               ((p = VideoController.vcnPal16G8[(q = MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]) & -2]) & 1) != 0 ?
  7743:                               VideoController.vcnPalTbl[
  7744:                                 VideoController.vcnMix2 (
  7745:                                   VideoController.vcnMix2 (
  7746:                                     p,
  7747:                                     VideoController.vcnPal16G8[1]),
  7748:                                   0)] :
  7749:                               (q & 1) != 0 ?
  7750:                               VideoController.vcnPal32G8[1] :
  7751:                               VideoController.vcnPal32G8[q]);
  7752:         gx1st += 16;
  7753:         gx2nd += 16;
  7754:         gx3rd += 16;
  7755:         gx4th += 16;
  7756:         da += 8;
  7757:       }  //while da<db
  7758:     }  //drawRaster(int,int)
  7759:   },  //E4_XHCGT
  7760: 
  7761:   //================================================================================
  7762:   //E4_XHPT ($0000,$06xx,$1D0F)
  7763:   //  概要
  7764:   //    E4  512ドット16色4プレーン
  7765:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  7766:   //  手順
  7767:   //    1番目のパレットが0のとき
  7768:   //      2番目のパレットを偶数化したパレットが0でないとき
  7769:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  7770:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  7771:   //        3番目のパレットを偶数化したパレットが0でないとき
  7772:   //          3番目のパレットを偶数化したパレットのカラー(0は黒)
  7773:   //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
  7774:   //          4番目のパレットを偶数化したパレットのカラー(0は黒)
  7775:   //    1番目のパレットが1のとき
  7776:   //      グラフィックスパレット0のカラー(0は黒)
  7777:   //    1番目のパレットが2以上の偶数のとき
  7778:   //      1番目のカラー(0は黒)
  7779:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  7780:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  7781:   //  中間コード1
  7782:   //    (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))
  7783:   //  中間コード2
  7784:   //    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)
  7785:   //  中間コード3
  7786:   //    (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)
  7787:   //  中間コード4
  7788:   //    (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)
  7789:   //  中間コード5
  7790:   //    (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)
  7791:   //  中間コード6
  7792:   //    (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))
  7793:   E4_XHPT {
  7794:     @Override public void drawRaster (int src, int dst) {
  7795:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  7796:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  7797:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7798:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  7799:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  7800:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7801:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  7802:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  7803:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7804:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  7805:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  7806:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7807:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  7808:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  7809:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  7810:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  7811:         gx1st += half << 1;
  7812:         gx2nd += half << 1;
  7813:         gx3rd += half << 1;
  7814:         gx4th += half << 1;
  7815:         da += half;
  7816:       }
  7817:       while (da < db) {
  7818:         int p;
  7819:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  7820:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  7821:                           VideoController.vcnPal32G8[p] :
  7822:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2) != 0 ?
  7823:                           VideoController.vcnPal32G8[p] :
  7824:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023] & -2] :
  7825:                           p == 1 ?
  7826:                           VideoController.vcnPal32G8[0] :
  7827:                           (p & 1) == 0 ?
  7828:                           VideoController.vcnPal32G8[p] :
  7829:                           VideoController.vcnPalTbl[
  7830:                             VideoController.vcnMix2 (
  7831:                               VideoController.vcnPal16G8[p & -2],
  7832:                               0)]);
  7833:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  7834:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  7835:                               VideoController.vcnPal32G8[p] :
  7836:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2) != 0 ?
  7837:                               VideoController.vcnPal32G8[p] :
  7838:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] & -2] :
  7839:                               p == 1 ?
  7840:                               VideoController.vcnPal32G8[0] :
  7841:                               (p & 1) == 0 ?
  7842:                               VideoController.vcnPal32G8[p] :
  7843:                               VideoController.vcnPalTbl[
  7844:                                 VideoController.vcnMix2 (
  7845:                                   VideoController.vcnPal16G8[p & -2],
  7846:                                   0)]);
  7847:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  7848:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  7849:                               VideoController.vcnPal32G8[p] :
  7850:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2) != 0 ?
  7851:                               VideoController.vcnPal32G8[p] :
  7852:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] & -2] :
  7853:                               p == 1 ?
  7854:                               VideoController.vcnPal32G8[0] :
  7855:                               (p & 1) == 0 ?
  7856:                               VideoController.vcnPal32G8[p] :
  7857:                               VideoController.vcnPalTbl[
  7858:                                 VideoController.vcnMix2 (
  7859:                                   VideoController.vcnPal16G8[p & -2],
  7860:                                   0)]);
  7861:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  7862:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  7863:                               VideoController.vcnPal32G8[p] :
  7864:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2) != 0 ?
  7865:                               VideoController.vcnPal32G8[p] :
  7866:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] & -2] :
  7867:                               p == 1 ?
  7868:                               VideoController.vcnPal32G8[0] :
  7869:                               (p & 1) == 0 ?
  7870:                               VideoController.vcnPal32G8[p] :
  7871:                               VideoController.vcnPalTbl[
  7872:                                 VideoController.vcnMix2 (
  7873:                                   VideoController.vcnPal16G8[p & -2],
  7874:                                   0)]);
  7875:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  7876:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  7877:                               VideoController.vcnPal32G8[p] :
  7878:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2) != 0 ?
  7879:                               VideoController.vcnPal32G8[p] :
  7880:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] & -2] :
  7881:                               p == 1 ?
  7882:                               VideoController.vcnPal32G8[0] :
  7883:                               (p & 1) == 0 ?
  7884:                               VideoController.vcnPal32G8[p] :
  7885:                               VideoController.vcnPalTbl[
  7886:                                 VideoController.vcnMix2 (
  7887:                                   VideoController.vcnPal16G8[p & -2],
  7888:                                   0)]);
  7889:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  7890:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  7891:                               VideoController.vcnPal32G8[p] :
  7892:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2) != 0 ?
  7893:                               VideoController.vcnPal32G8[p] :
  7894:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] & -2] :
  7895:                               p == 1 ?
  7896:                               VideoController.vcnPal32G8[0] :
  7897:                               (p & 1) == 0 ?
  7898:                               VideoController.vcnPal32G8[p] :
  7899:                               VideoController.vcnPalTbl[
  7900:                                 VideoController.vcnMix2 (
  7901:                                   VideoController.vcnPal16G8[p & -2],
  7902:                                   0)]);
  7903:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  7904:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  7905:                               VideoController.vcnPal32G8[p] :
  7906:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2) != 0 ?
  7907:                               VideoController.vcnPal32G8[p] :
  7908:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] & -2] :
  7909:                               p == 1 ?
  7910:                               VideoController.vcnPal32G8[0] :
  7911:                               (p & 1) == 0 ?
  7912:                               VideoController.vcnPal32G8[p] :
  7913:                               VideoController.vcnPalTbl[
  7914:                                 VideoController.vcnMix2 (
  7915:                                   VideoController.vcnPal16G8[p & -2],
  7916:                                   0)]);
  7917:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  7918:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  7919:                               VideoController.vcnPal32G8[p] :
  7920:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2) != 0 ?
  7921:                               VideoController.vcnPal32G8[p] :
  7922:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] & -2] :
  7923:                               p == 1 ?
  7924:                               VideoController.vcnPal32G8[0] :
  7925:                               (p & 1) == 0 ?
  7926:                               VideoController.vcnPal32G8[p] :
  7927:                               VideoController.vcnPalTbl[
  7928:                                 VideoController.vcnMix2 (
  7929:                                   VideoController.vcnPal16G8[p & -2],
  7930:                                   0)]);
  7931:         gx1st += 16;
  7932:         gx2nd += 16;
  7933:         gx3rd += 16;
  7934:         gx4th += 16;
  7935:         da += 8;
  7936:       }  //while da<db
  7937:     }  //drawRaster(int,int)
  7938:   },  //E4_XHPT
  7939: 
  7940:   //================================================================================
  7941:   //E4_XHPG ($0000,$06xx,$1E0F)
  7942:   //  概要
  7943:   //    E4  512ドット16色4プレーン
  7944:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  7945:   //  手順
  7946:   //    1番目のパレットが0のとき
  7947:   //      2番目のパレットを偶数化したパレットが0でないとき
  7948:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  7949:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  7950:   //        3番目のパレットを偶数化したパレットが0でないとき
  7951:   //          3番目のパレットを偶数化したパレットのカラー(0は黒)
  7952:   //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
  7953:   //          4番目のパレットを偶数化したパレットのカラー(0は黒)
  7954:   //    1番目のパレットが1のとき
  7955:   //      グラフィックスパレット0のカラー(0は黒)
  7956:   //    1番目のパレットが2以上の偶数のとき
  7957:   //      1番目のカラー(0は黒)
  7958:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  7959:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  7960:   //  中間コード1
  7961:   //    (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()))))
  7962:   //  中間コード2
  7963:   //    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())))
  7964:   //  中間コード3
  7965:   //    (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())))
  7966:   //  中間コード4
  7967:   //    (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())))
  7968:   //  中間コード5
  7969:   //    (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))
  7970:   //  中間コード6
  7971:   //    (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)))
  7972:   E4_XHPG {
  7973:     @Override public void drawRaster (int src, int dst) {
  7974:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  7975:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  7976:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7977:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  7978:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  7979:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7980:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  7981:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  7982:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  7983:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7984:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  7985:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  7986:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  7987:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  7988:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  7989:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  7990:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  7991:         gx1st += half << 1;
  7992:         gx2nd += half << 1;
  7993:         gx3rd += half << 1;
  7994:         gx4th += half << 1;
  7995:         da += half;
  7996:       }
  7997:       while (da < db) {
  7998:         int p;
  7999:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  8000:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  8001:                           VideoController.vcnPal32G8[p] :
  8002:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2) != 0 ?
  8003:                           VideoController.vcnPal32G8[p] :
  8004:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023] & -2] :
  8005:                           p == 1 ?
  8006:                           VideoController.vcnPal32G8[0] :
  8007:                           (p & 1) == 0 ?
  8008:                           VideoController.vcnPal32G8[p] :
  8009:                           VideoController.vcnPalTbl[
  8010:                             VideoController.vcnMix2 (
  8011:                               VideoController.vcnPal16G8[p & -2],
  8012:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1])]);
  8013:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  8014:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  8015:                               VideoController.vcnPal32G8[p] :
  8016:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2) != 0 ?
  8017:                               VideoController.vcnPal32G8[p] :
  8018:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] & -2] :
  8019:                               p == 1 ?
  8020:                               VideoController.vcnPal32G8[0] :
  8021:                               (p & 1) == 0 ?
  8022:                               VideoController.vcnPal32G8[p] :
  8023:                               VideoController.vcnPalTbl[
  8024:                                 VideoController.vcnMix2 (
  8025:                                   VideoController.vcnPal16G8[p & -2],
  8026:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1])]);
  8027:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  8028:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  8029:                               VideoController.vcnPal32G8[p] :
  8030:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2) != 0 ?
  8031:                               VideoController.vcnPal32G8[p] :
  8032:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] & -2] :
  8033:                               p == 1 ?
  8034:                               VideoController.vcnPal32G8[0] :
  8035:                               (p & 1) == 0 ?
  8036:                               VideoController.vcnPal32G8[p] :
  8037:                               VideoController.vcnPalTbl[
  8038:                                 VideoController.vcnMix2 (
  8039:                                   VideoController.vcnPal16G8[p & -2],
  8040:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1])]);
  8041:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  8042:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  8043:                               VideoController.vcnPal32G8[p] :
  8044:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2) != 0 ?
  8045:                               VideoController.vcnPal32G8[p] :
  8046:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] & -2] :
  8047:                               p == 1 ?
  8048:                               VideoController.vcnPal32G8[0] :
  8049:                               (p & 1) == 0 ?
  8050:                               VideoController.vcnPal32G8[p] :
  8051:                               VideoController.vcnPalTbl[
  8052:                                 VideoController.vcnMix2 (
  8053:                                   VideoController.vcnPal16G8[p & -2],
  8054:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1])]);
  8055:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  8056:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  8057:                               VideoController.vcnPal32G8[p] :
  8058:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2) != 0 ?
  8059:                               VideoController.vcnPal32G8[p] :
  8060:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] & -2] :
  8061:                               p == 1 ?
  8062:                               VideoController.vcnPal32G8[0] :
  8063:                               (p & 1) == 0 ?
  8064:                               VideoController.vcnPal32G8[p] :
  8065:                               VideoController.vcnPalTbl[
  8066:                                 VideoController.vcnMix2 (
  8067:                                   VideoController.vcnPal16G8[p & -2],
  8068:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1])]);
  8069:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  8070:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  8071:                               VideoController.vcnPal32G8[p] :
  8072:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2) != 0 ?
  8073:                               VideoController.vcnPal32G8[p] :
  8074:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] & -2] :
  8075:                               p == 1 ?
  8076:                               VideoController.vcnPal32G8[0] :
  8077:                               (p & 1) == 0 ?
  8078:                               VideoController.vcnPal32G8[p] :
  8079:                               VideoController.vcnPalTbl[
  8080:                                 VideoController.vcnMix2 (
  8081:                                   VideoController.vcnPal16G8[p & -2],
  8082:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1])]);
  8083:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  8084:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  8085:                               VideoController.vcnPal32G8[p] :
  8086:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2) != 0 ?
  8087:                               VideoController.vcnPal32G8[p] :
  8088:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] & -2] :
  8089:                               p == 1 ?
  8090:                               VideoController.vcnPal32G8[0] :
  8091:                               (p & 1) == 0 ?
  8092:                               VideoController.vcnPal32G8[p] :
  8093:                               VideoController.vcnPalTbl[
  8094:                                 VideoController.vcnMix2 (
  8095:                                   VideoController.vcnPal16G8[p & -2],
  8096:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1])]);
  8097:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  8098:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  8099:                               VideoController.vcnPal32G8[p] :
  8100:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2) != 0 ?
  8101:                               VideoController.vcnPal32G8[p] :
  8102:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] & -2] :
  8103:                               p == 1 ?
  8104:                               VideoController.vcnPal32G8[0] :
  8105:                               (p & 1) == 0 ?
  8106:                               VideoController.vcnPal32G8[p] :
  8107:                               VideoController.vcnPalTbl[
  8108:                                 VideoController.vcnMix2 (
  8109:                                   VideoController.vcnPal16G8[p & -2],
  8110:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1])]);
  8111:         gx1st += 16;
  8112:         gx2nd += 16;
  8113:         gx3rd += 16;
  8114:         gx4th += 16;
  8115:         da += 8;
  8116:       }  //while da<db
  8117:     }  //drawRaster(int,int)
  8118:   },  //E4_XHPG
  8119: 
  8120:   //================================================================================
  8121:   //E4_XHPGT ($0000,$06xx,$1F0F)
  8122:   //  概要
  8123:   //    E4  512ドット16色4プレーン
  8124:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  8125:   //  手順
  8126:   //    1番目のパレットが0のとき
  8127:   //      2番目のパレットを偶数化したパレットが0でないとき
  8128:   //        2番目のパレットを偶数化したパレットのカラー(0は黒)
  8129:   //      さもなくば(2番目のパレットを偶数化したパレットが0のとき)
  8130:   //        3番目のパレットを偶数化したパレットが0でないとき
  8131:   //          3番目のパレットを偶数化したパレットのカラー(0は黒)
  8132:   //        さもなくば(3番目のパレットを偶数化したパレットが0のとき)
  8133:   //          4番目のパレットを偶数化したパレットのカラー(0は黒)
  8134:   //    1番目のパレットが1のとき
  8135:   //      グラフィックスパレット0のカラー(0は黒)
  8136:   //    1番目のパレットが2以上の偶数のとき
  8137:   //      1番目のカラー(0は黒)
  8138:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  8139:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  8140:   //  中間コード1
  8141:   //    (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))
  8142:   //  中間コード2
  8143:   //    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)
  8144:   //  中間コード3
  8145:   //    (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)
  8146:   //  中間コード4
  8147:   //    (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)
  8148:   //  中間コード5
  8149:   //    (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)
  8150:   //  中間コード6
  8151:   //    (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))
  8152:   E4_XHPGT {
  8153:     @Override public void drawRaster (int src, int dst) {
  8154:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  8155:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8156:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8157:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  8158:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8159:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8160:       int gz2nd = VideoController.vcnHidden2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);  //ONとみなす
  8161:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  8162:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  8163:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8164:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  8165:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  8166:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8167:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8168:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8169:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  8170:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8171:         gx1st += half << 1;
  8172:         gx2nd += half << 1;
  8173:         gx3rd += half << 1;
  8174:         gx4th += half << 1;
  8175:         da += half;
  8176:       }
  8177:       while (da < db) {
  8178:         int p;
  8179:         XEiJ.pnlBM[da] = ((p = MainMemory.mmrM8[gy1st | gx1st & 1023]) == 0 ?
  8180:                           (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023] & -2) != 0 ?
  8181:                           VideoController.vcnPal32G8[p] :
  8182:                           (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023] & -2) != 0 ?
  8183:                           VideoController.vcnPal32G8[p] :
  8184:                           VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th & 1023] & -2] :
  8185:                           p == 1 ?
  8186:                           VideoController.vcnPal32G8[0] :
  8187:                           (p & 1) == 0 ?
  8188:                           VideoController.vcnPal32G8[p] :
  8189:                           VideoController.vcnPalTbl[
  8190:                             VideoController.vcnMix2 (
  8191:                               VideoController.vcnMix2 (
  8192:                                 VideoController.vcnPal16G8[p & -2],
  8193:                                 VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd & 1023] | 1]),
  8194:                               0)]);
  8195:         XEiJ.pnlBM[da + 1] = ((p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) == 0 ?
  8196:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] & -2) != 0 ?
  8197:                               VideoController.vcnPal32G8[p] :
  8198:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023] & -2) != 0 ?
  8199:                               VideoController.vcnPal32G8[p] :
  8200:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] & -2] :
  8201:                               p == 1 ?
  8202:                               VideoController.vcnPal32G8[0] :
  8203:                               (p & 1) == 0 ?
  8204:                               VideoController.vcnPal32G8[p] :
  8205:                               VideoController.vcnPalTbl[
  8206:                                 VideoController.vcnMix2 (
  8207:                                   VideoController.vcnMix2 (
  8208:                                     VideoController.vcnPal16G8[p & -2],
  8209:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 2 & 1023] | 1]),
  8210:                                   0)]);
  8211:         XEiJ.pnlBM[da + 2] = ((p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) == 0 ?
  8212:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] & -2) != 0 ?
  8213:                               VideoController.vcnPal32G8[p] :
  8214:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023] & -2) != 0 ?
  8215:                               VideoController.vcnPal32G8[p] :
  8216:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] & -2] :
  8217:                               p == 1 ?
  8218:                               VideoController.vcnPal32G8[0] :
  8219:                               (p & 1) == 0 ?
  8220:                               VideoController.vcnPal32G8[p] :
  8221:                               VideoController.vcnPalTbl[
  8222:                                 VideoController.vcnMix2 (
  8223:                                   VideoController.vcnMix2 (
  8224:                                     VideoController.vcnPal16G8[p & -2],
  8225:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 4 & 1023] | 1]),
  8226:                                   0)]);
  8227:         XEiJ.pnlBM[da + 3] = ((p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) == 0 ?
  8228:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] & -2) != 0 ?
  8229:                               VideoController.vcnPal32G8[p] :
  8230:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023] & -2) != 0 ?
  8231:                               VideoController.vcnPal32G8[p] :
  8232:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023] & -2] :
  8233:                               p == 1 ?
  8234:                               VideoController.vcnPal32G8[0] :
  8235:                               (p & 1) == 0 ?
  8236:                               VideoController.vcnPal32G8[p] :
  8237:                               VideoController.vcnPalTbl[
  8238:                                 VideoController.vcnMix2 (
  8239:                                   VideoController.vcnMix2 (
  8240:                                     VideoController.vcnPal16G8[p & -2],
  8241:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 6 & 1023] | 1]),
  8242:                                   0)]);
  8243:         XEiJ.pnlBM[da + 4] = ((p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) == 0 ?
  8244:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] & -2) != 0 ?
  8245:                               VideoController.vcnPal32G8[p] :
  8246:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023] & -2) != 0 ?
  8247:                               VideoController.vcnPal32G8[p] :
  8248:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023] & -2] :
  8249:                               p == 1 ?
  8250:                               VideoController.vcnPal32G8[0] :
  8251:                               (p & 1) == 0 ?
  8252:                               VideoController.vcnPal32G8[p] :
  8253:                               VideoController.vcnPalTbl[
  8254:                                 VideoController.vcnMix2 (
  8255:                                   VideoController.vcnMix2 (
  8256:                                     VideoController.vcnPal16G8[p & -2],
  8257:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 8 & 1023] | 1]),
  8258:                                   0)]);
  8259:         XEiJ.pnlBM[da + 5] = ((p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) == 0 ?
  8260:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] & -2) != 0 ?
  8261:                               VideoController.vcnPal32G8[p] :
  8262:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023] & -2) != 0 ?
  8263:                               VideoController.vcnPal32G8[p] :
  8264:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023] & -2] :
  8265:                               p == 1 ?
  8266:                               VideoController.vcnPal32G8[0] :
  8267:                               (p & 1) == 0 ?
  8268:                               VideoController.vcnPal32G8[p] :
  8269:                               VideoController.vcnPalTbl[
  8270:                                 VideoController.vcnMix2 (
  8271:                                   VideoController.vcnMix2 (
  8272:                                     VideoController.vcnPal16G8[p & -2],
  8273:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 10 & 1023] | 1]),
  8274:                                   0)]);
  8275:         XEiJ.pnlBM[da + 6] = ((p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) == 0 ?
  8276:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] & -2) != 0 ?
  8277:                               VideoController.vcnPal32G8[p] :
  8278:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023] & -2) != 0 ?
  8279:                               VideoController.vcnPal32G8[p] :
  8280:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023] & -2] :
  8281:                               p == 1 ?
  8282:                               VideoController.vcnPal32G8[0] :
  8283:                               (p & 1) == 0 ?
  8284:                               VideoController.vcnPal32G8[p] :
  8285:                               VideoController.vcnPalTbl[
  8286:                                 VideoController.vcnMix2 (
  8287:                                   VideoController.vcnMix2 (
  8288:                                     VideoController.vcnPal16G8[p & -2],
  8289:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 12 & 1023] | 1]),
  8290:                                   0)]);
  8291:         XEiJ.pnlBM[da + 7] = ((p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) == 0 ?
  8292:                               (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] & -2) != 0 ?
  8293:                               VideoController.vcnPal32G8[p] :
  8294:                               (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023] & -2) != 0 ?
  8295:                               VideoController.vcnPal32G8[p] :
  8296:                               VideoController.vcnPal32G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023] & -2] :
  8297:                               p == 1 ?
  8298:                               VideoController.vcnPal32G8[0] :
  8299:                               (p & 1) == 0 ?
  8300:                               VideoController.vcnPal32G8[p] :
  8301:                               VideoController.vcnPalTbl[
  8302:                                 VideoController.vcnMix2 (
  8303:                                   VideoController.vcnMix2 (
  8304:                                     VideoController.vcnPal16G8[p & -2],
  8305:                                     VideoController.vcnPal16G8[MainMemory.mmrM8[gz2nd | gx2nd + 14 & 1023] | 1]),
  8306:                                   0)]);
  8307:         gx1st += 16;
  8308:         gx2nd += 16;
  8309:         gx3rd += 16;
  8310:         gx4th += 16;
  8311:         da += 8;
  8312:       }  //while da<db
  8313:     }  //drawRaster(int,int)
  8314:   },  //E4_XHPGT
  8315: 
  8316:   //================================================================================
  8317:   //E4_A ($0000,$06xx,$400F)
  8318:   //  概要
  8319:   //    E4  512ドット16色4プレーン
  8320:   //    A  グラフィックスカラーとテキストパレット0のカラーを混ぜる
  8321:   //  手順
  8322:   //    1番目のパレットが0でないとき
  8323:   //      1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  8324:   //    さもなくば(1番目のパレットが0のとき)
  8325:   //      2番目のパレットが0でないとき
  8326:   //        2番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  8327:   //      さもなくば(2番目のパレットが0のとき)
  8328:   //        3番目のパレットが0でないとき
  8329:   //          3番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  8330:   //        さもなくば(3番目のパレットが0のとき)
  8331:   //          4番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  8332:   //  中間コード1
  8333:   //    (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)))))
  8334:   //  中間コード2
  8335:   //    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))
  8336:   //  中間コード3
  8337:   //    (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))
  8338:   //  中間コード4
  8339:   //    (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))
  8340:   //  中間コード5
  8341:   //    (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))
  8342:   //  中間コード6
  8343:   //    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)))
  8344:   E4_A {
  8345:     @Override public void drawRaster (int src, int dst) {
  8346:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのGVRAMページ番号
  8347:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8348:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8349:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //2番目のパレットのGVRAMページ番号
  8350:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8351:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8352:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //3番目のパレットのGVRAMページ番号
  8353:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  8354:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8355:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //4番目のパレットのGVRAMページ番号
  8356:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  8357:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8358:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8359:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8360:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  8361:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8362:         gx1st += half << 1;
  8363:         gx2nd += half << 1;
  8364:         gx3rd += half << 1;
  8365:         gx4th += half << 1;
  8366:         da += half;
  8367:       }
  8368:       while (da < db) {
  8369:         int p;
  8370:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  8371:                             (p = MainMemory.mmrM8[gy1st | gx1st & 1023]) != 0 ?
  8372:                             VideoController.vcnMix2 (
  8373:                               VideoController.vcnPal16G8[p],
  8374:                               VideoController.vcnPal16TS[0]) :
  8375:                             (p = MainMemory.mmrM8[gy2nd | gx2nd & 1023]) != 0 ?
  8376:                             VideoController.vcnMix2 (
  8377:                               VideoController.vcnPal16G8[p],
  8378:                               VideoController.vcnPal16TS[0]) :
  8379:                             (p = MainMemory.mmrM8[gy3rd | gx3rd & 1023]) != 0 ?
  8380:                             VideoController.vcnMix2 (
  8381:                               VideoController.vcnPal16G8[p],
  8382:                               VideoController.vcnPal16TS[0]) :
  8383:                             VideoController.vcnMix2 (
  8384:                               VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th & 1023]],
  8385:                               VideoController.vcnPal16TS[0])]);
  8386:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  8387:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 2 & 1023]) != 0 ?
  8388:                                 VideoController.vcnMix2 (
  8389:                                   VideoController.vcnPal16G8[p],
  8390:                                   VideoController.vcnPal16TS[0]) :
  8391:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023]) != 0 ?
  8392:                                 VideoController.vcnMix2 (
  8393:                                   VideoController.vcnPal16G8[p],
  8394:                                   VideoController.vcnPal16TS[0]) :
  8395:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023]) != 0 ?
  8396:                                 VideoController.vcnMix2 (
  8397:                                   VideoController.vcnPal16G8[p],
  8398:                                   VideoController.vcnPal16TS[0]) :
  8399:                                 VideoController.vcnMix2 (
  8400:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 2 & 1023]],
  8401:                                   VideoController.vcnPal16TS[0])]);
  8402:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  8403:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 4 & 1023]) != 0 ?
  8404:                                 VideoController.vcnMix2 (
  8405:                                   VideoController.vcnPal16G8[p],
  8406:                                   VideoController.vcnPal16TS[0]) :
  8407:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023]) != 0 ?
  8408:                                 VideoController.vcnMix2 (
  8409:                                   VideoController.vcnPal16G8[p],
  8410:                                   VideoController.vcnPal16TS[0]) :
  8411:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 4 & 1023]) != 0 ?
  8412:                                 VideoController.vcnMix2 (
  8413:                                   VideoController.vcnPal16G8[p],
  8414:                                   VideoController.vcnPal16TS[0]) :
  8415:                                 VideoController.vcnMix2 (
  8416:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 4 & 1023]],
  8417:                                   VideoController.vcnPal16TS[0])]);
  8418:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  8419:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 6 & 1023]) != 0 ?
  8420:                                 VideoController.vcnMix2 (
  8421:                                   VideoController.vcnPal16G8[p],
  8422:                                   VideoController.vcnPal16TS[0]) :
  8423:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023]) != 0 ?
  8424:                                 VideoController.vcnMix2 (
  8425:                                   VideoController.vcnPal16G8[p],
  8426:                                   VideoController.vcnPal16TS[0]) :
  8427:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 6 & 1023]) != 0 ?
  8428:                                 VideoController.vcnMix2 (
  8429:                                   VideoController.vcnPal16G8[p],
  8430:                                   VideoController.vcnPal16TS[0]) :
  8431:                                 VideoController.vcnMix2 (
  8432:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 6 & 1023]],
  8433:                                   VideoController.vcnPal16TS[0])]);
  8434:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  8435:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 8 & 1023]) != 0 ?
  8436:                                 VideoController.vcnMix2 (
  8437:                                   VideoController.vcnPal16G8[p],
  8438:                                   VideoController.vcnPal16TS[0]) :
  8439:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023]) != 0 ?
  8440:                                 VideoController.vcnMix2 (
  8441:                                   VideoController.vcnPal16G8[p],
  8442:                                   VideoController.vcnPal16TS[0]) :
  8443:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 8 & 1023]) != 0 ?
  8444:                                 VideoController.vcnMix2 (
  8445:                                   VideoController.vcnPal16G8[p],
  8446:                                   VideoController.vcnPal16TS[0]) :
  8447:                                 VideoController.vcnMix2 (
  8448:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 8 & 1023]],
  8449:                                   VideoController.vcnPal16TS[0])]);
  8450:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  8451:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 10 & 1023]) != 0 ?
  8452:                                 VideoController.vcnMix2 (
  8453:                                   VideoController.vcnPal16G8[p],
  8454:                                   VideoController.vcnPal16TS[0]) :
  8455:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023]) != 0 ?
  8456:                                 VideoController.vcnMix2 (
  8457:                                   VideoController.vcnPal16G8[p],
  8458:                                   VideoController.vcnPal16TS[0]) :
  8459:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 10 & 1023]) != 0 ?
  8460:                                 VideoController.vcnMix2 (
  8461:                                   VideoController.vcnPal16G8[p],
  8462:                                   VideoController.vcnPal16TS[0]) :
  8463:                                 VideoController.vcnMix2 (
  8464:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 10 & 1023]],
  8465:                                   VideoController.vcnPal16TS[0])]);
  8466:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  8467:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 12 & 1023]) != 0 ?
  8468:                                 VideoController.vcnMix2 (
  8469:                                   VideoController.vcnPal16G8[p],
  8470:                                   VideoController.vcnPal16TS[0]) :
  8471:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023]) != 0 ?
  8472:                                 VideoController.vcnMix2 (
  8473:                                   VideoController.vcnPal16G8[p],
  8474:                                   VideoController.vcnPal16TS[0]) :
  8475:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 12 & 1023]) != 0 ?
  8476:                                 VideoController.vcnMix2 (
  8477:                                   VideoController.vcnPal16G8[p],
  8478:                                   VideoController.vcnPal16TS[0]) :
  8479:                                 VideoController.vcnMix2 (
  8480:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 12 & 1023]],
  8481:                                   VideoController.vcnPal16TS[0])]);
  8482:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  8483:                                 (p = MainMemory.mmrM8[gy1st | gx1st + 14 & 1023]) != 0 ?
  8484:                                 VideoController.vcnMix2 (
  8485:                                   VideoController.vcnPal16G8[p],
  8486:                                   VideoController.vcnPal16TS[0]) :
  8487:                                 (p = MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023]) != 0 ?
  8488:                                 VideoController.vcnMix2 (
  8489:                                   VideoController.vcnPal16G8[p],
  8490:                                   VideoController.vcnPal16TS[0]) :
  8491:                                 (p = MainMemory.mmrM8[gy3rd | gx3rd + 14 & 1023]) != 0 ?
  8492:                                 VideoController.vcnMix2 (
  8493:                                   VideoController.vcnPal16G8[p],
  8494:                                   VideoController.vcnPal16TS[0]) :
  8495:                                 VideoController.vcnMix2 (
  8496:                                   VideoController.vcnPal16G8[MainMemory.mmrM8[gy4th | gx4th + 14 & 1023]],
  8497:                                   VideoController.vcnPal16TS[0])]);
  8498:         gx1st += 16;
  8499:         gx2nd += 16;
  8500:         gx3rd += 16;
  8501:         gx4th += 16;
  8502:         da += 8;
  8503:       }  //while da<db
  8504:     }  //drawRaster(int,int)
  8505:   },  //E4_A
  8506: 
  8507:   //================================================================================
  8508:   //F1 ($0001,$06xx,$0003)
  8509:   //  概要
  8510:   //    F1  512ドット256色1プレーン
  8511:   //    拡張なし
  8512:   //  手順
  8513:   //    1番目のカラー(0は黒)
  8514:   //  中間コード1
  8515:   //    fpc(f1p())
  8516:   //  中間コード2
  8517:   //    fpc(f1p())
  8518:   //  中間コード3
  8519:   //    fpc(f1p())
  8520:   //  中間コード4
  8521:   //    fpc(f1p())
  8522:   //  中間コード5
  8523:   //    fpc(f1p())
  8524:   //  中間コード6
  8525:   //    fpo(f1p())
  8526:   F1 {
  8527:     @Override public void drawRaster (int src, int dst) {
  8528:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  8529:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8530:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8531:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  8532:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8533:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8534:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8535:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8536:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  8537:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8538:         gx1st += half << 1;
  8539:         gx2nd += half << 1;
  8540:         da += half;
  8541:       }
  8542:       while (da < db) {
  8543:         XEiJ.pnlBM[da] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  8544:                                                       MainMemory.mmrM8[gy1st | gx1st & 1023])]);
  8545:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  8546:                                                           MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])]);
  8547:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  8548:                                                           MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])]);
  8549:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  8550:                                                           MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])]);
  8551:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  8552:                                                           MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])]);
  8553:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  8554:                                                           MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])]);
  8555:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  8556:                                                           MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])]);
  8557:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPal32G8[(MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  8558:                                                           MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])]);
  8559:         gx1st += 16;
  8560:         gx2nd += 16;
  8561:         da += 8;
  8562:       }  //while da<db
  8563:     }  //drawRaster(int,int)
  8564:   },  //F1
  8565: 
  8566:   //================================================================================
  8567:   //XF1
  8568:   //  概要
  8569:   //    F1  512ドット256色1プレーン
  8570:   //    拡張あり
  8571:   XF1 {
  8572:     @Override public void drawRaster (int src, int dst) {
  8573:       switch (VideoController.vcnReg3Curr >>> 8 & 0b01011111) {
  8574:         //   .A.XHPGT
  8575:       case 0b00010000:  //F1_XWC
  8576:       case 0b00010001:  //F1_XWC
  8577:       case 0b00010010:  //F1_XWC
  8578:       case 0b00010011:  //F1_XWC
  8579:         F1.drawRaster (src, dst);
  8580:         break;
  8581:         //   .A.XHPGT
  8582:       case 0b00010100:  //F1_XWP
  8583:       case 0b00010101:  //F1_XWP
  8584:       case 0b00010110:  //F1_XWP
  8585:       case 0b00010111:  //F1_XWP
  8586:         F1_XWP.drawRaster (src, dst);
  8587:         break;
  8588:         //   .A.XHPGT
  8589:       case 0b00011000:  //F1_XHC
  8590:         F1.drawRaster (src, dst);
  8591:         break;
  8592:         //   .A.XHPGT
  8593:       case 0b00011001:  //F1_XHCT
  8594:         F1_XHCT.drawRaster (src, dst);
  8595:         break;
  8596:         //   .A.XHPGT
  8597:       case 0b00011010:  //F1_XHCG
  8598:         F1_XHCG.drawRaster (src, dst);
  8599:         break;
  8600:         //   .A.XHPGT
  8601:       case 0b00011011:  //F1_XHCGT
  8602:         F1_XHCGT.drawRaster (src, dst);
  8603:         break;
  8604:         //   .A.XHPGT
  8605:       case 0b00011101:  //F1_XHPT
  8606:         F1_XHPT.drawRaster (src, dst);
  8607:         break;
  8608:         //   .A.XHPGT
  8609:       case 0b00011110:  //F1_XHPG
  8610:         F1_XHPG.drawRaster (src, dst);
  8611:         break;
  8612:         //   .A.XHPGT
  8613:       case 0b00011111:  //F1_XHPGT
  8614:         F1_XHPGT.drawRaster (src, dst);
  8615:         break;
  8616:         //   .A.XHPGT
  8617:       case 0b01000000:  //F1_A
  8618:       case 0b01000001:  //F1_A
  8619:       case 0b01000010:  //F1_A
  8620:       case 0b01000011:  //F1_A
  8621:       case 0b01000100:  //F1_A
  8622:       case 0b01000101:  //F1_A
  8623:       case 0b01000110:  //F1_A
  8624:       case 0b01000111:  //F1_A
  8625:       case 0b01001000:  //F1_A
  8626:       case 0b01001001:  //F1_A
  8627:       case 0b01001010:  //F1_A
  8628:       case 0b01001011:  //F1_A
  8629:       case 0b01001100:  //F1_A
  8630:       case 0b01001101:  //F1_A
  8631:       case 0b01001110:  //F1_A
  8632:       case 0b01001111:  //F1_A
  8633:       case 0b01010000:  //F1_A
  8634:       case 0b01010001:  //F1_A
  8635:       case 0b01010010:  //F1_A
  8636:       case 0b01010011:  //F1_A
  8637:       case 0b01010100:  //F1_A
  8638:       case 0b01010101:  //F1_A
  8639:       case 0b01010110:  //F1_A
  8640:       case 0b01010111:  //F1_A
  8641:       case 0b01011000:  //F1_A
  8642:       case 0b01011001:  //F1_A
  8643:       case 0b01011010:  //F1_A
  8644:       case 0b01011011:  //F1_A
  8645:       case 0b01011100:  //F1_A
  8646:       case 0b01011101:  //F1_A
  8647:       case 0b01011110:  //F1_A
  8648:       case 0b01011111:  //F1_A
  8649:         F1_A.drawRaster (src, dst);
  8650:         break;
  8651:       default:
  8652:         F1.drawRaster (src, dst);
  8653:         VideoController.vcnReportUnimplemented (XF1);
  8654:       }  //switch
  8655:     }  //drawRaster(int,int)
  8656:   },  //XF1
  8657: 
  8658:   //================================================================================
  8659:   //F1_XWP ($0001,$06xx,$1403)
  8660:   //  概要
  8661:   //    F1  512ドット256色1プレーン
  8662:   //    XWP  優先順位に関わらず1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーだけ表示する
  8663:   //  手順
  8664:   //    1番目のパレットが1以下のとき
  8665:   //      グラフィックスパレット0のカラー(0は黒)
  8666:   //    1番目のパレットが2以上の偶数のとき
  8667:   //      1番目のカラー(0は黒)
  8668:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  8669:   //      1番目のパレットを偶数化したパレットのカラー(0は黒)
  8670:   //  中間コード1
  8671:   //    (f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):fpc(tev(f1p())))
  8672:   //  中間コード2
  8673:   //    f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):fpc(tev(f1p()))
  8674:   //  中間コード3
  8675:   //    (v0=f1p())<=1?fpc(0):ls1(v0)==0?fpc(v0):fpc(tev(v0))
  8676:   //  中間コード4
  8677:   //    (p=f1p())<=1?fpc(0):ls1(p)==0?fpc(p):fpc(tev(p))
  8678:   //  中間コード5
  8679:   //    (p=f1p())<=1?fpc(0):(p&1)==0?fpc(p):fpc(p&-2)
  8680:   //  中間コード6
  8681:   //    (p=f1p())<=1?fpo(0):(p&1)==0?fpo(p):fpo(p&-2)
  8682:   F1_XWP {
  8683:     @Override public void drawRaster (int src, int dst) {
  8684:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  8685:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8686:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8687:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  8688:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8689:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8690:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8691:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8692:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  8693:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8694:         gx1st += half << 1;
  8695:         gx2nd += half << 1;
  8696:         da += half;
  8697:       }
  8698:       while (da < db) {
  8699:         int p;
  8700:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  8701:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) <= 1 ?
  8702:                           VideoController.vcnPal32G8[0] :
  8703:                           (p & 1) == 0 ?
  8704:                           VideoController.vcnPal32G8[p] :
  8705:                           VideoController.vcnPal32G8[p & -2]);
  8706:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  8707:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) <= 1 ?
  8708:                               VideoController.vcnPal32G8[0] :
  8709:                               (p & 1) == 0 ?
  8710:                               VideoController.vcnPal32G8[p] :
  8711:                               VideoController.vcnPal32G8[p & -2]);
  8712:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  8713:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) <= 1 ?
  8714:                               VideoController.vcnPal32G8[0] :
  8715:                               (p & 1) == 0 ?
  8716:                               VideoController.vcnPal32G8[p] :
  8717:                               VideoController.vcnPal32G8[p & -2]);
  8718:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  8719:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) <= 1 ?
  8720:                               VideoController.vcnPal32G8[0] :
  8721:                               (p & 1) == 0 ?
  8722:                               VideoController.vcnPal32G8[p] :
  8723:                               VideoController.vcnPal32G8[p & -2]);
  8724:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  8725:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) <= 1 ?
  8726:                               VideoController.vcnPal32G8[0] :
  8727:                               (p & 1) == 0 ?
  8728:                               VideoController.vcnPal32G8[p] :
  8729:                               VideoController.vcnPal32G8[p & -2]);
  8730:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  8731:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) <= 1 ?
  8732:                               VideoController.vcnPal32G8[0] :
  8733:                               (p & 1) == 0 ?
  8734:                               VideoController.vcnPal32G8[p] :
  8735:                               VideoController.vcnPal32G8[p & -2]);
  8736:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  8737:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) <= 1 ?
  8738:                               VideoController.vcnPal32G8[0] :
  8739:                               (p & 1) == 0 ?
  8740:                               VideoController.vcnPal32G8[p] :
  8741:                               VideoController.vcnPal32G8[p & -2]);
  8742:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  8743:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) <= 1 ?
  8744:                               VideoController.vcnPal32G8[0] :
  8745:                               (p & 1) == 0 ?
  8746:                               VideoController.vcnPal32G8[p] :
  8747:                               VideoController.vcnPal32G8[p & -2]);
  8748:         gx1st += 16;
  8749:         gx2nd += 16;
  8750:         da += 8;
  8751:       }  //while da<db
  8752:     }  //drawRaster(int,int)
  8753:   },  //F1_XWP
  8754: 
  8755:   //================================================================================
  8756:   //F1_XHCT ($0001,$06xx,$1903)
  8757:   //  概要
  8758:   //    F1  512ドット256色1プレーン
  8759:   //    XHCT  0でない1番目のパレットを偶数化(65536色は奇数化)したパレットのカラーが奇数のとき0でない1番目のカラーと奥のスプライト・テキストのカラーを混ぜる
  8760:   //  手順
  8761:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  8762:   //      1番目のカラーとカラー0を混ぜたカラー(0は黒)
  8763:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  8764:   //      1番目のカラー(0は黒)
  8765:   //  中間コード1
  8766:   //    (ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),0):fpc(f1p()))
  8767:   //  中間コード2
  8768:   //    ls1(fpc(tev(f1p())))!=0?mix(fpc(f1p()),0):fpc(f1p())
  8769:   //  中間コード3
  8770:   //    ls1(fpc(tev(v3=f1p())))!=0?mix(fpc(v3),0):fpc(v3)
  8771:   //  中間コード4
  8772:   //    ls1(fpc(tev(p=f1p())))!=0?mix(fpc(p),0):fpc(p)
  8773:   //  中間コード5
  8774:   //    (fpc((p=f1p())&-2)&1)!=0?mix(fpc(p),0):fpc(p)
  8775:   //  中間コード6
  8776:   //    (fpc((p=f1p())&-2)&1)!=0?cto(mix(fpc(p),0)):fpo(p)
  8777:   F1_XHCT {
  8778:     @Override public void drawRaster (int src, int dst) {
  8779:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  8780:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8781:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8782:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  8783:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8784:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8785:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8786:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8787:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  8788:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8789:         gx1st += half << 1;
  8790:         gx2nd += half << 1;
  8791:         da += half;
  8792:       }
  8793:       while (da < db) {
  8794:         int p;
  8795:         XEiJ.pnlBM[da] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  8796:                                                             MainMemory.mmrM8[gy1st | gx1st & 1023])) & -2] & 1) != 0 ?
  8797:                           VideoController.vcnPalTbl[
  8798:                             VideoController.vcnMix2 (
  8799:                               VideoController.vcnPal16G8[p],
  8800:                               0)] :
  8801:                           VideoController.vcnPal32G8[p]);
  8802:         XEiJ.pnlBM[da + 1] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  8803:                                                                 MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) & -2] & 1) != 0 ?
  8804:                               VideoController.vcnPalTbl[
  8805:                                 VideoController.vcnMix2 (
  8806:                                   VideoController.vcnPal16G8[p],
  8807:                                   0)] :
  8808:                               VideoController.vcnPal32G8[p]);
  8809:         XEiJ.pnlBM[da + 2] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  8810:                                                                 MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) & -2] & 1) != 0 ?
  8811:                               VideoController.vcnPalTbl[
  8812:                                 VideoController.vcnMix2 (
  8813:                                   VideoController.vcnPal16G8[p],
  8814:                                   0)] :
  8815:                               VideoController.vcnPal32G8[p]);
  8816:         XEiJ.pnlBM[da + 3] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  8817:                                                                 MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) & -2] & 1) != 0 ?
  8818:                               VideoController.vcnPalTbl[
  8819:                                 VideoController.vcnMix2 (
  8820:                                   VideoController.vcnPal16G8[p],
  8821:                                   0)] :
  8822:                               VideoController.vcnPal32G8[p]);
  8823:         XEiJ.pnlBM[da + 4] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  8824:                                                                 MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) & -2] & 1) != 0 ?
  8825:                               VideoController.vcnPalTbl[
  8826:                                 VideoController.vcnMix2 (
  8827:                                   VideoController.vcnPal16G8[p],
  8828:                                   0)] :
  8829:                               VideoController.vcnPal32G8[p]);
  8830:         XEiJ.pnlBM[da + 5] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  8831:                                                                 MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) & -2] & 1) != 0 ?
  8832:                               VideoController.vcnPalTbl[
  8833:                                 VideoController.vcnMix2 (
  8834:                                   VideoController.vcnPal16G8[p],
  8835:                                   0)] :
  8836:                               VideoController.vcnPal32G8[p]);
  8837:         XEiJ.pnlBM[da + 6] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  8838:                                                                 MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) & -2] & 1) != 0 ?
  8839:                               VideoController.vcnPalTbl[
  8840:                                 VideoController.vcnMix2 (
  8841:                                   VideoController.vcnPal16G8[p],
  8842:                                   0)] :
  8843:                               VideoController.vcnPal32G8[p]);
  8844:         XEiJ.pnlBM[da + 7] = ((VideoController.vcnPal16G8[(p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  8845:                                                                 MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) & -2] & 1) != 0 ?
  8846:                               VideoController.vcnPalTbl[
  8847:                                 VideoController.vcnMix2 (
  8848:                                   VideoController.vcnPal16G8[p],
  8849:                                   0)] :
  8850:                               VideoController.vcnPal32G8[p]);
  8851:         gx1st += 16;
  8852:         gx2nd += 16;
  8853:         da += 8;
  8854:       }  //while da<db
  8855:     }  //drawRaster(int,int)
  8856:   },  //F1_XHCT
  8857: 
  8858:   //================================================================================
  8859:   //F1_XHCG ($0001,$06xx,$1A03)
  8860:   //  概要
  8861:   //    F1  512ドット256色1プレーン
  8862:   //    XHCG  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜる
  8863:   //  手順
  8864:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  8865:   //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  8866:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  8867:   //      1番目のパレットが奇数のとき
  8868:   //        2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  8869:   //      さもなくば(1番目のパレットが偶数のとき)
  8870:   //        1番目のカラー(0は黒)
  8871:   //  中間コード1
  8872:   //    (ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):(ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p())))
  8873:   //  中間コード2
  8874:   //    ls1(fpc(tev(f1p())))!=0?mix(fpc(tev(f1p())),fpc(tod(f2q()))):ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p())
  8875:   //  中間コード3
  8876:   //    ls1(v1=fpc(tev(v3=f1p())))!=0?mix(v1,fpc(tod(f2q()))):ls1(v3)!=0?fpc(tod(f2q())):fpc(v3)
  8877:   //  中間コード4
  8878:   //    ls1(p=fpc(tev(q=f1p())))!=0?mix(p,fpc(tod(f2q()))):ls1(q)!=0?fpc(tod(f2q())):fpc(q)
  8879:   //  中間コード5
  8880:   //    ((p=fpc((q=f1p())&-2))&1)!=0?mix(p,fpc(f2q()|1)):(q&1)!=0?fpc(f2q()|1):fpc(q)
  8881:   //  中間コード6
  8882:   //    ((p=fpc((q=f1p())&-2))&1)!=0?cto(mix(p,fpc(f2q()|1))):(q&1)!=0?fpo(f2q()|1):fpo(q)
  8883:   F1_XHCG {
  8884:     @Override public void drawRaster (int src, int dst) {
  8885:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  8886:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  8887:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8888:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  8889:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  8890:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8891:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  8892:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  8893:       int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8894:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  8895:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  8896:       int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  8897:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  8898:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  8899:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  8900:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  8901:         gx1st += half << 1;
  8902:         gx2nd += half << 1;
  8903:         gx3rd += half << 1;
  8904:         gx4th += half << 1;
  8905:         da += half;
  8906:       }
  8907:       while (da < db) {
  8908:         int p, q;
  8909:         XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  8910:                                                                  MainMemory.mmrM8[gy1st | gx1st & 1023])) & -2]) & 1) != 0 ?
  8911:                           VideoController.vcnPalTbl[
  8912:                             VideoController.vcnMix2 (
  8913:                               p,
  8914:                               VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  8915:                                                           MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1])] :
  8916:                           (q & 1) != 0 ?
  8917:                           VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  8918:                                                       MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1] :
  8919:                           VideoController.vcnPal32G8[q]);
  8920:         XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  8921:                                                                      MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) & -2]) & 1) != 0 ?
  8922:                               VideoController.vcnPalTbl[
  8923:                                 VideoController.vcnMix2 (
  8924:                                   p,
  8925:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  8926:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1])] :
  8927:                               (q & 1) != 0 ?
  8928:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  8929:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1] :
  8930:                               VideoController.vcnPal32G8[q]);
  8931:         XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  8932:                                                                      MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) & -2]) & 1) != 0 ?
  8933:                               VideoController.vcnPalTbl[
  8934:                                 VideoController.vcnMix2 (
  8935:                                   p,
  8936:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  8937:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1])] :
  8938:                               (q & 1) != 0 ?
  8939:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  8940:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1] :
  8941:                               VideoController.vcnPal32G8[q]);
  8942:         XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  8943:                                                                      MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) & -2]) & 1) != 0 ?
  8944:                               VideoController.vcnPalTbl[
  8945:                                 VideoController.vcnMix2 (
  8946:                                   p,
  8947:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  8948:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1])] :
  8949:                               (q & 1) != 0 ?
  8950:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  8951:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1] :
  8952:                               VideoController.vcnPal32G8[q]);
  8953:         XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  8954:                                                                      MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) & -2]) & 1) != 0 ?
  8955:                               VideoController.vcnPalTbl[
  8956:                                 VideoController.vcnMix2 (
  8957:                                   p,
  8958:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  8959:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1])] :
  8960:                               (q & 1) != 0 ?
  8961:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  8962:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1] :
  8963:                               VideoController.vcnPal32G8[q]);
  8964:         XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  8965:                                                                      MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) & -2]) & 1) != 0 ?
  8966:                               VideoController.vcnPalTbl[
  8967:                                 VideoController.vcnMix2 (
  8968:                                   p,
  8969:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  8970:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1])] :
  8971:                               (q & 1) != 0 ?
  8972:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  8973:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1] :
  8974:                               VideoController.vcnPal32G8[q]);
  8975:         XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  8976:                                                                      MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) & -2]) & 1) != 0 ?
  8977:                               VideoController.vcnPalTbl[
  8978:                                 VideoController.vcnMix2 (
  8979:                                   p,
  8980:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  8981:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1])] :
  8982:                               (q & 1) != 0 ?
  8983:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  8984:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1] :
  8985:                               VideoController.vcnPal32G8[q]);
  8986:         XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  8987:                                                                      MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) & -2]) & 1) != 0 ?
  8988:                               VideoController.vcnPalTbl[
  8989:                                 VideoController.vcnMix2 (
  8990:                                   p,
  8991:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  8992:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1])] :
  8993:                               (q & 1) != 0 ?
  8994:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  8995:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1] :
  8996:                               VideoController.vcnPal32G8[q]);
  8997:         gx1st += 16;
  8998:         gx2nd += 16;
  8999:         gx3rd += 16;
  9000:         gx4th += 16;
  9001:         da += 8;
  9002:       }  //while da<db
  9003:     }  //drawRaster(int,int)
  9004:   },  //F1_XHCG
  9005: 
  9006:   //================================================================================
  9007:   //F1_XHCGT ($0001,$06xx,$1B03)
  9008:   //  概要
  9009:   //    F1  512ドット256色1プレーン
  9010:   //    XHCGT  0でない1番目のパレットを偶数化したパレットのカラーが奇数のときそれと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  9011:   //  手順
  9012:   //    1番目のパレットを偶数化したパレットのカラーが奇数のとき
  9013:   //      1番目のパレットを偶数化したパレットのカラーと2番目(ONとみなす)のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  9014:   //    さもなくば(1番目のパレットを偶数化したパレットのカラーが偶数のとき)
  9015:   //      1番目のパレットが奇数のとき
  9016:   //        2番目(ONとみなす)のパレットを奇数化したパレットのカラー(0は黒)
  9017:   //      さもなくば(1番目のパレットが偶数のとき)
  9018:   //        1番目のカラー(0は黒)
  9019:   //  中間コード1
  9020:   //    (ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0):(ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p())))
  9021:   //  中間コード2
  9022:   //    ls1(fpc(tev(f1p())))!=0?mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0):ls1(f1p())!=0?fpc(tod(f2q())):fpc(f1p())
  9023:   //  中間コード3
  9024:   //    ls1(v1=fpc(tev(v3=f1p())))!=0?mix(mix(v1,fpc(tod(f2q()))),0):ls1(v3)!=0?fpc(tod(f2q())):fpc(v3)
  9025:   //  中間コード4
  9026:   //    ls1(p=fpc(tev(q=f1p())))!=0?mix(mix(p,fpc(tod(f2q()))),0):ls1(q)!=0?fpc(tod(f2q())):fpc(q)
  9027:   //  中間コード5
  9028:   //    ((p=fpc((q=f1p())&-2))&1)!=0?mix(mix(p,fpc(f2q()|1)),0):(q&1)!=0?fpc(f2q()|1):fpc(q)
  9029:   //  中間コード6
  9030:   //    ((p=fpc((q=f1p())&-2))&1)!=0?cto(mix(mix(p,fpc(f2q()|1)),0)):(q&1)!=0?fpo(f2q()|1):fpo(q)
  9031:   F1_XHCGT {
  9032:     @Override public void drawRaster (int src, int dst) {
  9033:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9034:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9035:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9036:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9037:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9038:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9039:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  9040:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  9041:       int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9042:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  9043:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  9044:       int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9045:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9046:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9047:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  9048:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9049:         gx1st += half << 1;
  9050:         gx2nd += half << 1;
  9051:         gx3rd += half << 1;
  9052:         gx4th += half << 1;
  9053:         da += half;
  9054:       }
  9055:       while (da < db) {
  9056:         int p, q;
  9057:         XEiJ.pnlBM[da] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9058:                                                                  MainMemory.mmrM8[gy1st | gx1st & 1023])) & -2]) & 1) != 0 ?
  9059:                           VideoController.vcnPalTbl[
  9060:                             VideoController.vcnMix2 (
  9061:                               VideoController.vcnMix2 (
  9062:                                 p,
  9063:                                 VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  9064:                                                             MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1]),
  9065:                               0)] :
  9066:                           (q & 1) != 0 ?
  9067:                           VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  9068:                                                       MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1] :
  9069:                           VideoController.vcnPal32G8[q]);
  9070:         XEiJ.pnlBM[da + 1] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9071:                                                                      MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) & -2]) & 1) != 0 ?
  9072:                               VideoController.vcnPalTbl[
  9073:                                 VideoController.vcnMix2 (
  9074:                                   VideoController.vcnMix2 (
  9075:                                     p,
  9076:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  9077:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1]),
  9078:                                   0)] :
  9079:                               (q & 1) != 0 ?
  9080:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  9081:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1] :
  9082:                               VideoController.vcnPal32G8[q]);
  9083:         XEiJ.pnlBM[da + 2] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9084:                                                                      MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) & -2]) & 1) != 0 ?
  9085:                               VideoController.vcnPalTbl[
  9086:                                 VideoController.vcnMix2 (
  9087:                                   VideoController.vcnMix2 (
  9088:                                     p,
  9089:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  9090:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1]),
  9091:                                   0)] :
  9092:                               (q & 1) != 0 ?
  9093:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  9094:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1] :
  9095:                               VideoController.vcnPal32G8[q]);
  9096:         XEiJ.pnlBM[da + 3] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9097:                                                                      MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) & -2]) & 1) != 0 ?
  9098:                               VideoController.vcnPalTbl[
  9099:                                 VideoController.vcnMix2 (
  9100:                                   VideoController.vcnMix2 (
  9101:                                     p,
  9102:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  9103:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1]),
  9104:                                   0)] :
  9105:                               (q & 1) != 0 ?
  9106:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  9107:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1] :
  9108:                               VideoController.vcnPal32G8[q]);
  9109:         XEiJ.pnlBM[da + 4] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9110:                                                                      MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) & -2]) & 1) != 0 ?
  9111:                               VideoController.vcnPalTbl[
  9112:                                 VideoController.vcnMix2 (
  9113:                                   VideoController.vcnMix2 (
  9114:                                     p,
  9115:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  9116:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1]),
  9117:                                   0)] :
  9118:                               (q & 1) != 0 ?
  9119:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  9120:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1] :
  9121:                               VideoController.vcnPal32G8[q]);
  9122:         XEiJ.pnlBM[da + 5] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9123:                                                                      MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) & -2]) & 1) != 0 ?
  9124:                               VideoController.vcnPalTbl[
  9125:                                 VideoController.vcnMix2 (
  9126:                                   VideoController.vcnMix2 (
  9127:                                     p,
  9128:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  9129:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1]),
  9130:                                   0)] :
  9131:                               (q & 1) != 0 ?
  9132:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  9133:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1] :
  9134:                               VideoController.vcnPal32G8[q]);
  9135:         XEiJ.pnlBM[da + 6] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9136:                                                                      MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) & -2]) & 1) != 0 ?
  9137:                               VideoController.vcnPalTbl[
  9138:                                 VideoController.vcnMix2 (
  9139:                                   VideoController.vcnMix2 (
  9140:                                     p,
  9141:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  9142:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1]),
  9143:                                   0)] :
  9144:                               (q & 1) != 0 ?
  9145:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  9146:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1] :
  9147:                               VideoController.vcnPal32G8[q]);
  9148:         XEiJ.pnlBM[da + 7] = (((p = VideoController.vcnPal16G8[(q = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9149:                                                                      MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) & -2]) & 1) != 0 ?
  9150:                               VideoController.vcnPalTbl[
  9151:                                 VideoController.vcnMix2 (
  9152:                                   VideoController.vcnMix2 (
  9153:                                     p,
  9154:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  9155:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1]),
  9156:                                   0)] :
  9157:                               (q & 1) != 0 ?
  9158:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  9159:                                                           MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1] :
  9160:                               VideoController.vcnPal32G8[q]);
  9161:         gx1st += 16;
  9162:         gx2nd += 16;
  9163:         gx3rd += 16;
  9164:         gx4th += 16;
  9165:         da += 8;
  9166:       }  //while da<db
  9167:     }  //drawRaster(int,int)
  9168:   },  //F1_XHCGT
  9169: 
  9170:   //================================================================================
  9171:   //F1_XHPT ($0001,$06xx,$1D03)
  9172:   //  概要
  9173:   //    F1  512ドット256色1プレーン
  9174:   //    XHPT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと奥のスプライト・テキストのカラーを混ぜる
  9175:   //  手順
  9176:   //    1番目のパレットが1以下のとき
  9177:   //      グラフィックスパレット0のカラー(0は黒)
  9178:   //    1番目のパレットが2以上の偶数のとき
  9179:   //      1番目のカラー(0は黒)
  9180:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  9181:   //      1番目のパレットを偶数化したパレットのカラーとカラー0を混ぜたカラー(0は黒)
  9182:   //  中間コード1
  9183:   //    (f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),0))
  9184:   //  中間コード2
  9185:   //    f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),0)
  9186:   //  中間コード3
  9187:   //    (v0=f1p())<=1?fpc(0):ls1(v0)==0?fpc(v0):mix(fpc(tev(v0)),0)
  9188:   //  中間コード4
  9189:   //    (p=f1p())<=1?fpc(0):ls1(p)==0?fpc(p):mix(fpc(tev(p)),0)
  9190:   //  中間コード5
  9191:   //    (p=f1p())<=1?fpc(0):(p&1)==0?fpc(p):mix(fpc(p&-2),0)
  9192:   //  中間コード6
  9193:   //    (p=f1p())<=1?fpo(0):(p&1)==0?fpo(p):cto(mix(fpc(p&-2),0))
  9194:   F1_XHPT {
  9195:     @Override public void drawRaster (int src, int dst) {
  9196:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9197:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9198:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9199:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9200:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9201:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9202:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9203:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9204:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  9205:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9206:         gx1st += half << 1;
  9207:         gx2nd += half << 1;
  9208:         da += half;
  9209:       }
  9210:       while (da < db) {
  9211:         int p;
  9212:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9213:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) <= 1 ?
  9214:                           VideoController.vcnPal32G8[0] :
  9215:                           (p & 1) == 0 ?
  9216:                           VideoController.vcnPal32G8[p] :
  9217:                           VideoController.vcnPalTbl[
  9218:                             VideoController.vcnMix2 (
  9219:                               VideoController.vcnPal16G8[p & -2],
  9220:                               0)]);
  9221:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9222:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) <= 1 ?
  9223:                               VideoController.vcnPal32G8[0] :
  9224:                               (p & 1) == 0 ?
  9225:                               VideoController.vcnPal32G8[p] :
  9226:                               VideoController.vcnPalTbl[
  9227:                                 VideoController.vcnMix2 (
  9228:                                   VideoController.vcnPal16G8[p & -2],
  9229:                                   0)]);
  9230:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9231:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) <= 1 ?
  9232:                               VideoController.vcnPal32G8[0] :
  9233:                               (p & 1) == 0 ?
  9234:                               VideoController.vcnPal32G8[p] :
  9235:                               VideoController.vcnPalTbl[
  9236:                                 VideoController.vcnMix2 (
  9237:                                   VideoController.vcnPal16G8[p & -2],
  9238:                                   0)]);
  9239:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9240:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) <= 1 ?
  9241:                               VideoController.vcnPal32G8[0] :
  9242:                               (p & 1) == 0 ?
  9243:                               VideoController.vcnPal32G8[p] :
  9244:                               VideoController.vcnPalTbl[
  9245:                                 VideoController.vcnMix2 (
  9246:                                   VideoController.vcnPal16G8[p & -2],
  9247:                                   0)]);
  9248:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9249:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) <= 1 ?
  9250:                               VideoController.vcnPal32G8[0] :
  9251:                               (p & 1) == 0 ?
  9252:                               VideoController.vcnPal32G8[p] :
  9253:                               VideoController.vcnPalTbl[
  9254:                                 VideoController.vcnMix2 (
  9255:                                   VideoController.vcnPal16G8[p & -2],
  9256:                                   0)]);
  9257:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9258:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) <= 1 ?
  9259:                               VideoController.vcnPal32G8[0] :
  9260:                               (p & 1) == 0 ?
  9261:                               VideoController.vcnPal32G8[p] :
  9262:                               VideoController.vcnPalTbl[
  9263:                                 VideoController.vcnMix2 (
  9264:                                   VideoController.vcnPal16G8[p & -2],
  9265:                                   0)]);
  9266:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9267:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) <= 1 ?
  9268:                               VideoController.vcnPal32G8[0] :
  9269:                               (p & 1) == 0 ?
  9270:                               VideoController.vcnPal32G8[p] :
  9271:                               VideoController.vcnPalTbl[
  9272:                                 VideoController.vcnMix2 (
  9273:                                   VideoController.vcnPal16G8[p & -2],
  9274:                                   0)]);
  9275:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9276:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) <= 1 ?
  9277:                               VideoController.vcnPal32G8[0] :
  9278:                               (p & 1) == 0 ?
  9279:                               VideoController.vcnPal32G8[p] :
  9280:                               VideoController.vcnPalTbl[
  9281:                                 VideoController.vcnMix2 (
  9282:                                   VideoController.vcnPal16G8[p & -2],
  9283:                                   0)]);
  9284:         gx1st += 16;
  9285:         gx2nd += 16;
  9286:         da += 8;
  9287:       }  //while da<db
  9288:     }  //drawRaster(int,int)
  9289:   },  //F1_XHPT
  9290: 
  9291:   //================================================================================
  9292:   //F1_XHPG ($0001,$06xx,$1E03)
  9293:   //  概要
  9294:   //    F1  512ドット256色1プレーン
  9295:   //    XHPG  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜる
  9296:   //  手順
  9297:   //    1番目のパレットが1以下のとき
  9298:   //      グラフィックスパレット0のカラー(0は黒)
  9299:   //    1番目のパレットが2以上の偶数のとき
  9300:   //      1番目のカラー(0は黒)
  9301:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  9302:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラー(0は黒)
  9303:   //  中間コード1
  9304:   //    (f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),fpc(tod(f2q()))))
  9305:   //  中間コード2
  9306:   //    f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(fpc(tev(f1p())),fpc(tod(f2q())))
  9307:   //  中間コード3
  9308:   //    (v0=f1p())<=1?fpc(0):ls1(v0)==0?fpc(v0):mix(fpc(tev(v0)),fpc(tod(f2q())))
  9309:   //  中間コード4
  9310:   //    (p=f1p())<=1?fpc(0):ls1(p)==0?fpc(p):mix(fpc(tev(p)),fpc(tod(f2q())))
  9311:   //  中間コード5
  9312:   //    (p=f1p())<=1?fpc(0):(p&1)==0?fpc(p):mix(fpc(p&-2),fpc(f2q()|1))
  9313:   //  中間コード6
  9314:   //    (p=f1p())<=1?fpo(0):(p&1)==0?fpo(p):cto(mix(fpc(p&-2),fpc(f2q()|1)))
  9315:   F1_XHPG {
  9316:     @Override public void drawRaster (int src, int dst) {
  9317:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9318:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9319:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9320:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9321:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9322:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9323:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  9324:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  9325:       int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9326:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  9327:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  9328:       int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9329:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9330:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9331:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  9332:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9333:         gx1st += half << 1;
  9334:         gx2nd += half << 1;
  9335:         gx3rd += half << 1;
  9336:         gx4th += half << 1;
  9337:         da += half;
  9338:       }
  9339:       while (da < db) {
  9340:         int p;
  9341:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9342:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) <= 1 ?
  9343:                           VideoController.vcnPal32G8[0] :
  9344:                           (p & 1) == 0 ?
  9345:                           VideoController.vcnPal32G8[p] :
  9346:                           VideoController.vcnPalTbl[
  9347:                             VideoController.vcnMix2 (
  9348:                               VideoController.vcnPal16G8[p & -2],
  9349:                               VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  9350:                                                           MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1])]);
  9351:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9352:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) <= 1 ?
  9353:                               VideoController.vcnPal32G8[0] :
  9354:                               (p & 1) == 0 ?
  9355:                               VideoController.vcnPal32G8[p] :
  9356:                               VideoController.vcnPalTbl[
  9357:                                 VideoController.vcnMix2 (
  9358:                                   VideoController.vcnPal16G8[p & -2],
  9359:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  9360:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1])]);
  9361:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9362:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) <= 1 ?
  9363:                               VideoController.vcnPal32G8[0] :
  9364:                               (p & 1) == 0 ?
  9365:                               VideoController.vcnPal32G8[p] :
  9366:                               VideoController.vcnPalTbl[
  9367:                                 VideoController.vcnMix2 (
  9368:                                   VideoController.vcnPal16G8[p & -2],
  9369:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  9370:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1])]);
  9371:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9372:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) <= 1 ?
  9373:                               VideoController.vcnPal32G8[0] :
  9374:                               (p & 1) == 0 ?
  9375:                               VideoController.vcnPal32G8[p] :
  9376:                               VideoController.vcnPalTbl[
  9377:                                 VideoController.vcnMix2 (
  9378:                                   VideoController.vcnPal16G8[p & -2],
  9379:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  9380:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1])]);
  9381:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9382:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) <= 1 ?
  9383:                               VideoController.vcnPal32G8[0] :
  9384:                               (p & 1) == 0 ?
  9385:                               VideoController.vcnPal32G8[p] :
  9386:                               VideoController.vcnPalTbl[
  9387:                                 VideoController.vcnMix2 (
  9388:                                   VideoController.vcnPal16G8[p & -2],
  9389:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  9390:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1])]);
  9391:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9392:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) <= 1 ?
  9393:                               VideoController.vcnPal32G8[0] :
  9394:                               (p & 1) == 0 ?
  9395:                               VideoController.vcnPal32G8[p] :
  9396:                               VideoController.vcnPalTbl[
  9397:                                 VideoController.vcnMix2 (
  9398:                                   VideoController.vcnPal16G8[p & -2],
  9399:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  9400:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1])]);
  9401:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9402:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) <= 1 ?
  9403:                               VideoController.vcnPal32G8[0] :
  9404:                               (p & 1) == 0 ?
  9405:                               VideoController.vcnPal32G8[p] :
  9406:                               VideoController.vcnPalTbl[
  9407:                                 VideoController.vcnMix2 (
  9408:                                   VideoController.vcnPal16G8[p & -2],
  9409:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  9410:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1])]);
  9411:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9412:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) <= 1 ?
  9413:                               VideoController.vcnPal32G8[0] :
  9414:                               (p & 1) == 0 ?
  9415:                               VideoController.vcnPal32G8[p] :
  9416:                               VideoController.vcnPalTbl[
  9417:                                 VideoController.vcnMix2 (
  9418:                                   VideoController.vcnPal16G8[p & -2],
  9419:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  9420:                                                               MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1])]);
  9421:         gx1st += 16;
  9422:         gx2nd += 16;
  9423:         gx3rd += 16;
  9424:         gx4th += 16;
  9425:         da += 8;
  9426:       }  //while da<db
  9427:     }  //drawRaster(int,int)
  9428:   },  //F1_XHPG
  9429: 
  9430:   //================================================================================
  9431:   //F1_XHPGT ($0001,$06xx,$1F03)
  9432:   //  概要
  9433:   //    F1  512ドット256色1プレーン
  9434:   //    XHPGT  1番目のパレットが3以上の奇数のときそれを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜてさらに奥のスプライト・テキストのカラーを混ぜる
  9435:   //  手順
  9436:   //    1番目のパレットが1以下のとき
  9437:   //      グラフィックスパレット0のカラー(0は黒)
  9438:   //    1番目のパレットが2以上の偶数のとき
  9439:   //      1番目のカラー(0は黒)
  9440:   //    さもなくば(1番目のパレットが3以上の奇数のとき)
  9441:   //      1番目のパレットを偶数化したパレットのカラーと2番目のパレットを奇数化したパレットのカラーを混ぜたカラーにさらにカラー0を混ぜたカラー(0は黒)
  9442:   //  中間コード1
  9443:   //    (f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0))
  9444:   //  中間コード2
  9445:   //    f1p()<=1?fpc(0):ls1(f1p())==0?fpc(f1p()):mix(mix(fpc(tev(f1p())),fpc(tod(f2q()))),0)
  9446:   //  中間コード3
  9447:   //    (v0=f1p())<=1?fpc(0):ls1(v0)==0?fpc(v0):mix(mix(fpc(tev(v0)),fpc(tod(f2q()))),0)
  9448:   //  中間コード4
  9449:   //    (p=f1p())<=1?fpc(0):ls1(p)==0?fpc(p):mix(mix(fpc(tev(p)),fpc(tod(f2q()))),0)
  9450:   //  中間コード5
  9451:   //    (p=f1p())<=1?fpc(0):(p&1)==0?fpc(p):mix(mix(fpc(p&-2),fpc(f2q()|1)),0)
  9452:   //  中間コード6
  9453:   //    (p=f1p())<=1?fpo(0):(p&1)==0?fpo(p):cto(mix(mix(fpc(p&-2),fpc(f2q()|1)),0))
  9454:   F1_XHPGT {
  9455:     @Override public void drawRaster (int src, int dst) {
  9456:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9457:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9458:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9459:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9460:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9461:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9462:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  9463:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  9464:       int gz3rd = VideoController.vcnHidden3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9465:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  9466:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  9467:       int gz4th = VideoController.vcnHidden4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9468:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9469:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9470:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  9471:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9472:         gx1st += half << 1;
  9473:         gx2nd += half << 1;
  9474:         gx3rd += half << 1;
  9475:         gx4th += half << 1;
  9476:         da += half;
  9477:       }
  9478:       while (da < db) {
  9479:         int p;
  9480:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9481:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) <= 1 ?
  9482:                           VideoController.vcnPal32G8[0] :
  9483:                           (p & 1) == 0 ?
  9484:                           VideoController.vcnPal32G8[p] :
  9485:                           VideoController.vcnPalTbl[
  9486:                             VideoController.vcnMix2 (
  9487:                               VideoController.vcnMix2 (
  9488:                                 VideoController.vcnPal16G8[p & -2],
  9489:                                 VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th & 1023] << 4 |
  9490:                                                             MainMemory.mmrM8[gz3rd | gx3rd & 1023]) | 1]),
  9491:                               0)]);
  9492:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9493:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) <= 1 ?
  9494:                               VideoController.vcnPal32G8[0] :
  9495:                               (p & 1) == 0 ?
  9496:                               VideoController.vcnPal32G8[p] :
  9497:                               VideoController.vcnPalTbl[
  9498:                                 VideoController.vcnMix2 (
  9499:                                   VideoController.vcnMix2 (
  9500:                                     VideoController.vcnPal16G8[p & -2],
  9501:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 2 & 1023] << 4 |
  9502:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 2 & 1023]) | 1]),
  9503:                                   0)]);
  9504:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9505:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) <= 1 ?
  9506:                               VideoController.vcnPal32G8[0] :
  9507:                               (p & 1) == 0 ?
  9508:                               VideoController.vcnPal32G8[p] :
  9509:                               VideoController.vcnPalTbl[
  9510:                                 VideoController.vcnMix2 (
  9511:                                   VideoController.vcnMix2 (
  9512:                                     VideoController.vcnPal16G8[p & -2],
  9513:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 4 & 1023] << 4 |
  9514:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 4 & 1023]) | 1]),
  9515:                                   0)]);
  9516:         XEiJ.pnlBM[da + 3] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9517:                                     MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])) <= 1 ?
  9518:                               VideoController.vcnPal32G8[0] :
  9519:                               (p & 1) == 0 ?
  9520:                               VideoController.vcnPal32G8[p] :
  9521:                               VideoController.vcnPalTbl[
  9522:                                 VideoController.vcnMix2 (
  9523:                                   VideoController.vcnMix2 (
  9524:                                     VideoController.vcnPal16G8[p & -2],
  9525:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 6 & 1023] << 4 |
  9526:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 6 & 1023]) | 1]),
  9527:                                   0)]);
  9528:         XEiJ.pnlBM[da + 4] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9529:                                     MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])) <= 1 ?
  9530:                               VideoController.vcnPal32G8[0] :
  9531:                               (p & 1) == 0 ?
  9532:                               VideoController.vcnPal32G8[p] :
  9533:                               VideoController.vcnPalTbl[
  9534:                                 VideoController.vcnMix2 (
  9535:                                   VideoController.vcnMix2 (
  9536:                                     VideoController.vcnPal16G8[p & -2],
  9537:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 8 & 1023] << 4 |
  9538:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 8 & 1023]) | 1]),
  9539:                                   0)]);
  9540:         XEiJ.pnlBM[da + 5] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9541:                                     MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])) <= 1 ?
  9542:                               VideoController.vcnPal32G8[0] :
  9543:                               (p & 1) == 0 ?
  9544:                               VideoController.vcnPal32G8[p] :
  9545:                               VideoController.vcnPalTbl[
  9546:                                 VideoController.vcnMix2 (
  9547:                                   VideoController.vcnMix2 (
  9548:                                     VideoController.vcnPal16G8[p & -2],
  9549:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 10 & 1023] << 4 |
  9550:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 10 & 1023]) | 1]),
  9551:                                   0)]);
  9552:         XEiJ.pnlBM[da + 6] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9553:                                     MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])) <= 1 ?
  9554:                               VideoController.vcnPal32G8[0] :
  9555:                               (p & 1) == 0 ?
  9556:                               VideoController.vcnPal32G8[p] :
  9557:                               VideoController.vcnPalTbl[
  9558:                                 VideoController.vcnMix2 (
  9559:                                   VideoController.vcnMix2 (
  9560:                                     VideoController.vcnPal16G8[p & -2],
  9561:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 12 & 1023] << 4 |
  9562:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 12 & 1023]) | 1]),
  9563:                                   0)]);
  9564:         XEiJ.pnlBM[da + 7] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9565:                                     MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])) <= 1 ?
  9566:                               VideoController.vcnPal32G8[0] :
  9567:                               (p & 1) == 0 ?
  9568:                               VideoController.vcnPal32G8[p] :
  9569:                               VideoController.vcnPalTbl[
  9570:                                 VideoController.vcnMix2 (
  9571:                                   VideoController.vcnMix2 (
  9572:                                     VideoController.vcnPal16G8[p & -2],
  9573:                                     VideoController.vcnPal16G8[(MainMemory.mmrM8[gz4th | gx4th + 14 & 1023] << 4 |
  9574:                                                                 MainMemory.mmrM8[gz3rd | gx3rd + 14 & 1023]) | 1]),
  9575:                                   0)]);
  9576:         gx1st += 16;
  9577:         gx2nd += 16;
  9578:         gx3rd += 16;
  9579:         gx4th += 16;
  9580:         da += 8;
  9581:       }  //while da<db
  9582:     }  //drawRaster(int,int)
  9583:   },  //F1_XHPGT
  9584: 
  9585:   //================================================================================
  9586:   //F1_A ($0001,$06xx,$4003)
  9587:   //  概要
  9588:   //    F1  512ドット256色1プレーン
  9589:   //    A  グラフィックスカラーとテキストパレット0のカラーを混ぜる
  9590:   //  手順
  9591:   //    1番目のカラーとテキストパレット0のカラーを混ぜたカラー(0は黒)
  9592:   //  中間コード1
  9593:   //    mix(fpc(f1p()),tpc(0))
  9594:   //  中間コード2
  9595:   //    mix(fpc(f1p()),tpc(0))
  9596:   //  中間コード3
  9597:   //    mix(fpc(f1p()),tpc(0))
  9598:   //  中間コード4
  9599:   //    mix(fpc(f1p()),tpc(0))
  9600:   //  中間コード5
  9601:   //    mix(fpc(f1p()),tpc(0))
  9602:   //  中間コード6
  9603:   //    cto(mix(fpc(f1p()),tpc(0)))
  9604:   F1_A {
  9605:     @Override public void drawRaster (int src, int dst) {
  9606:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9607:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9608:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9609:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9610:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9611:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9612:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9613:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9614:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  9615:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9616:         gx1st += half << 1;
  9617:         gx2nd += half << 1;
  9618:         da += half;
  9619:       }
  9620:       while (da < db) {
  9621:         XEiJ.pnlBM[da] = (VideoController.vcnPalTbl[
  9622:                             VideoController.vcnMix2 (
  9623:                               VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9624:                                                           MainMemory.mmrM8[gy1st | gx1st & 1023])],
  9625:                               VideoController.vcnPal16TS[0])]);
  9626:         XEiJ.pnlBM[da + 1] = (VideoController.vcnPalTbl[
  9627:                                 VideoController.vcnMix2 (
  9628:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9629:                                                               MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])],
  9630:                                   VideoController.vcnPal16TS[0])]);
  9631:         XEiJ.pnlBM[da + 2] = (VideoController.vcnPalTbl[
  9632:                                 VideoController.vcnMix2 (
  9633:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9634:                                                               MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])],
  9635:                                   VideoController.vcnPal16TS[0])]);
  9636:         XEiJ.pnlBM[da + 3] = (VideoController.vcnPalTbl[
  9637:                                 VideoController.vcnMix2 (
  9638:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 6 & 1023] << 4 |
  9639:                                                               MainMemory.mmrM8[gy1st | gx1st + 6 & 1023])],
  9640:                                   VideoController.vcnPal16TS[0])]);
  9641:         XEiJ.pnlBM[da + 4] = (VideoController.vcnPalTbl[
  9642:                                 VideoController.vcnMix2 (
  9643:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 8 & 1023] << 4 |
  9644:                                                               MainMemory.mmrM8[gy1st | gx1st + 8 & 1023])],
  9645:                                   VideoController.vcnPal16TS[0])]);
  9646:         XEiJ.pnlBM[da + 5] = (VideoController.vcnPalTbl[
  9647:                                 VideoController.vcnMix2 (
  9648:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 10 & 1023] << 4 |
  9649:                                                               MainMemory.mmrM8[gy1st | gx1st + 10 & 1023])],
  9650:                                   VideoController.vcnPal16TS[0])]);
  9651:         XEiJ.pnlBM[da + 6] = (VideoController.vcnPalTbl[
  9652:                                 VideoController.vcnMix2 (
  9653:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 12 & 1023] << 4 |
  9654:                                                               MainMemory.mmrM8[gy1st | gx1st + 12 & 1023])],
  9655:                                   VideoController.vcnPal16TS[0])]);
  9656:         XEiJ.pnlBM[da + 7] = (VideoController.vcnPalTbl[
  9657:                                 VideoController.vcnMix2 (
  9658:                                   VideoController.vcnPal16G8[(MainMemory.mmrM8[gy2nd | gx2nd + 14 & 1023] << 4 |
  9659:                                                               MainMemory.mmrM8[gy1st | gx1st + 14 & 1023])],
  9660:                                   VideoController.vcnPal16TS[0])]);
  9661:         gx1st += 16;
  9662:         gx2nd += 16;
  9663:         da += 8;
  9664:       }  //while da<db
  9665:     }  //drawRaster(int,int)
  9666:   },  //F1_A
  9667: 
  9668:   //================================================================================
  9669:   //F2 ($0001,$06xx,$000F)
  9670:   //  概要
  9671:   //    F2  512ドット256色2プレーン
  9672:   //    拡張なし
  9673:   //  手順
  9674:   //    1番目のパレットが0でないとき
  9675:   //      1番目のカラー(0は黒)
  9676:   //    さもなくば(1番目のパレットが0のとき)
  9677:   //      2番目のカラー(0は黒)
  9678:   //  中間コード1
  9679:   //    (f1p()!=0?fpc(f1p()):fpc(f2p()))
  9680:   //  中間コード2
  9681:   //    f1p()!=0?fpc(f1p()):fpc(f2p())
  9682:   //  中間コード3
  9683:   //    (v0=f1p())!=0?fpc(v0):fpc(f2p())
  9684:   //  中間コード4
  9685:   //    (p=f1p())!=0?fpc(p):fpc(f2p())
  9686:   //  中間コード5
  9687:   //    (p=f1p())!=0?fpc(p):fpc(f2p())
  9688:   //  中間コード6
  9689:   //    (p=f1p())!=0?fpo(p):fpo(f2p())
  9690:   F2 {
  9691:     @Override public void drawRaster (int src, int dst) {
  9692:       int pn = VideoController.vcnReg2Curr & 3;  //1番目のパレットのbit3-0のGVRAMページ番号
  9693:       int gx1st = CRTC.crtR12GrXCurr[pn] << 1;
  9694:       int gy1st = VideoController.vcnVisible1st + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9695:       pn = VideoController.vcnReg2Curr >> 2 & 3;  //1番目のパレットのbit7-4のGVRAMページ番号
  9696:       int gx2nd = CRTC.crtR12GrXCurr[pn] << 1;
  9697:       int gy2nd = VideoController.vcnVisible2nd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9698:       pn = VideoController.vcnReg2Curr >> 4 & 3;  //2番目のパレットのbit3-0のGVRAMページ番号
  9699:       int gx3rd = CRTC.crtR12GrXCurr[pn] << 1;
  9700:       int gy3rd = VideoController.vcnVisible3rd + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9701:       pn = VideoController.vcnReg2Curr >> 6 & 3;  //2番目のパレットのbit7-4のGVRAMページ番号
  9702:       int gx4th = CRTC.crtR12GrXCurr[pn] << 1;
  9703:       int gy4th = VideoController.vcnVisible4th + ((CRTC.crtR13GrYCurr[pn] + src & 511) << 10);
  9704:       int da = dst << XEiJ.PNL_BM_OFFSET_BITS;  //ARGB出力インデックス
  9705:       int db = da + XEiJ.pnlScreenWidth;  //ARGB出力インデックスの終了位置
  9706:       if (CRTC.crtBeginningAllStamp != CRTC.crtAllStamp) {
  9707:         int half = XEiJ.pnlScreenWidth >> 4 << 3;
  9708:         gx1st += half << 1;
  9709:         gx2nd += half << 1;
  9710:         gx3rd += half << 1;
  9711:         gx4th += half << 1;
  9712:         da += half;
  9713:       }
  9714:       while (da < db) {
  9715:         int p;
  9716:         XEiJ.pnlBM[da] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd & 1023] << 4 |
  9717:                                 MainMemory.mmrM8[gy1st | gx1st & 1023])) != 0 ?
  9718:                           VideoController.vcnPal32G8[p] :
  9719:                           VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th & 1023] << 4 |
  9720:                                                       MainMemory.mmrM8[gy3rd | gx3rd & 1023])]);
  9721:         XEiJ.pnlBM[da + 1] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 2 & 1023] << 4 |
  9722:                                     MainMemory.mmrM8[gy1st | gx1st + 2 & 1023])) != 0 ?
  9723:                               VideoController.vcnPal32G8[p] :
  9724:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 2 & 1023] << 4 |
  9725:                                                           MainMemory.mmrM8[gy3rd | gx3rd + 2 & 1023])]);
  9726:         XEiJ.pnlBM[da + 2] = ((p = (MainMemory.mmrM8[gy2nd | gx2nd + 4 & 1023] << 4 |
  9727:                                     MainMemory.mmrM8[gy1st | gx1st + 4 & 1023])) != 0 ?
  9728:                               VideoController.vcnPal32G8[p] :
  9729:                               VideoController.vcnPal32G8[(MainMemory.mmrM8[gy4th | gx4th + 4 & 1023] << 4 |
  9730:                                                           MainMemory.mmrM8[g