Site hosted by Angelfire.com: Build your free website today!

MulipleMiceMame/dx8Mame

new!
Mame57 version. (Download from the download page.) Now saves settings in windows! Command lines options can be in mame.ini if you run mame -cc again or add them yourself.
Limits:
  • You need two or more USB mice for mame to see more than one mouse!
  • You need directX 8 or greater installed!
  • You need Windows 98 or ME! I have confirmation that it does not work on win2000 or XP.
  • Don't use Logitech MouseWare software! Logitech drivers are okay. Apparently, the Logitech MouseWare software prevents logitech mice from being seen as individual mice.

 

added command-line options:

  • -switchmice/-noswitchmice: adds new menu item in UI that allows you to map complete mice to any player
  • -switchaxes/-noswitchaxes : adds new menu item in UI that allows you to map X and Y mouse(mice) axes to any player
  • -switchjoy/-noswitchjoy : menu item gives better analog input mapping (like switchmice)
  • All above options let you change the default settings by using mame's settings menu ([tab] key)

  • -analogpedal/-noanalogpedal : enables true analog pedal input from joystick Y axis.
  • -singlemouse/-nosinglemouse : forces use of only the "sysmouse" (yuck)

To add the above options to mame.ini, just cut and paste the text below into mame.ini:

### Analog+ options ###
singlemouse 0
switchablemice 0
switchmiceaxes 1
switchablejoy 1
analogpedal 1

 

Old theory: I wonder if the serial and ps/2 mice problem is because their drivers are not fully directX compatible? See if you can follow this reasoning. It's because USB mice are HID's ("Human Interface Devices"), while ps/2 and serial mice are not HID's. Windows 98/Me can see the HID mice as separate devices, but not non-HID mice. Go figure: the normal ps/2 mouse is not a "Human Interface Device"; <sarcasm>great labeling there Microsoft</sarcasm>.

I'm throwing these pages up for you all to try/test/fix. I'll try to keep this page current, and clean it up later. ;)


Download the files from the download page.

This page is a little out-of-date. The information is still pretty good, though. I'll upgrade this page, too, at some point.


The Binary

complied mame55 (multiple USB mice+mappable mouse axes +saved settings)

complied mame55 (multiple USB mice) (old)

You need directX 8.0 or greater installed to run the binary. You need usb mice for more than one mouse to be seen.

This binary lets people with up to four USB mice connect and control different players. As compiled, if any usb mice are connected, all serial and ps/2 mice control player 4. If no usb mice are connected, all mice control player 1 (just like mame .55).

The new binary partially adds three new features: (a little more info)

Command-line option  
-switchmice allows any player by controlled by any mouse.
-switchaxes allows any player axis be controlled by any mouse and any axis.
example: Two spinners from one mouse, player 1 can the mouse's x-axis and player 2 the mouse's y-axis.
-switchjoy like -switchmice, but for analog joysticks

The setting you input are not yet saved, but I'm working on it.

If one of your USB mice is not working correctly, just unplug and replug it. (That's what I did and it fixed it. Don't know why.)

See the what's new page and MultiMice Test Page for some more info.


To compile your own:

You need directX 8.0 or greater installed to run your compiled binary. You need all the dx8 C++ header files to compile.

I suggest having two mingw's if you try compiling: one for normal mame compiling, one for dx8 mame. My dx8 mingw directory is mingwdx8, and is written so in this notes.

Just multiple mice source

Partially implemented mouse axes features

My MultiMouse Test Page lists all the combinations of mice I tested.

The What's new page lists some advantages of using the source, in addition to the what the binary does.


Old post:

Can Mame Be Rewritten for Dual Mice Input?

A link (given by xiaou2) shows a program written in java that uses two mice for two separate inputs. All they seemed to do to get the the multiple inputs was use some native directX 8.0 c function calls. The Java just was set up with multiple mice in mind and handled the user interface. Mame knows how to handle multiple mice and is a great UI; it just can't get access to the individual mouse inputs. I think if mame was re-written and compiled for directX 8.0, mame would be able to get separate multiple mouse inputs.

I don't have VC; I can't find directX 8.0 libraries to compile and link with the gcc mame uses. Anybody who can tell me where to get gcc dx8 libs? But currently I can't compile for dx8. (note: I now have PeterPuck's dx8 libs mirrored here)

But I want dual mouse inputs so badly, I rewrote the necessary files (I hope) to make mame directX 8.0 compliant. All someone has to do is download them, replace the 3 changed files, and compile with the directX 8.0 libs. I don't know if any more hacking needs to be done to compile in VC, but please, someone with VC try compiling these hacks. I can help you or do any rewriting needed to compile. Just let me know if dual USB mice work. (and post the binary if it does) I tested the files by compiling mame using gcc + MS directX 8.0 includes, but since the MS libraries are for VC, I could not link the .o files to see if the rewrite actually works, but I was able to make all mame .o files with the changes.

All changes are now between:

#if(DIRECTINPUT_VERSION >= 0x0800)
      [new code]
#else
      [original code]
#endif //#if(DIRECTINPUT_VERSION >= 0x0800)

so if you set:

download changed files (mame .55; 2001 oct 9):

All real changes are in the input.c file; the other two files' changes cover differences between the gcc and VC compilers, I think. If you have problems with these two files, try using the original files.

Here's a smaller program + source to test directX 8.0 vs 5.0 and dual mice. (much easier to debug) The binary is compiled with dX5.0, because as said above, I can't compile & link directX 8.0. The differences, like above, are between #if(), #else, and #endif lines.

Mame would have the same limits as the Java program:

Remember, you need two usb mice.

I am trying to compile with mingw and MS dx8 headers and libs, but keep getting conflicts. I'll see what I can do, and let you know any progress.


I'll clean these pages up later. Sorry about the mess.