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