Re: [hatari-devel] Incomplete emulation of IKBD $0A command

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 01/11/2021 à 08:14, Thorsten Otto a écrit :
On Sonntag, 31. Oktober 2021 21:47:15 CET Nicolas Pomarède wrote:

 > Can you try the following patch ? mouse reporting should now take

 > deltax/y into account and cursor will move much slower in the case of

 > gulam with param 0606 for example.

Thanks for looking into this. Yes, that seems mostly to work. However, i think the code should check for >= instead of > to get the same behaviour as before (and also what seems to be done by the IKBD rom). I've attached a slightly modified patch. It also checks for zero thresholds and sets them to one, to simplify the handling in SendMouseCursorPacket() and making sure it does not loop forever.

Hi

indeed, it was >= that should be used, as I wrote in my previous mail ; this is fixed. As for converting 0 value for KeyCodeDeltaX/Y to 1, I'd rather add a check for DeltaX/Y != 0 as is in IKBD ROM, this should ensure it doesn't loop forever


BTW, there seems to be a similar issue with the $0B command, which sets the thresholds for relative mouse movements. It is accepted, and correctly reported back with the $8B command, but otherwise not taken into account. However i don't know of any program that makes use of this.


I saw that too, will have a look later.

I've also attached a second patch that replaces some magic values with already defined constants (ie. ATARIJOY_BITMASK_FIRE). This is just a cosmetic change and should not affect behaviour.

Can you repost it with the missing defines from ikbd.h ?

Nicolas






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/