
README, mconv2 version 0.1
==========================

Credits:
   This program is just a modification of "mconv" by Johan Myreen.
   Modifications include this README and the support of the ps2 and
   the mse pseudodevices, and were done by Frode V. Fjeld.

Who wants this?
   Linux-users who have a ps/2-style mouse.

What does it do?
   It allows you to have several programs use the mouse at the same
   time, for instance selection and XFree86. It also gives you the
   opportunity to use programs which doesn't understand the ps/2
   protocol, but does understand the microsoft serial mouse protocol,
   like doom and svgalib.

Installation:
   1. Compile the program if you don't want to use the binary that
      should come with this archive.

         % gcc -O2 -o mconv2 mconv2.c

      This is a small program without any fancy stuff, so it should
      compile without complaints.

   2. Put the binary somewhere appropriate, like

         % cp mconv2 /usr/local/bin


   3. Decide which devices you want. mconv2 has this to offer:

         - Microsoft serial mouse.
            This device pretends to be a Microsoft
            serial mouse. This device ignores the mid-
            button on your mouse.

         - PS/2 mouse.
            This device is just a copy of the real
            mouse device, but lets more that one program
            use it at a time.

         - Microsoft serial mouse with mid-button emulation.
            This device is just like the microsoft serial
            mouse, but translates mid-button clicks to
            clicks on both left and right button. This lets
            programs that have mid-button emulation
            (like XFree86) work with the mid-button.


   4. Make one fifo for each device you want. Let's say you want all
      three devices:

         % mkfifo -m 666 /dev/msmouse
         % mkfifo -m 666 /dev/ps2mouse
         % mkfifo -m 666 /dev/msemouse

      This will only have to be done once.


   5. Run mconv2. Following the same example:

         % mconv2 /dev/psaux -ms /dev/msmouse -ps2 /dev/ps2mouse -mse /dev/msemouse

      ..assuming your true mouse-device is /dev/psaux. If everything works well,
      put this command in your /etc/rc.d/rc.local or wherever your startup-script
      is. You probably want to start mconv2 before other programs that use the
      mouse.


   6. Configure your programs to use the new mouse-devices. You probably
      want programs like XFree86 and Selection to use the /dev/ps2mouse
      device, and doom to use /dev/msmouse (or am I the only one who can't
      get svgalibdoom to work with a ps/2-mouse?)


   7. Sit back and watch everything work perfectly.


   or send me a mail explaining what/why/how things didn't work.



Problems:
   I don't know exactly what the overhead is here, but it doesn't slow
   down things noticeable on my 486/33. The microsoft device is really
   slow under doom, but it's OK when I manually set the mouse speed to
   about 30. Under other apps, like svgalibs mousetest, the speed is OK.


--
Frode Fjeld        e-mail..: frodef@stud.cs.uit.no
                   WWW.....: http://www.cs.uit.no/~frodef/frodef.html



This is the original source code comment from Johan Myreen. I was not able
to contact him, so I just hope this release is ok with him.

/*
 * Microsoft serial mouse emulator for PS/2 mouse using a named pipe.
 *
 * This program reads packets from a PS/2 mouse, transforms them 
 * into the corresponding Microsoft serial mouse packets and writes
 * them to a named pipe (fifo). Application programs not supporting
 * the PS/2 mouse protocol (e.g. X11) can then read the packets from
 * the fifo, which to them looks like a serial port with a Microsoft
 * mouse on it.
 *
 * Create a named pipe with suitable permissions with mkfifo,
 * for instance
 *
 *      mkfifo -m 666 /dev/mouse
 * 
 * Make sure you have an entry in /dev for the PS/2 pointing device.
 * If not, create with
 *
 *      mknod /dev/psaux c 10 1
 *
 * Start up the conversion program with:
 *
 *      mconv /dev/psaux /dev/mouse &
 *
 * The program takes two arguments: the real mouse device and the
 * name of the fifo.
 *
 * In Xconfig, fool X into thinking you have a Microsoft mouse
 * on /dev/mouse (or whatever you called it):
 *
 * Microsoft "/dev/mouse"
 * 
 * Johan Myreen
 * jem@cs.hut.fi
 */

