src/mess/layout/junior.lay
| r13145 | r13146 | |
| 4 | 4 | |
| 5 | 5 | <element name="digit" defstate="0"> |
| 6 | 6 | <led7seg> |
| 7 | | <color red="1.00" green="0.0" blue="0.0" /> |
| 7 | <color red="0.75" green="0.0" blue="0.0" /> |
| 8 | 8 | </led7seg> |
| 9 | 9 | </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> |
| 10 | 16 | |
| 11 | 17 | <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 --> |
| 14 | 23 | <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" /> |
| 16 | 25 | </bezel> |
| 17 | 26 | <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" /> |
| 19 | 28 | </bezel> |
| 20 | 29 | <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" /> |
| 22 | 31 | </bezel> |
| 23 | 32 | <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" /> |
| 25 | 34 | </bezel> |
| 26 | 35 | |
| 27 | 36 | <!-- Led data display --> |
| 28 | 37 | <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" /> |
| 30 | 39 | </bezel> |
| 31 | 40 | <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" /> |
| 33 | 42 | </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 | | |
| 140 | 43 | </view> |
| 141 | 44 | </mamelayout> |
src/mess/drivers/junior.c
| r13145 | r13146 | |
| 4 | 4 | |
| 5 | 5 | 17/07/2009 Skeleton driver. |
| 6 | 6 | |
| 7 | This is heavily based on the KIM-1, the keycodes and operation being |
| 8 | identical. |
| 9 | |
| 10 | Pasting: |
| 11 | 0-F : as is |
| 12 | + (inc) : ^ |
| 13 | AD : - |
| 14 | DA : = |
| 15 | GO : X |
| 16 | |
| 17 | (note: DA only works when addressing RAM) |
| 18 | |
| 19 | Test 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 | |
| 7 | 23 | ****************************************************************************/ |
| 8 | 24 | #define ADDRESS_MAP_MODERN |
| 9 | 25 | |
| r13145 | r13146 | |
| 56 | 72 | static INPUT_PORTS_START( junior ) |
| 57 | 73 | PORT_START("LINE0") /* IN0 keys row 0 */ |
| 58 | 74 | 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') |
| 66 | 82 | |
| 67 | 83 | PORT_START("LINE1") /* IN1 keys row 1 */ |
| 68 | 84 | 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') |
| 76 | 92 | |
| 77 | 93 | PORT_START("LINE2") /* IN2 keys row 2 */ |
| 78 | 94 | 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) |
| 86 | 102 | |
| 87 | 103 | PORT_START("LINE3") /* IN3 STEP and RESET keys, MODE switch */ |
| 88 | 104 | 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) |
| 91 | 107 | PORT_DIPNAME(0x10, 0x10, "sw3: SS (NumLock)") PORT_CODE(KEYCODE_NUMLOCK) PORT_TOGGLE |
| 92 | 108 | PORT_DIPSETTING( 0x00, "single step") |
| 93 | 109 | PORT_DIPSETTING( 0x10, "run") |
| r13145 | r13146 | |
| 203 | 219 | int i; |
| 204 | 220 | |
| 205 | 221 | for ( i = 0; i < 6; i++ ) |
| 206 | | { |
| 207 | 222 | state->m_led_time[i] = 0; |
| 208 | | } |
| 209 | 223 | } |
| 210 | 224 | |
| 211 | 225 | |
| r13145 | r13146 | |
| 221 | 235 | /* video hardware */ |
| 222 | 236 | MCFG_DEFAULT_LAYOUT( layout_junior ) |
| 223 | 237 | |
| 238 | /* Devices */ |
| 224 | 239 | MCFG_RIOT6532_ADD("riot", XTAL_1MHz, junior_riot_interface) |
| 225 | | |
| 226 | 240 | MCFG_TIMER_ADD_PERIODIC("led_timer", junior_update_leds, attotime::from_hz(50)) |
| 227 | 241 | MACHINE_CONFIG_END |
| 228 | 242 | |
| r13145 | r13146 | |
| 244 | 258 | |
| 245 | 259 | /* Driver */ |
| 246 | 260 | |
| 247 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 248 | | COMP( 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 */ |
| 262 | COMP( 1980, junior, 0, 0, junior, junior, 0, "Elektor Electronics", "Junior Computer", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW) |