src/mess/machine/kb_keytro.c
| r3013 | r3014 | |
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | | Emulation file for Keytronic KB3270/PC keyboard. |
| 3 | TODO: |
| 4 | - Add support for PF01 - PF24 |
| 4 | 5 | |
| 6 | Emulation file for Keytronic KB3270/PC keyboard by Wilbert Pol. |
| 7 | |
| 5 | 8 | This keyboard supports both the PC/XT and the PC/AT keyboard protocols. The |
| 6 | 9 | desired protocol can be selected by a switch on the keybaord. |
| 7 | 10 | |
| 8 | | SW1 is connected to Port 1 of a 8031. |
| 9 | | P1.0 - On - Standard PC and XT |
| 10 | | Off - Enhanced XT, AT and PS/2 Models. |
| 11 | | P1.1 - On - IRMA Emulation |
| 12 | | Off - Native Scan Code Set |
| 13 | | P1.2 - On - Enhanced 101 Scan Code Set |
| 14 | | Off - Native Scan Code Set |
| 15 | | P1.3 - On - Disable E0 |
| 16 | | Off - Enable E0 |
| 17 | | P1.4 - On - Int'l Code Tables |
| 18 | | Off - U.S. Code Tables |
| 19 | | P1.5 - Off - Not Used |
| 20 | | P1.6 - Off - Not Used |
| 21 | | P1.7 - On - Key click |
| 22 | | Off - No key click |
| 23 | | |
| 24 | | TODO: |
| 25 | | - Verify P1 boot up behavior. Right now we ignore the signals when |
| 26 | | P1 != 0xFF. (Code at 0x0FCF) |
| 27 | | |
| 28 | 11 | Keyboard matrix. |
| 29 | 12 | |
| 30 | 13 | Z5 = XR 22-00950-001 |
| r3013 | r3014 | |
| 34 | 17 | Z11 = XR 22-908-03B |
| 35 | 18 | |
| 36 | 19 | |
| 37 | | Z11 pin 8 |
| 38 | | | Z11 pin 7 |
| 39 | | | | Z11 pin 6 |
| 40 | | | | | Z11 pin 5 |
| 41 | | | | | | Z11 pin 4 |
| 20 | | Z11 pin 8 |
| 21 | | | Z11 pin 7 |
| 22 | | | | Z11 pin 6 |
| 23 | | | | | Z11 pin 5 |
| 24 | | | | | | Z11 pin 4 |
| 42 | 25 | | | | | | | |
| 43 | 26 | F1 -------- F2 ------------- F3 ----- F4 ----- F5 ----- F6 -------- J2 pin 2 - Z5 pin 19 |
| 44 | 27 | | | | | | | |
| r3013 | r3014 | |
| 68 | 51 | | | | | | | |
| 69 | 52 | Backspace - PA1/Dup -------- |<-- --- /a\ ---- Pad + -- Pad + ----- J9 pin 5 - Z7 pin 12 |
| 70 | 53 | | | | | | | |
| 71 | | Esc ------- NumLock -------- Pad 7 -- Pad 8 -- Pad 4 -- Pad 5 ---------------- Can't finish trace, goes under SW1 |
| 54 | Esc ------- NumLock -------- Pad 7 -- Pad 8 -- Pad 4 -- Pad 5 ------J9 pin 3 - Z7 pin 2 |
| 72 | 55 | | | | | | | |
| 73 | | SysReq ---- ScrLk ---------- -->| --- Pad 9 -- Pad - -- Pad 6 ---------------- Can't finish trace, goes under Z8 between pins 5 and 6 |
| 56 | SysReq ---- ScrLk ---------- -->| --- Pad 9 -- Pad - -- Pad 6 ---------------- goes under Z8 between pins 5 and 6 to Z8 pin 15? |
| 74 | 57 | | | | | | | |
| 75 | 58 | Pad 3 ----- Pad 0 ---------- Pad 0 -- Pad . -- Unused - Up ------------------- Z7 pin 7 |
| 76 | 59 | | | | | | | |
| 77 | | PrtSc * --- PA2/Field Mark - Right -- /a ----- Center - Unused --------------- Can't finish trace, SW1 blocks view |
| 60 | PrtSc * --- PA2/Field Mark - Right -- /a ----- Center - Unused ---- J9 pin 2 - Z7 pin 3 |
| 78 | 61 | | | | | | | |
| 79 | 62 | |
| 80 | 63 | The 'Return', 'Backspace, 'Pad 0', 'Right Shift', 'Pad +' keys on the keyboard |
| r3013 | r3014 | |
| 86 | 69 | #include "machine/kb_keytro.h" |
| 87 | 70 | #include "cpu/i8051/i8051.h" |
| 88 | 71 | |
| 72 | #define LOG 0 |
| 73 | |
| 89 | 74 | static struct { |
| 90 | 75 | UINT8 p1; |
| 91 | 76 | UINT8 p1_data; |
| r3013 | r3014 | |
| 96 | 81 | write8_machine_func clock_callback; |
| 97 | 82 | write8_machine_func data_callback; |
| 98 | 83 | int cpunum; |
| 84 | UINT16 last_write_addr; |
| 99 | 85 | } kb_keytronic; |
| 100 | 86 | |
| 101 | 87 | |
| r3013 | r3014 | |
| 106 | 92 | ***************************************************************************/ |
| 107 | 93 | INPUT_PORTS_START( kb_keytronic ) |
| 108 | 94 | PORT_START_TAG( "kb_keytronic_0b" ) |
| 109 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 110 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 111 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 112 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 113 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 114 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 115 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 116 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 95 | PORT_DIPNAME( 0x01, 0x00, "Protocol selection" ) |
| 96 | PORT_DIPSETTING( 0x00, "Enhanced XT, AT and PS/2 models" ) |
| 97 | PORT_DIPSETTING( 0x01, "Standard PC and XT" ) |
| 98 | PORT_DIPNAME( 0x02, 0x02, "IRMA/Native scan code set" ) |
| 99 | PORT_DIPSETTING( 0x00, "Native scan code set" ) |
| 100 | PORT_DIPSETTING( 0x02, "IRMA Emulation" ) |
| 101 | PORT_DIPNAME( 0x04, 0x04, "Enhanced 101/Native scan code set" ) |
| 102 | PORT_DIPSETTING( 0x00, "Native scan code set" ) |
| 103 | PORT_DIPSETTING( 0x04, "Enhanced 101 scan code set" ) |
| 104 | PORT_DIPNAME( 0x08, 0x08, "Enable E0" ) |
| 105 | PORT_DIPSETTING( 0x00, "Enable E0" ) |
| 106 | PORT_DIPSETTING( 0x08, "Disable E0" ) |
| 107 | PORT_DIPNAME( 0x10, 0x10, "Code tables" ) |
| 108 | PORT_DIPSETTING( 0x00, "U.S. code tables" ) |
| 109 | PORT_DIPSETTING( 0x10, "International code tables" ) |
| 110 | PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 111 | PORT_DIPNAME( 0x80, 0x80, "Key click" ) |
| 112 | PORT_DIPSETTING( 0x00, "No key click" ) |
| 113 | PORT_DIPSETTING( 0x80, "Key click" ) |
| 117 | 114 | |
| 118 | | PORT_START_TAG( "kb_keytronic_0e" ) |
| 119 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 120 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 121 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 122 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 123 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 124 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 125 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 126 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 127 | | |
| 128 | 115 | PORT_START_TAG( "kb_keytronic_0f" ) |
| 129 | 116 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') /* 06 */ |
| 130 | 117 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') /* 05 */ |
| r3013 | r3014 | |
| 132 | 119 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') /* 13 */ |
| 133 | 120 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') /* 22 */ |
| 134 | 121 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') /* 21 */ |
| 135 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Cursor Right (MF2?)") /* 6a */ |
| 136 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) /* 41 */ |
| 122 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 41 */ |
| 123 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 6a */ |
| 137 | 124 | |
| 138 | | PORT_START_TAG( "kb_keytronic_30" ) |
| 139 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) /* 58 */ |
| 125 | PORT_START_TAG( "kb_keytronic_30_0" ) |
| 126 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') /* 31 */ |
| 140 | 127 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') /* 32 */ |
| 141 | 128 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') /* 30 */ |
| 142 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 5b */ |
| 143 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 5c */ |
| 144 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 5d */ |
| 145 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("End (MF2?)") /* 6b */ |
| 146 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) /* 42 */ |
| 129 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') /* 2f */ |
| 130 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') /* 2e */ |
| 131 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') /* 33 */ |
| 132 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 147 | 133 | |
| 148 | | PORT_START_TAG( "kb_keytronic_31" ) |
| 149 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("KP *") /* 37 */ |
| 134 | PORT_START_TAG( "kb_keytronic_30_1" ) |
| 135 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) /* 58 */ |
| 136 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) /* 59 */ |
| 137 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) /* 5a */ |
| 138 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) /* 5b */ |
| 139 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) /* 5c */ |
| 140 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) /* 5d */ |
| 141 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 6b */ |
| 142 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 42 */ |
| 143 | |
| 144 | PORT_START_TAG( "kb_keytronic_31_0" ) |
| 145 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') /* 07 */ |
| 150 | 146 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') /* 08 */ |
| 151 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_MAMEKEY(LSHIFT)) /* 2a */ |
| 152 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 70 */ |
| 153 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') /* 2c */ |
| 147 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') /* 15 */ |
| 148 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') /* 16 */ |
| 149 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') /* 23 */ |
| 154 | 150 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') /* 24 */ |
| 155 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Cursor Down (MF2?)") /* 6c */ |
| 156 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) /* 43 */ |
| 151 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 157 | 152 | |
| 158 | | PORT_START_TAG( "kb_keytronic_32" ) |
| 153 | PORT_START_TAG( "kb_keytronic_31_1" ) |
| 154 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) /* 37 */ |
| 155 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) /* 5f */ |
| 156 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_NAME("LShift") /* 2a */ |
| 157 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("<") /* 70 */ |
| 158 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') /* 2c */ |
| 159 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') /* 2d */ |
| 160 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 6c */ |
| 161 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 43 */ |
| 162 | |
| 163 | PORT_START_TAG( "kb_keytronic_32_0" ) |
| 159 | 164 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') /* 0a */ |
| 160 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) /* 1d */ |
| 161 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 71 */ |
| 162 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LALT) PORT_NAME("Alt") /* 38 */ |
| 163 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Space") /* 39 */ |
| 164 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LALT) PORT_NAME("Alt") /* 38 */ |
| 165 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Cursor Left (MF2?)") /* 69 */ |
| 166 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) /* 40 */ |
| 165 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') /* 09 */ |
| 166 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') /* 18 */ |
| 167 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') /* 17 */ |
| 168 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') /* 26 */ |
| 169 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') /* 25 */ |
| 170 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 167 | 171 | |
| 168 | | PORT_START_TAG( "kb_keytronic_33" ) |
| 172 | PORT_START_TAG( "kb_keytronic_32_1" ) |
| 173 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) /* 57 */ |
| 174 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) /* 1d */ |
| 175 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) /* 71 */ |
| 176 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LALT) PORT_NAME("LAlt") /* 38 */ |
| 177 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') /* 39 */ |
| 178 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RALT) PORT_NAME("RAlt") /* 38 */ |
| 179 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 69 */ |
| 180 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 40 */ |
| 181 | |
| 182 | PORT_START_TAG( "kb_keytronic_33_0" ) |
| 183 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("KP 2") /* 50 */ |
| 184 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("KP 1") /* 4f */ |
| 185 | PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 186 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down") /* 55 */ |
| 187 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Enter") /* 75 */ |
| 188 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 189 | |
| 190 | PORT_START_TAG( "kb_keytronic_33_1" ) |
| 169 | 191 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') /* 02 */ |
| 170 | 192 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') /* 29 */ |
| 171 | 193 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') /* 10 */ |
| 172 | 194 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) /* 0f */ |
| 173 | 195 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') /* 1e */ |
| 174 | 196 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_NAME("Caps") /* 3a */ |
| 175 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("Page Up (MF2?)") /* 68 */ |
| 176 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) /* 3f */ |
| 197 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 68 */ |
| 198 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 3f */ |
| 177 | 199 | |
| 178 | | PORT_START_TAG( "kb_keytronic_34" ) |
| 200 | PORT_START_TAG( "kb_keytronic_34_0" ) |
| 201 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 202 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') /* 35 */ |
| 203 | PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_MAMEKEY(RSHIFT)) /* 36 */ |
| 204 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left") /* 56 */ |
| 205 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') /* 34 */ |
| 206 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 207 | |
| 208 | PORT_START_TAG( "kb_keytronic_34_1" ) |
| 179 | 209 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') /* 02 */ |
| 180 | 210 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') /* 03 */ |
| 181 | 211 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') /* 11 */ |
| 182 | 212 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') /* 12 */ |
| 183 | 213 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') /* 1f */ |
| 184 | 214 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') /* 20 */ |
| 185 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_NAME("Cursor Up (MF2?)") /* 67 */ |
| 186 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) /* 3e */ |
| 215 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 67 */ |
| 216 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 3e */ |
| 187 | 217 | |
| 188 | | PORT_START_TAG( "kb_keytronic_35" ) |
| 218 | PORT_START_TAG( "kb_keytronic_35_0" ) |
| 189 | 219 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') /* 0b */ |
| 190 | 220 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') /* 0c */ |
| 191 | 221 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') /* 19 */ |
| 192 | 222 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') /* 1a */ |
| 193 | 223 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') /* 27 */ |
| 194 | 224 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') /* 28 */ |
| 195 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("Home (MF2?)") /* 66 */ |
| 196 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) /* 3d */ |
| 225 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 197 | 226 | |
| 198 | | PORT_START_TAG( "kb_keytronic_36" ) |
| 227 | PORT_START_TAG( "kb_keytronic_35_1" ) |
| 228 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 229 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 66 */ |
| 230 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 3d */ |
| 231 | |
| 232 | PORT_START_TAG( "kb_keytronic_36_0" ) |
| 199 | 233 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) /* 0e */ |
| 200 | 234 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') /* 0d */ |
| 201 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) /* 1c */ |
| 235 | PORT_BIT( 0x14, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) /* 1c */ |
| 202 | 236 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') /* 2b */ |
| 203 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 204 | 237 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') /* 1b */ |
| 205 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PAUSE) PORT_NAME("Pause (MF2?)") /* 65 */ |
| 206 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) /* 3c */ |
| 238 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 207 | 239 | |
| 208 | | PORT_START_TAG( "kb_keytronic_37" ) |
| 209 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 210 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 7b */ |
| 211 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 7e */ |
| 212 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 7a */ |
| 213 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("KP +") /* 4e */ |
| 214 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 215 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RALT) PORT_NAME("AltGr (MF2?)") /* 64 */ |
| 216 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) /* 3b */ |
| 240 | PORT_START_TAG( "kb_keytronic_37_0" ) |
| 241 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PA1") /* 7b */ |
| 242 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("|<--") /* 7e */ |
| 243 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("/a\\") /* 7a */ |
| 244 | PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("KP +") /* 4e */ |
| 245 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 217 | 246 | |
| 218 | | PORT_START_TAG( "kb_keytronic_38" ) |
| 219 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 54 */ |
| 247 | PORT_START_TAG( "kb_keytronic_37_1" ) |
| 248 | PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 249 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 64 */ |
| 250 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 3b */ |
| 251 | |
| 252 | PORT_START_TAG( "kb_keytronic_38_0" ) |
| 253 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SysReq") /* 54 */ |
| 220 | 254 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SCRLOCK) PORT_NAME("ScrLock") /* 46 */ |
| 221 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 7c */ |
| 255 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("-->|") /* 7c */ |
| 222 | 256 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("KP 9") /* 49 */ |
| 223 | 257 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("KP -") /* 4a */ |
| 224 | 258 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("KP 6") /* 4d */ |
| 225 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 226 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 259 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 227 | 260 | |
| 228 | | PORT_START_TAG( "kb_keytronic_39" ) |
| 261 | PORT_START_TAG( "kb_keytronic_39_0" ) |
| 229 | 262 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_NAME("Esc") /* 01 */ |
| 230 | 263 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK) PORT_NAME("NumLock") /* 45 */ |
| 231 | 264 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("KP 7") /* 47 */ |
| 232 | 265 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("KP 8") /* 48 */ |
| 233 | 266 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("KP 4") /* 4b */ |
| 234 | 267 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("KP 5") /* 4c */ |
| 235 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 76 */ |
| 236 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PRTSCR) PORT_NAME("PrtScr (MF2?)") /* 63 */ |
| 268 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 76 */ |
| 269 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 63 */ |
| 237 | 270 | |
| 238 | | PORT_START_TAG( "kb_keytronic_3a" ) |
| 239 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Delete (MF2?)") /* 6f */ |
| 240 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 7f */ |
| 241 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 7d */ |
| 242 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 79 */ |
| 243 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 77 */ |
| 271 | PORT_START_TAG( "kb_keytronic_3a_0" ) |
| 272 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PrtSc *") /* 6f */ |
| 273 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PA2") /* 7f */ |
| 274 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right") /* 7d */ |
| 275 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("/a") /* 79 */ |
| 276 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Center") /* 77 */ |
| 244 | 277 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 245 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_NAME("Insert (MF2?)") /* 6e */ |
| 246 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME("KP / (MF2?)") /* 62 */ |
| 278 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 6e */ |
| 279 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 62 */ |
| 247 | 280 | |
| 248 | | PORT_START_TAG( "kb_keytronic_3b" ) |
| 281 | PORT_START_TAG( "kb_keytronic_3b_0" ) |
| 249 | 282 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("KP 3") /* 51 */ |
| 250 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 251 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("KP 0") /* 52 */ |
| 283 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("KP 0") /* 52 */ |
| 252 | 284 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("KP .") /* 53 */ |
| 253 | 285 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 254 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 78 */ |
| 255 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Page Down (MF2?)") /* 6d */ |
| 256 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) /* 44 */ |
| 286 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_NAME("Up") /* 78 */ |
| 287 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 6d */ |
| 288 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) /* 44 */ |
| 257 | 289 | |
| 258 | 290 | INPUT_PORTS_END |
| 259 | 291 | |
| r3013 | r3014 | |
| 270 | 302 | WRITE8_HANDLER( kb_keytronic_set_data_signal ) |
| 271 | 303 | { |
| 272 | 304 | kb_keytronic.data_signal = data; |
| 273 | | //printf("kb_keytronic_set_data_signal(): data = %d\n", data); |
| 274 | 305 | cpunum_set_input_line( machine, kb_keytronic.cpunum, I8051_T0_LINE, data ? HOLD_LINE : CLEAR_LINE ); |
| 275 | 306 | } |
| 276 | 307 | |
| r3013 | r3014 | |
| 286 | 317 | |
| 287 | 318 | static READ8_HANDLER( kb_keytronic_p1_r ) |
| 288 | 319 | { |
| 289 | | UINT8 data = kb_keytronic.p1_data; |
| 290 | | |
| 291 | | return data; |
| 320 | return kb_keytronic.p1 & kb_keytronic.p1_data; |
| 292 | 321 | } |
| 293 | 322 | |
| 294 | 323 | |
| 295 | 324 | static WRITE8_HANDLER( kb_keytronic_p1_w ) |
| 296 | 325 | { |
| 297 | | logerror("kb_keytronic_p1_w(): write %02x\n", data ); |
| 326 | if (LOG) |
| 327 | logerror( "kb_keytronic_p1_w(): write %02x\n", data ); |
| 298 | 328 | |
| 299 | | switch( data ) |
| 300 | | { |
| 301 | | case 0x0b: |
| 302 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_0b" ); |
| 303 | | kb_keytronic.p1_data = 0xFF; |
| 304 | | break; |
| 305 | | case 0x0e: |
| 306 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_0e" ); |
| 307 | | kb_keytronic.p1_data = 0xFE; |
| 308 | | break; |
| 309 | | case 0x0f: |
| 310 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_0f" ); |
| 311 | | break; |
| 312 | | case 0x30: |
| 313 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_30" ); |
| 314 | | break; |
| 315 | | case 0x31: |
| 316 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_31" ); |
| 317 | | break; |
| 318 | | case 0x32: |
| 319 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_32" ); |
| 320 | | break; |
| 321 | | case 0x33: |
| 322 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_33" ); |
| 323 | | break; |
| 324 | | case 0x34: |
| 325 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_34" ); |
| 326 | | break; |
| 327 | | case 0x35: |
| 328 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_35" ); |
| 329 | | break; |
| 330 | | case 0x36: |
| 331 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_36" ); |
| 332 | | break; |
| 333 | | case 0x37: |
| 334 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_37" ); |
| 335 | | break; |
| 336 | | case 0x38: |
| 337 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_38" ); |
| 338 | | break; |
| 339 | | case 0x39: |
| 340 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_39" ); |
| 341 | | break; |
| 342 | | case 0x3a: |
| 343 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_3a" ); |
| 344 | | break; |
| 345 | | case 0x3b: |
| 346 | | // kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_3b" ); |
| 347 | | break; |
| 348 | | } |
| 349 | 329 | kb_keytronic.p1 = data; |
| 350 | 330 | } |
| 351 | 331 | |
| r3013 | r3014 | |
| 360 | 340 | |
| 361 | 341 | static WRITE8_HANDLER( kb_keytronic_p2_w ) |
| 362 | 342 | { |
| 363 | | logerror("kb_keytronic_p2_w(): write %02x\n", data ); |
| 343 | if (LOG) |
| 344 | logerror( "kb_keytronic_p2_w(): write %02x\n", data ); |
| 364 | 345 | |
| 365 | 346 | kb_keytronic.p2 = data; |
| 366 | 347 | } |
| r3013 | r3014 | |
| 378 | 359 | /* T0 signal */ |
| 379 | 360 | data |= ( kb_keytronic.data_signal ? 0x00 : 0x10 ); |
| 380 | 361 | |
| 381 | | //printf("kb_keytronic_p3_r(): %02x\n", data); |
| 382 | 362 | return data; |
| 383 | 363 | } |
| 384 | 364 | |
| 385 | 365 | |
| 386 | 366 | static WRITE8_HANDLER( kb_keytronic_p3_w ) |
| 387 | 367 | { |
| 388 | | logerror("kb_keytronic_p3_w(): write %02x\n", data ); |
| 368 | if (LOG) |
| 369 | logerror( "kb_keytronic_p3_w(): write %02x\n", data ); |
| 370 | |
| 371 | kb_keytronic.p3 = data; |
| 389 | 372 | } |
| 390 | 373 | |
| 391 | 374 | |
| 392 | 375 | static READ8_HANDLER( kb_keytronic_data_r ) |
| 393 | 376 | { |
| 394 | | logerror("kb_keytronic_data_r(): read from %04x\n", offset ); |
| 377 | if (LOG) |
| 378 | logerror( "kb_keytronic_data_r(): read from %04x\n", offset ); |
| 395 | 379 | |
| 396 | | if ( kb_keytronic.p1 == 0xFF ) |
| 397 | | { |
| 398 | | kb_keytronic.data_signal = ( offset & 0x0100 ) ? 1 : 0; |
| 399 | | kb_keytronic.clock_signal = ( offset & 0x0200 ) ? 1 : 0; |
| 380 | kb_keytronic.data_signal = ( offset & 0x0100 ) ? 1 : 0; |
| 381 | kb_keytronic.clock_signal = ( offset & 0x0200 ) ? 1 : 0; |
| 400 | 382 | |
| 401 | | kb_keytronic.data_callback( machine, 0, kb_keytronic.data_signal ); |
| 402 | | kb_keytronic.clock_callback( machine, 0, kb_keytronic.clock_signal ); |
| 383 | kb_keytronic.data_callback( machine, 0, kb_keytronic.data_signal ); |
| 384 | kb_keytronic.clock_callback( machine, 0, kb_keytronic.clock_signal ); |
| 403 | 385 | |
| 404 | | //printf("data = %d, clock = %d\n", kb_keytronic.data_signal, kb_keytronic.clock_signal ); |
| 405 | | } |
| 406 | 386 | return 0xFF; |
| 407 | 387 | } |
| 408 | 388 | |
| 409 | 389 | |
| 410 | 390 | static WRITE8_HANDLER( kb_keytronic_data_w ) |
| 411 | 391 | { |
| 412 | | if ( kb_keytronic.p1 == 0xFF ) |
| 392 | if (LOG) |
| 393 | logerror( "kb_keytronic_data_w(): write to offset %04x\n", offset ); |
| 394 | |
| 395 | /* Check for low->high transition on AD8 */ |
| 396 | if ( ! ( kb_keytronic.last_write_addr & 0x0100 ) && ( offset & 0x0100 ) ) |
| 413 | 397 | { |
| 414 | | kb_keytronic.data_signal = ( offset & 0x0100 ) ? 1 : 0; |
| 415 | | kb_keytronic.clock_signal = ( offset & 0x0200 ) ? 1 : 0; |
| 398 | switch ( kb_keytronic.p1 ) |
| 399 | { |
| 400 | case 0x0e: |
| 401 | break; |
| 402 | case 0x0f: |
| 403 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_0f" ); |
| 404 | break; |
| 405 | case 0x30: |
| 406 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_30_0" ); |
| 407 | break; |
| 408 | case 0x31: |
| 409 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_31_0" ); |
| 410 | break; |
| 411 | case 0x32: |
| 412 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_32_0" ); |
| 413 | break; |
| 414 | case 0x33: |
| 415 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_33_0" ); |
| 416 | break; |
| 417 | case 0x34: |
| 418 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_34_0" ); |
| 419 | break; |
| 420 | case 0x35: |
| 421 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_35_0" ); |
| 422 | break; |
| 423 | case 0x36: |
| 424 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_36_0" ); |
| 425 | break; |
| 426 | case 0x37: |
| 427 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_37_0" ) | ( input_port_read( machine, "kb_keytronic_36_0" ) & 0x01 ); |
| 428 | break; |
| 429 | case 0x38: |
| 430 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_38_0" ); |
| 431 | break; |
| 432 | case 0x39: |
| 433 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_39_0" ); |
| 434 | break; |
| 435 | case 0x3a: |
| 436 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_3a_0" ); |
| 437 | break; |
| 438 | case 0x3b: |
| 439 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_3b_0" ); |
| 440 | break; |
| 441 | } |
| 442 | } |
| 416 | 443 | |
| 417 | | kb_keytronic.data_callback( machine, 0, kb_keytronic.data_signal ); |
| 418 | | kb_keytronic.clock_callback( machine, 0, kb_keytronic.clock_signal ); |
| 419 | | |
| 420 | | //printf("data = %d, clock = %d\n", kb_keytronic.data_signal, kb_keytronic.clock_signal ); |
| 444 | /* Check for low->high transition on AD9 */ |
| 445 | if ( ! ( kb_keytronic.last_write_addr & 0x0200 ) && ( offset & 0x0200 ) ) |
| 446 | { |
| 447 | switch ( kb_keytronic.p1 ) |
| 448 | { |
| 449 | case 0x0b: |
| 450 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_0b" ); |
| 451 | break; |
| 452 | case 0x30: |
| 453 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_30_1" ); |
| 454 | break; |
| 455 | case 0x31: |
| 456 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_31_1" ); |
| 457 | break; |
| 458 | case 0x32: |
| 459 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_32_1" ); |
| 460 | break; |
| 461 | case 0x33: |
| 462 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_33_1" ); |
| 463 | break; |
| 464 | case 0x34: |
| 465 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_34_1" ); |
| 466 | break; |
| 467 | case 0x35: |
| 468 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_35_1" ); |
| 469 | break; |
| 470 | case 0x36: |
| 471 | kb_keytronic.p1_data = 0xFF; |
| 472 | break; |
| 473 | case 0x37: |
| 474 | kb_keytronic.p1_data = input_port_read( machine, "kb_keytronic_37_1" ); |
| 475 | break; |
| 476 | case 0x38: |
| 477 | kb_keytronic.p1_data = 0xFF; |
| 478 | break; |
| 479 | case 0x39: |
| 480 | kb_keytronic.p1_data = 0xFF; |
| 481 | break; |
| 482 | case 0x3a: |
| 483 | kb_keytronic.p1_data = 0xFF; |
| 484 | break; |
| 485 | } |
| 421 | 486 | } |
| 487 | |
| 488 | kb_keytronic.last_write_addr = offset; |
| 422 | 489 | } |
| 423 | 490 | |
| 424 | 491 | |
src/mess/machine/pc.c
| r3013 | r3014 | |
| 48 | 48 | |
| 49 | 49 | #include "machine/8237dma.h" |
| 50 | 50 | |
| 51 | #include "machine/kb_keytro.h" |
| 51 | 52 | |
| 53 | |
| 52 | 54 | #define VERBOSE_PIO 0 /* PIO (keyboard controller) */ |
| 53 | 55 | |
| 54 | 56 | #define PIO_LOG(N,M,A) \ |
| r3013 | r3014 | |
| 292 | 294 | { |
| 293 | 295 | { |
| 294 | 296 | { |
| 295 | | 4772720/4, /* heartbeat IRQ */ |
| 297 | XTAL_14_31818MHz/12, /* heartbeat IRQ */ |
| 296 | 298 | ibm5150_timer0_w |
| 297 | 299 | }, { |
| 298 | | 4772720/4, /* dram refresh */ |
| 300 | XTAL_14_31818MHz/12, /* dram refresh */ |
| 299 | 301 | ibm5150_pit8253_out1_changed |
| 300 | 302 | }, { |
| 301 | | 4772720/4, /* pio port c pin 4, and speaker polling enough */ |
| 303 | XTAL_14_31818MHz/12, /* pio port c pin 4, and speaker polling enough */ |
| 302 | 304 | ibm5150_pit8253_out2_changed |
| 303 | 305 | } |
| 304 | 306 | } |
| r3013 | r3014 | |
| 315 | 317 | { |
| 316 | 318 | { |
| 317 | 319 | { |
| 318 | | 4772720/4, /* heartbeat IRQ */ |
| 320 | XTAL_14_31818MHz/12, /* heartbeat IRQ */ |
| 319 | 321 | ibm5150_timer0_w |
| 320 | 322 | }, { |
| 321 | | 4772720/4, /* dram refresh */ |
| 323 | XTAL_14_31818MHz/12, /* dram refresh */ |
| 322 | 324 | NULL |
| 323 | 325 | }, { |
| 324 | | 4772720/4, /* pio port c pin 4, and speaker polling enough */ |
| 326 | XTAL_14_31818MHz/12, /* pio port c pin 4, and speaker polling enough */ |
| 325 | 327 | ibm5150_pit8253_out2_changed |
| 326 | 328 | } |
| 327 | 329 | } |
| r3013 | r3014 | |
| 594 | 596 | * 4 - PB4 - ENBRAMPCK - Enable ram parity check |
| 595 | 597 | * 5 - PB5 - ENABLEI/OCK - Enable expansion I/O check |
| 596 | 598 | * 6 - PB6 - - Connected to keyboard clock signal |
| 599 | * 0 = ignore keyboard signals |
| 600 | * 1 = accept keyboard signals |
| 597 | 601 | * 7 - PB7 - - Clear/disable shift register and IRQ1 line |
| 602 | * 0 = normal operation |
| 603 | * 1 = clear and disable shift register and clear IRQ1 flip flop |
| 598 | 604 | * |
| 599 | 605 | * PORT C |
| 600 | 606 | * 0 - PC0 - - Dipswitch 0/4 |
| r3013 | r3014 | |
| 609 | 615 | **********************************************************/ |
| 610 | 616 | |
| 611 | 617 | static struct { |
| 612 | | int portc_switch_high; |
| 613 | | int speaker; |
| 614 | | int keyboard_disabled; |
| 615 | | UINT8 keyb_clock; |
| 616 | | UINT8 portb; |
| 618 | int portc_switch_high; |
| 619 | int speaker; |
| 620 | int keyboard_clear; |
| 621 | UINT8 keyb_clock; |
| 622 | UINT8 portb; |
| 623 | UINT8 clock_signal; |
| 624 | UINT8 data_signal; |
| 625 | UINT8 shift_register; |
| 626 | UINT8 shift_enable; |
| 627 | write8_machine_func clock_callback; |
| 628 | write8_machine_func data_callback; |
| 617 | 629 | } pc_ppi={ 0 }; |
| 618 | 630 | |
| 619 | 631 | |
| 620 | | static READ8_HANDLER (pc_ppi_porta_r) |
| 632 | static READ8_HANDLER (ibm5150_ppi_porta_r) |
| 621 | 633 | { |
| 622 | 634 | int data = 0xFF; |
| 623 | 635 | |
| 624 | 636 | /* KB port A */ |
| 625 | | if (pc_ppi.keyboard_disabled) |
| 637 | if (pc_ppi.keyboard_clear) |
| 626 | 638 | { |
| 627 | 639 | /* 0 0 - no floppy drives |
| 628 | 640 | * 1 Not used |
| r3013 | r3014 | |
| 637 | 649 | } |
| 638 | 650 | else |
| 639 | 651 | { |
| 640 | | if ( pc_ppi.keyb_clock ) |
| 641 | | { |
| 642 | | data = pc_keyb_read(); |
| 643 | | } |
| 652 | data = pc_ppi.shift_register; |
| 644 | 653 | } |
| 645 | 654 | PIO_LOG(1,"PIO_A_r",("$%02x\n", data)); |
| 646 | 655 | return data; |
| 647 | 656 | } |
| 648 | 657 | |
| 649 | 658 | |
| 650 | | static READ8_HANDLER (pc_ppi_portb_r ) |
| 659 | static READ8_HANDLER (ibm5150_ppi_portb_r ) |
| 651 | 660 | { |
| 652 | 661 | int data; |
| 653 | 662 | |
| r3013 | r3014 | |
| 657 | 666 | } |
| 658 | 667 | |
| 659 | 668 | |
| 660 | | static READ8_HANDLER ( pc_ppi_portc_r ) |
| 669 | static READ8_HANDLER ( ibm5150_ppi_portc_r ) |
| 661 | 670 | { |
| 662 | 671 | int timer2_output = pit8253_get_output( pc_devices.pit8253, 2 ); |
| 663 | 672 | int data=0xff; |
| r3013 | r3014 | |
| 665 | 674 | data&=~0x80; // no parity error |
| 666 | 675 | data&=~0x40; // no error on expansion board |
| 667 | 676 | /* KB port C: equipment flags */ |
| 668 | | // if (pc_port[0x61] & 0x08) |
| 669 | 677 | if (pc_ppi.portc_switch_high) |
| 670 | 678 | { |
| 671 | 679 | /* read hi nibble of S2 */ |
| r3013 | r3014 | |
| 705 | 713 | } |
| 706 | 714 | |
| 707 | 715 | |
| 708 | | static WRITE8_HANDLER ( pc_ppi_porta_w ) |
| 716 | static WRITE8_HANDLER ( ibm5150_ppi_porta_w ) |
| 709 | 717 | { |
| 710 | 718 | /* KB controller port A */ |
| 711 | 719 | PIO_LOG(1,"PIO_A_w",("$%02x\n", data)); |
| 712 | 720 | } |
| 713 | 721 | |
| 714 | 722 | |
| 715 | | static WRITE8_HANDLER ( pc_ppi_portb_w ) |
| 723 | static WRITE8_HANDLER ( ibm5150_ppi_portb_w ) |
| 716 | 724 | { |
| 717 | 725 | /* KB controller port B */ |
| 718 | 726 | pc_ppi.portb = data; |
| 719 | 727 | pc_ppi.portc_switch_high = data & 0x08; |
| 720 | | pc_ppi.keyboard_disabled = data & 0x80; |
| 728 | pc_ppi.keyboard_clear = data & 0x80; |
| 721 | 729 | pc_ppi.keyb_clock = data & 0x40; |
| 722 | 730 | pit8253_gate_w( pc_devices.pit8253, 2, data & 1); |
| 723 | 731 | pc_speaker_set_spkrdata( data & 0x02 ); |
| 724 | | pc_keyb_set_clock( pc_ppi.keyb_clock ); |
| 725 | 732 | |
| 726 | 733 | cassette_change_state( image_from_devtype_and_index( IO_CASSETTE, 0 ), ( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); |
| 727 | 734 | |
| 728 | | if (data & 0x80) |
| 729 | | pc_keyb_clear(); |
| 735 | pc_ppi.clock_signal = ( pc_ppi.keyb_clock ) ? 1 : 0; |
| 736 | |
| 737 | pc_ppi.clock_callback( machine, 0, pc_ppi.clock_signal ); |
| 738 | |
| 739 | /* If PB7 is set clear the shift register and reset the IRQ line */ |
| 740 | if ( pc_ppi.keyboard_clear ) |
| 741 | { |
| 742 | pic8259_set_irq_line(pc_devices.pic8259_master, 1, 0); |
| 743 | pc_ppi.shift_register = 0; |
| 744 | pc_ppi.shift_enable = 1; |
| 745 | } |
| 730 | 746 | } |
| 731 | 747 | |
| 732 | 748 | |
| 733 | | static WRITE8_HANDLER ( pc_ppi_portc_w ) |
| 749 | static WRITE8_HANDLER ( ibm5150_ppi_portc_w ) |
| 734 | 750 | { |
| 735 | 751 | /* KB controller port C */ |
| 736 | 752 | PIO_LOG(1,"PIO_C_w",("$%02x\n", data)); |
| 737 | 753 | } |
| 738 | 754 | |
| 739 | 755 | |
| 756 | static WRITE8_HANDLER( ibm5150_kb_set_clock_signal ) |
| 757 | { |
| 758 | if ( pc_ppi.clock_signal != data ) |
| 759 | { |
| 760 | if ( pc_ppi.keyb_clock && pc_ppi.shift_enable ) |
| 761 | { |
| 762 | pc_ppi.clock_signal = data; |
| 763 | if ( ! pc_ppi.keyboard_clear ) |
| 764 | { |
| 765 | /* Data is clocked in on a high->low transition */ |
| 766 | if ( ! data ) |
| 767 | { |
| 768 | UINT8 trigger_irq = pc_ppi.shift_register & 0x01; |
| 769 | |
| 770 | pc_ppi.shift_register = ( pc_ppi.shift_register >> 1 ) | ( pc_ppi.data_signal << 7 ); |
| 771 | if ( trigger_irq ) |
| 772 | { |
| 773 | pic8259_set_irq_line(pc_devices.pic8259_master, 1, 1); |
| 774 | pc_ppi.shift_enable = 0; |
| 775 | pc_ppi.clock_signal = 0; |
| 776 | pc_ppi.clock_callback( machine, 0, 0 ); |
| 777 | } |
| 778 | } |
| 779 | } |
| 780 | } |
| 781 | } |
| 782 | |
| 783 | pc_ppi.clock_callback( machine, 0, pc_ppi.clock_signal ); |
| 784 | } |
| 785 | |
| 786 | |
| 787 | static WRITE8_HANDLER( ibm5150_kb_set_data_signal ) |
| 788 | { |
| 789 | pc_ppi.data_signal = data; |
| 790 | |
| 791 | pc_ppi.data_callback( machine, 0, pc_ppi.data_signal ); |
| 792 | } |
| 793 | |
| 794 | |
| 795 | static void ibm5150_set_keyboard_interface( running_machine *machine, write8_machine_func clock_cb, write8_machine_func data_cb ) |
| 796 | { |
| 797 | pc_ppi.clock_callback = clock_cb; |
| 798 | pc_ppi.data_callback = data_cb; |
| 799 | } |
| 800 | |
| 801 | |
| 740 | 802 | /* IBM PC has a 8255 which is connected to keyboard and other |
| 741 | 803 | status information */ |
| 742 | 804 | const ppi8255_interface ibm5150_ppi8255_interface = |
| 743 | 805 | { |
| 744 | | pc_ppi_porta_r, |
| 745 | | pc_ppi_portb_r, |
| 746 | | pc_ppi_portc_r, |
| 747 | | pc_ppi_porta_w, |
| 748 | | pc_ppi_portb_w, |
| 749 | | pc_ppi_portc_w |
| 806 | ibm5150_ppi_porta_r, |
| 807 | ibm5150_ppi_portb_r, |
| 808 | ibm5150_ppi_portc_r, |
| 809 | ibm5150_ppi_porta_w, |
| 810 | ibm5150_ppi_portb_w, |
| 811 | ibm5150_ppi_portc_w |
| 750 | 812 | }; |
| 751 | 813 | |
| 752 | 814 | |
| 815 | static READ8_HANDLER (ibm5160_ppi_porta_r) |
| 816 | { |
| 817 | int data = 0xFF; |
| 818 | |
| 819 | /* KB port A */ |
| 820 | if (pc_ppi.keyboard_clear) |
| 821 | { |
| 822 | /* 0 0 - no floppy drives |
| 823 | * 1 Not used |
| 824 | * 2-3 The number of memory banks on the system board |
| 825 | * 4-5 Display mode |
| 826 | * 11 = monochrome |
| 827 | * 10 - color 80x25 |
| 828 | * 01 - color 40x25 |
| 829 | * 6-7 The number of floppy disk drives |
| 830 | */ |
| 831 | data = input_port_read(machine, "DSW0"); |
| 832 | } |
| 833 | else |
| 834 | { |
| 835 | if ( pc_ppi.keyb_clock ) |
| 836 | { |
| 837 | data = pc_keyb_read(); |
| 838 | } |
| 839 | } |
| 840 | PIO_LOG(1,"PIO_A_r",("$%02x\n", data)); |
| 841 | return data; |
| 842 | } |
| 843 | |
| 844 | |
| 753 | 845 | static READ8_HANDLER ( ibm5160_ppi_portc_r ) |
| 754 | 846 | { |
| 755 | 847 | int timer2_output = pit8253_get_output( pc_devices.pit8253, 2 ); |
| r3013 | r3014 | |
| 786 | 878 | { |
| 787 | 879 | pc_ppi.portb = data; |
| 788 | 880 | pc_ppi.portc_switch_high = data & 0x08; |
| 789 | | pc_ppi.keyboard_disabled = data & 0x80; |
| 881 | pc_ppi.keyboard_clear = data & 0x80; |
| 790 | 882 | pc_ppi.keyb_clock = data & 0x40; |
| 791 | 883 | pit8253_gate_w( pc_devices.pit8253, 2, data & 0x01 ); |
| 792 | 884 | pc_speaker_set_spkrdata( data & 0x02 ); |
| 793 | 885 | pc_keyb_set_clock( pc_ppi.keyb_clock ); |
| 794 | 886 | |
| 795 | | if ( data & 0x80 ) |
| 887 | if ( pc_ppi.keyboard_clear ) |
| 796 | 888 | pc_keyb_clear(); |
| 797 | 889 | } |
| 798 | 890 | |
| 799 | 891 | |
| 800 | 892 | const ppi8255_interface ibm5160_ppi8255_interface = |
| 801 | 893 | { |
| 802 | | pc_ppi_porta_r, |
| 803 | | pc_ppi_portb_r, |
| 894 | ibm5160_ppi_porta_r, |
| 895 | ibm5150_ppi_portb_r, |
| 804 | 896 | ibm5160_ppi_portc_r, |
| 805 | | pc_ppi_porta_w, |
| 897 | ibm5150_ppi_porta_w, |
| 806 | 898 | ibm5160_ppi_portb_w, |
| 807 | | pc_ppi_portc_w |
| 899 | ibm5150_ppi_portc_w |
| 808 | 900 | }; |
| 809 | 901 | |
| 810 | 902 | |
| r3013 | r3014 | |
| 882 | 974 | const ppi8255_interface pcjr_ppi8255_interface = |
| 883 | 975 | { |
| 884 | 976 | pcjr_ppi_porta_r, |
| 885 | | pc_ppi_portb_r, |
| 977 | ibm5150_ppi_portb_r, |
| 886 | 978 | pcjr_ppi_portc_r, |
| 887 | | pc_ppi_porta_w, |
| 979 | ibm5150_ppi_porta_w, |
| 888 | 980 | pcjr_ppi_portb_w, |
| 889 | | pc_ppi_portc_w |
| 981 | ibm5150_ppi_portc_w |
| 890 | 982 | }; |
| 891 | 983 | |
| 892 | 984 | |
| r3013 | r3014 | |
| 959 | 1051 | pc_mouse_initialise(); |
| 960 | 1052 | } |
| 961 | 1053 | |
| 1054 | |
| 1055 | DRIVER_INIT( ibm5150 ) |
| 1056 | { |
| 1057 | mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line); |
| 1058 | pc_rtc_init(); |
| 1059 | |
| 1060 | /* Attach keyboard to the keyboard controller */ |
| 1061 | ibm5150_set_keyboard_interface( machine, kb_keytronic_set_clock_signal, kb_keytronic_set_data_signal ); |
| 1062 | kb_keytronic_set_host_interface( machine, ibm5150_kb_set_clock_signal, ibm5150_kb_set_data_signal ); |
| 1063 | } |
| 1064 | |
| 1065 | |
| 962 | 1066 | DRIVER_INIT( pccga ) |
| 963 | 1067 | { |
| 964 | 1068 | mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line); |
| 965 | 1069 | pc_rtc_init(); |
| 966 | 1070 | } |
| 967 | 1071 | |
| 1072 | |
| 968 | 1073 | DRIVER_INIT( bondwell ) |
| 969 | 1074 | { |
| 970 | 1075 | mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line); |
src/mess/drivers/pc.c
| r3013 | r3014 | |
| 20 | 20 | IBM PC 5150 |
| 21 | 21 | =========== |
| 22 | 22 | |
| 23 | - Intel 8088 at 4.77 MHz derived from a 14.31818 MHz crystal |
| 24 | - RAM: min. 16KB, max. 256KB |
| 25 | - Graphics: MDA, CGA, or MDA and CGA |
| 26 | - Cassette port |
| 27 | - Optional 8087 co-processor |
| 28 | - Optional up to 2 160KB single-sided or 360KB double-sided 5 1/4" floppy drives |
| 29 | - Optional 10MB hard disk |
| 30 | |
| 31 | |
| 23 | 32 | IBM PC-JR |
| 24 | 33 | ========= |
| 25 | 34 | |
| 35 | |
| 26 | 36 | IBM PC-XT 5160 |
| 27 | 37 | ============== |
| 28 | 38 | |
| 39 | - Intel 8086 at 4.77 MHz derived from a 14.31818 MHz crystal |
| 40 | - RAM: min. 128KB, max. 640KB |
| 41 | - Graphics: MDA, CGA, or MDA and CGA |
| 42 | - Optional 8087 co-processor |
| 43 | - One 360KB double-sided 5 1/4" floppy drive |
| 44 | - 10MB or 20MB Seagate ST-412 hard disk |
| 45 | - Optional second 360KB double-sided 5 1/4" floppy drive |
| 46 | |
| 47 | |
| 48 | Tandy 1000 |
| 49 | ========== |
| 50 | |
| 51 | Tandy 1000 machines are similar to the IBM 5160s with CGA graphics. Tandy |
| 52 | added some additional graphic capabilities similar, but not equal, to |
| 53 | those added for the IBM PC Jr. |
| 54 | |
| 29 | 55 | Tandy 1000 (8086/8088) variations: |
| 30 | 56 | 1000 128KB-640KB RAM 4.77 MHz v01.00.00, v01.01.00 |
| 31 | 57 | 1000A/1000HD 128KB-640KB RAM 4.77 MHz v01.01.00 |
| r3013 | r3014 | |
| 100 | 126 | #include "sound/sn76496.h" |
| 101 | 127 | #include "sound/3812intf.h" |
| 102 | 128 | |
| 129 | #include "machine/kb_keytro.h" |
| 103 | 130 | |
| 131 | |
| 104 | 132 | #define ym3812_StdClock 3579545 |
| 105 | 133 | |
| 106 | 134 | /* |
| r3013 | r3014 | |
| 548 | 576 | PORT_INCLUDE( pcvideo_cga ) |
| 549 | 577 | INPUT_PORTS_END |
| 550 | 578 | |
| 579 | static INPUT_PORTS_START( ibm5150 ) |
| 580 | PORT_START_TAG("IN0") /* IN0 */ |
| 581 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| 582 | PORT_BIT ( 0x08, 0x08, IPT_VBLANK ) |
| 583 | PORT_BIT ( 0x07, 0x07, IPT_UNUSED ) |
| 584 | |
| 585 | PORT_START_TAG("DSW0") /* IN1 */ |
| 586 | PORT_DIPNAME( 0xc0, 0x40, "Number of floppy drives") |
| 587 | PORT_DIPSETTING( 0x00, "1" ) |
| 588 | PORT_DIPSETTING( 0x40, "2" ) |
| 589 | PORT_DIPSETTING( 0x80, "3" ) |
| 590 | PORT_DIPSETTING( 0xc0, "4" ) |
| 591 | PORT_DIPNAME( 0x30, 0x20, "Graphics adapter") |
| 592 | PORT_DIPSETTING( 0x00, "EGA/VGA" ) |
| 593 | PORT_DIPSETTING( 0x10, "Color 40x25" ) |
| 594 | PORT_DIPSETTING( 0x20, "Color 80x25" ) |
| 595 | PORT_DIPSETTING( 0x30, "Monochrome" ) |
| 596 | PORT_DIPNAME( 0x0c, 0x0c, "RAM banks") |
| 597 | PORT_DIPSETTING( 0x00, "1 - 16 64 256K" ) |
| 598 | PORT_DIPSETTING( 0x04, "2 - 32 128 512K" ) |
| 599 | PORT_DIPSETTING( 0x08, "3 - 48 192 576K" ) |
| 600 | PORT_DIPSETTING( 0x0c, "4 - 64 256 640K" ) |
| 601 | PORT_DIPNAME( 0x02, 0x00, "80387 installed") |
| 602 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 603 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) |
| 604 | PORT_DIPNAME( 0x01, 0x01, "Floppy installed") |
| 605 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 606 | PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) |
| 607 | |
| 608 | PORT_START_TAG("DSW1") /* IN2 */ |
| 609 | PORT_DIPNAME( 0x80, 0x80, "COM1: enable") |
| 610 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 611 | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 612 | PORT_DIPNAME( 0x40, 0x40, "COM2: enable") |
| 613 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 614 | PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) |
| 615 | PORT_DIPNAME( 0x20, 0x00, "COM3: enable") |
| 616 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 617 | PORT_DIPSETTING( 0x20, DEF_STR( Yes ) ) |
| 618 | PORT_DIPNAME( 0x10, 0x00, "COM4: enable") |
| 619 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 620 | PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) |
| 621 | PORT_DIPNAME( 0x08, 0x08, "LPT1: enable") |
| 622 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 623 | PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) |
| 624 | PORT_DIPNAME( 0x04, 0x00, "LPT2: enable") |
| 625 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 626 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) |
| 627 | PORT_DIPNAME( 0x02, 0x00, "LPT3: enable") |
| 628 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 629 | PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) |
| 630 | PORT_DIPNAME( 0x01, 0x00, "Game port enable") |
| 631 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 632 | PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) |
| 633 | |
| 634 | PORT_START_TAG("DSW2") /* IN3 */ |
| 635 | PORT_DIPNAME( 0xf0, 0x80, "Serial mouse") |
| 636 | PORT_DIPSETTING( 0x80, "COM1" ) |
| 637 | PORT_DIPSETTING( 0x40, "COM2" ) |
| 638 | PORT_DIPSETTING( 0x20, "COM3" ) |
| 639 | PORT_DIPSETTING( 0x10, "COM4" ) |
| 640 | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 641 | PORT_DIPNAME( 0x08, 0x08, "HDC1 (C800:0 port 320-323)") |
| 642 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 643 | PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) |
| 644 | PORT_DIPNAME( 0x04, 0x04, "HDC2 (CA00:0 port 324-327)") |
| 645 | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 646 | PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) |
| 647 | PORT_BIT( 0x02, 0x02, IPT_UNUSED ) /* no turbo switch */ |
| 648 | PORT_BIT( 0x01, 0x01, IPT_UNUSED ) |
| 649 | |
| 650 | PORT_INCLUDE( kb_keytronic ) /* IN4 - IN11 */ |
| 651 | PORT_INCLUDE( pc_mouse_microsoft ) /* IN12 - IN14 */ |
| 652 | PORT_INCLUDE( pc_joystick ) /* IN15 - IN19 */ |
| 653 | PORT_INCLUDE( pcvideo_cga ) |
| 654 | INPUT_PORTS_END |
| 655 | |
| 551 | 656 | static INPUT_PORTS_START( europc ) |
| 552 | 657 | PORT_START_TAG("IN0") /* IN0 */ |
| 553 | 658 | PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) |
| r3013 | r3014 | |
| 1201 | 1306 | MDRV_CPU_IO_MAP(pc8_io, 0) |
| 1202 | 1307 | MDRV_CPU_VBLANK_INT_HACK(pc_frame_interrupt, 4) |
| 1203 | 1308 | |
| 1309 | MDRV_INTERLEAVE(1) |
| 1310 | |
| 1204 | 1311 | MDRV_MACHINE_START(pc) |
| 1205 | 1312 | MDRV_MACHINE_RESET(pc) |
| 1206 | 1313 | |
| r3013 | r3014 | |
| 1319 | 1426 | MDRV_DEVICE_ADD("printer3", PRINTER) |
| 1320 | 1427 | MACHINE_DRIVER_END |
| 1321 | 1428 | |
| 1429 | static MACHINE_DRIVER_START( ibm5150 ) |
| 1430 | /* basic machine hardware */ |
| 1431 | MDRV_CPU_ADD("main", I8088, XTAL_14_31818MHz/3) |
| 1432 | MDRV_CPU_PROGRAM_MAP(pc8_map, 0) |
| 1433 | MDRV_CPU_IO_MAP(pc8_io, 0) |
| 1434 | MDRV_CPU_CONFIG(i86_address_mask) |
| 1435 | |
| 1436 | MDRV_INTERLEAVE(1) |
| 1437 | |
| 1438 | MDRV_MACHINE_START(pc) |
| 1439 | MDRV_MACHINE_RESET(pc) |
| 1440 | |
| 1441 | MDRV_DEVICE_ADD( "pit8253", PIT8253 ) |
| 1442 | MDRV_DEVICE_CONFIG( ibm5150_pit8253_config ) |
| 1443 | |
| 1444 | MDRV_DEVICE_ADD( "dma8237", DMA8237 ) |
| 1445 | MDRV_DEVICE_CONFIG( ibm5150_dma8237_config ) |
| 1446 | |
| 1447 | MDRV_DEVICE_ADD( "pic8259_master", PIC8259 ) |
| 1448 | MDRV_DEVICE_CONFIG( ibm5150_pic8259_master_config ) |
| 1449 | |
| 1450 | MDRV_DEVICE_ADD( "pic8259_slave", PIC8259 ) |
| 1451 | MDRV_DEVICE_CONFIG( ibm5150_pic8259_slave_config ) |
| 1452 | |
| 1453 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) |
| 1454 | MDRV_DEVICE_CONFIG( ibm5150_ppi8255_interface ) |
| 1455 | |
| 1456 | MDRV_DEVICE_ADD( "ins8250_0", INS8250 ) /* TODO: Verify model */ |
| 1457 | MDRV_DEVICE_CONFIG( ibm5150_com_interface[0] ) |
| 1458 | |
| 1459 | MDRV_DEVICE_ADD( "ins8250_1", INS8250 ) /* TODO: Verify model */ |
| 1460 | MDRV_DEVICE_CONFIG( ibm5150_com_interface[1] ) |
| 1461 | |
| 1462 | MDRV_DEVICE_ADD( "ins8250_2", INS8250 ) /* TODO: Verify model */ |
| 1463 | MDRV_DEVICE_CONFIG( ibm5150_com_interface[2] ) |
| 1464 | |
| 1465 | MDRV_DEVICE_ADD( "ins8250_3", INS8250 ) /* TODO: Verify model */ |
| 1466 | MDRV_DEVICE_CONFIG( ibm5150_com_interface[3] ) |
| 1467 | |
| 1468 | /* video hardware */ |
| 1469 | MDRV_IMPORT_FROM( pcvideo_cga ) |
| 1470 | |
| 1471 | /* sound hardware */ |
| 1472 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1473 | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 1474 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 1475 | #ifdef ADLIB |
| 1476 | MDRV_SOUND_ADD("ym3812", YM3812, ym3812_StdClock) |
| 1477 | MDRV_SOUND_CONFIG(ym3812_interface) |
| 1478 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 1479 | #endif |
| 1480 | #ifdef GAMEBLASTER |
| 1481 | MDRV_SOUND_ADD("saa1099.1", SAA1099, 4772720) |
| 1482 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1483 | MDRV_SOUND_ADD("saa1099.2", SAA1099, 4772720) |
| 1484 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1485 | #endif |
| 1486 | |
| 1487 | MDRV_IMPORT_FROM( kb_keytronic ) |
| 1488 | |
| 1489 | /* printer */ |
| 1490 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 1491 | MDRV_DEVICE_ADD("printer2", PRINTER) |
| 1492 | MDRV_DEVICE_ADD("printer3", PRINTER) |
| 1493 | MACHINE_DRIVER_END |
| 1494 | |
| 1322 | 1495 | static MACHINE_DRIVER_START( pccga ) |
| 1323 | 1496 | /* basic machine hardware */ |
| 1324 | 1497 | MDRV_CPU_PC(pc8, pc8, I8088, 4772720, pc_frame_interrupt) /* 4,77 Mhz */ |
| 1325 | 1498 | |
| 1499 | MDRV_INTERLEAVE(1) |
| 1500 | |
| 1326 | 1501 | MDRV_MACHINE_START(pc) |
| 1327 | 1502 | MDRV_MACHINE_RESET(pc) |
| 1328 | 1503 | |
| r3013 | r3014 | |
| 1339 | 1514 | MDRV_DEVICE_CONFIG( ibm5150_pic8259_slave_config ) |
| 1340 | 1515 | |
| 1341 | 1516 | MDRV_DEVICE_ADD( "ppi8255", PPI8255 ) |
| 1342 | | MDRV_DEVICE_CONFIG( ibm5150_ppi8255_interface ) |
| 1517 | MDRV_DEVICE_CONFIG( ibm5160_ppi8255_interface ) |
| 1343 | 1518 | |
| 1344 | 1519 | MDRV_DEVICE_ADD( "ins8250_0", INS8250 ) /* TODO: Verify model */ |
| 1345 | 1520 | MDRV_DEVICE_CONFIG( ibm5150_com_interface[0] ) |
| r3013 | r3014 | |
| 1372 | 1547 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1373 | 1548 | #endif |
| 1374 | 1549 | |
| 1550 | // MDRV_IMPORT_FROM( kb_keytronic ) |
| 1551 | |
| 1375 | 1552 | /* printer */ |
| 1376 | 1553 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 1377 | 1554 | MDRV_DEVICE_ADD("printer2", PRINTER) |
| r3013 | r3014 | |
| 1437 | 1614 | |
| 1438 | 1615 | static MACHINE_DRIVER_START( ibm5160 ) |
| 1439 | 1616 | /* basic machine hardware */ |
| 1440 | | MDRV_CPU_PC(pc16, pc16, I8086, 4772720, pc_frame_interrupt) |
| 1617 | MDRV_CPU_PC(pc16, pc16, I8086, XTAL_14_31818MHz/3, pc_frame_interrupt) |
| 1441 | 1618 | |
| 1442 | 1619 | MDRV_MACHINE_START(pc) |
| 1443 | 1620 | MDRV_MACHINE_RESET(pc) |
| r3013 | r3014 | |
| 1488 | 1665 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1489 | 1666 | #endif |
| 1490 | 1667 | |
| 1668 | // MDRV_IMPORT_FROM( kb_keytronic ) |
| 1669 | |
| 1491 | 1670 | /* printer */ |
| 1492 | 1671 | MDRV_DEVICE_ADD("printer", PRINTER) |
| 1493 | 1672 | MDRV_DEVICE_ADD("printer2", PRINTER) |
| r3013 | r3014 | |
| 1897 | 2076 | /* Character rom */ |
| 1898 | 2077 | ROM_REGION(0x2000,"gfx1", 0) |
| 1899 | 2078 | ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) |
| 2079 | |
| 2080 | /* 8051 keytronic keyboard controller */ |
| 2081 | ROM_REGION( 0x2000, KEYTRONIC_KB3270PC_CPU, 0 ) |
| 2082 | ROM_LOAD("14166.bin", 0x0000, 0x2000, CRC(1aea1b53) SHA1(b75b6d4509036406052157bc34159f7039cdc72e)) |
| 1900 | 2083 | ROM_END |
| 1901 | 2084 | |
| 1902 | 2085 | ROM_START( ibmpca ) |
| r3013 | r3014 | |
| 2261 | 2444 | } |
| 2262 | 2445 | } |
| 2263 | 2446 | |
| 2264 | | static SYSTEM_CONFIG_START(ibmpc) |
| 2447 | static SYSTEM_CONFIG_START(ibm5150) |
| 2265 | 2448 | CONFIG_RAM_DEFAULT( 640 * 1024 ) |
| 2266 | 2449 | CONFIG_DEVICE(ibmpc_cassette_getinfo) |
| 2267 | 2450 | CONFIG_DEVICE(ibmpc_floppy_getinfo) |
| r3013 | r3014 | |
| 2290 | 2473 | ***************************************************************************/ |
| 2291 | 2474 | |
| 2292 | 2475 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 2293 | | COMP( 1981, ibm5150, 0, 0, pccga, pccga, pccga, ibmpc, "International Business Machines", "IBM PC 5150" , 0) |
| 2294 | | COMP( 1984, dgone, ibm5150, 0, pccga, pccga, pccga, ibmpc, "Data General", "Data General/One" , GAME_NOT_WORKING) /* CGA, 2x 3.5" disk drives */ |
| 2295 | | COMP( 1987, pc, ibm5150, 0, pccga, pccga, pccga, ibmpc, "", "PC (CGA)" , 0) |
| 2296 | | COMP( 1985, bondwell, ibm5150, 0, pccga, bondwell, bondwell, ibmpc, "Bondwell Holding", "BW230 (PRO28 Series)", GAME_NOT_WORKING ) |
| 2297 | | COMP( 1988, europc, ibm5150, 0, europc, europc, europc, ibmpc, "Schneider Rdf. AG", "EURO PC", GAME_NOT_WORKING) |
| 2476 | COMP( 1981, ibm5150, 0, 0, ibm5150, ibm5150, ibm5150, ibm5150, "International Business Machines", "IBM PC 5150" , 0) |
| 2477 | COMP( 1984, dgone, ibm5150, 0, pccga, pccga, pccga, ibm5160, "Data General", "Data General/One" , GAME_NOT_WORKING) /* CGA, 2x 3.5" disk drives */ |
| 2478 | COMP( 1987, pc, ibm5150, 0, pccga, pccga, pccga, ibm5160, "", "PC (CGA)" , 0) |
| 2479 | COMP( 1985, bondwell, ibm5150, 0, pccga, bondwell, bondwell, ibm5160, "Bondwell Holding", "BW230 (PRO28 Series)", GAME_NOT_WORKING ) |
| 2480 | COMP( 1988, europc, ibm5150, 0, europc, europc, europc, ibm5160, "Schneider Rdf. AG", "EURO PC", GAME_NOT_WORKING) |
| 2298 | 2481 | |
| 2299 | 2482 | // pcjr (better graphics, better sound) |
| 2300 | 2483 | COMP( 1983, ibmpcjr, ibm5150, 0, ibmpcjr, tandy1t, pcjr, pcjr, "International Business Machines", "IBM PC Jr", GAME_NOT_WORKING|GAME_IMPERFECT_COLORS ) |
| 2301 | | COMP( 1987, t1000hx, ibm5150, 0, t1000hx, tandy1t, t1000hx, ibmpc, "Tandy Radio Shack", "Tandy 1000HX", 0) |
| 2302 | | COMP( 1987, t1000sx, ibm5150, 0, t1000hx, tandy1t, t1000hx, ibmpc, "Tandy Radio Shack", "Tandy 1000SX", 0) |
| 2484 | COMP( 1987, t1000hx, ibm5150, 0, t1000hx, tandy1t, t1000hx, ibm5160, "Tandy Radio Shack", "Tandy 1000HX", 0) |
| 2485 | COMP( 1987, t1000sx, ibm5150, 0, t1000hx, tandy1t, t1000hx, ibm5160, "Tandy Radio Shack", "Tandy 1000SX", 0) |
| 2303 | 2486 | |
| 2304 | 2487 | // xt class (pc but 8086) |
| 2305 | | COMP( 1982, ibm5160, ibm5150, 0, ibm5160, xtcga, pccga, ibm5160, "International Business Machines", "IBM XT 5160" , 0) |
| 2306 | | COMP( 1988, pc200, ibm5150, 0, pc200, pc200, pc200, ibmpc, "Sinclair Research", "PC200 Professional Series", GAME_NOT_WORKING) |
| 2307 | | COMP( 1988, pc20, ibm5150, 0, pc200, pc200, pc200, ibmpc, "Amstrad plc", "Amstrad PC20" , GAME_NOT_WORKING) |
| 2308 | | COMP( 1987, ppc512, ibm5150, 0, pc200, pc200, pc200, ibmpc, "Amstrad plc", "Amstrad PPC512", 0) |
| 2309 | | COMP( 1987, ppc640, ibm5150, 0, pc200, pc200, pc200, ibmpc, "Amstrad plc", "Amstrad PPC640", 0) |
| 2310 | | COMP( 1986, pc1512, ibm5150, 0, pc1512, pc1512, pc1512, ibmpc, "Amstrad plc", "Amstrad PC1512 (version 1)", GAME_NOT_WORKING) |
| 2311 | | COMP( 198?, pc1512v2, ibm5150, 0, pc1512, pc1512, pc1512, ibmpc, "Amstrad plc", "Amstrad PC1512 (version 2)", GAME_NOT_WORKING) |
| 2312 | | COMP( 1987, pc1640, ibm5150, 0, pc1640, pc1640, pc1640, ibmpc, "Amstrad plc", "Amstrad PC1640 / PC6400 (US)", GAME_NOT_WORKING ) |
| 2488 | COMP( 1982, ibm5160, ibm5150, 0, ibm5160, xtcga, pccga, ibm5160, "International Business Machines", "IBM XT 5160" , 0) |
| 2489 | COMP( 1988, pc200, ibm5150, 0, pc200, pc200, pc200, ibm5160, "Sinclair Research", "PC200 Professional Series", GAME_NOT_WORKING) |
| 2490 | COMP( 1988, pc20, ibm5150, 0, pc200, pc200, pc200, ibm5160, "Amstrad plc", "Amstrad PC20" , GAME_NOT_WORKING) |
| 2491 | COMP( 1987, ppc512, ibm5150, 0, pc200, pc200, pc200, ibm5160, "Amstrad plc", "Amstrad PPC512", 0) |
| 2492 | COMP( 1987, ppc640, ibm5150, 0, pc200, pc200, pc200, ibm5160, "Amstrad plc", "Amstrad PPC640", 0) |
| 2493 | COMP( 1986, pc1512, ibm5150, 0, pc1512, pc1512, pc1512, ibm5160, "Amstrad plc", "Amstrad PC1512 (version 1)", GAME_NOT_WORKING) |
| 2494 | COMP( 198?, pc1512v2, ibm5150, 0, pc1512, pc1512, pc1512, ibm5160, "Amstrad plc", "Amstrad PC1512 (version 2)", GAME_NOT_WORKING) |
| 2495 | COMP( 1987, pc1640, ibm5150, 0, pc1640, pc1640, pc1640, ibm5160, "Amstrad plc", "Amstrad PC1640 / PC6400 (US)", GAME_NOT_WORKING ) |
| 2313 | 2496 | // pc2086 pc1512 with vga?? |
| 2314 | | COMP ( 1987, pcmda, ibm5150, 0, pcmda, pcmda, pcmda, ibmpc, "", "PC (MDA)" , 0) |
| 2315 | | COMP ( 1987, pcherc, ibm5150, 0, pcherc, pcmda, pcmda, ibmpc, "MESS", "PC (Hercules)" , 0) |
| 2316 | | COMP ( 1987, xtvga, ibm5150, 0, xtvga, xtvga, pc_vga, ibmpc, "", "PC/XT (VGA, MF2 Keyboard)" , GAME_NOT_WORKING) |
| 2497 | COMP ( 1987, pcmda, ibm5150, 0, pcmda, pcmda, pcmda, ibm5160, "", "PC (MDA)" , 0) |
| 2498 | COMP ( 1987, pcherc, ibm5150, 0, pcherc, pcmda, pcmda, ibm5160, "MESS", "PC (Hercules)" , 0) |
| 2499 | COMP ( 1987, xtvga, ibm5150, 0, xtvga, xtvga, pc_vga, ibm5160, "", "PC/XT (VGA, MF2 Keyboard)" , GAME_NOT_WORKING) |
| 2317 | 2500 | |