src/mess/video/733_asr.c
| r3496 | r3497 | |
| 617 | 617 | |
| 618 | 618 | static unsigned char repeat_timer; |
| 619 | 619 | enum { repeat_delay = 5 /* approx. 1/10s */ }; |
| 620 | | static char last_key_pressed = -1; |
| 620 | static UINT8 last_key_pressed = 0x80; |
| 621 | 621 | static modifier_state_t last_modifier_state; |
| 622 | 622 | |
| 623 | 623 | UINT16 key_buf[6]; |
| r3496 | r3497 | |
| 655 | 655 | /* reset REPEAT timer if the REPEAT key is not pressed */ |
| 656 | 656 | repeat_timer = 0; |
| 657 | 657 | |
| 658 | | if ((last_key_pressed >= 0) && (key_buf[last_key_pressed >> 4] & (1 << (last_key_pressed & 0xf)))) |
| 658 | if ( ! (last_key_pressed & 0x80) && (key_buf[last_key_pressed >> 4] & (1 << (last_key_pressed & 0xf)))) |
| 659 | 659 | { |
| 660 | 660 | /* last key has not been released */ |
| 661 | 661 | if (modifier_state == last_modifier_state) |
| r3496 | r3497 | |
| 684 | 684 | } |
| 685 | 685 | else |
| 686 | 686 | { |
| 687 | | last_key_pressed = -1; |
| 687 | last_key_pressed = 0x80; |
| 688 | 688 | |
| 689 | 689 | if (asr[unit].status & AS_rrq_mask) |
| 690 | 690 | { /* keyboard buffer full */ |
| r3496 | r3497 | |
| 701 | 701 | last_key_pressed = (i << 4) | j; |
| 702 | 702 | last_modifier_state = modifier_state; |
| 703 | 703 | |
| 704 | | asr[unit].recv_buf = (int)key_translate[modifier_state][(int)last_key_pressed]; |
| 704 | asr[unit].recv_buf = (int)key_translate[modifier_state][last_key_pressed]; |
| 705 | 705 | asr[unit].status |= AS_rrq_mask; |
| 706 | 706 | asr[unit].new_status_flag = 1; /* right??? */ |
| 707 | 707 | asr_field_interrupt(unit); |