Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
#112960 - 03/25/18 08:15 AM Oversteer for relative analog wheels  
Joined: Sep 2014
Posts: 93
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 93
Netherlands
i was recently asked on the HyperSpin forums to add a feature to MAME 0.195 to support proper handling of relative analog wheels. They basically act as a single axis mouse, which causes the current code to lose the center position of the wheel if you steer beyond the game's limits. Is this a feature you would consider allowing in the MAME code? If so, what other issues should I take into account before adding it to my development fork, and send out a pull request?

#112961 - 03/25/18 10:42 AM Re: Oversteer for relative analog wheels [Re: phulshof]  
Joined: Feb 2004
Posts: 1,939
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,939
Sydney, Australia
Well, from experience, arcade hardware actually does lose the centre position if you turn a relative analog wheel past the game's limits. I remember this vividly from an Atari cockpit cab. It had full force feedback, allowing it to drive the steering wheel during attract mode to match the demo gameplay. When you started a game, wherever the wheel was would be the initial centre position. If you turned the wheel too far, you'd still be a fixed number of turns from the centre position. So suppose you turned it 180° past the limit to the left, now the centre position will be 180° to the left of where it was initially.

#112962 - 03/25/18 05:23 PM Re: Oversteer for relative analog wheels [Re: phulshof]  
Joined: Apr 2013
Posts: 52
geecab Offline
Member
geecab  Offline
Member

Joined: Apr 2013
Posts: 52
Hi! If we are talking about the same thing (which I think we are), then I think it would be a good feature to have in mame. I have an upright driving arcade machine that has a free spinning steering wheel (I connected it up to the x-axis of an old mouse). For arcade games that used free spinning wheels (pole position, supersprint) it is great. For arcade games that used limited turning wheels (OutRun, WecLeMans, Harddrivin) it isn't so great. After a tight corner, you can't help but "oversteer" past the boundaries of the game, then you'd be fighting to find the steering's new center position (And frustratingly crash in the process).

A while ago I hacked the mame source to fix this and now things are perfect.

I posted a thread about this a while ago but nobody commented:
OutRun/HangOn/WecLeMans etc.. mouse steering hack

Also, discussed here:
Mame hacks that make driving games play better with mouse/spinner/360wheel

On these threads I also posted a video of myself showing how games play before after my hack.

#112981 - 03/28/18 04:58 PM Re: Oversteer for relative analog wheels [Re: geecab]  
Joined: Sep 2014
Posts: 93
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 93
Netherlands
We are indeed talking about the same thing. Some users on the HyperSpin forum tried to port your feature to MAME 0.195, and were having some trouble doing it. Since I'm not in favor of using global variables I took the general idea behind your fix, and applied it to the current MAME structure. So far it seems to behave exactly like your fix, so I figured I'd offer it as a feature (-oversteer) to the MAME team.

Vas, would you consider allowing this feature to be added by me?

#112990 - 03/28/18 10:07 PM Re: Oversteer for relative analog wheels [Re: phulshof]  
Joined: Feb 2004
Posts: 1,939
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,939
Sydney, Australia
Can you describe exactly what it's supposed to do here and how it works, what combinations of host control and emulated control it applies to, etc? Talk about global variables and hacks is scaring me.

#112992 - 03/28/18 10:32 PM Re: Oversteer for relative analog wheels [Re: phulshof]  
Joined: Apr 2006
Posts: 626
Dullaron Offline
Senior Member
Dullaron  Offline
Senior Member

Joined: Apr 2006
Posts: 626
Fort Worth, TX.
I gave my wheel and peddles away while back to my step dad and my mom. I felt like it wasn't good enough to use on MAME because some of the racing games wheel behavior.

I do have a spinner though.

Last edited by Dullaron; 03/28/18 10:33 PM.

Windows 10 Pro 64-bit / Intel Core i5-4460 3.20 GHz / 8.00 GB RAM / AMD Radeon R9 200 Series
#113000 - 03/29/18 07:21 PM Re: Oversteer for relative analog wheels [Re: Vas Crabb]  
Joined: Sep 2014
Posts: 93
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 93
Netherlands
Originally Posted by Vas Crabb
Can you describe exactly what it's supposed to do here and how it works, what combinations of host control and emulated control it applies to, etc? Talk about global variables and hacks is scaring me.


No worries, I have no such intentions. smile The feature is implemented in the apply_min_max function in ioport.cpp. Normal functionality is to maximize/minimize the value based on the min/max values of the game, and discard the excess value. This -oversteer feature, when enabled, stores the excess value in an m_oversteer class member variable, and reapplies it the next time the function is called. This allows the analog_field to keep track of the oversteer, and keep its center position.

#113004 - 03/30/18 06:21 AM Re: Oversteer for relative analog wheels [Re: phulshof]  
Joined: Aug 2002
Posts: 346
Heihachi_73 Offline
Senior Member
Heihachi_73  Offline
Senior Member

Joined: Aug 2002
Posts: 346
Melbourne, Australia
On a slightly related note, I had to repair a mobility scooter (a CTM Shoprider) a few years ago with a very similar overflow issue. The spring-loaded forward/back paddles (which are one piece) are connected to a potentiometer using a small key (which is actually a very small hex screw jammed against the pot shaft), if the key becomes loose the scooter becomes uncontrollable and won't stop if it was currently moving*, unless it is shut down. If the pot goes out of bounds (too far left or right e.g. too close to 0 or 50 ohms, if it was a 50 ohm pot) the machine will enter an error mode and will not move at all (IIRC a similar protection mechanism occurs if the machine is turned on while one of the paddles is being pushed, which will require the rider to let go of the paddles and turn the scooter off and back on to reset everything). The valid region is about half of the pot's actual range with neutral (no movement) being in the middle.

* What's worse is that when this happens the paddles can also become loose enough to drop down below the pot/spring housing and let go of the spring, disengaging the paddles completely, which would be a pretty frightening experience if it happened e.g. near a road crossing with the person being unable to stop it and ending up in the middle of the road (if they panicked, they probably wouldn't be thinking of reaching for the key to turn it off).

Anyone want to emulate a mobility scooter or electric wheelchair in MAME? It has to be up there with an eye test machine. smile

#113064 - 04/07/18 07:44 PM Re: Oversteer for relative analog wheels [Re: phulshof]  
Joined: Sep 2014
Posts: 93
phulshof Offline
Member
phulshof  Offline
Member

Joined: Sep 2014
Posts: 93
Netherlands
Shall I work on a pull release for you to have a look at? You can always turn it down after you've seen the code. smile

#113069 - 04/08/18 01:03 PM Re: Oversteer for relative analog wheels [Re: phulshof]  
Joined: Feb 2004
Posts: 1,939
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,939
Sydney, Australia
You didn't actually answer most of the question.

Page 1 of 2 1 2

Who's Online Now
1 registered members (MAMEBase), 22 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,525
Posts111,253
Members4,792
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.026s Queries: 15 (0.007s) Memory: 5.0163 MB (Peak: 5.2446 MB) Zlib enabled. Server Time: 2018-04-21 03:53:21 UTC