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