Re: [Freedos-user] Keyboard issue - wondering about typematic rate for keyboard repeats in different VMs and emulators
Most modern computers seem to support INT 16.03 to set the Typematic rate. I've personally never had it fail with real hardware, but in some Virtual Machines (VMs) it doesn't actually do anything. I've had lots of failures with support of INT 16.09 to get the current typematic rate, both in real hardware and in VMs. > Our MODE just calls the BIOS. There is no DOS typematic rate driver, > DOS only asks the BIOS to set the rate for it. When DOS MODE calls the BIOS to change something about the typematic rate, there is no "driver" involved. If the keyboard is a regular PS2 (or older) keyboard, the BIOS just sends a special serial packet to the keyboard telling it what to do. Control of the actual typematic stuff is handled COMPLETELY by the keyboard hardware. In addition, in the PS2 keyboard serial protocol there is no way for the BIOS to "ask" the keyboard what the current typematic settings are. This means the BIOS must keep track of the current typematic settings internally since it can't ask the keyboard (it can't do a "Read-Modify-Write", it can only do a "Write"). USB keyboards are actually "dumber" than the PS2 keyboards. PS2 keyboards handle key presses, key releases, and all the typematic stuff all by themselves and just send data to the computer when something has happened. USB keyboards must constantly be polled and only return information about key presses. The USB keyboard driver needs to handle the key releases and the typematic stuff in software since the USB keyboard doesn't do it. ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Keyboard issue - wondering about typematic rate for keyboard repeats in different VMs and emulators
Hi! Here is the related RBIL part for you: B-1603--- INT 16 - KEYBOARD - SET TYPEMATIC RATE AND DELAY AH = 03h AL = subfunction 00h set default delay and rate (PCjr and some PS/2) 01h increase delay before repeat (PCjr) 02h decrease repeat rate by factor of 2 (PCjr) 03h increase delay and decrease repeat rate (PCjr) 04h turn off typematic repeat (PCjr and some PS/2) 05h set repeat rate and delay (AT,PS) BH = delay value (00h = 250ms to 03h = 1000ms) BL = repeat rate (00h=30/sec to 0Ch=10/sec [def] to 1Fh=2/sec) 06h get current typematic rate and delay (newer PS/2s) Return: BL = repeat rate (above) BH = delay (above) Return: AH destroyed by many BIOSes Note: use INT 16/AH=09h to determine whether some of the subfunctions are supported SeeAlso: INT 16/AH=09h,AH=29h"HUNTER",AH=2Ah"HUNTER" B-1609--- INT 16 - KEYBOARD - GET KEYBOARD FUNCTIONALITY AH = 09h Return: AL = supported keyboard functions (see #00585) AH destroyed by many BIOSes Note: this function is only available if bit 6 of the second feature byte returned by INT 15/AH=C0h is set (see #00509) SeeAlso: AH=03h,AH=0Ah,AH=10h,AH=11h,AH=12h,AH=20h,AH=21h,AH=22h,INT 15/AH=C0h Bitfields for supported keyboard functions: Bit(s) Description (Table 00585) 7 reserved 6 INT 16/AH=20h-22h supported (122-key keyboard support) 5 INT 16/AH=10h-12h supported (enhanced keyboard support) 4 INT 16/AH=0Ah supported 3 INT 16/AX=0306h supported 2 INT 16/AX=0305h supported 1 INT 16/AX=0304h supported 0 INT 16/AX=0300h supported SeeAlso: #00511 And here is what FreeDOS "MODE /?" has to say about it: ... > MODE CON[:] [RATE=...] [DELAY=...] > (default rate 20, default delay 1) > Rate can be 1..32 for 2..30 char/sec, > delay can be 1..4 for 1/4..4/4 sec. Our MODE just calls the BIOS. There is no DOS typematic rate driver, DOS only asks the BIOS to set the rate for it. Regards, Eric Eric proposed: "For this, you start DEBUG, then type: a cs:100 mov ax,0305 mov bx, int 16 int 20 g q " As Ah=3 int 16h is marked as PCJr only: INT 16 - KEYBOARD - SET DELAYS (PCjr ONLY) REG AH = 3 AL = 0: RESET TYPEMATIC AL = 1: INCREASE INITIAL DELAY AL = 2: INCREASE CONTINUING DELAY AL = 3: INCREASE BOTH DELAYS AL = 4: TURN OFF TYPEMATIC in https://groups.google.com/g/net.micro.pc/c/yg4oazZOA7g/m/uwO-gYOTi2gJ I hesitate to go there... but did not get the full RBIL. https://info.wsisiz.edu.pl/~bse26236/batutil/help/MODESTRS.HTM but I am a bit unsure these options are supported by FreeDOS because: http://wiki.freedos.org/wiki/index.php/Mode does not mention them. Last I was thinking many keyboards are now USB rather than PS/2... and I think the 8042 chip handle typematic on DOS... so I was first thinking about BIOS emulation of PS/2 keyboard and mouse in BIOS options... but your keyboard would just not work if these options were causing problem I think. ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Keyboard issue - wondering about typematic rate for keyboard repeats in different VMs and emulators
Eric proposed: "For this, you start DEBUG, then type: a cs:100 mov ax,0305 mov bx, int 16 int 20 g q " As Ah=3 int 16h is marked as PCJr only: INT 16 - KEYBOARD - SET DELAYS (PCjr ONLY) REG AH = 3 AL = 0: RESET TYPEMATIC AL = 1: INCREASE INITIAL DELAY AL = 2: INCREASE CONTINUING DELAY AL = 3: INCREASE BOTH DELAYS AL = 4: TURN OFF TYPEMATIC in https://groups.google.com/g/net.micro.pc/c/yg4oazZOA7g/m/uwO-gYOTi2gJ I hesitate to go there... but did not get the full RBIL. https://info.wsisiz.edu.pl/~bse26236/batutil/help/MODESTRS.HTM but I am a bit unsure these options are supported by FreeDOS because: http://wiki.freedos.org/wiki/index.php/Mode does not mention them. Last I was thinking many keyboards are now USB rather than PS/2... and I think the 8042 chip handle typematic on DOS... so I was first thinking about BIOS emulation of PS/2 keyboard and mouse in BIOS options... but your keyboard would just not work if these options were causing problem I think. Activé ven., 10 juin 2022 14:48:48 -0400 Eric Auer écrit > > Tom, > > >> In DOS I was able to press and hold a key and the key would repeat. > >> Great for arrow and page keys. For some reason this stopped workin > > > > wow. one of these Asshole from Hell questions: > > > > no information what DOS we are talkink about. > > > > no information whatsoever about CONFIG.SYS/AUTOEXEC.BAT. > > I somehow liked Dennis' way of asking for more context and details > better :-p However, I also have a technical question about Daniel's > technical question :-) > > Daniel, you could do the following to test whether explicitly setting > keyboard repeat (typematic rate, see RBIL = Ralf Browns Interrupt List) > to maximum speed and the delay to minimum has any effect on your real or > virtual hardware. > Note that you have to press return twice between "int 20" and "g". > > For the lowest possible speed and the longest delay before repeating > starts, you write "031f" instead of "" in the "mov bx,..." line. > > Interestingly, it seems to make no difference in DOSEMU2 which of the > two values I use for BX. It probably just uses the keyboard repeat > settings from Linux, without letting me a custom different rate just for > the DOSEMU2 window. > > So I would be keen to know which of the other DOS systems people here > are using do or do not support changing the typematic rate aka keyboard > repeat rate. In particular, I guess that real hardware often supports > this, while running DOS on a virtual computer in a window could be less > likely to offer support for this setting? > > Thanks for testing! Regards, Eric > > > > ___ > Freedos-user mailing list > Freedos-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-user > ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Keyboard issue - wondering about typematic rate for keyboard repeats in different VMs and emulators
Tom, In DOS I was able to press and hold a key and the key would repeat. Great for arrow and page keys. For some reason this stopped workin wow. one of these Asshole from Hell questions: no information what DOS we are talkink about. no information whatsoever about CONFIG.SYS/AUTOEXEC.BAT. I somehow liked Dennis' way of asking for more context and details better :-p However, I also have a technical question about Daniel's technical question :-) Daniel, you could do the following to test whether explicitly setting keyboard repeat (typematic rate, see RBIL = Ralf Browns Interrupt List) to maximum speed and the delay to minimum has any effect on your real or virtual hardware. For this, you start DEBUG, then type: acs:100 mov ax,0305 mov bx, int 16 int 20 g q Note that you have to press return twice between "int 20" and "g". For the lowest possible speed and the longest delay before repeating starts, you write "031f" instead of "" in the "mov bx,..." line. Interestingly, it seems to make no difference in DOSEMU2 which of the two values I use for BX. It probably just uses the keyboard repeat settings from Linux, without letting me a custom different rate just for the DOSEMU2 window. So I would be keen to know which of the other DOS systems people here are using do or do not support changing the typematic rate aka keyboard repeat rate. In particular, I guess that real hardware often supports this, while running DOS on a virtual computer in a window could be less likely to offer support for this setting? Thanks for testing! Regards, Eric ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user