Previous 15994 Revisions Next

r13146 Sunday 30th October, 2011 at 22:15:41 UTC by Robbbert
JUNIOR - added standard paste facility.
[src/mess/drivers]junior.c
[src/mess/layout]junior.lay

src/mess/layout/junior.lay
r13145r13146
44
55   <element name="digit" defstate="0">
66      <led7seg>
7         <color red="1.00" green="0.0" blue="0.0" />
7         <color red="0.75" green="0.0" blue="0.0" />
88      </led7seg>
99   </element>
10   <element name="background">
11      <rect>
12         <bounds left="0" top="0" right="1" bottom="1" />
13         <color red="0.0" green="0.0" blue="0.0" />
14      </rect>
15   </element>
1016
1117   <view name="Default Layout">
12
13   <!-- Led address display -->
18      <!-- Background -->
19      <backdrop element="background">
20         <bounds left="377" top="399" right="571" bottom="443" />
21      </backdrop>
22      <!-- Led address display -->
1423      <bezel name="digit0" element="digit">
15         <bounds x="358" y="33" width="20" height="25" />
24         <bounds x="387" y="409" width="18" height="24" />
1625      </bezel>
1726      <bezel name="digit1" element="digit">
18         <bounds x="390" y="33" width="20" height="25" />
27         <bounds x="417" y="409" width="18" height="24" />
1928      </bezel>
2029      <bezel name="digit2" element="digit">
21         <bounds x="419" y="33" width="20" height="25" />
30         <bounds x="447" y="409" width="18" height="24" />
2231      </bezel>
2332      <bezel name="digit3" element="digit">
24         <bounds x="449" y="33" width="20" height="25" />
33         <bounds x="477" y="409" width="18" height="24" />
2534      </bezel>
2635
2736      <!-- Led data display -->
2837      <bezel name="digit4" element="digit">
29         <bounds x="478" y="33" width="20" height="25" />
38         <bounds x="513" y="409" width="18" height="24" />
3039      </bezel>
3140      <bezel name="digit5" element="digit">
32         <bounds x="508" y="33" width="20" height="25" />
41         <bounds x="543" y="409" width="18" height="24" />
3342      </bezel>
34
35
36      <!-- Buttons -->
37      <!-- Column 1 : C 8 4 0 -->
38      <bezel element="button" inputtag="LINE1" inputmask="0x02">
39         <bounds x="342" y="230" width="26" height="23"/>
40      </bezel>
41
42      <bezel element="button" inputtag="LINE1" inputmask="0x20">
43         <bounds x="342" y="281" width="26" height="23"/>
44      </bezel>
45
46      <bezel element="button" inputtag="LINE0" inputmask="0x04">
47         <bounds x="342" y="331" width="26" height="23"/>
48      </bezel>
49
50      <bezel element="button" inputtag="LINE0" inputmask="0x40">
51         <bounds x="342" y="382" width="26" height="23"/>
52      </bezel>
53
54
55      <!-- Column 2 : D 9 5 1 -->
56      <bezel element="button" inputtag="LINE1" inputmask="0x01">
57         <bounds x="380" y="230" width="26" height="23"/>
58      </bezel>
59
60      <bezel element="button" inputtag="LINE1" inputmask="0x10">
61         <bounds x="380" y="281" width="26" height="23"/>
62      </bezel>
63
64      <bezel element="button" inputtag="LINE0" inputmask="0x02">
65         <bounds x="380" y="331" width="26" height="23"/>
66      </bezel>
67
68      <bezel element="button" inputtag="LINE0" inputmask="0x20">
69         <bounds x="380" y="382" width="26" height="23"/>
70      </bezel>
71
72
73      <!-- Column 3 : E A 6 2 -->
74      <bezel element="button" inputtag="LINE2" inputmask="0x40">
75         <bounds x="416" y="230" width="26" height="23"/>
76      </bezel>
77
78      <bezel element="button" inputtag="LINE1" inputmask="0x08">
79         <bounds x="416" y="281" width="26" height="23"/>
80      </bezel>
81
82      <bezel element="button" inputtag="LINE0" inputmask="0x01">
83         <bounds x="416" y="331" width="26" height="23"/>
84      </bezel>
85
86      <bezel element="button" inputtag="LINE0" inputmask="0x10">
87         <bounds x="416" y="382" width="26" height="23"/>
88      </bezel>
89
90
91      <!-- Column 4 : F B 7 3 -->
92      <bezel element="button" inputtag="LINE2" inputmask="0x20">
93         <bounds x="453" y="230" width="26" height="23"/>
94      </bezel>
95
96      <bezel element="button" inputtag="LINE1" inputmask="0x04">
97         <bounds x="453" y="281" width="26" height="23"/>
98      </bezel>
99
100      <bezel element="button" inputtag="LINE1" inputmask="0x40">
101         <bounds x="453" y="331" width="26" height="23"/>
102      </bezel>
103
104      <bezel element="button" inputtag="LINE0" inputmask="0x08">
105         <bounds x="453" y="382" width="26" height="23"/>
106      </bezel>
107
108
109      <!-- Column 5 : PC AD DA + -->
110      <bezel element="button" inputtag="LINE2" inputmask="0x01">
111         <bounds x="523" y="230" width="26" height="23"/>
112      </bezel>
113
114      <bezel element="button" inputtag="LINE2" inputmask="0x10">
115         <bounds x="523" y="280" width="26" height="23"/>
116      </bezel>
117
118      <bezel element="button" inputtag="LINE2" inputmask="0x08">
119         <bounds x="523" y="330" width="26" height="23"/>
120      </bezel>
121
122      <bezel element="button" inputtag="LINE2" inputmask="0x04">
123         <bounds x="523" y="380" width="26" height="23"/>
124      </bezel>
125
126
127      <!-- Column 6 : GO ST RST -->
128      <bezel element="button" inputtag="LINE2" inputmask="0x02">
129         <bounds x="562" y="280" width="26" height="23"/>
130      </bezel>
131
132      <bezel element="button" inputtag="LINE3" inputmask="0x40">
133         <bounds x="562" y="330" width="26" height="23"/>
134      </bezel>
135
136      <bezel element="button" inputtag="LINE3" inputmask="0x20">
137         <bounds x="562" y="380" width="26" height="23"/>
138      </bezel>
139
14043   </view>
14144</mamelayout>
src/mess/drivers/junior.c
r13145r13146
44
55        17/07/2009 Skeleton driver.
66
7This is heavily based on the KIM-1, the keycodes and operation being
8identical.
9
10Pasting:
11        0-F : as is
12        + (inc) : ^
13        AD : -
14        DA : =
15        GO : X
16
17(note: DA only works when addressing RAM)
18
19Test Paste:
20        =11^22^33^44^55^66^77^88^99^-0000
21        Now press up-arrow to confirm the data has been entered.
22
723****************************************************************************/
824#define ADDRESS_MAP_MODERN
925
r13145r13146
5672static INPUT_PORTS_START( junior )
5773PORT_START("LINE0")         /* IN0 keys row 0 */
5874   PORT_BIT( 0x80, 0x00, IPT_UNUSED )
59   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("0.6: 0") PORT_CODE(KEYCODE_0)
60   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("0.5: 1") PORT_CODE(KEYCODE_1)
61   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("0.4: 2") PORT_CODE(KEYCODE_2)
62   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("0.3: 3") PORT_CODE(KEYCODE_3)
63   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("0.2: 4") PORT_CODE(KEYCODE_4)
64   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("0.1: 5") PORT_CODE(KEYCODE_5)
65   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("0.0: 6") PORT_CODE(KEYCODE_6)
75   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0')
76   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
77   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2')
78   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3')
79   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4')
80   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5')
81   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6')
6682
6783   PORT_START("LINE1")         /* IN1 keys row 1 */
6884   PORT_BIT( 0x80, 0x00, IPT_UNUSED )
69   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("1.6: 7") PORT_CODE(KEYCODE_7)
70   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("1.5: 8") PORT_CODE(KEYCODE_8)
71   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("1.4: 9") PORT_CODE(KEYCODE_9)
72   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("1.3: A") PORT_CODE(KEYCODE_A)
73   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("1.2: B") PORT_CODE(KEYCODE_B)
74   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("1.1: C") PORT_CODE(KEYCODE_C)
75   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("1.0: D") PORT_CODE(KEYCODE_D)
85   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7')
86   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8')
87   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9')
88   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A')
89   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B')
90   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C')
91   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D')
7692
7793   PORT_START("LINE2")         /* IN2 keys row 2 */
7894   PORT_BIT( 0x80, 0x00, IPT_UNUSED )
79   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("2.6: E") PORT_CODE(KEYCODE_E)
80   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("2.5: F") PORT_CODE(KEYCODE_F)
81   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("2.4: AD (F1)") PORT_CODE(KEYCODE_F1)
82   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("2.3: DA (F2)") PORT_CODE(KEYCODE_F2)
83   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("2.2: +  (CR)") PORT_CODE(KEYCODE_ENTER)
84   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("2.1: GO (F5)") PORT_CODE(KEYCODE_F5)
85   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("2.0: PC (F6)") PORT_CODE(KEYCODE_F6)
95   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E')
96   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F')
97   PORT_BIT( 0x10, 0x10, IPT_KEYBOARD ) PORT_NAME("AD") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
98   PORT_BIT( 0x08, 0x08, IPT_KEYBOARD ) PORT_NAME("DA") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=')
99   PORT_BIT( 0x04, 0x04, IPT_KEYBOARD ) PORT_NAME("+") PORT_CODE(KEYCODE_UP) PORT_CHAR('^')
100   PORT_BIT( 0x02, 0x02, IPT_KEYBOARD ) PORT_NAME("GO") PORT_CODE(KEYCODE_X) PORT_CHAR('X')
101   PORT_BIT( 0x01, 0x01, IPT_KEYBOARD ) PORT_NAME("PC") PORT_CODE(KEYCODE_F6)
86102
87103   PORT_START("LINE3")         /* IN3 STEP and RESET keys, MODE switch */
88104   PORT_BIT( 0x80, 0x00, IPT_UNUSED )
89   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("sw1: ST (F7)") PORT_CODE(KEYCODE_F7)
90   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("sw2: RST (F3)") PORT_CODE(KEYCODE_F3) PORT_CHANGED(junior_reset, NULL)
105   PORT_BIT( 0x40, 0x40, IPT_KEYBOARD ) PORT_NAME("sw1: ST") PORT_CODE(KEYCODE_F7)
106   PORT_BIT( 0x20, 0x20, IPT_KEYBOARD ) PORT_NAME("sw2: RST") PORT_CODE(KEYCODE_F3) PORT_CHANGED(junior_reset, NULL)
91107   PORT_DIPNAME(0x10, 0x10, "sw3: SS (NumLock)") PORT_CODE(KEYCODE_NUMLOCK) PORT_TOGGLE
92108   PORT_DIPSETTING( 0x00, "single step")
93109   PORT_DIPSETTING( 0x10, "run")
r13145r13146
203219   int i;
204220
205221   for ( i = 0; i < 6; i++ )
206   {
207222      state->m_led_time[i] = 0;
208   }
209223}
210224
211225
r13145r13146
221235   /* video hardware */
222236   MCFG_DEFAULT_LAYOUT( layout_junior )
223237
238   /* Devices */
224239   MCFG_RIOT6532_ADD("riot", XTAL_1MHz, junior_riot_interface)
225
226240   MCFG_TIMER_ADD_PERIODIC("led_timer", junior_update_leds, attotime::from_hz(50))
227241MACHINE_CONFIG_END
228242
r13145r13146
244258
245259/* Driver */
246260
247/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT     COMPANY   FULLNAME       FLAGS */
248COMP( 1980, junior,  0,       0,     junior,    junior,   0,     "Elektor Electronics", "Junior Computer", GAME_SUPPORTS_SAVE | GAME_NO_SOUND)
261/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT     COMPANY                     FULLNAME       FLAGS */
262COMP( 1980, junior, 0,      0,       junior,    junior,   0,     "Elektor Electronics", "Junior Computer", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team