Regresar   Foro de marcianitos.org > Construcción y restauración de máquinas recreativas > El panel de control

 
 
Old 21-dic-2008, 03:22   #1
pakoman
Marciano
 
Avatar de pakoman
Driver raton con ejes invertidos para Msdos

Hola.

He parcheado el cutemouse de msdos para invertir el eje X, el Y o ambos.

Puede ser util para los que usen un trackball casero de raton optico en msdos o quieran invertir el eje Y para juegos de msdos que no permitan esa opcion.

http://www.savefile.com/files/1941002

A lo moderadores por favor pido que actualicen la pagina http://www.marcianitos.org/programas/cutemouse con el nuevo archivo y con estas instrucciones, tanto en español como en ingles, para que el autor de cutemouse tambien ponga un link a esta pagina (para que no digais que no os promociono, jeje).

Un saludo.


Copio y pego el instrucciones.txt

Quote:
------------------------
Instrucciones en español
------------------------


Cutemouse 2.1b4 para Msdos con ejes invertidos. Puede ser de utilidad para su uso con un trackball casero o juegos que no permitan la opción "invert Y axis".

Se incluye el cutemouse 2.1b4 original y los parcheados.

ctmouse.exe driver original
ctmouseX.exe driver con eje X invertido
ctmouseX2.exe driver con eje X invertido (otro método, funciona igual)
ctmouseY.exe driver con eje Y invertido
ctmouseXY.exe driver con ambos ejes invertidos

Cutemouse soporta ratones USB, PS2 y Serie. Estos parches están verificados que funcionan por PS2, desconocemos si funcionaran con otros ratones, aunque es probable que sí.

Los ficheros han sido parcheados gracias a la ayuda de Eric Auer, quien se encarga actualmente del proyecto cutemouse, y se distribuyen los parcheados con su permiso.

Se ha parcheado lo siguiente:

...
swapbuttons proc
neg cx
test al,00000011b ; =3 ; check the L and R buttons
; if_ odd ; if buttons not same
...

En otras palabras, añadir la línea "neg cx" después de la línea "swapbuttons proc" y recompilar...


Para compilar necesitamos JWASMD y Turbo C 2 con
TLINK y MAKE. Simplemente teclear MAKE.
Si eso falla, probablemente olvidamos copiar algún fichero ctm-*.msg
en ctmouse.msg ...
Puedes encontrar JWASM en www.japheth.de - si no puedes encontrar Turbo C 2,
pregunta a Nagy Daniel si él puede hacernos el makefile para otro LINK / MAKE
como OpenWatcom u otro.




Si no queremos recompilar, podemos parchear el fichero con un editor hexadecimal:
Esto parchea solo para PS/2. Con el 2.1b4 ctmouse exe editamos esta parte:

0000023A B000 mov al,0x0
0000023C F7D9 neg cx
0000023E A803 test al,0x3

Editar los bytes f7 d9 por 90 90 para invertir el eje Y del ratón PS/2...

Para invertir solamente el eje X:

f7 d9 neg cx
a8 03 test al,3
7a 02 jpe ...
34 03 xor al,3

Lo reescribimos en:

f7 d9 neg cx ; leave Y intact
f7 db neg bx ; invert X
eb 02 jmp short ...
34 03 xor al,3

O alternativamente en:

f7 d9 neg cx ; leave Y intact
f7 db neg bx ; invert X
90 nop
90 nop
34 03 xor al,3

Ambas variaentes romperán la opción /L "intercambiar botones".



Parcheado por pakoman ¿será de utilidad para alguien más aparte de mi? :P



Agradecimientos: Eric Auer por su ayuda y paciencia, y al autor original de Cutemouse, Nagy Daniel.
Me pidió que no mencionara su correo de forma legible por un "spam bot", así que no lo mencionaré de ninguna manera.
La web de Cutemouse es http://cutemouse.sourceforge.net/



--------------------
English instructions
--------------------

Cutemouse 2.1b4 for Msdos with inverted axis. It may be useful for those using a homemade trackball or with Msdos games that don't allow "invert Y axis" option.

The package includes original cutemouse 2.1b4 and the patches ones.

ctmouse.exe original driver
ctmouseX.exe driver with X axis inverted
ctmouseX2.exe driver with X axis inverted (another patch, works the same)
ctmouseY.exe driver with Y axis inverted
ctmouseXY.exe driver with both axis inverted



In order to patch ctmouse on your own, you must follow these steps:

I do not know what type of mouse you use - PS/2
or USB or RS232 - but here is a patch that may
work for all types:

...
swapbuttons proc
neg cx
test al,00000011b ; =3 ; check the L and R buttons
; if_ odd ; if buttons not same
...

In other words, add the "neg cx" line after the
line "swapbuttons proc" and then recompile...

To compile, you need JWASMD and Turbo C 2 with
TLINK and MAKE. Then just type MAKE. If that
fails, you probably forgot to copy one of the
ctm-*.msg files to ctmouse.msg ... You can find
JWASM on www.japheth.de - if you cannot find a
copy of Turbo C 2, please ask Nagy Daniel if he
can write us a makefile for another LINK / MAKE
such as the OpenWatcom one or some smaller one.

If you do not want to recompile, you can also
use a hex editor such as HIEW for a simple fix
which fixes only the PS/2 case. With the 2.1b4
ctmouse exe you would edit this part:

0000023A B000 mov al,0x0
0000023C F7D9 neg cx
0000023E A803 test al,0x3

Edit the bytes f7 d9 into 90 90 to invert
the Y axis of PS/2 mouse handling...



Edit the f7 d9 into f7 db to replace neg cx by neg bx.
and I got both axis inverted:

0000023A B000 mov al,0x0
0000023C F7D9 neg cx
0000023E A803 test al,0x3



To invert only X axis and leave Y axis intact:

f7 d9 neg cx
a8 03 test al,3
7a 02 jpe ...
34 03 xor al,3

You could rewrite it into:

f7 d9 neg cx ; leave Y intact
f7 db neg bx ; invert X
eb 02 jmp short ...
34 03 xor al,3

Or alternatively rewrite it into:

f7 d9 neg cx ; leave Y intact
f7 db neg bx ; invert X
90 nop
90 nop
34 03 xor al,3

Both versions will break the /L "swap mouse buttons"
handling in some way, but I think it will just mean
that you can no longer swap the mouse buttons...



Patched by pakoman. May it be useful for another one but me? :P



Thanks to: Eric Auer for his help and patience, and original cutemouse aothor, Nagy Daniel.
I was asked not to post any mail in a "spam bot" readable form, so I wont post any email.
Cutemouse's web is http://cutemouse.sourceforge.net/
   
Old 21-dic-2008, 20:20   #2
dasansa
Editor Marciano
genial! gracias
   
Old 22-dic-2008, 19:55   #3
pakoman
Marciano
 
Avatar de pakoman
Actualizada la pagina: http://www.marcianitos.org/programas/cutemouse (no sabia que la podia editar yo mismo).

Un saludo.