Page 1 of 1

[Patch] Fixed XT/Tandy keyboard repeat scancode

Posted: Tue 13 Nov, 2018 9:19 pm
by Tale
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).

Re: [Patch] Fixed XT/Tandy keyboard repeat scancode

Posted: Wed 14 Nov, 2018 7:46 am
by RealNC
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

Posted: Wed 14 Nov, 2018 6:45 pm
by Tale
RealNC wrote: Wed 14 Nov, 2018 7:46 amHey, 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.
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?)... :oops: Anyway, here they are, I hope.

Re: [Patch] Fixed XT/Tandy keyboard repeat scancode

Posted: Tue 20 Nov, 2018 10:50 am
by SarahWalker
Merged at revs 1199 and 1200.