src/mess/drivers/tutor.c
| r2846 | r2847 | |
| 160 | 160 | |
| 161 | 161 | static READ8_HANDLER(read_keyboard) |
| 162 | 162 | { |
| 163 | | char port[6]; |
| 163 | char port[12]; |
| 164 | UINT8 value; |
| 164 | 165 | |
| 165 | | sprintf(port, "LINE%d", offset); |
| 166 | | return input_port_read(machine, port); |
| 166 | snprintf(port, ARRAY_LENGTH(port), "LINE%d", offset); |
| 167 | value = input_port_read(machine, port); |
| 168 | |
| 169 | /* hack for port overlapping with joystick */ |
| 170 | if (value == 5) |
| 171 | { |
| 172 | snprintf(port, ARRAY_LENGTH(port), "LINE%d_alt", offset); |
| 173 | value |= input_port_read(machine, port); |
| 174 | } |
| 175 | return value; |
| 167 | 176 | } |
| 168 | 177 | |
| 169 | 178 | static DEVICE_IMAGE_LOAD( tutor_cart ) |
| r2846 | r2847 | |
| 522 | 531 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 523 | 532 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') // this one is 4th line, 4th key after 'M' |
| 524 | 533 | |
| 534 | PORT_START_TAG("LINE5_alt") /* col 5 */ |
| 525 | 535 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) |
| 526 | 536 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_PLAYER(2) |
| 527 | 537 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) |