I was looking at keyboard.c (trying to figure out why my cursor keys don't seem to work properly with the AMI XT clone), when I happened to spot an inconsistency in keyboard_process(): When a key is pressed initially it sends out scancodes from scancode_set1[], scancode_xt[], or scancode_tandy[], but when repeating it always uses scancodes from scancode_set1[]. I think this is probably an oversight, but being new to PCem I'm not 100% sure. Anyway, the attached patch #1 fixes this.
I have also attached 2 other patches, which optimize/reduce some keyboard array sizes (patch #2 takes off 39168 bytes, and #3 another 2448).
[Patch] Fixed XT/Tandy keyboard repeat scancode
[Patch] Fixed XT/Tandy keyboard repeat scancode
- Attachments
-
- 1_xt_keyboard_repeat.patch
- (1.11 KiB) Downloaded 410 times
Re: [Patch] Fixed XT/Tandy keyboard repeat scancode
Hey, this fixes keyboard input for me with 8088 emulation! When I switch to fullscreen using ctrl+alt+pgdn, the keyboard stops working. This patch seems to fix the bug and now I can finally run a fullscreen 8088 emulation.
Re: [Patch] Fixed XT/Tandy keyboard repeat scancode
Cool!
BTW, I just noticed that the other 2 patchs are missing, so I guess I didn't upload them (or maybe phpBB removed them while I was previewing?)... Anyway, here they are, I hope.
- Attachments
-
- 3_keyboard_state_array.patch
- (1.96 KiB) Downloaded 415 times
-
- 2_keyboard_scancode_array.patch
- (63.76 KiB) Downloaded 410 times
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: [Patch] Fixed XT/Tandy keyboard repeat scancode
Merged at revs 1199 and 1200.