Re: [hatari-devel] Incomplete emulation of IKBD $0A command |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 30/10/2021 à 13:24, Thorsten Otto a écrit :
Hi,
The IKBD command $0A (causing the IKBD to report cursor keys instead of
mouse movements) takes two parameters for the thresholds. These are not
considered by Hatari, instead it behaves as using threshold values of 1.
This can be seen eg. with gulam, where every mouse movements scrolls the
history.
BTW, does anybody know what happens if those thresholds are set to zero?
Hi
from an annotated dump of the IKBD rom I made in 2012, I see this code :
F5D2 : 91 C5 " " cmpa X00C5
F5D4 : 25 03 "% " bcs LF5D9
F5D6 : 72 01 C6 "r " oim #$01X00C6
F5D9 LF5D9:
F5D9 : 39 "9" rts
where RAM 0xC5 will contain deltax/deltay value and reg A will contain
x/y distance.
this would translate to :
if ( x_distance >= deltax )
{
or #1,$c6
}
So I would say that delta_x =0 or =1 should have the same effect when
x_distance is >0, it will report a key left/right for every change of 1
unit in x distance.
This matches the code in IKBD_SendCursorMousePacket(), except
KeyCodeDeltaX/Y is not taken into account, it just does for example :
if (KeyboardProcessor.Mouse.DeltaX>0)
but correct would be
if (KeyboardProcessor.Mouse.DeltaX>KeyCodeDeltaX)
I think I can provide a patch for this, but I don't know the "gulam"
program ; where can I get it to test the patch ?
Nicolas