ScreenModeTest.java
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: package xeij;
14:
15: import java.awt.event.*;
16: import java.lang.*;
17: import java.util.*;
18: import javax.swing.*;
19: import javax.swing.event.*;
20:
21: public class ScreenModeTest {
22:
23: public static final boolean SMT_ON = true;
24:
25:
26: public static final int SMT_MARGIN = 4;
27: public static final int SMT_ITEM_GAP = 4;
28: public static final int SMT_ITEM_GAP_2 = 8;
29: public static final int SMT_ITEM_GAP_3 = 12;
30: public static JFrame smtFrame;
31:
32:
33: public static JTextField smtFreqTextField;
34: public static String smtFreqLastText;
35:
36:
37: public static JTextField smtModeTextField;
38: public static final int SMT_MODE_LIMIT = 6;
39: public static final int SMT_MODE_SPAN = 5;
40: public static final String[] smtModeName = new String[SMT_MODE_LIMIT];
41: public static final long[] smtModeTime = new long[SMT_MODE_LIMIT];
42: public static int smtModeCount;
43:
44:
45: public static boolean smtPatternTestOn;
46: public static boolean smtPatternTestSpriteOn;
47:
48:
49: public static SMTItem[] smtItemArray;
50:
51: public static SMTGroup smtCRTItemGroup1;
52: public static SMTItem smtItemCrtHFEd;
53: public static SMTItem smtItemCrtHSEd;
54: public static SMTItem smtItemCrtHBEd;
55: public static SMTItem smtItemCrtHDEd;
56: public static SMTItem smtItemCrtVFEd;
57: public static SMTItem smtItemCrtVSEd;
58: public static SMTItem smtItemCrtVBEd;
59: public static SMTItem smtItemCrtVDEd;
60:
61: public static SMTGroup smtCRTItemGroup2;
62: public static SMTItem smtItemCrtIRQ;
63: public static SMTItem smtItemCrtTxX;
64: public static SMTItem smtItemCrtTxY;
65: public static SMTItem smtItemCrtGrMM;
66: public static SMTItem smtItemCrtHigh;
67: public static SMTItem smtItemCrtVRes;
68: public static SMTItem smtItemCrtHRes;
69: public static SMTItem smtItemSysHRL;
70: public static SMTItem smtItemSysCont;
71:
72: public static SMTGroup smtCRTItemGroup3;
73: public static SMTItem smtItemCrtGr0X;
74: public static SMTItem smtItemCrtGr0Y;
75: public static SMTItem smtItemCrtGr1X;
76: public static SMTItem smtItemCrtGr1Y;
77: public static SMTItem smtItemCrtGr2X;
78: public static SMTItem smtItemCrtGr2Y;
79: public static SMTItem smtItemCrtGr3X;
80: public static SMTItem smtItemCrtGr3Y;
81:
82: public static SMTGroup smtVcnItemGroup1;
83: public static SMTItem smtItemVcnGrMM;
84: public static SMTItem smtItemVcnSpPr;
85: public static SMTItem smtItemVcnTxPr;
86: public static SMTItem smtItemVcnGrPr;
87: public static SMTItem smtItemVcnG4th;
88: public static SMTItem smtItemVcnG3rd;
89: public static SMTItem smtItemVcnG2nd;
90: public static SMTItem smtItemVcnG1st;
91:
92: public static SMTGroup smtVcnItemGroup2;
93: public static SMTItem smtItemVcnAHOn;
94: public static SMTItem smtItemVcnExOn;
95: public static SMTItem smtItemVcnHalf;
96: public static SMTItem smtItemVcnPLSB;
97: public static SMTItem smtItemVcnGrGr;
98: public static SMTItem smtItemVcnGrST;
99: public static SMTItem smtItemVcnSpOn;
100: public static SMTItem smtItemVcnTxOn;
101: public static SMTItem smtItemVcnGxOn;
102: public static SMTItem smtItemVcnG4On;
103: public static SMTItem smtItemVcnG3On;
104: public static SMTItem smtItemVcnG2On;
105: public static SMTItem smtItemVcnG1On;
106:
107: public static SMTGroup smtSprItemGroup1;
108: public static SMTItem smtItemSprBg0X;
109: public static SMTItem smtItemSprBg0Y;
110: public static SMTItem smtItemSprBg1X;
111: public static SMTItem smtItemSprBg1Y;
112: public static SMTItem smtItemSprDisp;
113: public static SMTItem smtItemSprB1Tx;
114: public static SMTItem smtItemSprB1On;
115: public static SMTItem smtItemSprB0Tx;
116: public static SMTItem smtItemSprB0On;
117:
118: public static SMTGroup smtSprItemGroup2;
119: public static SMTItem smtItemSprHFEd;
120: public static SMTItem smtItemSprHBEd;
121: public static SMTItem smtItemSprVBEd;
122: public static SMTItem smtItemSprHigh;
123: public static SMTItem smtItemSprVRes;
124: public static SMTItem smtItemSprHRes;
125:
126:
127: public static final int SMT_INTERVAL = 10;
128: public static int smtTimer;
129:
130:
131:
132: public static void smtInit () {
133:
134:
135: smtFrame = null;
136:
137:
138: smtFreqLastText = "";
139:
140:
141: smtModeCount = 0;
142:
143:
144: smtPatternTestOn = false;
145: smtPatternTestSpriteOn = false;
146:
147:
148: smtTimer = 0;
149:
150: }
151:
152:
153: public static void smtStart () {
154: if (RestorableFrame.rfmGetOpened (Settings.SGS_SMT_FRAME_KEY)) {
155: smtOpen ();
156: }
157: }
158:
159:
160:
161: public static void smtOpen () {
162: if (smtFrame == null) {
163: smtMakeFrame ();
164: } else {
165: smtUpdateFrame ();
166: }
167: XEiJ.dbgVisibleMask |= XEiJ.DBG_SMT_VISIBLE_MASK;
168: XEiJ.pnlExitFullScreen (false);
169: smtFrame.setVisible (true);
170: }
171:
172:
173:
174:
175: public static void smtMakeFrame () {
176:
177:
178: smtItemArray = new SMTItem[] {
179:
180: smtItemCrtHFEd = new SMTItem_CrtHFEd (),
181: smtItemCrtHSEd = new SMTItem_CrtHSEd (),
182: smtItemCrtHBEd = new SMTItem_CrtHBEd (),
183: smtItemCrtHDEd = new SMTItem_CrtHDEd (),
184: smtItemCrtVFEd = new SMTItem_CrtVFEd (),
185: smtItemCrtVSEd = new SMTItem_CrtVSEd (),
186: smtItemCrtVBEd = new SMTItem_CrtVBEd (),
187: smtItemCrtVDEd = new SMTItem_CrtVDEd (),
188:
189: smtItemCrtIRQ = new SMTItem_CrtIRQ (),
190: smtItemCrtTxX = new SMTItem_CrtTxX (),
191: smtItemCrtTxY = new SMTItem_CrtTxY (),
192: smtItemCrtGrMM = new SMTItem_CrtGrMM (),
193: smtItemCrtHigh = new SMTItem_CrtHigh (),
194: smtItemCrtVRes = new SMTItem_CrtVRes (),
195: smtItemCrtHRes = new SMTItem_CrtHRes (),
196: smtItemSysHRL = new SMTItem_SysHRL (),
197: smtItemSysCont = new SMTItem_SysCont (),
198:
199: smtItemCrtGr0X = new SMTItem_CrtGr0X (),
200: smtItemCrtGr0Y = new SMTItem_CrtGr0Y (),
201: smtItemCrtGr1X = new SMTItem_CrtGr1X (),
202: smtItemCrtGr1Y = new SMTItem_CrtGr1Y (),
203: smtItemCrtGr2X = new SMTItem_CrtGr2X (),
204: smtItemCrtGr2Y = new SMTItem_CrtGr2Y (),
205: smtItemCrtGr3X = new SMTItem_CrtGr3X (),
206: smtItemCrtGr3Y = new SMTItem_CrtGr3Y (),
207:
208: smtItemVcnGrMM = new SMTItem_VcnGrMM (),
209: smtItemVcnSpPr = new SMTItem_VcnSpPr (),
210: smtItemVcnTxPr = new SMTItem_VcnTxPr (),
211: smtItemVcnGrPr = new SMTItem_VcnGrPr (),
212: smtItemVcnG4th = new SMTItem_VcnG4th (),
213: smtItemVcnG3rd = new SMTItem_VcnG3rd (),
214: smtItemVcnG2nd = new SMTItem_VcnG2nd (),
215: smtItemVcnG1st = new SMTItem_VcnG1st (),
216:
217: smtItemVcnAHOn = new SMTItem_VcnAHOn (),
218: smtItemVcnExOn = new SMTItem_VcnExOn (),
219: smtItemVcnHalf = new SMTItem_VcnHalf (),
220: smtItemVcnPLSB = new SMTItem_VcnPLSB (),
221: smtItemVcnGrGr = new SMTItem_VcnGrGr (),
222: smtItemVcnGrST = new SMTItem_VcnGrST (),
223: smtItemVcnSpOn = new SMTItem_VcnSpOn (),
224: smtItemVcnTxOn = new SMTItem_VcnTxOn (),
225: smtItemVcnGxOn = new SMTItem_VcnGxOn (),
226: smtItemVcnG4On = new SMTItem_VcnG4On (),
227: smtItemVcnG3On = new SMTItem_VcnG3On (),
228: smtItemVcnG2On = new SMTItem_VcnG2On (),
229: smtItemVcnG1On = new SMTItem_VcnG1On (),
230:
231: smtItemSprBg0X = new SMTItem_SprBg0X (),
232: smtItemSprBg0Y = new SMTItem_SprBg0Y (),
233: smtItemSprBg1X = new SMTItem_SprBg1X (),
234: smtItemSprBg1Y = new SMTItem_SprBg1Y (),
235: smtItemSprDisp = new SMTItem_SprDisp (),
236: smtItemSprB1Tx = new SMTItem_SprB1Tx (),
237: smtItemSprB1On = new SMTItem_SprB1On (),
238: smtItemSprB0Tx = new SMTItem_SprB0Tx (),
239: smtItemSprB0On = new SMTItem_SprB0On (),
240:
241: smtItemSprHFEd = new SMTItem_SprHFEd (),
242: smtItemSprHBEd = new SMTItem_SprHBEd (),
243: smtItemSprVBEd = new SMTItem_SprVBEd (),
244: smtItemSprHigh = new SMTItem_SprHigh (),
245: smtItemSprVRes = new SMTItem_SprVRes (),
246: smtItemSprHRes = new SMTItem_SprHRes (),
247:
248: };
249:
250:
251: smtCRTItemGroup1 = new SMTGroup (
252: smtItemCrtHFEd,
253: smtItemCrtHSEd,
254: smtItemCrtHBEd,
255: smtItemCrtHDEd,
256: smtItemCrtVFEd,
257: smtItemCrtVSEd,
258: smtItemCrtVBEd,
259: smtItemCrtVDEd
260: );
261: smtCRTItemGroup2 = new SMTGroup (
262: smtItemCrtIRQ,
263: smtItemCrtTxX,
264: smtItemCrtTxY,
265: smtItemCrtGrMM,
266: smtItemCrtHigh,
267: smtItemCrtVRes,
268: smtItemCrtHRes,
269: smtItemSysHRL,
270: smtItemSysCont
271: );
272: smtCRTItemGroup3 = new SMTGroup (
273: smtItemCrtGr0X,
274: smtItemCrtGr0Y,
275: smtItemCrtGr1X,
276: smtItemCrtGr1Y,
277: smtItemCrtGr2X,
278: smtItemCrtGr2Y,
279: smtItemCrtGr3X,
280: smtItemCrtGr3Y
281: );
282: smtVcnItemGroup1 = new SMTGroup (
283: smtItemVcnGrMM,
284: smtItemVcnSpPr,
285: smtItemVcnTxPr,
286: smtItemVcnGrPr,
287: smtItemVcnG4th,
288: smtItemVcnG3rd,
289: smtItemVcnG2nd,
290: smtItemVcnG1st
291: );
292: smtVcnItemGroup2 = new SMTGroup (
293: smtItemVcnAHOn,
294: smtItemVcnExOn,
295: smtItemVcnHalf,
296: smtItemVcnPLSB,
297: smtItemVcnGrGr,
298: smtItemVcnGrST,
299: smtItemVcnSpOn,
300: smtItemVcnTxOn,
301: smtItemVcnGxOn,
302: smtItemVcnG4On,
303: smtItemVcnG3On,
304: smtItemVcnG2On,
305: smtItemVcnG1On
306: );
307: smtSprItemGroup1 = new SMTGroup (
308: smtItemSprBg0X,
309: smtItemSprBg0Y,
310: smtItemSprBg1X,
311: smtItemSprBg1Y,
312: smtItemSprDisp,
313: smtItemSprB1Tx,
314: smtItemSprB1On,
315: smtItemSprB0Tx,
316: smtItemSprB0On
317: );
318: smtSprItemGroup2 = new SMTGroup (
319: smtItemSprHFEd,
320: smtItemSprHBEd,
321: smtItemSprVBEd,
322: smtItemSprHigh,
323: smtItemSprVRes,
324: smtItemSprHRes
325: );
326:
327:
328: smtFrame = Multilingual.mlnTitle (
329: ComponentFactory.createRestorableSubFrame (
330: Settings.SGS_SMT_FRAME_KEY,
331: "Screen Mode Test",
332: null,
333: ComponentFactory.createVerticalBox (
334: Box.createVerticalStrut (SMT_MARGIN),
335:
336: ComponentFactory.createHorizontalBox (
337: Box.createHorizontalStrut (SMT_MARGIN),
338: Multilingual.mlnTitledBorder (
339: ComponentFactory.setTitledLineBorder (
340: ComponentFactory.createVerticalBox (
341: ComponentFactory.createHorizontalBox (
342: smtFreqTextField = ComponentFactory.setEditable (
343: ComponentFactory.setHorizontalAlignment (
344: ComponentFactory.createTextField ("", 30),
345: JTextField.CENTER),
346: false)
347: ),
348: ComponentFactory.createHorizontalBox (
349: smtCRTItemGroup1.smgBox,
350: Box.createHorizontalStrut (SMT_ITEM_GAP_2),
351: smtItemCrtHFEd.smiBox,
352: Box.createHorizontalStrut (SMT_ITEM_GAP),
353: smtItemCrtHSEd.smiBox,
354: Box.createHorizontalStrut (SMT_ITEM_GAP),
355: smtItemCrtHBEd.smiBox,
356: Box.createHorizontalStrut (SMT_ITEM_GAP),
357: smtItemCrtHDEd.smiBox,
358: Box.createHorizontalStrut (SMT_ITEM_GAP),
359: smtItemCrtVFEd.smiBox,
360: Box.createHorizontalStrut (SMT_ITEM_GAP),
361: smtItemCrtVSEd.smiBox,
362: Box.createHorizontalStrut (SMT_ITEM_GAP),
363: smtItemCrtVBEd.smiBox,
364: Box.createHorizontalStrut (SMT_ITEM_GAP),
365: smtItemCrtVDEd.smiBox,
366: Box.createHorizontalGlue ()
367: ),
368: ComponentFactory.createHorizontalBox (
369: smtCRTItemGroup2.smgBox,
370: Box.createHorizontalStrut (SMT_ITEM_GAP_2),
371: smtItemCrtIRQ.smiBox,
372: Box.createHorizontalStrut (SMT_ITEM_GAP),
373: smtItemCrtTxX.smiBox,
374: Box.createHorizontalStrut (SMT_ITEM_GAP),
375: smtItemCrtTxY.smiBox,
376: Box.createHorizontalStrut (SMT_ITEM_GAP_3),
377: smtItemCrtGrMM.smiBox,
378: Box.createHorizontalStrut (SMT_ITEM_GAP),
379: smtItemCrtHigh.smiBox,
380: Box.createHorizontalStrut (SMT_ITEM_GAP),
381: smtItemCrtVRes.smiBox,
382: Box.createHorizontalStrut (SMT_ITEM_GAP),
383: smtItemCrtHRes.smiBox,
384: Box.createHorizontalStrut (SMT_ITEM_GAP),
385: smtItemSysHRL.smiBox,
386: Box.createHorizontalStrut (SMT_ITEM_GAP_3),
387: smtItemSysCont.smiBox,
388: Box.createHorizontalGlue ()
389: ),
390: ComponentFactory.createHorizontalBox (
391: smtCRTItemGroup3.smgBox,
392: Box.createHorizontalStrut (SMT_ITEM_GAP_2),
393: smtItemCrtGr0X.smiBox,
394: Box.createHorizontalStrut (SMT_ITEM_GAP),
395: smtItemCrtGr0Y.smiBox,
396: Box.createHorizontalStrut (SMT_ITEM_GAP),
397: smtItemCrtGr1X.smiBox,
398: Box.createHorizontalStrut (SMT_ITEM_GAP),
399: smtItemCrtGr1Y.smiBox,
400: Box.createHorizontalStrut (SMT_ITEM_GAP),
401: smtItemCrtGr2X.smiBox,
402: Box.createHorizontalStrut (SMT_ITEM_GAP),
403: smtItemCrtGr2Y.smiBox,
404: Box.createHorizontalStrut (SMT_ITEM_GAP),
405: smtItemCrtGr3X.smiBox,
406: Box.createHorizontalStrut (SMT_ITEM_GAP),
407: smtItemCrtGr3Y.smiBox,
408: Box.createHorizontalGlue ()
409: )
410: ),
411: "CRTC / System port"),
412: "ja", "CRTC / システムポート"),
413: Box.createHorizontalStrut (SMT_MARGIN)
414: ),
415:
416: ComponentFactory.createHorizontalBox (
417: Box.createHorizontalStrut (SMT_MARGIN),
418: Multilingual.mlnTitledBorder (
419: ComponentFactory.setTitledLineBorder (
420: ComponentFactory.createVerticalBox (
421: ComponentFactory.createHorizontalBox (
422: smtModeTextField = ComponentFactory.setEditable (
423: ComponentFactory.setHorizontalAlignment (
424: ComponentFactory.createTextField ("", 30),
425: JTextField.CENTER),
426: false)
427: ),
428: ComponentFactory.createHorizontalBox (
429: smtVcnItemGroup1.smgBox,
430: Box.createHorizontalStrut (SMT_ITEM_GAP_2),
431: smtItemVcnGrMM.smiBox,
432: Box.createHorizontalStrut (SMT_ITEM_GAP_3),
433: smtItemVcnSpPr.smiBox,
434: Box.createHorizontalStrut (SMT_ITEM_GAP),
435: smtItemVcnTxPr.smiBox,
436: Box.createHorizontalStrut (SMT_ITEM_GAP),
437: smtItemVcnGrPr.smiBox,
438: Box.createHorizontalStrut (SMT_ITEM_GAP),
439: smtItemVcnG4th.smiBox,
440: Box.createHorizontalStrut (SMT_ITEM_GAP),
441: smtItemVcnG3rd.smiBox,
442: Box.createHorizontalStrut (SMT_ITEM_GAP),
443: smtItemVcnG2nd.smiBox,
444: Box.createHorizontalStrut (SMT_ITEM_GAP),
445: smtItemVcnG1st.smiBox,
446: Box.createHorizontalGlue ()
447: ),
448: ComponentFactory.createHorizontalBox (
449: smtVcnItemGroup2.smgBox,
450: Box.createHorizontalStrut (SMT_ITEM_GAP_2),
451: smtItemVcnAHOn.smiBox,
452: Box.createHorizontalStrut (SMT_ITEM_GAP),
453: smtItemVcnExOn.smiBox,
454: Box.createHorizontalStrut (SMT_ITEM_GAP),
455: smtItemVcnHalf.smiBox,
456: Box.createHorizontalStrut (SMT_ITEM_GAP),
457: smtItemVcnPLSB.smiBox,
458: Box.createHorizontalStrut (SMT_ITEM_GAP),
459: smtItemVcnGrGr.smiBox,
460: Box.createHorizontalStrut (SMT_ITEM_GAP),
461: smtItemVcnGrST.smiBox,
462: Box.createHorizontalStrut (SMT_ITEM_GAP),
463: smtItemVcnSpOn.smiBox,
464: Box.createHorizontalStrut (SMT_ITEM_GAP),
465: smtItemVcnTxOn.smiBox,
466: Box.createHorizontalStrut (SMT_ITEM_GAP),
467: smtItemVcnGxOn.smiBox,
468: Box.createHorizontalStrut (SMT_ITEM_GAP),
469: smtItemVcnG4On.smiBox,
470: Box.createHorizontalStrut (SMT_ITEM_GAP),
471: smtItemVcnG3On.smiBox,
472: Box.createHorizontalStrut (SMT_ITEM_GAP),
473: smtItemVcnG2On.smiBox,
474: Box.createHorizontalStrut (SMT_ITEM_GAP),
475: smtItemVcnG1On.smiBox,
476: Box.createHorizontalGlue ()
477: )
478: ),
479: "Video Controller"),
480: "ja", "ビデオコントローラ"),
481: Box.createHorizontalStrut (SMT_MARGIN)
482: ),
483:
484: ComponentFactory.createHorizontalBox (
485: Box.createHorizontalStrut (SMT_MARGIN),
486: Multilingual.mlnTitledBorder (
487: ComponentFactory.setTitledLineBorder (
488: ComponentFactory.createVerticalBox (
489: ComponentFactory.createHorizontalBox (
490: smtSprItemGroup1.smgBox,
491: Box.createHorizontalStrut (SMT_ITEM_GAP_2),
492: smtItemSprBg0X.smiBox,
493: Box.createHorizontalStrut (SMT_ITEM_GAP),
494: smtItemSprBg0Y.smiBox,
495: Box.createHorizontalStrut (SMT_ITEM_GAP),
496: smtItemSprBg1X.smiBox,
497: Box.createHorizontalStrut (SMT_ITEM_GAP),
498: smtItemSprBg1Y.smiBox,
499: Box.createHorizontalStrut (SMT_ITEM_GAP_3),
500: smtItemSprDisp.smiBox,
501: Box.createHorizontalStrut (SMT_ITEM_GAP),
502: smtItemSprB1Tx.smiBox,
503: Box.createHorizontalStrut (SMT_ITEM_GAP),
504: smtItemSprB1On.smiBox,
505: Box.createHorizontalStrut (SMT_ITEM_GAP),
506: smtItemSprB0Tx.smiBox,
507: Box.createHorizontalStrut (SMT_ITEM_GAP),
508: smtItemSprB0On.smiBox,
509: Box.createHorizontalGlue ()
510: ),
511: ComponentFactory.createHorizontalBox (
512: smtSprItemGroup2.smgBox,
513: Box.createHorizontalStrut (SMT_ITEM_GAP_2),
514: smtItemSprHFEd.smiBox,
515: Box.createHorizontalStrut (SMT_ITEM_GAP),
516: smtItemSprHBEd.smiBox,
517: Box.createHorizontalStrut (SMT_ITEM_GAP),
518: smtItemSprVBEd.smiBox,
519: Box.createHorizontalStrut (SMT_ITEM_GAP_3),
520: smtItemSprHigh.smiBox,
521: Box.createHorizontalStrut (SMT_ITEM_GAP),
522: smtItemSprVRes.smiBox,
523: Box.createHorizontalStrut (SMT_ITEM_GAP),
524: smtItemSprHRes.smiBox,
525: Box.createHorizontalGlue (),
526: !SpriteScreen.SPR_PATTEST_ON ? null :
527: ComponentFactory.createVerticalBox (
528: Box.createVerticalGlue (),
529: ComponentFactory.createHorizontalBox (
530: Multilingual.mlnText (
531: ComponentFactory.createCheckBox (
532: smtPatternTestOn,
533: "Pattern Test",
534: new ActionListener () {
535: @Override public void actionPerformed (ActionEvent ae) {
536: smtSetPatternTestOn (((JCheckBox) ae.getSource ()).isSelected ());
537: }
538: }),
539: "ja", "パターンテスト")
540: ),
541: ComponentFactory.createHorizontalBox (
542: Multilingual.mlnText (
543: ComponentFactory.createCheckBox (
544: smtPatternTestSpriteOn,
545: "Sprite Number",
546: new ActionListener () {
547: @Override public void actionPerformed (ActionEvent ae) {
548: smtSetPatternTestSpriteOn (((JCheckBox) ae.getSource ()).isSelected ());
549: }
550: }),
551: "ja", "スプライト番号")
552: ),
553: Box.createVerticalGlue ()
554: )
555: )
556: ),
557: "Sprite Controller"),
558: "ja", "スプライトコントローラ"),
559: Box.createHorizontalStrut (SMT_MARGIN)
560: ),
561:
562: Box.createVerticalStrut (SMT_MARGIN)
563: )
564: ),
565: "ja", "表示モードテスト");
566:
567:
568: ComponentFactory.addListener (
569: smtFrame,
570: new WindowAdapter () {
571: @Override public void windowClosing (WindowEvent we) {
572: XEiJ.dbgVisibleMask &= ~XEiJ.DBG_SMT_VISIBLE_MASK;
573: }
574: });
575:
576: }
577:
578:
579:
580: public static void smtSetPatternTestOn (boolean on) {
581: if (smtPatternTestOn != on) {
582: smtPatternTestOn = on;
583: if (on) {
584: SpriteScreen.sprPatCurr = SpriteScreen.sprPatTest;
585: SpriteScreen.sprColCurr = SpriteScreen.sprColTest;
586: SpriteScreen.sprTColCurr = SpriteScreen.sprTColTest;
587: VideoController.vcnPal16TS = VideoController.vcnPal16TSTest;
588: } else {
589: SpriteScreen.sprPatCurr = SpriteScreen.sprPatPort;
590: SpriteScreen.sprColCurr = SpriteScreen.sprColPort;
591: SpriteScreen.sprTColCurr = SpriteScreen.sprTColPort;
592: VideoController.vcnPal16TS = VideoController.vcnPal16TSPort;
593: }
594: for (int i = 0; i < 256; i++) {
595: VideoController.vcnPal32TS[i] = VideoController.vcnPalTbl[VideoController.vcnPal16TS[i]];
596: }
597: CRTC.crtAllStamp += 2;
598: if (XEiJ.mpuTask == null) {
599: CRTC.crtRepaint ();
600: }
601: }
602: }
603:
604:
605:
606: public static void smtSetPatternTestSpriteOn (boolean on) {
607: if (smtPatternTestSpriteOn != on) {
608: smtPatternTestSpriteOn = on;
609: if (on) {
610: SpriteScreen.sprNumCurr = SpriteScreen.sprNumTest;
611: } else {
612: SpriteScreen.sprNumCurr = SpriteScreen.sprNumPort;
613: }
614: CRTC.crtAllStamp += 2;
615: if (XEiJ.mpuTask == null) {
616: CRTC.crtRepaint ();
617: }
618: }
619: }
620:
621:
622:
623: public static void smtUpdateFrame () {
624:
625: if (smtFrame == null) {
626: return;
627: }
628:
629:
630: smtUpdateFreq ();
631:
632:
633: smtUpdateMode ();
634:
635:
636: smtItemCrtHFEd.smiSetPortValue (CRTC.crtR00HFrontEndPort);
637: smtItemCrtHSEd.smiSetPortValue (CRTC.crtR01HSyncEndPort);
638: smtItemCrtHBEd.smiSetPortValue (CRTC.crtR02HBackEndPort);
639: smtItemCrtHDEd.smiSetPortValue (CRTC.crtR03HDispEndPort);
640: smtItemCrtVFEd.smiSetPortValue (CRTC.crtR04VFrontEndPort);
641: smtItemCrtVSEd.smiSetPortValue (CRTC.crtR05VSyncEndPort);
642: smtItemCrtVBEd.smiSetPortValue (CRTC.crtR06VBackEndPort);
643: smtItemCrtVDEd.smiSetPortValue (CRTC.crtR07VDispEndPort);
644:
645: smtItemCrtIRQ.smiSetPortValue (CRTC.crtR09IRQRasterPort);
646: smtItemCrtTxX.smiSetPortValue (CRTC.crtR10TxXPort);
647: smtItemCrtTxY.smiSetPortValue (CRTC.crtR11TxYPort);
648: smtItemCrtGrMM.smiSetPortValue (CRTC.crtMemoryModePort);
649: smtItemCrtHigh.smiSetPortValue (CRTC.crtHighResoPort);
650: smtItemCrtVRes.smiSetPortValue (CRTC.crtVResoPort);
651: smtItemCrtHRes.smiSetPortValue (CRTC.crtHResoPort);
652: smtItemSysHRL.smiSetPortValue (CRTC.crtHRLPort);
653: smtItemSysCont.smiSetPortValue (VideoController.vcnTargetContrastPort);
654:
655: smtItemCrtGr0X.smiSetPortValue (CRTC.crtR12GrXPort[0]);
656: smtItemCrtGr0Y.smiSetPortValue (CRTC.crtR13GrYPort[0]);
657: smtItemCrtGr1X.smiSetPortValue (CRTC.crtR12GrXPort[1]);
658: smtItemCrtGr1Y.smiSetPortValue (CRTC.crtR13GrYPort[1]);
659: smtItemCrtGr2X.smiSetPortValue (CRTC.crtR12GrXPort[2]);
660: smtItemCrtGr2Y.smiSetPortValue (CRTC.crtR13GrYPort[2]);
661: smtItemCrtGr3X.smiSetPortValue (CRTC.crtR12GrXPort[3]);
662: smtItemCrtGr3Y.smiSetPortValue (CRTC.crtR13GrYPort[3]);
663:
664: smtItemVcnGrMM.smiSetPortValue (VideoController.vcnReg1Port );
665: smtItemVcnSpPr.smiSetPortValue (VideoController.vcnReg2Port >> 12);
666: smtItemVcnTxPr.smiSetPortValue (VideoController.vcnReg2Port >> 10);
667: smtItemVcnGrPr.smiSetPortValue (VideoController.vcnReg2Port >> 8);
668: smtItemVcnG4th.smiSetPortValue (VideoController.vcnReg2Port >> 6);
669: smtItemVcnG3rd.smiSetPortValue (VideoController.vcnReg2Port >> 4);
670: smtItemVcnG2nd.smiSetPortValue (VideoController.vcnReg2Port >> 2);
671: smtItemVcnG1st.smiSetPortValue (VideoController.vcnReg2Port );
672:
673: smtItemVcnAHOn.smiSetPortValue (VideoController.vcnReg3Port >> 14);
674: smtItemVcnExOn.smiSetPortValue (VideoController.vcnReg3Port >> 12);
675: smtItemVcnHalf.smiSetPortValue (VideoController.vcnReg3Port >> 11);
676: smtItemVcnPLSB.smiSetPortValue (VideoController.vcnReg3Port >> 10);
677: smtItemVcnGrGr.smiSetPortValue (VideoController.vcnReg3Port >> 9);
678: smtItemVcnGrST.smiSetPortValue (VideoController.vcnReg3Port >> 8);
679: smtItemVcnSpOn.smiSetPortValue (VideoController.vcnReg3Port >> 6);
680: smtItemVcnTxOn.smiSetPortValue (VideoController.vcnReg3Port >> 5);
681: smtItemVcnGxOn.smiSetPortValue (VideoController.vcnReg3Port >> 4);
682: smtItemVcnG4On.smiSetPortValue (VideoController.vcnReg3Port >> 3);
683: smtItemVcnG3On.smiSetPortValue (VideoController.vcnReg3Port >> 2);
684: smtItemVcnG2On.smiSetPortValue (VideoController.vcnReg3Port >> 1);
685: smtItemVcnG1On.smiSetPortValue (VideoController.vcnReg3Port );
686:
687: smtItemSprBg0X.smiSetPortValue (SpriteScreen.sprReg0Bg0XPort);
688: smtItemSprBg0Y.smiSetPortValue (SpriteScreen.sprReg1Bg0YPort);
689: smtItemSprBg1X.smiSetPortValue (SpriteScreen.sprReg2Bg1XPort);
690: smtItemSprBg1Y.smiSetPortValue (SpriteScreen.sprReg3Bg1YPort);
691: smtItemSprDisp.smiSetPortValue (SpriteScreen.sprReg4BgCtrlPort >> 9);
692: smtItemSprB1Tx.smiSetPortValue (SpriteScreen.sprReg4BgCtrlPort >> 4);
693: smtItemSprB1On.smiSetPortValue (SpriteScreen.sprReg4BgCtrlPort >> 3);
694: smtItemSprB0Tx.smiSetPortValue (SpriteScreen.sprReg4BgCtrlPort >> 1);
695: smtItemSprB0On.smiSetPortValue (SpriteScreen.sprReg4BgCtrlPort );
696:
697: smtItemSprHFEd.smiSetPortValue (SpriteScreen.sprReg5HFrontEndPort);
698: smtItemSprHBEd.smiSetPortValue (SpriteScreen.sprReg6HBackEndPort);
699: smtItemSprVBEd.smiSetPortValue (SpriteScreen.sprReg7VBackEndPort);
700: smtItemSprHigh.smiSetPortValue (SpriteScreen.sprReg8ResoPort >> 4);
701: smtItemSprVRes.smiSetPortValue (SpriteScreen.sprReg8ResoPort >> 2);
702: smtItemSprHRes.smiSetPortValue (SpriteScreen.sprReg8ResoPort );
703:
704: for (SMTItem item : smtItemArray) {
705: if (item.smiPending) {
706: item.smiPending = false;
707: item.smiControlled ();
708: }
709: }
710:
711: }
712:
713:
714:
715: public static void smtUpdateFreq () {
716: int htotal = CRTC.crtR00HFrontEndCurr + 1;
717: int vtotal = CRTC.crtR04VFrontEndCurr + 1;
718: if (0 < htotal && 0 < vtotal) {
719: int k = CRTC.crtHRLCurr << 3 | CRTC.crtHighResoCurr << 2 | CRTC.crtHResoCurr;
720: double osc = (double) CRTC.crtFreqs[CRTC.CRT_OSCS[k]] * CRTC.crtVsyncMultiplier;
721: int ratio = CRTC.CRT_DIVS[k];
722: double hfreq = osc / (ratio * htotal << 3);
723: double vfreq = hfreq / vtotal;
724: int width = CRTC.crtR03HDispEndCurr - CRTC.crtR02HBackEndCurr << 3;
725: int height = CRTC.crtR07VDispEndCurr - CRTC.crtR06VBackEndCurr;
726: String option = "(normal)";
727: if (CRTC.crtDuplication) {
728: height >>= 1;
729: option = "(double-scanning)";
730: } else if (CRTC.crtInterlace) {
731: height <<= 1;
732: option = "(interlace)";
733: } else if (CRTC.crtSlit) {
734: option = "(slit)";
735: } else if (CRTC.crtDupExceptSp) {
736: height >>= 1;
737: option = "(double-except-sp)";
738: }
739: String freqText = String.format ("%dx%d%s, HSYNC:%.3fMHz/%d/8/%d=%.3fkHz, VSYNC:%.3fkHz/%d=%.3fHz",
740: width, height,
741: option,
742: osc * 1e-6, ratio, htotal, hfreq * 1e-3,
743: hfreq * 1e-3, vtotal, vfreq);
744: if (!freqText.equals (smtFreqLastText)) {
745: smtFreqLastText = freqText;
746: smtFreqTextField.setText (freqText);
747: }
748: }
749: }
750:
751:
752:
753:
754: public static void smtUpdateMode () {
755: String name1 = VideoController.vcnMode.name ();
756: String name2 = VideoController.vcnGetName (new StringBuilder ()).toString ();
757: String name = name1.equals (name2) ? name1 : new StringBuilder (name1).append ('(').append (name2).append (')').toString ();
758: long time = XEiJ.mpuClockTime;
759: boolean update = false;
760:
761:
762:
763: boolean f = false;
764: {
765: long t = time - XEiJ.TMR_FREQ * SMT_MODE_SPAN;
766: int k = 0;
767: for (int i = 0; i < smtModeCount; i++) {
768: if (name.compareTo (smtModeName[i]) == 0) {
769: f = true;
770:
771: smtModeName[k] = name;
772: smtModeTime[k] = time;
773: k++;
774: } else if (t < smtModeTime[i]) {
775:
776: smtModeName[k] = smtModeName[i];
777: smtModeTime[k] = smtModeTime[i];
778: k++;
779: }
780: }
781: if (k < smtModeCount) {
782: smtModeCount = k;
783: update = true;
784: }
785: }
786: if (!f) {
787:
788: if (smtModeCount == SMT_MODE_LIMIT) {
789:
790: int o = -1;
791: long t = Long.MAX_VALUE;
792: for (int i = 0; i < smtModeCount; i++) {
793: if (smtModeTime[i] < t) {
794: t = smtModeTime[i];
795: o = i;
796: }
797: }
798:
799: for (int i = o + 1; i < SMT_MODE_LIMIT; i++) {
800: smtModeName[i - 1] = smtModeName[i];
801: smtModeTime[i - 1] = smtModeTime[i];
802: }
803: smtModeCount--;
804: }
805:
806: {
807: int p = -1;
808: for (int i = 0; i < smtModeCount; i++) {
809: if (name.compareTo (smtModeName[i]) < 0) {
810: p = i;
811: break;
812: }
813: }
814: if (p < 0) {
815: p = smtModeCount;
816: }
817: for (int i = smtModeCount - 1; p <= i; i--) {
818: smtModeName[i + 1] = smtModeName[i];
819: smtModeTime[i + 1] = smtModeTime[i];
820: }
821: smtModeName[p] = name;
822: smtModeTime[p] = time;
823: smtModeCount++;
824: }
825: update = true;
826: }
827:
828: if (update) {
829: StringBuilder sb = new StringBuilder ();
830: for (int i = 0; i < smtModeCount; i++) {
831: if (0 < i) {
832: sb.append (", ");
833: }
834: sb.append (smtModeName[i]);
835: }
836: smtModeTextField.setText (sb.toString ());
837: }
838: }
839:
840:
841:
842:
843:
844: public static class SMTItem {
845:
846: public int smiBitWidth;
847: public int smiBitMask;
848: public int smiDigits;
849:
850: public int smiPortValue;
851: public int smiMaskValue;
852: public int smiTestValue;
853:
854: public boolean smiPending;
855:
856: public ButtonGroup smiButtonGroup;
857:
858: public Box smiBox;
859: public JLabel smiNameLabel;
860:
861: public JRadioButton smiPortRadioButton;
862: public JCheckBox smiPortCheckBox;
863: public JTextField smiPortTextField;
864:
865: public JRadioButton smiTestRadioButton;
866: public JCheckBox smiTestCheckBox;
867: public DecimalSpinner smiTestSpinner;
868:
869: public SMTGroup smiItemGroup;
870:
871:
872: public SMTItem (String name, int portValue, int bitWidth) {
873:
874: smiBitWidth = bitWidth;
875: smiBitMask = (1 << bitWidth) - 1;
876: smiDigits = (bitWidth * 77 >> 8) + 1;
877:
878: portValue &= smiBitMask;
879: smiPortValue = portValue;
880: smiMaskValue = 0;
881: smiTestValue = portValue;
882:
883: smiPending = false;
884:
885: smiButtonGroup = new ButtonGroup ();
886:
887: smiBox = ComponentFactory.setFixedSize (
888: ComponentFactory.createVerticalBox (
889: Box.createVerticalGlue (),
890: ComponentFactory.createHorizontalBox (
891: Box.createHorizontalGlue (),
892: smiNameLabel = ComponentFactory.setFixedSize (
893: ComponentFactory.createLabel (name),
894: bitWidth == 1 ? LnF.lnfFontSize * 3 : 14 + 24 + (LnF.lnfFontSize * 2 / 3) * Math.max (2, smiDigits), LnF.lnfFontSize + 4),
895: Box.createHorizontalGlue ()
896: ),
897: ComponentFactory.createHorizontalBox (
898: Box.createHorizontalGlue (),
899: smiPortRadioButton = ComponentFactory.setFixedSize (ComponentFactory.createRadioButton (smiButtonGroup, smiMaskValue == 0, "", new ActionListener () {
900: @Override public void actionPerformed (ActionEvent ae) {
901: smiPortSelected ();
902: }
903: }), 14, LnF.lnfFontSize + 4),
904: bitWidth == 1 ?
905: (smiPortCheckBox = ComponentFactory.setEnabled (
906: ComponentFactory.setFixedSize (
907: ComponentFactory.createCheckBox (smiPortValue != 0, "", null),
908: 14, LnF.lnfFontSize + 4),
909: false)) :
910: (smiPortTextField = ComponentFactory.setFixedSize (
911: ComponentFactory.setEditable (
912: ComponentFactory.setHorizontalAlignment (
913: new JTextField (String.valueOf (smiPortValue)),
914: JTextField.CENTER),
915: false),
916: 24 + (LnF.lnfFontSize * 2 / 3) * smiDigits, LnF.lnfFontSize + 4)),
917: Box.createHorizontalGlue ()
918: ),
919: ComponentFactory.createHorizontalBox (
920: Box.createHorizontalGlue (),
921: smiTestRadioButton = ComponentFactory.setFixedSize (ComponentFactory.createRadioButton (smiButtonGroup, smiMaskValue != 0, "", new ActionListener () {
922: @Override public void actionPerformed (ActionEvent ae) {
923: smiTestSelected ();
924: }
925: }), 14, LnF.lnfFontSize + 4),
926: bitWidth == 1 ?
927: (smiTestCheckBox = ComponentFactory.setFixedSize (ComponentFactory.createCheckBox (smiTestValue != 0, "", new ActionListener () {
928: @Override public void actionPerformed (ActionEvent ae) {
929: smiTestChanged ();
930: }
931: }), 14, LnF.lnfFontSize + 4)) :
932: (smiTestSpinner = ComponentFactory.createDecimalSpinner (smiTestValue, 0, smiBitMask, 1, 0, new ChangeListener () {
933: @Override public void stateChanged (ChangeEvent ce) {
934: smiTestChanged ();
935: }
936: })),
937: Box.createHorizontalGlue ()
938: ),
939: Box.createVerticalGlue ()
940: ),
941: bitWidth == 1 ? LnF.lnfFontSize * 3 : 14 + 24 + (LnF.lnfFontSize * 2 / 3) * Math.max (2, smiDigits), LnF.lnfFontSize * 3 + 12);
942:
943: smiItemGroup = null;
944:
945: }
946:
947:
948:
949:
950: public void smiSetPortValue (int portValue) {
951: portValue &= smiBitMask;
952: if (smiPortValue != portValue) {
953: smiPortValue = portValue;
954: if (smiBitWidth == 1) {
955: smiPortCheckBox.setSelected (portValue != 0);
956: } else {
957: smiPortTextField.setText (String.valueOf (portValue));
958: }
959: }
960: }
961:
962:
963:
964: public void smiPortSelected () {
965: if (smiMaskValue != 0) {
966: smiMaskValue = 0;
967: if (XEiJ.mpuTask == null) {
968:
969: smiControlled ();
970: } else {
971:
972: smiPending = true;
973: }
974: if (smiItemGroup != null) {
975: smiItemGroup.smgUpdate ();
976: }
977: }
978: }
979:
980:
981:
982: public void smiTestSelected () {
983: if (smiMaskValue == 0) {
984: smiMaskValue = -1;
985: if (XEiJ.mpuTask == null) {
986:
987: smiControlled ();
988: } else {
989:
990: smiPending = true;
991: }
992: if (smiItemGroup != null) {
993: smiItemGroup.smgUpdate ();
994: }
995: }
996: }
997:
998:
999:
1000: public void smiTestChanged () {
1001: int testValue = (smiBitWidth == 1 ? smiTestCheckBox.isSelected () ? 1 : 0 :
1002: smiTestSpinner.getIntValue ());
1003: if (smiTestValue != testValue) {
1004: smiTestValue = testValue;
1005: if (XEiJ.mpuTask == null) {
1006:
1007: smiControlled ();
1008: } else {
1009:
1010: smiPending = true;
1011: }
1012: }
1013: }
1014:
1015:
1016:
1017: public void smiControlled () {
1018:
1019: }
1020:
1021: }
1022:
1023:
1024:
1025:
1026:
1027: public static class SMTItem_CrtHFEd extends SMTItem {
1028: public SMTItem_CrtHFEd () {
1029: super ("HFEd", CRTC.crtR00HFrontEndPort, 8);
1030: Multilingual.mlnToolTipText (smiNameLabel,
1031: "en", "$E80000.w 7-0 Horizontal front porch end column",
1032: "ja", "$E80000.w 7-0 水平フロントポーチ終了カラム");
1033: }
1034: @Override public void smiControlled () {
1035: CRTC.crtR00HFrontEndMask = smiMaskValue;
1036: CRTC.crtR00HFrontEndTest = smiTestValue;
1037: int curr = CRTC.crtR00HFrontEndMask == 0 ? CRTC.crtR00HFrontEndPort : CRTC.crtR00HFrontEndTest;
1038: if (CRTC.crtR00HFrontEndCurr != curr) {
1039: CRTC.crtR00HFrontEndCurr = curr;
1040: if (XEiJ.mpuTask != null) {
1041: CRTC.crtRestart ();
1042: }
1043: }
1044: }
1045: }
1046:
1047: public static class SMTItem_CrtHSEd extends SMTItem {
1048: public SMTItem_CrtHSEd () {
1049: super ("HSEd", CRTC.crtR01HSyncEndPort, 8);
1050: Multilingual.mlnToolTipText (smiNameLabel,
1051: "en", "$E80002.w 7-0 Horizontal sync pulse end column",
1052: "ja", "$E80002.w 7-0 水平同期パルス終了カラム");
1053: }
1054: @Override public void smiControlled () {
1055: CRTC.crtR01HSyncEndMask = smiMaskValue;
1056: CRTC.crtR01HSyncEndTest = smiTestValue;
1057: int curr = CRTC.crtR01HSyncEndMask == 0 ? CRTC.crtR01HSyncEndPort : CRTC.crtR01HSyncEndTest;
1058: if (CRTC.crtR01HSyncEndCurr != curr) {
1059: CRTC.crtR01HSyncEndCurr = curr;
1060: if (XEiJ.mpuTask != null) {
1061: CRTC.crtRestart ();
1062: }
1063: }
1064: }
1065: }
1066:
1067: public static class SMTItem_CrtHBEd extends SMTItem {
1068: public SMTItem_CrtHBEd () {
1069: super ("HBEd", CRTC.crtR02HBackEndPort, 8);
1070: Multilingual.mlnToolTipText (smiNameLabel,
1071: "en", "$E80004.w 7-0 Horizontal back porch end column -4",
1072: "ja", "$E80004.w 7-0 水平バックポーチ終了カラム -4");
1073: }
1074: @Override public void smiControlled () {
1075: CRTC.crtR02HBackEndMask = smiMaskValue;
1076: CRTC.crtR02HBackEndTest = smiTestValue;
1077: int curr = CRTC.crtR02HBackEndMask == 0 ? CRTC.crtR02HBackEndPort : CRTC.crtR02HBackEndTest;
1078: if (CRTC.crtR02HBackEndCurr != curr) {
1079: CRTC.crtR02HBackEndCurr = curr;
1080: if (XEiJ.mpuTask != null) {
1081: CRTC.crtRestart ();
1082: }
1083: }
1084: }
1085: }
1086:
1087: public static class SMTItem_CrtHDEd extends SMTItem {
1088: public SMTItem_CrtHDEd () {
1089: super ("HDEd", CRTC.crtR03HDispEndPort, 8);
1090: Multilingual.mlnToolTipText (smiNameLabel,
1091: "en", "$E80006.w 7-0 Horizontal display period end column -4",
1092: "ja", "$E80006.w 7-0 水平映像期間終了カラム -4");
1093: }
1094: @Override public void smiControlled () {
1095: CRTC.crtR03HDispEndMask = smiMaskValue;
1096: CRTC.crtR03HDispEndTest = smiTestValue;
1097: int curr = CRTC.crtR03HDispEndMask == 0 ? CRTC.crtR03HDispEndPort : CRTC.crtR03HDispEndTest;
1098: if (CRTC.crtR03HDispEndCurr != curr) {
1099: CRTC.crtR03HDispEndCurr = curr;
1100: if (XEiJ.mpuTask != null) {
1101: CRTC.crtRestart ();
1102: }
1103: }
1104: }
1105: }
1106:
1107: public static class SMTItem_CrtVFEd extends SMTItem {
1108: public SMTItem_CrtVFEd () {
1109: super ("VFEd", CRTC.crtR04VFrontEndPort, 10);
1110: Multilingual.mlnToolTipText (smiNameLabel,
1111: "en", "$E80008.w 9-0 Vertical front porch end raster",
1112: "ja", "$E80008.w 9-0 垂直フロントポーチ終了ラスタ");
1113: }
1114: @Override public void smiControlled () {
1115: CRTC.crtR04VFrontEndMask = smiMaskValue;
1116: CRTC.crtR04VFrontEndTest = smiTestValue;
1117: int curr = CRTC.crtR04VFrontEndMask == 0 ? CRTC.crtR04VFrontEndPort : CRTC.crtR04VFrontEndTest;
1118: if (CRTC.crtR04VFrontEndCurr != curr) {
1119: CRTC.crtR04VFrontEndCurr = curr;
1120: if (CRTC.CRT_RASTER_HASH_ON) {
1121: CRTC.crtUpdateRasterHash ();
1122: }
1123: if (XEiJ.mpuTask != null) {
1124: CRTC.crtRestart ();
1125: }
1126: }
1127: }
1128: }
1129:
1130: public static class SMTItem_CrtVSEd extends SMTItem {
1131: public SMTItem_CrtVSEd () {
1132: super ("VSEd", CRTC.crtR05VSyncEndPort, 10);
1133: Multilingual.mlnToolTipText (smiNameLabel,
1134: "en", "$E8000A.w 9-0 Vertical sync pulse end raster",
1135: "ja", "$E8000A.w 9-0 垂直同期パルス終了ラスタ");
1136: }
1137: @Override public void smiControlled () {
1138: CRTC.crtR05VSyncEndMask = smiMaskValue;
1139: CRTC.crtR05VSyncEndTest = smiTestValue;
1140: int curr = CRTC.crtR05VSyncEndMask == 0 ? CRTC.crtR05VSyncEndPort : CRTC.crtR05VSyncEndTest;
1141: if (CRTC.crtR05VSyncEndCurr != curr) {
1142: CRTC.crtR05VSyncEndCurr = curr;
1143: if (XEiJ.mpuTask != null) {
1144: CRTC.crtRestart ();
1145: }
1146: }
1147: }
1148: }
1149:
1150: public static class SMTItem_CrtVBEd extends SMTItem {
1151: public SMTItem_CrtVBEd () {
1152: super ("VBEd", CRTC.crtR06VBackEndPort, 10);
1153: Multilingual.mlnToolTipText (smiNameLabel,
1154: "en", "$E8000C.w 9-0 Vertical back porch end raster",
1155: "ja", "$E8000C.w 9-0 垂直バックポーチ終了ラスタ");
1156: }
1157: @Override public void smiControlled () {
1158: CRTC.crtR06VBackEndMask = smiMaskValue;
1159: CRTC.crtR06VBackEndTest = smiTestValue;
1160: int curr = CRTC.crtR06VBackEndMask == 0 ? CRTC.crtR06VBackEndPort : CRTC.crtR06VBackEndTest;
1161: if (CRTC.crtR06VBackEndCurr != curr) {
1162: CRTC.crtR06VBackEndCurr = curr;
1163: if (XEiJ.mpuTask != null) {
1164: CRTC.crtRestart ();
1165: }
1166: }
1167: }
1168: }
1169:
1170: public static class SMTItem_CrtVDEd extends SMTItem {
1171: public SMTItem_CrtVDEd () {
1172: super ("VDEd", CRTC.crtR07VDispEndPort, 10);
1173: Multilingual.mlnToolTipText (smiNameLabel,
1174: "en", "$E8000E.w 9-0 Vertical display period end raster",
1175: "ja", "$E8000E.w 9-0 垂直映像期間終了ラスタ");
1176: }
1177: @Override public void smiControlled () {
1178: CRTC.crtR07VDispEndMask = smiMaskValue;
1179: CRTC.crtR07VDispEndTest = smiTestValue;
1180: int curr = CRTC.crtR07VDispEndMask == 0 ? CRTC.crtR07VDispEndPort : CRTC.crtR07VDispEndTest;
1181: if (CRTC.crtR07VDispEndCurr != curr) {
1182: CRTC.crtR07VDispEndCurr = curr;
1183: if (XEiJ.mpuTask != null) {
1184: CRTC.crtRestart ();
1185: }
1186: }
1187: }
1188: }
1189:
1190: public static class SMTItem_CrtGrMM extends SMTItem {
1191: public SMTItem_CrtGrMM () {
1192: super ("GrMM", CRTC.crtMemoryModePort, 3);
1193: Multilingual.mlnToolTipText (smiNameLabel,
1194: "en", "$E80028.w 10-8 Memory mode of graphic screen",
1195: "ja", "$E80028.w 10-8 グラフィック画面のメモリモード");
1196: }
1197: @Override public void smiControlled () {
1198: CRTC.crtMemoryModeMask = smiMaskValue;
1199: CRTC.crtMemoryModeTest = smiTestValue;
1200: CRTC.crtSetMemoryMode (CRTC.crtTextStorage, CRTC.crtGraphicStorage, CRTC.crtMemoryModePort);
1201: }
1202: }
1203:
1204: public static class SMTItem_CrtHigh extends SMTItem {
1205: public SMTItem_CrtHigh () {
1206: super ("High", CRTC.crtHighResoPort, 1);
1207: Multilingual.mlnToolTipText (smiNameLabel,
1208: "en", "$E80028.w 4 High-resolution",
1209: "ja", "$E80028.w 4 高解像度");
1210: }
1211: @Override public void smiControlled () {
1212: CRTC.crtHighResoMask = smiMaskValue;
1213: CRTC.crtHighResoTest = smiTestValue;
1214: int curr = CRTC.crtHighResoMask == 0 ? CRTC.crtHighResoPort : CRTC.crtHighResoTest;
1215: if (CRTC.crtHighResoCurr != curr) {
1216: CRTC.crtHighResoCurr = curr;
1217: if (XEiJ.mpuTask != null) {
1218: CRTC.crtRestart ();
1219: }
1220: }
1221: }
1222: }
1223:
1224: public static class SMTItem_CrtVRes extends SMTItem {
1225: public SMTItem_CrtVRes () {
1226: super ("VRes", CRTC.crtVResoPort, 2);
1227: Multilingual.mlnToolTipText (smiNameLabel,
1228: "en", "$E80028.w 3-2 Vertical resolution",
1229: "ja", "$E80028.w 3-2 垂直解像度");
1230: }
1231: @Override public void smiControlled () {
1232: CRTC.crtVResoMask = smiMaskValue;
1233: CRTC.crtVResoTest = smiTestValue;
1234: int curr = CRTC.crtVResoMask == 0 ? CRTC.crtVResoPort : CRTC.crtVResoTest;
1235: if (CRTC.crtVResoCurr != curr) {
1236: CRTC.crtVResoCurr = curr;
1237: if (XEiJ.mpuTask != null) {
1238: CRTC.crtRestart ();
1239: }
1240: }
1241: }
1242: }
1243:
1244: public static class SMTItem_CrtHRes extends SMTItem {
1245: public SMTItem_CrtHRes () {
1246: super ("HRes", CRTC.crtHResoPort, 2);
1247: Multilingual.mlnToolTipText (smiNameLabel,
1248: "en", "$E80028.w 1-0 Horizontal resolution",
1249: "ja", "$E80028.w 1-0 水平解像度");
1250: }
1251: @Override public void smiControlled () {
1252: CRTC.crtHResoMask = smiMaskValue;
1253: CRTC.crtHResoTest = smiTestValue;
1254: int curr = CRTC.crtHResoMask == 0 ? CRTC.crtHResoPort : CRTC.crtHResoTest;
1255: if (CRTC.crtHResoCurr != curr) {
1256: CRTC.crtHResoCurr = curr;
1257: if (XEiJ.mpuTask != null) {
1258: CRTC.crtRestart ();
1259: }
1260: }
1261: }
1262: }
1263:
1264: public static class SMTItem_CrtIRQ extends SMTItem {
1265: public SMTItem_CrtIRQ () {
1266: super ("IRQ", CRTC.crtR09IRQRasterPort, 10);
1267: Multilingual.mlnToolTipText (smiNameLabel,
1268: "en", "$E80012.w 9-0 IRQ raster number",
1269: "ja", "$E80012.w 9-0 IRQ ラスタ番号");
1270: }
1271: @Override public void smiControlled () {
1272: CRTC.crtR09IRQRasterMask = smiMaskValue;
1273: CRTC.crtR09IRQRasterTest = smiTestValue;
1274: int curr = CRTC.crtR09IRQRasterMask == 0 ? CRTC.crtR09IRQRasterPort : CRTC.crtR09IRQRasterTest;
1275: if (CRTC.crtR09IRQRasterCurr != curr) {
1276: CRTC.crtR09IRQRasterCurr = curr;
1277: if (CRTC.CRT_RASTER_HASH_ON) {
1278: CRTC.crtUpdateRasterHash ();
1279: }
1280: if (RasterBreakPoint.RBP_ON) {
1281: RasterBreakPoint.rbpCheckIRQ ();
1282: }
1283: }
1284: }
1285: }
1286:
1287: public static class SMTItem_CrtTxX extends SMTItem {
1288: public SMTItem_CrtTxX () {
1289: super ("TxX", CRTC.crtR10TxXPort, 10);
1290: Multilingual.mlnToolTipText (smiNameLabel,
1291: "en", "$E80014.w 9-0 Text screen x-direction scroll",
1292: "ja", "$E80014.w 9-0 テキスト画面 x 方向スクロール");
1293: }
1294: @Override public void smiControlled () {
1295: CRTC.crtR10TxXMask = smiMaskValue;
1296: CRTC.crtR10TxXTest = smiTestValue;
1297: int curr = CRTC.crtR10TxXMask == 0 ? CRTC.crtR10TxXPort : CRTC.crtR10TxXTest;
1298: if (CRTC.crtR10TxXCurr != curr) {
1299: CRTC.crtR10TxXCurr = curr;
1300: CRTC.crtAllStamp += 2;
1301: if (XEiJ.mpuTask == null) {
1302: CRTC.crtRepaint ();
1303: }
1304: }
1305: }
1306: }
1307:
1308: public static class SMTItem_CrtTxY extends SMTItem {
1309: public SMTItem_CrtTxY () {
1310: super ("TxY", CRTC.crtR11TxYPort, 10);
1311: Multilingual.mlnToolTipText (smiNameLabel,
1312: "en", "$E80016.w 9-0 Text screen y-direction scroll",
1313: "ja", "$E80016.w 9-0 テキスト画面 y 方向スクロール");
1314: }
1315: @Override public void smiControlled () {
1316: CRTC.crtR11TxYMask = smiMaskValue;
1317: CRTC.crtR11TxYTest = smiTestValue;
1318: int curr = CRTC.crtR11TxYMask == 0 ? CRTC.crtR11TxYPort : CRTC.crtR11TxYTest;
1319: if (CRTC.crtR11TxYCurr != curr) {
1320: CRTC.crtR11TxYCurr = curr;
1321: CRTC.crtAllStamp += 2;
1322: if (XEiJ.mpuTask == null) {
1323: CRTC.crtRepaint ();
1324: }
1325: }
1326: }
1327: }
1328:
1329: public static class SMTItem_CrtGr0X extends SMTItem {
1330: public SMTItem_CrtGr0X () {
1331: super ("Gr0X", CRTC.crtR12GrXPort[0], 10);
1332: Multilingual.mlnToolTipText (smiNameLabel,
1333: "en", "$E80018.w 9-0 graphic plane 0 x-direction scroll",
1334: "ja", "$E80018.w 9-0 グラフィックプレーン 0 x 方向スクロール");
1335: }
1336: @Override public void smiControlled () {
1337: CRTC.crtR12GrXMask[0] = smiMaskValue;
1338: CRTC.crtR12GrXTest[0] = smiTestValue;
1339: int curr = CRTC.crtR12GrXMask[0] == 0 ? CRTC.crtR12GrXPort[0] : CRTC.crtR12GrXTest[0];
1340: if (CRTC.crtR12GrXCurr[0] != curr) {
1341: CRTC.crtR12GrXCurr[0] = curr;
1342: CRTC.crtAllStamp += 2;
1343: if (XEiJ.mpuTask == null) {
1344: CRTC.crtRepaint ();
1345: }
1346: }
1347: }
1348: }
1349:
1350: public static class SMTItem_CrtGr0Y extends SMTItem {
1351: public SMTItem_CrtGr0Y () {
1352: super ("Gr0Y", CRTC.crtR13GrYPort[0], 10);
1353: Multilingual.mlnToolTipText (smiNameLabel,
1354: "en", "$E8001A.w 9-0 graphic plane 0 y-direction scroll",
1355: "ja", "$E8001A.w 9-0 グラフィックプレーン 0 y 方向スクロール");
1356: }
1357: @Override public void smiControlled () {
1358: CRTC.crtR13GrYMask[0] = smiMaskValue;
1359: CRTC.crtR13GrYTest[0] = smiTestValue;
1360: int curr = CRTC.crtR13GrYMask[0] == 0 ? CRTC.crtR13GrYPort[0] : CRTC.crtR13GrYTest[0];
1361: if (CRTC.crtR13GrYCurr[0] != curr) {
1362: CRTC.crtR13GrYCurr[0] = curr;
1363: CRTC.crtAllStamp += 2;
1364: if (XEiJ.mpuTask == null) {
1365: CRTC.crtRepaint ();
1366: }
1367: }
1368: }
1369: }
1370:
1371: public static class SMTItem_CrtGr1X extends SMTItem {
1372: public SMTItem_CrtGr1X () {
1373: super ("Gr1X", CRTC.crtR12GrXPort[1], 9);
1374: Multilingual.mlnToolTipText (smiNameLabel,
1375: "en", "$E8001C.w 8-0 graphic plane 0 x-direction scroll",
1376: "ja", "$E8001C.w 8-0 グラフィックプレーン 0 x 方向スクロール");
1377: }
1378: @Override public void smiControlled () {
1379: CRTC.crtR12GrXMask[1] = smiMaskValue;
1380: CRTC.crtR12GrXTest[1] = smiTestValue;
1381: int curr = CRTC.crtR12GrXMask[1] == 0 ? CRTC.crtR12GrXPort[1] : CRTC.crtR12GrXTest[1];
1382: if (CRTC.crtR12GrXCurr[1] != curr) {
1383: CRTC.crtR12GrXCurr[1] = curr;
1384: CRTC.crtAllStamp += 2;
1385: if (XEiJ.mpuTask == null) {
1386: CRTC.crtRepaint ();
1387: }
1388: }
1389: }
1390: }
1391:
1392: public static class SMTItem_CrtGr1Y extends SMTItem {
1393: public SMTItem_CrtGr1Y () {
1394: super ("Gr1Y", CRTC.crtR13GrYPort[1], 9);
1395: Multilingual.mlnToolTipText (smiNameLabel,
1396: "en", "$E8001E.w 8-0 graphic plane 0 y-direction scroll",
1397: "ja", "$E8001E.w 8-0 グラフィックプレーン 0 y 方向スクロール");
1398: }
1399: @Override public void smiControlled () {
1400: CRTC.crtR13GrYMask[1] = smiMaskValue;
1401: CRTC.crtR13GrYTest[1] = smiTestValue;
1402: int curr = CRTC.crtR13GrYMask[1] == 0 ? CRTC.crtR13GrYPort[1] : CRTC.crtR13GrYTest[1];
1403: if (CRTC.crtR13GrYCurr[1] != curr) {
1404: CRTC.crtR13GrYCurr[1] = curr;
1405: CRTC.crtAllStamp += 2;
1406: if (XEiJ.mpuTask == null) {
1407: CRTC.crtRepaint ();
1408: }
1409: }
1410: }
1411: }
1412:
1413: public static class SMTItem_CrtGr2X extends SMTItem {
1414: public SMTItem_CrtGr2X () {
1415: super ("Gr2X", CRTC.crtR12GrXPort[2], 9);
1416: Multilingual.mlnToolTipText (smiNameLabel,
1417: "en", "$E80020.w 8-0 graphic plane 0 x-direction scroll",
1418: "ja", "$E80020.w 8-0 グラフィックプレーン 0 x 方向スクロール");
1419: }
1420: @Override public void smiControlled () {
1421: CRTC.crtR12GrXMask[2] = smiMaskValue;
1422: CRTC.crtR12GrXTest[2] = smiTestValue;
1423: int curr = CRTC.crtR12GrXMask[2] == 0 ? CRTC.crtR12GrXPort[2] : CRTC.crtR12GrXTest[2];
1424: if (CRTC.crtR12GrXCurr[2] != curr) {
1425: CRTC.crtR12GrXCurr[2] = curr;
1426: CRTC.crtAllStamp += 2;
1427: if (XEiJ.mpuTask == null) {
1428: CRTC.crtRepaint ();
1429: }
1430: }
1431: }
1432: }
1433:
1434: public static class SMTItem_CrtGr2Y extends SMTItem {
1435: public SMTItem_CrtGr2Y () {
1436: super ("Gr2Y", CRTC.crtR13GrYPort[2], 9);
1437: Multilingual.mlnToolTipText (smiNameLabel,
1438: "en", "$E80022.w 8-0 graphic plane 0 y-direction scroll",
1439: "ja", "$E80022.w 8-0 グラフィックプレーン 0 y 方向スクロール");
1440: }
1441: @Override public void smiControlled () {
1442: CRTC.crtR13GrYMask[2] = smiMaskValue;
1443: CRTC.crtR13GrYTest[2] = smiTestValue;
1444: int curr = CRTC.crtR13GrYMask[2] == 0 ? CRTC.crtR13GrYPort[2] : CRTC.crtR13GrYTest[2];
1445: if (CRTC.crtR13GrYCurr[2] != curr) {
1446: CRTC.crtR13GrYCurr[2] = curr;
1447: CRTC.crtAllStamp += 2;
1448: if (XEiJ.mpuTask == null) {
1449: CRTC.crtRepaint ();
1450: }
1451: }
1452: }
1453: }
1454:
1455: public static class SMTItem_CrtGr3X extends SMTItem {
1456: public SMTItem_CrtGr3X () {
1457: super ("Gr3X", CRTC.crtR12GrXPort[3], 9);
1458: Multilingual.mlnToolTipText (smiNameLabel,
1459: "en", "$E80024.w 8-0 graphic plane 3 x-direction scroll",
1460: "ja", "$E80024.w 8-0 グラフィックプレーン 3 x 方向スクロール");
1461: }
1462: @Override public void smiControlled () {
1463: CRTC.crtR12GrXMask[3] = smiMaskValue;
1464: CRTC.crtR12GrXTest[3] = smiTestValue;
1465: int curr = CRTC.crtR12GrXMask[3] == 0 ? CRTC.crtR12GrXPort[3] : CRTC.crtR12GrXTest[3];
1466: if (CRTC.crtR12GrXCurr[3] != curr) {
1467: CRTC.crtR12GrXCurr[3] = curr;
1468: CRTC.crtAllStamp += 2;
1469: if (XEiJ.mpuTask == null) {
1470: CRTC.crtRepaint ();
1471: }
1472: }
1473: }
1474: }
1475:
1476: public static class SMTItem_CrtGr3Y extends SMTItem {
1477: public SMTItem_CrtGr3Y () {
1478: super ("Gr3Y", CRTC.crtR13GrYPort[3], 9);
1479: Multilingual.mlnToolTipText (smiNameLabel,
1480: "en", "$E80026.w 8-0 graphic plane 3 y-direction scroll",
1481: "ja", "$E80026.w 8-0 グラフィックプレーン 3 y 方向スクロール");
1482: }
1483: @Override public void smiControlled () {
1484: CRTC.crtR13GrYMask[3] = smiMaskValue;
1485: CRTC.crtR13GrYTest[3] = smiTestValue;
1486: int curr = CRTC.crtR13GrYMask[3] == 0 ? CRTC.crtR13GrYPort[3] : CRTC.crtR13GrYTest[3];
1487: if (CRTC.crtR13GrYCurr[3] != curr) {
1488: CRTC.crtR13GrYCurr[3] = curr;
1489: CRTC.crtAllStamp += 2;
1490: if (XEiJ.mpuTask == null) {
1491: CRTC.crtRepaint ();
1492: }
1493: }
1494: }
1495: }
1496:
1497:
1498:
1499:
1500:
1501: public static class SMTItem_VcnGrMM extends SMTItem {
1502: public SMTItem_VcnGrMM () {
1503: super ("GrMM", VideoController.vcnReg1Port, 3);
1504: Multilingual.mlnToolTipText (smiNameLabel,
1505: "en", "$E82400.w 2-0 Memory mode of graphic screen",
1506: "ja", "$E82400.w 2-0 グラフィック画面のメモリモード");
1507: }
1508: @Override public void smiControlled () {
1509: VideoController.vcnReg1Mask = VideoController.vcnReg1Mask & ~7 | smiMaskValue & 7;
1510: VideoController.vcnReg1Test = VideoController.vcnReg1Test & ~7 | smiTestValue;
1511: int curr = VideoController.vcnReg1Port & ~VideoController.vcnReg1Mask | VideoController.vcnReg1Test & VideoController.vcnReg1Mask;
1512: if (VideoController.vcnReg1Curr != curr) {
1513: VideoController.vcnReg1Curr = curr;
1514: VideoController.vcnUpdateMode ();
1515: if (XEiJ.mpuTask == null) {
1516: CRTC.crtRepaint ();
1517: }
1518: }
1519: }
1520: }
1521:
1522: public static class SMTItem_VcnSpPr extends SMTItem {
1523: public SMTItem_VcnSpPr () {
1524: super ("SpPr", VideoController.vcnReg2Port >> 12, 2);
1525: Multilingual.mlnToolTipText (smiNameLabel,
1526: "en", "$E82500.w 13-12 Precedence of sprite screen",
1527: "ja", "$E82500.w 13-12 スプライト画面の優先順位");
1528: }
1529: @Override public void smiControlled () {
1530: VideoController.vcnReg2Mask = VideoController.vcnReg2Mask & ~(3 << 12) | smiMaskValue & 3 << 12;
1531: VideoController.vcnReg2Test = VideoController.vcnReg2Test & ~(3 << 12) | smiTestValue << 12;
1532: int curr = VideoController.vcnReg2Port & ~VideoController.vcnReg2Mask | VideoController.vcnReg2Test & VideoController.vcnReg2Mask;
1533: if (VideoController.vcnReg2Curr != curr) {
1534: VideoController.vcnReg2Curr = curr;
1535: VideoController.vcnUpdateMode ();
1536: if (XEiJ.mpuTask == null) {
1537: CRTC.crtRepaint ();
1538: }
1539: }
1540: }
1541: }
1542:
1543: public static class SMTItem_VcnTxPr extends SMTItem {
1544: public SMTItem_VcnTxPr () {
1545: super ("TxPr", VideoController.vcnReg2Port >> 10, 2);
1546: Multilingual.mlnToolTipText (smiNameLabel,
1547: "en", "$E82500.w 11-10 Precedence of text screen",
1548: "ja", "$E82500.w 11-10 テキスト画面の優先順位");
1549: }
1550: @Override public void smiControlled () {
1551: VideoController.vcnReg2Mask = VideoController.vcnReg2Mask & ~(3 << 10) | smiMaskValue & 3 << 10;
1552: VideoController.vcnReg2Test = VideoController.vcnReg2Test & ~(3 << 10) | smiTestValue << 10;
1553: int curr = VideoController.vcnReg2Port & ~VideoController.vcnReg2Mask | VideoController.vcnReg2Test & VideoController.vcnReg2Mask;
1554: if (VideoController.vcnReg2Curr != curr) {
1555: VideoController.vcnReg2Curr = curr;
1556: VideoController.vcnUpdateMode ();
1557: if (XEiJ.mpuTask == null) {
1558: CRTC.crtRepaint ();
1559: }
1560: }
1561: }
1562: }
1563:
1564: public static class SMTItem_VcnGrPr extends SMTItem {
1565: public SMTItem_VcnGrPr () {
1566: super ("GrPr", VideoController.vcnReg2Port >> 8, 2);
1567: Multilingual.mlnToolTipText (smiNameLabel,
1568: "en", "$E82500.w 9-8 Precedence of graphic screen",
1569: "ja", "$E82500.w 9-8 グラフィック画面の優先順位");
1570: }
1571: @Override public void smiControlled () {
1572: VideoController.vcnReg2Mask = VideoController.vcnReg2Mask & ~(3 << 8) | smiMaskValue & 3 << 8;
1573: VideoController.vcnReg2Test = VideoController.vcnReg2Test & ~(3 << 8) | smiTestValue << 8;
1574: int curr = VideoController.vcnReg2Port & ~VideoController.vcnReg2Mask | VideoController.vcnReg2Test & VideoController.vcnReg2Mask;
1575: if (VideoController.vcnReg2Curr != curr) {
1576: VideoController.vcnReg2Curr = curr;
1577: VideoController.vcnUpdateMode ();
1578: if (XEiJ.mpuTask == null) {
1579: CRTC.crtRepaint ();
1580: }
1581: }
1582: }
1583: }
1584:
1585: public static class SMTItem_VcnG4th extends SMTItem {
1586: public SMTItem_VcnG4th () {
1587: super ("G4th", VideoController.vcnReg2Port >> 6, 2);
1588: Multilingual.mlnToolTipText (smiNameLabel,
1589: "en", "$E82500.w 7-6 The farthest plane number of graphic screen",
1590: "ja", "$E82500.w 7-6 グラフィック画面の一番奥のプレーンの番号");
1591: }
1592: @Override public void smiControlled () {
1593: VideoController.vcnReg2Mask = VideoController.vcnReg2Mask & ~(3 << 6) | smiMaskValue & 3 << 6;
1594: VideoController.vcnReg2Test = VideoController.vcnReg2Test & ~(3 << 6) | smiTestValue << 6;
1595: int curr = VideoController.vcnReg2Port & ~VideoController.vcnReg2Mask | VideoController.vcnReg2Test & VideoController.vcnReg2Mask;
1596: if (VideoController.vcnReg2Curr != curr) {
1597: VideoController.vcnReg2Curr = curr;
1598: VideoController.vcnUpdateMode ();
1599: if (XEiJ.mpuTask == null) {
1600: CRTC.crtRepaint ();
1601: }
1602: }
1603: }
1604: }
1605:
1606: public static class SMTItem_VcnG3rd extends SMTItem {
1607: public SMTItem_VcnG3rd () {
1608: super ("G3rd", VideoController.vcnReg2Port >> 4, 2);
1609: Multilingual.mlnToolTipText (smiNameLabel,
1610: "en", "$E82500.w 5-4 Second-farthest plane number of graphic screen",
1611: "ja", "$E82500.w 5-4 グラフィック画面の奥から 2 番目のプレーンの番号");
1612: }
1613: @Override public void smiControlled () {
1614: VideoController.vcnReg2Mask = VideoController.vcnReg2Mask & ~(3 << 4) | smiMaskValue & 3 << 4;
1615: VideoController.vcnReg2Test = VideoController.vcnReg2Test & ~(3 << 4) | smiTestValue << 4;
1616: int curr = VideoController.vcnReg2Port & ~VideoController.vcnReg2Mask | VideoController.vcnReg2Test & VideoController.vcnReg2Mask;
1617: if (VideoController.vcnReg2Curr != curr) {
1618: VideoController.vcnReg2Curr = curr;
1619: VideoController.vcnUpdateMode ();
1620: if (XEiJ.mpuTask == null) {
1621: CRTC.crtRepaint ();
1622: }
1623: }
1624: }
1625: }
1626:
1627: public static class SMTItem_VcnG2nd extends SMTItem {
1628: public SMTItem_VcnG2nd () {
1629: super ("G2nd", VideoController.vcnReg2Port >> 2, 2);
1630: Multilingual.mlnToolTipText (smiNameLabel,
1631: "en", "$E82500.w 3-2 Second-nearest plane number of graphic screen",
1632: "ja", "$E82500.w 3-2 グラフィック画面の手前から 2 番目のプレーンの番号");
1633: }
1634: @Override public void smiControlled () {
1635: VideoController.vcnReg2Mask = VideoController.vcnReg2Mask & ~(3 << 2) | smiMaskValue & 3 << 2;
1636: VideoController.vcnReg2Test = VideoController.vcnReg2Test & ~(3 << 2) | smiTestValue << 2;
1637: int curr = VideoController.vcnReg2Port & ~VideoController.vcnReg2Mask | VideoController.vcnReg2Test & VideoController.vcnReg2Mask;
1638: if (VideoController.vcnReg2Curr != curr) {
1639: VideoController.vcnReg2Curr = curr;
1640: VideoController.vcnUpdateMode ();
1641: if (XEiJ.mpuTask == null) {
1642: CRTC.crtRepaint ();
1643: }
1644: }
1645: }
1646: }
1647:
1648: public static class SMTItem_VcnG1st extends SMTItem {
1649: public SMTItem_VcnG1st () {
1650: super ("G1st", VideoController.vcnReg2Port, 2);
1651: Multilingual.mlnToolTipText (smiNameLabel,
1652: "en", "$E82500.w 1-0 The nearest plane number of graphic screen",
1653: "ja", "$E82500.w 1-0 グラフィック画面の一番手前のプレーンの番号");
1654: }
1655: @Override public void smiControlled () {
1656: VideoController.vcnReg2Mask = VideoController.vcnReg2Mask & ~3 | smiMaskValue & 3;
1657: VideoController.vcnReg2Test = VideoController.vcnReg2Test & ~3 | smiTestValue;
1658: int curr = VideoController.vcnReg2Port & ~VideoController.vcnReg2Mask | VideoController.vcnReg2Test & VideoController.vcnReg2Mask;
1659: if (VideoController.vcnReg2Curr != curr) {
1660: VideoController.vcnReg2Curr = curr;
1661: VideoController.vcnUpdateMode ();
1662: if (XEiJ.mpuTask == null) {
1663: CRTC.crtRepaint ();
1664: }
1665: }
1666: }
1667: }
1668:
1669: public static class SMTItem_VcnAHOn extends SMTItem {
1670: public SMTItem_VcnAHOn () {
1671: super ("AHOn", VideoController.vcnReg3Port >> 14, 1);
1672: Multilingual.mlnToolTipText (smiNameLabel,
1673: "en", "$E82600.w 14 Halftone with text palet 0",
1674: "ja", "$E82600.w 14 テキストパレット 0 との半透明");
1675: }
1676: @Override public void smiControlled () {
1677: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 14) | smiMaskValue & 1 << 14;
1678: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 14) | smiTestValue << 14;
1679: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1680: if (VideoController.vcnReg3Curr != curr) {
1681: VideoController.vcnReg3Curr = curr;
1682: VideoController.vcnUpdateMode ();
1683: if (XEiJ.mpuTask == null) {
1684: CRTC.crtRepaint ();
1685: }
1686: }
1687: }
1688: }
1689:
1690: public static class SMTItem_VcnExOn extends SMTItem {
1691: public SMTItem_VcnExOn () {
1692: super ("ExOn", VideoController.vcnReg3Port >> 12, 1);
1693: Multilingual.mlnToolTipText (smiNameLabel,
1694: "en", "$E82600.w 12 Extended (special priority or halftone)",
1695: "ja", "$E82600.w 12 拡張 (特殊プライオリティまたは半透明)");
1696: }
1697: @Override public void smiControlled () {
1698: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 12) | smiMaskValue & 1 << 12;
1699: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 12) | smiTestValue << 12;
1700: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1701: if (VideoController.vcnReg3Curr != curr) {
1702: VideoController.vcnReg3Curr = curr;
1703: VideoController.vcnUpdateMode ();
1704: if (XEiJ.mpuTask == null) {
1705: CRTC.crtRepaint ();
1706: }
1707: }
1708: }
1709: }
1710:
1711: public static class SMTItem_VcnHalf extends SMTItem {
1712: public SMTItem_VcnHalf () {
1713: super ("Half", VideoController.vcnReg3Port >> 11, 1);
1714: Multilingual.mlnToolTipText (smiNameLabel,
1715: "en", "$E82600.w 11 Halftone",
1716: "ja", "$E82600.w 11 半透明");
1717: }
1718: @Override public void smiControlled () {
1719: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 11) | smiMaskValue & 1 << 11;
1720: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 11) | smiTestValue << 11;
1721: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1722: if (VideoController.vcnReg3Curr != curr) {
1723: VideoController.vcnReg3Curr = curr;
1724: VideoController.vcnUpdateMode ();
1725: if (XEiJ.mpuTask == null) {
1726: CRTC.crtRepaint ();
1727: }
1728: }
1729: }
1730: }
1731:
1732: public static class SMTItem_VcnPLSB extends SMTItem {
1733: public SMTItem_VcnPLSB () {
1734: super ("PLSB", VideoController.vcnReg3Port >> 10, 1);
1735: Multilingual.mlnToolTipText (smiNameLabel,
1736: "en", "$E82600.w 10 Select area by LSB of palet code",
1737: "ja", "$E82600.w 10 パレットコードの LSB で範囲を選択");
1738: }
1739: @Override public void smiControlled () {
1740: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 10) | smiMaskValue & 1 << 10;
1741: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 10) | smiTestValue << 10;
1742: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1743: if (VideoController.vcnReg3Curr != curr) {
1744: VideoController.vcnReg3Curr = curr;
1745: VideoController.vcnUpdateMode ();
1746: if (XEiJ.mpuTask == null) {
1747: CRTC.crtRepaint ();
1748: }
1749: }
1750: }
1751: }
1752:
1753: public static class SMTItem_VcnGrGr extends SMTItem {
1754: public SMTItem_VcnGrGr () {
1755: super ("GrGr", VideoController.vcnReg3Port >> 9, 1);
1756: Multilingual.mlnToolTipText (smiNameLabel,
1757: "en", "$E82600.w 9 Halftone between the nearest graphic page and second-nearest graphic page",
1758: "ja", "$E82600.w 9 一番手前のグラフィックページと手前から 2 番目のグラフィックページとの半透明");
1759: }
1760: @Override public void smiControlled () {
1761: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 9) | smiMaskValue & 1 << 9;
1762: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 9) | smiTestValue << 9;
1763: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1764: if (VideoController.vcnReg3Curr != curr) {
1765: VideoController.vcnReg3Curr = curr;
1766: VideoController.vcnUpdateMode ();
1767: if (XEiJ.mpuTask == null) {
1768: CRTC.crtRepaint ();
1769: }
1770: }
1771: }
1772: }
1773:
1774: public static class SMTItem_VcnGrST extends SMTItem {
1775: public SMTItem_VcnGrST () {
1776: super ("GrST", VideoController.vcnReg3Port >> 8, 1);
1777: Multilingual.mlnToolTipText (smiNameLabel,
1778: "en", "$E82600.w 8 Halftone between the nearest graphic page and sprite/text screen in the back of graphic screen",
1779: "ja", "$E82600.w 8 一番手前のグラフィックページとグラフィック画面の奥にあるスプライト/テキスト画面との半透明");
1780: }
1781: @Override public void smiControlled () {
1782: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 8) | smiMaskValue & 1 << 8;
1783: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 8) | smiTestValue << 8;
1784: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1785: if (VideoController.vcnReg3Curr != curr) {
1786: VideoController.vcnReg3Curr = curr;
1787: VideoController.vcnUpdateMode ();
1788: if (XEiJ.mpuTask == null) {
1789: CRTC.crtRepaint ();
1790: }
1791: }
1792: }
1793: }
1794:
1795: public static class SMTItem_VcnSpOn extends SMTItem {
1796: public SMTItem_VcnSpOn () {
1797: super ("SpOn", VideoController.vcnReg3Port >> 6, 1);
1798: Multilingual.mlnToolTipText (smiNameLabel,
1799: "en", "$E82600.w 6 Sprite screen",
1800: "ja", "$E82600.w 6 スプライト画面");
1801: }
1802: @Override public void smiControlled () {
1803: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 6) | smiMaskValue & 1 << 6;
1804: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 6) | smiTestValue << 6;
1805: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1806: if (VideoController.vcnReg3Curr != curr) {
1807: VideoController.vcnReg3Curr = curr;
1808: VideoController.vcnUpdateMode ();
1809: if (XEiJ.mpuTask == null) {
1810: CRTC.crtRepaint ();
1811: }
1812: }
1813: }
1814: }
1815:
1816: public static class SMTItem_VcnTxOn extends SMTItem {
1817: public SMTItem_VcnTxOn () {
1818: super ("TxOn", VideoController.vcnReg3Port >> 5, 1);
1819: Multilingual.mlnToolTipText (smiNameLabel,
1820: "en", "$E82600.w 5 Text screen",
1821: "ja", "$E82600.w 5 テキスト画面");
1822: }
1823: @Override public void smiControlled () {
1824: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 5) | smiMaskValue & 1 << 5;
1825: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 5) | smiTestValue << 5;
1826: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1827: if (VideoController.vcnReg3Curr != curr) {
1828: VideoController.vcnReg3Curr = curr;
1829: VideoController.vcnUpdateMode ();
1830: if (XEiJ.mpuTask == null) {
1831: CRTC.crtRepaint ();
1832: }
1833: }
1834: }
1835: }
1836:
1837: public static class SMTItem_VcnGxOn extends SMTItem {
1838: public SMTItem_VcnGxOn () {
1839: super ("GxOn", VideoController.vcnReg3Port >> 4, 1);
1840: Multilingual.mlnToolTipText (smiNameLabel,
1841: "en", "$E82600.w 4 1024x1024 graphic screen",
1842: "ja", "$E82600.w 4 1024x1024 グラフィック画面");
1843: }
1844: @Override public void smiControlled () {
1845: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 4) | smiMaskValue & 1 << 4;
1846: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 4) | smiTestValue << 4;
1847: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1848: if (VideoController.vcnReg3Curr != curr) {
1849: VideoController.vcnReg3Curr = curr;
1850: VideoController.vcnUpdateMode ();
1851: if (XEiJ.mpuTask == null) {
1852: CRTC.crtRepaint ();
1853: }
1854: }
1855: }
1856: }
1857:
1858: public static class SMTItem_VcnG4On extends SMTItem {
1859: public SMTItem_VcnG4On () {
1860: super ("G4On", VideoController.vcnReg3Port >> 3, 1);
1861: Multilingual.mlnToolTipText (smiNameLabel,
1862: "en", "$E82600.w 3 512x512 graphic plane 3",
1863: "ja", "$E82600.w 3 512x512 グラフィックプレーン 3");
1864: }
1865: @Override public void smiControlled () {
1866: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 3) | smiMaskValue & 1 << 3;
1867: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 3) | smiTestValue << 3;
1868: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1869: if (VideoController.vcnReg3Curr != curr) {
1870: VideoController.vcnReg3Curr = curr;
1871: VideoController.vcnUpdateMode ();
1872: if (XEiJ.mpuTask == null) {
1873: CRTC.crtRepaint ();
1874: }
1875: }
1876: }
1877: }
1878:
1879: public static class SMTItem_VcnG3On extends SMTItem {
1880: public SMTItem_VcnG3On () {
1881: super ("G3On", VideoController.vcnReg3Port >> 2, 1);
1882: Multilingual.mlnToolTipText (smiNameLabel,
1883: "en", "$E82600.w 2 512x512 graphic plane 2",
1884: "ja", "$E82600.w 2 512x512 グラフィックプレーン 2");
1885: }
1886: @Override public void smiControlled () {
1887: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 2) | smiMaskValue & 1 << 2;
1888: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 2) | smiTestValue << 2;
1889: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1890: if (VideoController.vcnReg3Curr != curr) {
1891: VideoController.vcnReg3Curr = curr;
1892: VideoController.vcnUpdateMode ();
1893: if (XEiJ.mpuTask == null) {
1894: CRTC.crtRepaint ();
1895: }
1896: }
1897: }
1898: }
1899:
1900: public static class SMTItem_VcnG2On extends SMTItem {
1901: public SMTItem_VcnG2On () {
1902: super ("G2On", VideoController.vcnReg3Port >> 1, 1);
1903: Multilingual.mlnToolTipText (smiNameLabel,
1904: "en", "$E82600.w 1 512x512 graphic plane 1",
1905: "ja", "$E82600.w 1 512x512 グラフィックプレーン 1");
1906: }
1907: @Override public void smiControlled () {
1908: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~(1 << 1) | smiMaskValue & 1 << 1;
1909: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~(1 << 1) | smiTestValue << 1;
1910: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1911: if (VideoController.vcnReg3Curr != curr) {
1912: VideoController.vcnReg3Curr = curr;
1913: VideoController.vcnUpdateMode ();
1914: if (XEiJ.mpuTask == null) {
1915: CRTC.crtRepaint ();
1916: }
1917: }
1918: }
1919: }
1920:
1921: public static class SMTItem_VcnG1On extends SMTItem {
1922: public SMTItem_VcnG1On () {
1923: super ("G1On", VideoController.vcnReg3Port, 1);
1924: Multilingual.mlnToolTipText (smiNameLabel,
1925: "en", "$E82600.w 0 512x512 graphic plane 0",
1926: "ja", "$E82600.w 0 512x512 グラフィックプレーン 0");
1927: }
1928: @Override public void smiControlled () {
1929: VideoController.vcnReg3Mask = VideoController.vcnReg3Mask & ~1 | smiMaskValue & 1;
1930: VideoController.vcnReg3Test = VideoController.vcnReg3Test & ~1 | smiTestValue;
1931: int curr = VideoController.vcnReg3Port & ~VideoController.vcnReg3Mask | VideoController.vcnReg3Test & VideoController.vcnReg3Mask;
1932: if (VideoController.vcnReg3Curr != curr) {
1933: VideoController.vcnReg3Curr = curr;
1934: VideoController.vcnUpdateMode ();
1935: if (XEiJ.mpuTask == null) {
1936: CRTC.crtRepaint ();
1937: }
1938: }
1939: }
1940: }
1941:
1942:
1943:
1944:
1945:
1946: public static class SMTItem_SprBg0X extends SMTItem {
1947: public SMTItem_SprBg0X () {
1948: super ("Bg0X", SpriteScreen.sprReg0Bg0XPort, 10);
1949: Multilingual.mlnToolTipText (smiNameLabel,
1950: "en", "$EB0800.w 9-0 Background 0 x-direction scroll",
1951: "ja", "$EB0800.w 9-0 バックグラウンド 0 x 方向スクロール");
1952: }
1953: @Override public void smiControlled () {
1954: SpriteScreen.sprReg0Bg0XMask = smiMaskValue;
1955: SpriteScreen.sprReg0Bg0XTest = smiTestValue;
1956: int curr = SpriteScreen.sprReg0Bg0XMask == 0 ? SpriteScreen.sprReg0Bg0XPort : SpriteScreen.sprReg0Bg0XTest;
1957: if (SpriteScreen.sprReg0Bg0XCurr != curr) {
1958: SpriteScreen.sprReg0Bg0XCurr = curr;
1959: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
1960: CRTC.crtAllStamp += 2;
1961: if (XEiJ.mpuTask == null) {
1962: CRTC.crtRepaint ();
1963: }
1964: }
1965: }
1966: }
1967: }
1968:
1969: public static class SMTItem_SprBg0Y extends SMTItem {
1970: public SMTItem_SprBg0Y () {
1971: super ("Bg0Y", SpriteScreen.sprReg1Bg0YPort, 10);
1972: Multilingual.mlnToolTipText (smiNameLabel,
1973: "en", "$EB0802.w 9-0 Background 0 y-direction scroll",
1974: "ja", "$EB0802.w 9-0 バックグラウンド 0 y 方向スクロール");
1975: }
1976: @Override public void smiControlled () {
1977: SpriteScreen.sprReg1Bg0YMask = smiMaskValue;
1978: SpriteScreen.sprReg1Bg0YTest = smiTestValue;
1979: int curr = SpriteScreen.sprReg1Bg0YMask == 0 ? SpriteScreen.sprReg1Bg0YPort : SpriteScreen.sprReg1Bg0YTest;
1980: if (SpriteScreen.sprReg1Bg0YCurr != curr) {
1981: SpriteScreen.sprReg1Bg0YCurr = curr;
1982: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
1983: CRTC.crtAllStamp += 2;
1984: if (XEiJ.mpuTask == null) {
1985: CRTC.crtRepaint ();
1986: }
1987: }
1988: }
1989: }
1990: }
1991:
1992: public static class SMTItem_SprBg1X extends SMTItem {
1993: public SMTItem_SprBg1X () {
1994: super ("Bg1X", SpriteScreen.sprReg2Bg1XPort, 10);
1995: Multilingual.mlnToolTipText (smiNameLabel,
1996: "en", "$EB0804.w 9-0 Background 1 x-direction scroll",
1997: "ja", "$EB0804.w 9-0 バックグラウンド 1 x 方向スクロール");
1998: }
1999: @Override public void smiControlled () {
2000: SpriteScreen.sprReg2Bg1XMask = smiMaskValue;
2001: SpriteScreen.sprReg2Bg1XTest = smiTestValue;
2002: int curr = SpriteScreen.sprReg2Bg1XMask == 0 ? SpriteScreen.sprReg2Bg1XPort : SpriteScreen.sprReg2Bg1XTest;
2003: if (SpriteScreen.sprReg2Bg1XCurr != curr) {
2004: SpriteScreen.sprReg2Bg1XCurr = curr;
2005: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2006: CRTC.crtAllStamp += 2;
2007: if (XEiJ.mpuTask == null) {
2008: CRTC.crtRepaint ();
2009: }
2010: }
2011: }
2012: }
2013: }
2014:
2015: public static class SMTItem_SprBg1Y extends SMTItem {
2016: public SMTItem_SprBg1Y () {
2017: super ("Bg1Y", SpriteScreen.sprReg3Bg1YPort, 10);
2018: Multilingual.mlnToolTipText (smiNameLabel,
2019: "en", "$EB0806.w 9-0 Background 1 y-direction scroll",
2020: "ja", "$EB0806.w 9-0 バックグラウンド 1 y 方向スクロール");
2021: }
2022: @Override public void smiControlled () {
2023: SpriteScreen.sprReg3Bg1YMask = smiMaskValue;
2024: SpriteScreen.sprReg3Bg1YTest = smiTestValue;
2025: int curr = SpriteScreen.sprReg3Bg1YMask == 0 ? SpriteScreen.sprReg3Bg1YPort : SpriteScreen.sprReg3Bg1YTest;
2026: if (SpriteScreen.sprReg3Bg1YCurr != curr) {
2027: SpriteScreen.sprReg3Bg1YCurr = curr;
2028: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2029: CRTC.crtAllStamp += 2;
2030: if (XEiJ.mpuTask == null) {
2031: CRTC.crtRepaint ();
2032: }
2033: }
2034: }
2035: }
2036: }
2037:
2038: public static class SMTItem_SprDisp extends SMTItem {
2039: public SMTItem_SprDisp () {
2040: super ("Disp", SpriteScreen.sprReg4BgCtrlPort >> 9, 1);
2041: Multilingual.mlnToolTipText (smiNameLabel,
2042: "en", "$EB0808.w 9 Display sprite and background",
2043: "ja", "$EB0808.w 9 スプライトとバックグラウンドを表示");
2044: }
2045: @Override public void smiControlled () {
2046: SpriteScreen.sprReg4BgCtrlMask = SpriteScreen.sprReg4BgCtrlMask & ~(1 << 9) | smiMaskValue & 1 << 9;
2047: SpriteScreen.sprReg4BgCtrlTest = SpriteScreen.sprReg4BgCtrlTest & ~(1 << 9) | smiTestValue << 9;
2048: int curr = SpriteScreen.sprReg4BgCtrlPort & ~SpriteScreen.sprReg4BgCtrlMask | SpriteScreen.sprReg4BgCtrlTest & SpriteScreen.sprReg4BgCtrlMask;
2049: if (SpriteScreen.sprReg4BgCtrlCurr != curr) {
2050: SpriteScreen.sprReg4BgCtrlCurr = curr;
2051: if (VideoController.vcnReg3Curr << 31 - 6 < 0) {
2052: CRTC.crtAllStamp += 2;
2053: if (XEiJ.mpuTask == null) {
2054: CRTC.crtRepaint ();
2055: }
2056: }
2057: }
2058: }
2059: }
2060:
2061: public static class SMTItem_SprB1Tx extends SMTItem {
2062: public SMTItem_SprB1Tx () {
2063: super ("B1Tx", SpriteScreen.sprReg4BgCtrlPort >> 4, 2);
2064: Multilingual.mlnToolTipText (smiNameLabel,
2065: "en", "$EB0808.w 5-4 Text page assigned to background 1",
2066: "ja", "$EB0808.w 5-4 バックグラウンド 1 に割り当てるテキストページ");
2067: }
2068: @Override public void smiControlled () {
2069: SpriteScreen.sprReg4BgCtrlMask = SpriteScreen.sprReg4BgCtrlMask & ~(3 << 4) | smiMaskValue & 3 << 4;
2070: SpriteScreen.sprReg4BgCtrlTest = SpriteScreen.sprReg4BgCtrlTest & ~(3 << 4) | smiTestValue << 4;
2071: int curr = SpriteScreen.sprReg4BgCtrlPort & ~SpriteScreen.sprReg4BgCtrlMask | SpriteScreen.sprReg4BgCtrlTest & SpriteScreen.sprReg4BgCtrlMask;
2072: if (SpriteScreen.sprReg4BgCtrlCurr != curr) {
2073: SpriteScreen.sprReg4BgCtrlCurr = curr;
2074: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2075: CRTC.crtAllStamp += 2;
2076: if (XEiJ.mpuTask == null) {
2077: CRTC.crtRepaint ();
2078: }
2079: }
2080: }
2081: }
2082: }
2083:
2084: public static class SMTItem_SprB1On extends SMTItem {
2085: public SMTItem_SprB1On () {
2086: super ("B1On", SpriteScreen.sprReg4BgCtrlPort >> 3, 1);
2087: Multilingual.mlnToolTipText (smiNameLabel,
2088: "en", "$EB0808.w 3 Background 1",
2089: "ja", "$EB0808.w 3 バックグラウンド 1");
2090: }
2091: @Override public void smiControlled () {
2092: SpriteScreen.sprReg4BgCtrlMask = SpriteScreen.sprReg4BgCtrlMask & ~(1 << 3) | smiMaskValue & 1 << 3;
2093: SpriteScreen.sprReg4BgCtrlTest = SpriteScreen.sprReg4BgCtrlTest & ~(1 << 3) | smiTestValue << 3;
2094: int curr = SpriteScreen.sprReg4BgCtrlPort & ~SpriteScreen.sprReg4BgCtrlMask | SpriteScreen.sprReg4BgCtrlTest & SpriteScreen.sprReg4BgCtrlMask;
2095: if (SpriteScreen.sprReg4BgCtrlCurr != curr) {
2096: SpriteScreen.sprReg4BgCtrlCurr = curr;
2097: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2098: CRTC.crtAllStamp += 2;
2099: if (XEiJ.mpuTask == null) {
2100: CRTC.crtRepaint ();
2101: }
2102: }
2103: }
2104: }
2105: }
2106:
2107: public static class SMTItem_SprB0Tx extends SMTItem {
2108: public SMTItem_SprB0Tx () {
2109: super ("B0Tx", SpriteScreen.sprReg4BgCtrlPort >> 1, 2);
2110: Multilingual.mlnToolTipText (smiNameLabel,
2111: "en", "$EB0808.w 2-1 Text page assigned to background 0",
2112: "ja", "$EB0808.w 2-1 バックグラウンド 0 に割り当てるテキストページ");
2113: }
2114: @Override public void smiControlled () {
2115: SpriteScreen.sprReg4BgCtrlMask = SpriteScreen.sprReg4BgCtrlMask & ~(3 << 1) | smiMaskValue & 3 << 1;
2116: SpriteScreen.sprReg4BgCtrlTest = SpriteScreen.sprReg4BgCtrlTest & ~(3 << 1) | smiTestValue << 1;
2117: int curr = SpriteScreen.sprReg4BgCtrlPort & ~SpriteScreen.sprReg4BgCtrlMask | SpriteScreen.sprReg4BgCtrlTest & SpriteScreen.sprReg4BgCtrlMask;
2118: if (SpriteScreen.sprReg4BgCtrlCurr != curr) {
2119: SpriteScreen.sprReg4BgCtrlCurr = curr;
2120: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2121: CRTC.crtAllStamp += 2;
2122: if (XEiJ.mpuTask == null) {
2123: CRTC.crtRepaint ();
2124: }
2125: }
2126: }
2127: }
2128: }
2129:
2130: public static class SMTItem_SprB0On extends SMTItem {
2131: public SMTItem_SprB0On () {
2132: super ("B0On", SpriteScreen.sprReg4BgCtrlPort, 1);
2133: Multilingual.mlnToolTipText (smiNameLabel,
2134: "en", "$EB0808.w 0 Background 0",
2135: "ja", "$EB0808.w 0 バックグラウンド 0");
2136: }
2137: @Override public void smiControlled () {
2138: SpriteScreen.sprReg4BgCtrlMask = SpriteScreen.sprReg4BgCtrlMask & ~1 | smiMaskValue & 1;
2139: SpriteScreen.sprReg4BgCtrlTest = SpriteScreen.sprReg4BgCtrlTest & ~1 | smiTestValue;
2140: int curr = SpriteScreen.sprReg4BgCtrlPort & ~SpriteScreen.sprReg4BgCtrlMask | SpriteScreen.sprReg4BgCtrlTest & SpriteScreen.sprReg4BgCtrlMask;
2141: if (SpriteScreen.sprReg4BgCtrlCurr != curr) {
2142: SpriteScreen.sprReg4BgCtrlCurr = curr;
2143: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2144: CRTC.crtAllStamp += 2;
2145: if (XEiJ.mpuTask == null) {
2146: CRTC.crtRepaint ();
2147: }
2148: }
2149: }
2150: }
2151: }
2152:
2153: public static class SMTItem_SprHFEd extends SMTItem {
2154: public SMTItem_SprHFEd () {
2155: super ("HFEd", SpriteScreen.sprReg5HFrontEndPort, 8);
2156: Multilingual.mlnToolTipText (smiNameLabel,
2157: "en", "$EB080A.w 7-0 End character number of horizontal front porch",
2158: "ja", "$EB080A.w 7-0 水平フロントポーチの終了キャラクタ番号");
2159: }
2160: @Override public void smiControlled () {
2161: SpriteScreen.sprReg5HFrontEndMask = smiMaskValue;
2162: SpriteScreen.sprReg5HFrontEndTest = smiTestValue;
2163: int curr = SpriteScreen.sprReg5HFrontEndMask == 0 ? SpriteScreen.sprReg5HFrontEndPort : SpriteScreen.sprReg5HFrontEndTest;
2164: if (SpriteScreen.sprReg5HFrontEndCurr != curr) {
2165: SpriteScreen.sprReg5HFrontEndCurr = curr;
2166: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2167: CRTC.crtAllStamp += 2;
2168: if (XEiJ.mpuTask == null) {
2169: CRTC.crtRepaint ();
2170: }
2171: }
2172: }
2173: }
2174: }
2175:
2176: public static class SMTItem_SprHBEd extends SMTItem {
2177: public SMTItem_SprHBEd () {
2178: super ("HBEd", SpriteScreen.sprReg6HBackEndPort, 6);
2179: Multilingual.mlnToolTipText (smiNameLabel,
2180: "en", "$EB080C.w 5-0 End character number of horizontal back porch",
2181: "ja", "$EB080C.w 5-0 水平バックポーチの終了キャラクタ番号");
2182: }
2183: @Override public void smiControlled () {
2184: SpriteScreen.sprReg6HBackEndMask = smiMaskValue;
2185: SpriteScreen.sprReg6HBackEndTest = smiTestValue;
2186: int curr = SpriteScreen.sprReg6HBackEndMask == 0 ? SpriteScreen.sprReg6HBackEndPort : SpriteScreen.sprReg6HBackEndTest;
2187: if (SpriteScreen.sprReg6HBackEndCurr != curr) {
2188: SpriteScreen.sprReg6HBackEndCurr = curr;
2189: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2190: CRTC.crtAllStamp += 2;
2191: if (XEiJ.mpuTask == null) {
2192: CRTC.crtRepaint ();
2193: }
2194: }
2195: }
2196: }
2197: }
2198:
2199: public static class SMTItem_SprVBEd extends SMTItem {
2200: public SMTItem_SprVBEd () {
2201: super ("VBEd", SpriteScreen.sprReg7VBackEndPort, 8);
2202: Multilingual.mlnToolTipText (smiNameLabel,
2203: "en", "$EB080E.w 7-0 End raster number of vertical back porch",
2204: "ja", "$EB080E.w 7-0 垂直バックポーチの終了ラスタ番号");
2205: }
2206: @Override public void smiControlled () {
2207: SpriteScreen.sprReg7VBackEndMask = smiMaskValue;
2208: SpriteScreen.sprReg7VBackEndTest = smiTestValue;
2209: int curr = SpriteScreen.sprReg7VBackEndMask == 0 ? SpriteScreen.sprReg7VBackEndPort : SpriteScreen.sprReg7VBackEndTest;
2210: if (SpriteScreen.sprReg7VBackEndCurr != curr) {
2211: SpriteScreen.sprReg7VBackEndCurr = curr;
2212: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2213: CRTC.crtAllStamp += 2;
2214: if (XEiJ.mpuTask == null) {
2215: CRTC.crtRepaint ();
2216: }
2217: }
2218: }
2219: }
2220: }
2221:
2222: public static class SMTItem_SprHigh extends SMTItem {
2223: public SMTItem_SprHigh () {
2224: super ("High", SpriteScreen.sprReg8ResoPort >> 4, 1);
2225: Multilingual.mlnToolTipText (smiNameLabel,
2226: "en", "$EB0810.w 4 High-resolution",
2227: "ja", "$EB0810.w 4 高解像度");
2228: }
2229: @Override public void smiControlled () {
2230: SpriteScreen.sprReg8ResoMask = SpriteScreen.sprReg8ResoMask & ~(1 << 4) | smiMaskValue & 1 << 4;
2231: SpriteScreen.sprReg8ResoTest = SpriteScreen.sprReg8ResoTest & ~(1 << 4) | smiTestValue << 4;
2232: int curr = SpriteScreen.sprReg8ResoPort & ~SpriteScreen.sprReg8ResoMask | SpriteScreen.sprReg8ResoTest & SpriteScreen.sprReg8ResoMask;
2233: if (SpriteScreen.sprReg8ResoCurr != curr) {
2234: SpriteScreen.sprReg8ResoCurr = curr;
2235: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2236: CRTC.crtAllStamp += 2;
2237: if (XEiJ.mpuTask == null) {
2238: CRTC.crtRepaint ();
2239: }
2240: }
2241: }
2242: }
2243: }
2244:
2245: public static class SMTItem_SprVRes extends SMTItem {
2246: public SMTItem_SprVRes () {
2247: super ("VRes", SpriteScreen.sprReg8ResoPort >> 2, 2);
2248: Multilingual.mlnToolTipText (smiNameLabel,
2249: "en", "$EB0810.w 3-2 Vertical resolution",
2250: "ja", "$EB0810.w 3-2 垂直解像度");
2251: }
2252: @Override public void smiControlled () {
2253: SpriteScreen.sprReg8ResoMask = SpriteScreen.sprReg8ResoMask & ~(3 << 2) | smiMaskValue & 3 << 2;
2254: SpriteScreen.sprReg8ResoTest = SpriteScreen.sprReg8ResoTest & ~(3 << 2) | smiTestValue << 2;
2255: int curr = SpriteScreen.sprReg8ResoPort & ~SpriteScreen.sprReg8ResoMask | SpriteScreen.sprReg8ResoTest & SpriteScreen.sprReg8ResoMask;
2256: if (SpriteScreen.sprReg8ResoCurr != curr) {
2257: SpriteScreen.sprReg8ResoCurr = curr;
2258: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2259: CRTC.crtAllStamp += 2;
2260: if (XEiJ.mpuTask == null) {
2261: CRTC.crtRepaint ();
2262: }
2263: }
2264: }
2265: }
2266: }
2267:
2268: public static class SMTItem_SprHRes extends SMTItem {
2269: public SMTItem_SprHRes () {
2270: super ("HRes", SpriteScreen.sprReg8ResoPort, 2);
2271: Multilingual.mlnToolTipText (smiNameLabel,
2272: "en", "$EB0810.w 1-0 Horizontal resolution",
2273: "ja", "$EB0810.w 1-0 水平解像度");
2274: }
2275: @Override public void smiControlled () {
2276: SpriteScreen.sprReg8ResoMask = SpriteScreen.sprReg8ResoMask & ~3 | smiMaskValue & 3;
2277: SpriteScreen.sprReg8ResoTest = SpriteScreen.sprReg8ResoTest & ~3 | smiTestValue;
2278: int curr = SpriteScreen.sprReg8ResoPort & ~SpriteScreen.sprReg8ResoMask | SpriteScreen.sprReg8ResoTest & SpriteScreen.sprReg8ResoMask;
2279: if (SpriteScreen.sprReg8ResoCurr != curr) {
2280: SpriteScreen.sprReg8ResoCurr = curr;
2281: if (VideoController.vcnReg3Curr << 31 - 6 < 0 && SpriteScreen.sprReg4BgCtrlCurr << 31 - 9 < 0) {
2282: CRTC.crtAllStamp += 2;
2283: if (XEiJ.mpuTask == null) {
2284: CRTC.crtRepaint ();
2285: }
2286: }
2287: }
2288: }
2289: }
2290:
2291:
2292:
2293:
2294:
2295: public static class SMTItem_SysHRL extends SMTItem {
2296: public SMTItem_SysHRL () {
2297: super ("HRL", CRTC.crtHRLPort, 1);
2298: Multilingual.mlnToolTipText (smiNameLabel,
2299: "en", "$E8E007.b 1 HRL (dot clock selection)",
2300: "ja", "$E8E007.b 1 HRL (ドットクロック選択)");
2301: }
2302: @Override public void smiControlled () {
2303: CRTC.crtHRLMask = smiMaskValue;
2304: CRTC.crtHRLTest = smiTestValue;
2305: int curr = CRTC.crtHRLMask == 0 ? CRTC.crtHRLPort : CRTC.crtHRLTest;
2306: if (CRTC.crtHRLCurr != curr) {
2307: CRTC.crtHRLCurr = curr;
2308: if (XEiJ.mpuTask != null) {
2309: CRTC.crtRestart ();
2310: }
2311: }
2312: }
2313: }
2314:
2315: public static class SMTItem_SysCont extends SMTItem {
2316: public SMTItem_SysCont () {
2317: super ("Cont", VideoController.vcnTargetContrastPort, 4);
2318: Multilingual.mlnToolTipText (smiNameLabel,
2319: "en", "$E8E001.b 3-0 Contrast",
2320: "ja", "$E8E001.b 3-0 コントラスト");
2321: }
2322: @Override public void smiControlled () {
2323: VideoController.vcnTargetContrastMask = smiMaskValue;
2324: VideoController.vcnTargetContrastTest = smiTestValue;
2325: int curr = VideoController.vcnTargetContrastMask == 0 ? VideoController.vcnTargetContrastPort : VideoController.vcnTargetContrastTest;
2326: if (VideoController.vcnTargetContrastCurr != curr) {
2327: VideoController.vcnTargetContrastCurr = curr;
2328: VideoController.vcnTargetScaledContrast = VideoController.VCN_CONTRAST_SCALE * VideoController.vcnTargetContrastCurr;
2329: CRTC.crtContrastClock = XEiJ.mpuClockTime;
2330: CRTC.crtFrameTaskClock = Math.min (CRTC.crtContrastClock, CRTC.crtCaptureClock);
2331: }
2332: }
2333: }
2334:
2335:
2336:
2337:
2338:
2339:
2340:
2341:
2342:
2343:
2344:
2345: public static class SMTGroup {
2346:
2347: public SMTItem[] smgItemArray;
2348: public ButtonGroup smgButtonGroup;
2349: public Box smgBox;
2350: public JRadioButton smgPortRadioButton;
2351: public JRadioButton smgTestRadioButton;
2352:
2353:
2354: public SMTGroup (SMTItem... itemArray) {
2355: smgItemArray = itemArray;
2356: for (SMTItem item : smgItemArray) {
2357: item.smiItemGroup = this;
2358: }
2359: smgButtonGroup = new ButtonGroup ();
2360: smgBox = ComponentFactory.setFixedSize (
2361: ComponentFactory.createVerticalBox (
2362: Box.createVerticalStrut (LnF.lnfFontSize + 4),
2363: ComponentFactory.createHorizontalBox (
2364: ComponentFactory.createVerticalBox (
2365: Box.createVerticalGlue (),
2366: ComponentFactory.setFixedSize (
2367: Multilingual.mlnToolTipText (
2368: ComponentFactory.createImageButton (
2369: XEiJ.createImage (
2370: 14, 18,
2371: "11111111111111" +
2372: "1............1" +
2373: "1............1" +
2374: "1............1" +
2375: "1....1111....1" +
2376: "1....1..1....1" +
2377: "1....1..1....1" +
2378: "1....1..1....1" +
2379: "1....1..1....1" +
2380: "1.1111..1111.1" +
2381: "1..1......1..1" +
2382: "1...1....1...1" +
2383: "1....1..1....1" +
2384: "1.....11.....1" +
2385: "1............1" +
2386: "1............1" +
2387: "1............1" +
2388: "11111111111111",
2389: LnF.lnfRGB[0],
2390: LnF.lnfRGB[12]),
2391: "Copy port data to test data", new ActionListener () {
2392: @Override public void actionPerformed (ActionEvent ae) {
2393: smgCopyClicked ();
2394: }
2395: }),
2396: "ja", "ポートデータをテストデータにコピーする"),
2397: 16, 20),
2398: Box.createVerticalGlue ()
2399: ),
2400: Box.createHorizontalStrut (2),
2401: ComponentFactory.createVerticalBox (
2402: smgPortRadioButton = ComponentFactory.setFixedSize (
2403: Multilingual.mlnToolTipText (
2404: ComponentFactory.createRadioButton (smgButtonGroup, smgIsPortSelected (), "", new ActionListener () {
2405: @Override public void actionPerformed (ActionEvent ae) {
2406: smgPortSelected ();
2407: }
2408: }),
2409: "en", "Reflect port data", "ja", "ポートデータを反映させる"),
2410: 14, LnF.lnfFontSize + 4),
2411: smgTestRadioButton = ComponentFactory.setFixedSize (
2412: Multilingual.mlnToolTipText (
2413: ComponentFactory.createRadioButton (smgButtonGroup, smgIsTestSelected (), "", new ActionListener () {
2414: @Override public void actionPerformed (ActionEvent ae) {
2415: smgTestSelected ();
2416: }
2417: }),
2418: "en", "Reflect test data", "ja", "テストデータを反映させる"),
2419: 14, LnF.lnfFontSize + 4)
2420: )
2421: )
2422: ),
2423: 32, (LnF.lnfFontSize + 4) * 3);
2424: }
2425:
2426:
2427:
2428: public final boolean smgIsPortSelected () {
2429: for (SMTItem item : smgItemArray) {
2430: if (item.smiMaskValue != 0) {
2431: return false;
2432: }
2433: }
2434: return true;
2435: }
2436:
2437:
2438:
2439: public final boolean smgIsTestSelected () {
2440: for (SMTItem item : smgItemArray) {
2441: if (item.smiMaskValue == 0) {
2442: return false;
2443: }
2444: }
2445: return true;
2446: }
2447:
2448:
2449:
2450:
2451: public void smgCopyClicked () {
2452: for (SMTItem item : smgItemArray) {
2453: if (item.smiBitWidth == 1) {
2454: item.smiTestCheckBox.setSelected (item.smiPortValue != 0);
2455: } else {
2456: item.smiTestSpinner.setIntValue (item.smiPortValue);
2457: }
2458: item.smiTestChanged ();
2459: }
2460: }
2461:
2462:
2463:
2464: public void smgPortSelected () {
2465: for (SMTItem item : smgItemArray) {
2466: item.smiPortRadioButton.setSelected (true);
2467: item.smiPortSelected ();
2468: }
2469: }
2470:
2471:
2472:
2473: public void smgTestSelected () {
2474: for (SMTItem item : smgItemArray) {
2475: item.smiTestRadioButton.setSelected (true);
2476: item.smiTestSelected ();
2477: }
2478: }
2479:
2480:
2481:
2482: public void smgUpdate () {
2483: if (smgIsPortSelected ()) {
2484: smgPortRadioButton.setSelected (true);
2485: } else if (smgIsTestSelected ()) {
2486: smgTestRadioButton.setSelected (true);
2487: } else {
2488: smgButtonGroup.clearSelection ();
2489: }
2490: }
2491:
2492: }
2493:
2494:
2495:
2496: }
2497:
2498:
2499: