Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: MoonDog on October 25, 2004, 01:38:59 am

Title: configuring mouse as steering wheel? update
Post by: MoonDog on October 25, 2004, 01:38:59 am
I realize this is a MAME question and not really BYOAC but I thought I might get some help here.  I finally got around to wiring up my original Pole Position wheel and shifter to a mouse hack.  In windows everything looks great.  I can get smooth left and right pointer movement by turning the steering wheel.  So I fired up Pole Position in MAME and I couldn't get it to work properly.  After messing with the controls configuration (tab menu) I was finally able to get the car to turn left, but for some reason it doesn't want to go right.  Does anyone have any pointers in getting this working?  It seems like the hardware must be good because it is working in Windows.
Title: Re:configuring mouse as steering wheel?
Post by: Minwah on October 25, 2004, 05:37:09 am
If it works fine in Windows it should work in MAME.  Try another game...
Title: Re:configuring mouse as steering wheel?
Post by: MoonDog on October 26, 2004, 01:01:05 am
OK.  After some more examination I found the cause of my problem.  If I remove the analog pedal from the gameport the steering works fine.  I have one axis of the joystick connected to the pedal and the other is connected to 5v.  If I add a 100K resistor I can turn the other direction only.  So it appears that the mouse is fighting with the gameport.  How do I set this up so I can use both at the same time?
Title: Re:configuring mouse as steering wheel?
Post by: Minwah on October 26, 2004, 05:22:19 am
OK.  After some more examination I found the cause of my problem.  If I remove the analog pedal from the gameport the steering works fine.  I have one axis of the joystick connected to the pedal and the other is connected to 5v.  If I add a 100K resistor I can turn the other direction only.  So it appears that the mouse is fighting with the gameport.  How do I set this up so I can use both at the same time?

Wierd...mouse and gameport devices are totally separate - I've never heard of that problem before.

Make sure you don't have both joystick and mouse mapped to steering in MAME - maybe that is the cause.
Title: Re:configuring mouse as steering wheel?
Post by: u_rebelscum on October 26, 2004, 03:11:57 pm
If I remove the analog pedal from the gameport the steering works fine.  I have one axis of the joystick connected to the pedal and the other is connected to 5v.  If I add a 100K resistor I can turn the other direction only.  So it appears that the mouse is fighting with the gameport.  How do I set this up so I can use both at the same time?
Make sure you don't have both joystick and mouse mapped to steering in MAME - maybe that is the cause.

That IS the cause, and the fix.

It's been happening since before I got into mame.  A couple years ago mame got the feature to be able to remap/unmap the analog joystick from a game's input port; we just got remapping/unmapping mouse input with 0.84.
Title: Re:configuring mouse as steering wheel?
Post by: MoonDog on October 26, 2004, 07:00:22 pm
That IS the cause, and the fix.

It's been happening since before I got into mame.  A couple years ago mame got the feature to be able to remap/unmap the analog joystick from a game's input port; we just got remapping/unmapping mouse input with 0.84.

So, should I be able to have the analog joystick mapped to the pedal and the mouse mapped to the steering?  It seems like this should be a simple thing to do, but I haven't been able to figure out how to configure it (MAME 0.86).  I've spent quite a bit of time trying to figure this out  

So basically what I need to do is unmap the analog joystick from the gameport for the dial but leave it mapped for the wheel?  (I'm not sure how to do that.)  Since I'm passing "-mouse" on the command line and it works correctly if there is no joystick attached I assume I won't need to do any re-mapping of the mouse input.  I'll look at this some more this evening and see if I can get it working.
Title: Re:configuring mouse as steering wheel?
Post by: u_rebelscum on October 26, 2004, 09:31:06 pm


So, should I be able to have the analog joystick mapped to the pedal and the mouse mapped to the steering?  It seems like this should be a simple thing to do, but I haven't been able to figure out how to configure it (MAME 0.86).  I've spent quite a bit of time trying to figure this out  

Tab.  (mameFAQ H03 (http://www.mame.net/mamefaq.html#h03)).

Basically, you want to map the mouse and only the mouse to the steering wheel (and the pedal and only your pedal to the pedal).  

Mapping mice, however, is touch and go.  You'll probably need to repeat it a few times before mame sees it (enter, spin wheel, if mame doesn't map to it repeat).   :-\


You can use the ctrlr files, instead of tabbing, but easyemu ctrlr page (http://www.mameworld.net/easyemu/mamecontrolini.htm) hasn't been updated to the new format yet, and explaining it is a little more in depth than the "tab" method (above). :P  
Title: Re:configuring mouse as steering wheel?
Post by: MoonDog on October 27, 2004, 01:50:35 am
Mapping mice, however, is touch and go.  You'll probably need to repeat it a few times before mame sees it (enter, spin wheel, if mame doesn't map to it repeat).   :-\

You can use the ctrlr files, instead of tabbing, but easyemu ctrlr page (http://www.mameworld.net/easyemu/mamecontrolini.htm) hasn't been updated to the new format yet, and explaining it is a little more in depth than the "tab" method (above). :P  

Thank you!  Knowing that mapping mice is troublesome helps.  From the beginning I have tried to map the Mouse 1 X axis to the Dial and it does not see it no matter how I many times I try.  The default for Dial Analog for Pole Position is Mouse 1 X OR J1 X-axis (I'm sure other games as well).  I need to remove the joystick part but since the mapping won't work using "tab" I need to manually modify the polepos.cfg file (or create a generic ctrl cfg file for all games).  What I don't know is what the naming convention for "Dial Analog" and "Mouse 1 X" in that file.  I probably just need to do some more searching now to find out how to set this up.
Title: Re:configuring mouse as steering wheel? update
Post by: MoonDog on October 27, 2004, 02:18:19 am
Hurray!  I figured it out.  Thanks for the responses!  They put me on the right track to figuring out what I should be looking for.  I looked at the default.cfg file to get the naming convention and was able to successfully play Pole Position in MAME on my Pole Position cabinet using all the original controls!!!

The next thing I need to figure out is if I can configure MAME to shift the was the original game did.  The shifter for PP is a microswitch closed for High and open for Low.  MAME uses a momentary button press to switch between high and low.  I can get it to work by throwing the shifter down and then up to change gears, but it's not quite the same as the original setup.  I could see how this would be more appropriate for a keyboard or using control panel buttons, but since I have the original control it seems a shame not to be able to use it as such.

Thanks again.
Title: Re:configuring mouse as steering wheel? update
Post by: Minwah on October 27, 2004, 06:52:20 am
The next thing I need to figure out is if I can configure MAME to shift the was the original game did.  The shifter for PP is a microswitch closed for High and open for Low.  MAME uses a momentary button press to switch between high and low.  I can get it to work by throwing the shifter down and then up to change gears, but it's not quite the same as the original setup.  I could see how this would be more appropriate for a keyboard or using control panel buttons, but since I have the original control it seems a shame not to be able to use it as such.

This is one of those things which really gets on my nerves...basically this input code is written for keyboard users with no regard to accuracy.  To use the original shifter you need to make a source change...someone here will have it / be able to point you in the right direction hopefully...
Title: Re:configuring mouse as steering wheel? update
Post by: Gunstar Hero on October 28, 2004, 03:41:21 am
I never could get the wheel in my PolePos MAME cab to "feel" right. I think it was pretty worn out, and I probably mangles the analog settings.  ???

I used a pedal with a microswitch out of a PolePos converted to a World Rally my buddy found by the side of the road. It wasn't just like the original, but it worked well. It had a nice wheel in it too. Lucky!  ;D

I also had the same issue with the shifter. Every time i shifted "down-up" it acted like a button press.  :P

It was pretty fun yanking it up and down to nitro in Off Road tho.  ;D
Title: Re:configuring mouse as steering wheel? update
Post by: MoonDog on October 28, 2004, 05:01:56 pm
I got a chance to really play PP last night on my cab and it was great.  The steering was smooth and the analog pedal worked like a charm.  I liked the game as a kid, but was never very good at it.  Not much has changed (I still suck at it).

Minwah, are you saying make a change to the MAME source and re-compile?  I'm a C++ developer so that sounds like fun.  I've yet to look at the source and it sounds daunting, but maybe I'll check into it.
Title: Re:configuring mouse as steering wheel? update
Post by: Howard_Casto on October 28, 2004, 09:21:27 pm
remember you can't use your normal c compilers though. (easily at least)  Be sure to download mingw along with the source.  I can tell you by expenience that if you know what you need to change it couldn't be easier to recompile... it's figuring out what ot change that is hard.  :)
Title: Re:configuring mouse as steering wheel? update
Post by: MoonDog on October 28, 2004, 10:17:19 pm
remember you can't use your normal c compilers though. (easily at least)  Be sure to download mingw along with the source.  I can tell you by expenience that if you know what you need to change it couldn't be easier to recompile... it's figuring out what ot change that is hard.  :)

Yeah, I briefly looked over another post that was talking about using mingw.  I don't think it would easy to find what to change.  Heck sometimes I have a hard time just digging through my own code.  ;)  Might be fun though and who knows I might get lucky.

Thanks for the tip about mingw.
Title: Re:configuring mouse as steering wheel? update
Post by: Minwah on October 29, 2004, 06:11:16 am
Yeah, I briefly looked over another post that was talking about using mingw.  I don't think it would easy to find what to change.  Heck sometimes I have a hard time just digging through my own code.  ;)  Might be fun though and who knows I might get lucky.

Thanks for the tip about mingw.

Yeah the instructions at mame.net are great for compiling.  I'll try to find a thread about the PolePos source change...