trunk/src/mess/drivers/tispeak.c
| r242508 | r242509 | |
| 1 | 1 | // license:BSD-3-Clause |
| 2 | | // copyright-holders:hap |
| 2 | // copyright-holders:hap, Lord Nightmare |
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | 5 | Texas Instruments Speak & Spell hardware |
| r242508 | r242509 | |
| 159 | 159 | |
| 160 | 160 | WRITE_LINE_MEMBER(tispeak_state::auto_power_off) |
| 161 | 161 | { |
| 162 | | // power-off request from the MCU, usually after a couple of minutes of idling |
| 162 | // power-off request from the MCU, when [OFF] is pressed, also typically after a couple of minutes of idling |
| 163 | 163 | if (state) |
| 164 | 164 | power_off(); |
| 165 | 165 | } |
| r242508 | r242509 | |
| 186 | 186 | |
| 187 | 187 | INPUT_CHANGED_MEMBER(tispeak_state::power_button) |
| 188 | 188 | { |
| 189 | | // note: even though power buttons are on the matrix, they are not MCU-controlled |
| 190 | 189 | int on = (int)(FPTR)param; |
| 191 | 190 | |
| 192 | 191 | if (on) |
| r242508 | r242509 | |
| 245 | 244 | PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 246 | 245 | |
| 247 | 246 | PORT_START("IN.7") // R7 |
| 248 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, tispeak_state, power_button, (void *)0) |
| 247 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") // -> auto_power_off |
| 249 | 248 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_NAME("Go") |
| 250 | 249 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_NAME("Replay") |
| 251 | 250 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_NAME("Repeat") |
| r242508 | r242509 | |
| 286 | 285 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 287 | 286 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") |
| 288 | 287 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Go") |
| 289 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, tispeak_state, power_button, (void *)0) |
| 288 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") // -> auto_power_off |
| 290 | 289 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 291 | 290 | |
| 292 | 291 | PORT_START("IN.4") // R4 |
| r242508 | r242509 | |
| 300 | 299 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") |
| 301 | 300 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-") |
| 302 | 301 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY) |
| 303 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE) |
| 302 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE) // / |
| 304 | 303 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_NAME("Mix It") |
| 305 | 304 | |
| 306 | 305 | PORT_START("IN.6") // R6 |
trunk/src/mess/layout/tispeak.lay
| r242508 | r242509 | |
| 6 | 6 | <!-- note: the TI Speak & Spell 14seg digits look different from MAME's default, most notably the right half is wider --> |
| 7 | 7 | |
| 8 | 8 | <element name="digit" defstate="0"> |
| 9 | | <led14seg><color red="0.3" green="1.0" blue="0.7" /></led14seg> |
| 9 | <led14seg><color red="0.2" green="1.0" blue="0.85" /></led14seg> |
| 10 | 10 | </element> |
| 11 | 11 | |
| 12 | 12 | <!-- add our own for DP(display point) and the custom AP(apostrophe) segments --> |
| 13 | 13 | |
| 14 | 14 | <element name="lamp_dp" defstate="0"> |
| 15 | | <disk state="0"><color red="0.0353" green="0.1255" blue="0.0863" /></disk> |
| 16 | | <disk state="1"><color red="0.3" green="1.0" blue="0.7" /></disk> |
| 15 | <disk state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></disk> |
| 16 | <disk state="1"><color red="0.2" green="1.0" blue="0.85" /></disk> |
| 17 | 17 | </element> |
| 18 | 18 | <element name="lamp_ap" defstate="0"> |
| 19 | | <rect state="0"><color red="0.0353" green="0.1255" blue="0.0863" /></rect> |
| 20 | | <rect state="1"><color red="0.3" green="1.0" blue="0.7" /></rect> |
| 19 | <rect state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></rect> |
| 20 | <rect state="1"><color red="0.2" green="1.0" blue="0.85" /></rect> |
| 21 | 21 | </element> |
| 22 | 22 | |
| 23 | 23 | |