trunk/src/mess/drivers/mbee.c
| r244811 | r244812 | |
| 370 | 370 | |
| 371 | 371 | PORT_START("X.3") /* IN3 KEY ROW 3 [180] */ |
| 372 | 372 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) |
| 373 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('u') PORT_CHAR('Y') PORT_CHAR(0x19) |
| 373 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(0x19) |
| 374 | 374 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) |
| 375 | 375 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHAR(0x1b) |
| 376 | 376 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1c) |
| r244811 | r244812 | |
| 391 | 391 | PORT_START("X.5") /* IN5 KEY ROW 5 [280] */ |
| 392 | 392 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("8 (") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 393 | 393 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 394 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
| 395 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(": *") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| 394 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(": *") PORT_CODE(KEYCODE_COLON) PORT_CHAR(':') PORT_CHAR('*') |
| 395 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("; +") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+') |
| 396 | 396 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 397 | 397 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("- =") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 398 | 398 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| r244811 | r244812 | |
| 418 | 418 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 419 | 419 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 420 | 420 | |
| 421 | | PORT_START("EXTRA") /* IN8 extra keys (non-premium keyboard only) */ |
| 422 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Up)") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 423 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 424 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 425 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 426 | | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Insert)") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) |
| 427 | | PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 428 | | |
| 429 | 421 | // Autorun on quickload |
| 430 | 422 | PORT_START("CONFIG") |
| 431 | 423 | PORT_CONFNAME( 0x01, 0x01, "Autorun on Quickload") |
trunk/src/mess/includes/mbee.h
| r244811 | r244812 | |
| 49 | 49 | , m_pak(*this, "pak") |
| 50 | 50 | , m_telcom(*this, "telcom") |
| 51 | 51 | , m_basic(*this, "basic") |
| 52 | | , m_io_extra(*this, "EXTRA") |
| 53 | | , m_io_config(*this, "CONFIG") |
| 52 | , m_io_x7(*this, "X.7") |
| 54 | 53 | , m_io_oldkb(*this, "X") |
| 55 | 54 | , m_io_newkb(*this, "Y") |
| 55 | , m_io_config(*this, "CONFIG") |
| 56 | 56 | , m_screen(*this, "screen") |
| 57 | 57 | { } |
| 58 | 58 | |
| r244811 | r244812 | |
| 164 | 164 | optional_memory_bank m_pak; |
| 165 | 165 | optional_memory_bank m_telcom; |
| 166 | 166 | optional_memory_bank m_basic; |
| 167 | | optional_ioport m_io_extra; |
| 168 | | required_ioport m_io_config; |
| 167 | optional_ioport m_io_x7; |
| 169 | 168 | optional_ioport_array<8> m_io_oldkb; |
| 170 | 169 | optional_ioport_array<15> m_io_newkb; |
| 170 | required_ioport m_io_config; |
| 171 | 171 | required_device<screen_device> m_screen; |
| 172 | 172 | }; |
| 173 | 173 | |
trunk/src/mess/video/mbee.c
| r244811 | r244812 | |
| 156 | 156 | { |
| 157 | 157 | if (m_has_oldkb) |
| 158 | 158 | { |
| 159 | offs &= 0x3f0; // safety check |
| 159 | 160 | UINT8 port = (offs >> 7) & 7; |
| 160 | 161 | UINT8 bit = (offs >> 4) & 7; |
| 162 | UINT8 extra = 0; |
| 161 | 163 | UINT8 data = m_io_oldkb[port]->read(); |
| 164 | if ((port == 0) || (port == 2) || (port == 3)) |
| 165 | extra = m_io_x7->read(); |
| 166 | else |
| 167 | if (port == 7) |
| 168 | extra = data; |
| 169 | |
| 162 | 170 | bool keydown = ( data >> bit ) & 1; |
| 163 | 171 | |
| 164 | | // This adds premium-style cursor keys to the old keyboard |
| 165 | | // They are used by the pc85 & ppc menu, and the 128k shell. |
| 166 | | if (!keydown) |
| 172 | // This adds premium-style cursor keys to the old keyboard. |
| 173 | // They are used by the pc85 menu. Premium keyboards already |
| 174 | // have these keys fitted. |
| 175 | if (!keydown && !m_is_premium && extra) |
| 167 | 176 | { |
| 168 | | UINT8 extra = m_io_extra->read(); |
| 169 | | |
| 170 | | if (extra && port == 7 && bit == 1) keydown = 1; /* Control */ |
| 171 | | |
| 172 | | if (BIT(extra, 0) && ( port == 0 && bit == 5 )) keydown = 1; // cursor up = ^E |
| 177 | if BIT(extra, 0) // cursor up |
| 178 | { |
| 179 | if( port == 7 && bit == 1 ) keydown = 1; |
| 180 | if( port == 0 && bit == 5 ) keydown = 1; // control E |
| 181 | } |
| 173 | 182 | else |
| 174 | | if (BIT(extra, 1) && ( port == 3 && bit == 0 )) keydown = 1; // cursor down = ^X |
| 183 | if BIT(extra, 2) // cursor down |
| 184 | { |
| 185 | if( port == 7 && bit == 1 ) keydown = 1; |
| 186 | if( port == 3 && bit == 0 ) keydown = 1; // control X |
| 187 | } |
| 175 | 188 | else |
| 176 | | if (BIT(extra, 2) && ( port == 2 && bit == 3 )) keydown = 1; // cursor left = ^S |
| 189 | if BIT(extra, 3) // cursor left |
| 190 | { |
| 191 | if( port == 7 && bit == 1 ) keydown = 1; |
| 192 | if( port == 2 && bit == 3 ) keydown = 1; // control S |
| 193 | } |
| 177 | 194 | else |
| 178 | | if (BIT(extra, 3) && ( port == 0 && bit == 4 )) keydown = 1; // cursor right = ^D |
| 179 | | else |
| 180 | | if (BIT(extra, 4) && ( port == 2 && bit == 6 )) keydown = 1; // insert = ^V |
| 195 | if BIT(extra, 6) // cursor right |
| 196 | { |
| 197 | if( port == 7 && bit == 1 ) keydown = 1; |
| 198 | if( port == 0 && bit == 4 ) keydown = 1; // control D |
| 199 | } |
| 181 | 200 | } |
| 182 | 201 | |
| 183 | 202 | if( keydown ) |