[Aranym-user] Mouse wheel support ?

Xavier Joubert xavier.joubert at free.fr
Sun Oct 10 08:28:53 CEST 2004


Hello all,


Selon Arnaud BERCEGEAY <arnaud.bercegeay at free.fr>:
> i have a mouse (with wheel) connected to linux-box running
> aranym/emutos/freemint/xaaes.
>
> XaAES can manage wheel mouse by using the vdi call vex_wheelv().
>
> The missing stuff is the path from linux to xaaes mouse driver. I don't
> know what part is involved (aranym ? emutos ? fvdi ?)

Here is what I think is needed to be able to mouse wheel on a typical
ARAnyM/Afros setup (from high level to low) :

1- An AES application that make use of this feature. That's your job, Arnaud !

2- An AES that handle vex_wheelv() and returns corresponding AES events. I
assume XaAES is OK as you wrote.

3- A VDI that provide vex_wheelv(). EmuTOS VDI is a good candidate. It just
needs some work to actually call the installed function, according to Martin. I
think the best would be to follow the latest Eiffel card conventions (
http://perso.wanadoo.fr/didierm/eiffel-e.htm ), and use $F6 $05 $00 $00 $00 $00
$00 $59/$5A status frames. This way EmuTOS will also support real hardware.

I did not look how EmuTOS VDI hook to get keyboards events, but I think this
should be trivial.

4- ARAnyM IKBD emulation now has to return those status frames whenever it
receive a mouse wheel event from SDL. Currently it simply acts as if user
pressed up arrow and down arrow keys.

I attached a simple patch to change this. Please note it is not tested as I have
no wheel mouse at home.


Best regards,


Xavier
-------------- next part --------------
--- ../aranym/src/input.cpp	2004-09-04 11:13:29.784017600 +0200
+++ src/input.cpp	2004-10-10 08:19:18.931932800 +0200
@@ -547,11 +547,25 @@
 				grabTheMouse();
 		}
 		else if (event.button.button == 4) {	/* mouse wheel Up */
-			getIKBD()->SendKey(0x48);	// press keyUp
+			getIKBD()->SendKey(0xF6);
+			getIKBD()->SendKey(0x05);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x59);
 			return;
 		}
 		else if (event.button.button == 5) {	/* mouse wheel Down */
-			getIKBD()->SendKey(0x50);	// press keyDown
+			getIKBD()->SendKey(0xF6);
+			getIKBD()->SendKey(0x05);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x00);
+			getIKBD()->SendKey(0x5A);
 			return;
 		}
 	}


More information about the cz-bobek-lists-aranym-user mailing list