First post, by superfury
When I try to use the keyboard after starting certain applications (Windows 3.0 running a MS-DOS game) the keyboard acts strangely. Also when I try to open a text editor (like edit) in MS-DOS, all keys input "\" into the text editor, instead of normal input. Anyone knows what's the cause of this? My keyboard emulation works fine in Windows 3.0 itself and when running games like Ultima VI.
I've also noticed that for some reason keyboard input is too fast? I'm using the documented delays for inputting keys (single key input vs typematic key using the current typematic key rate). The main thread handles input and translates it into either PSP input or Keyboard/Mouse input(during Direct Input mode). The CPU thread then processes that data and updates keyboard(at the rate specified) and mouse(at the rate specified in PS/2 mode, or at a predetermined rate using Serial mouse mode(default)). It looks like the typematic mode is entered too fast? So it isn't delaying enough for some reason?
My input handling routine:
https://bitbucket.org/superfury/x86emu/src/70 … ard.c?at=master
It's the tickPendingKeys function that's handled every 1/1000th second that handles input and typematic rates (combined with calculateKeyboardStep). onKeyPress/onKeyRelease handle the moment a key(or PSP OSK mapped input for the keyboard) is pressed/released.
The keyboard emulation itself:
https://bitbucket.org/superfury/x86emu/src/70 … ard.c?at=master
The tables are taken from:
https://bitbucket.org/superfury/x86emu/src/70 … ata.c?at=master
Anyone knows why the keyboard doesn't work correctly in some MS-DOS programs (like edit, qbasic etc.) and why the keyboard starts using typematic mode too fast?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io