src/mess/machine/pc.c
| r2502 | r2503 | |
| 383 | 383 | |
| 384 | 384 | /************************************************************* |
| 385 | 385 | * |
| 386 | | * NMI handling and |
| 387 | | * PCJR raw keybaord handling |
| 386 | * PCJR NMI and raw keybaord handling |
| 388 | 387 | * |
| 388 | * raw signals on the keyboard cable: |
| 389 | * ---_-b0b1b2b3b4b5b6b7pa---------------------- |
| 390 | * | | | | | | | | | | | |
| 391 | * | | | | | | | | | | *--- 11 stop bits ( -- = 1 stop bit ) |
| 392 | * | | | | | | | | | *----- parity bit ( 0 = _-, 1 = -_ ) |
| 393 | * | | | | | | | | *------- bit 7 ( 0 = _-, 1 = -_ ) |
| 394 | * | | | | | | | *--------- bit 6 ( 0 = _-, 1 = -_ ) |
| 395 | * | | | | | | *----------- bit 5 ( 0 = _-, 1 = -_ ) |
| 396 | * | | | | | *------------- bit 4 ( 0 = _-, 1 = -_ ) |
| 397 | * | | | | *--------------- bit 3 ( 0 = _-, 1 = -_ ) |
| 398 | * | | | *----------------- bit 2 ( 0 = _-, 1 = -_ ) |
| 399 | * | | *------------------- bit 1 ( 0 = _-, 1 = -_ ) |
| 400 | * | *--------------------- bit 0 ( 0 = _-, 1 = -_ ) |
| 401 | * *----------------------- start bit (always _- ) |
| 402 | * |
| 403 | * An entire bit lasts for 440 uSec, half bit time is 220 uSec. |
| 404 | * Transferring an entire byte takes 21 x 440uSec. The extra |
| 405 | * time of the stop bits is to allow the CPU to do other things |
| 406 | * besides decoding keyboard signals. |
| 407 | * |
| 408 | * These signals get inverted before going to the PCJR |
| 409 | * handling hardware. The sequence for the start then |
| 410 | * becomes: |
| 411 | * |
| 412 | * __-_b0b1..... |
| 413 | * | |
| 414 | * *---- on the 0->1 transition of the start bit a keyboard |
| 415 | * latch signal is set to 1 and an NMI is generated |
| 416 | * when enabled. |
| 417 | * The keyboard latch is reset by reading from the |
| 418 | * NMI enable port (A0h). |
| 419 | * |
| 389 | 420 | *************************************************************/ |
| 390 | 421 | |
| 391 | 422 | static struct { |