Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Figured out why the joystick gets "stuck" in mame!!!  (Read 10324 times)

0 Members and 1 Guest are viewing this topic.

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Figured out why the joystick gets "stuck" in mame!!!
« on: January 15, 2006, 09:48:05 pm »
Hey guys,

In all two player games that I have played since my cab was built (Contra, Rampage, Double Dragon)... the second player joystick breaks after the second player dies.

The character just runs left and the joystick inputs don't do anything.  In other words you can't control him anymore.

Any ideas wrong is wrong?

Player 1 has no problems, things work fine all the time.  This happens only on the player 2 jostick.  The player 2 controls work absolutely fine until that person dies.

« Last Edit: January 20, 2006, 11:55:33 pm by Farmboy90 »

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Joystick stuck after dying!!
« Reply #1 on: January 15, 2006, 09:55:41 pm »
Hummm strange...  Seem my custom version of MAME was the problem.  Not sure how skip the disclaimer (the code I modified) had anything to do with that.

I'll need to debug this further I guess.

Thanks anyway guys.


The problem is back.  Even with unmodified source.  Aaaarrrggghhh!!   ???

This is frustrating.
« Last Edit: January 15, 2006, 09:58:32 pm by Farmboy90 »

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Joystick stuck after dying!!
« Reply #2 on: January 16, 2006, 10:45:08 am »
It is strange.  I tried to play around a little bit and it is pretty incosistent.  Player two will eventually get stuck.  It seems to always happen after the player dies and comes back into the game.

No one has ever seen this problem?  Man it is really embarassing, since people are lining up to play the thing now that it is finished, and we end up having to quit games in the middle of them after player two gets hosed.

I am running mame v.102 as well.  I think I will try an older mame build later today. 

JCL

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 239
  • Last login:April 20, 2008, 04:11:10 pm
  • What Are You Looking At?
Re: Joystick stuck after dying!!
« Reply #3 on: January 16, 2006, 11:28:04 pm »
Are you sure it is really after player 2 dies? Or does the joy stop working randomly, causing player 2 to die, but you only notice it after the fact?

Joystick
wiring
encoder



swap joystick. Does the problem follow the joytick?
swap wires. Does the problem follow the wires?
if you swap both the joystick and wires, the problem has to be with the encoder.

I would guess wiring as that is most likely to be bad. Solid core wire or stranded? Solid core breaks more easily.


Bones

  • [Moderator]
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3995
  • Last login:July 26, 2021, 11:34:03 pm
Re: Joystick stuck after dying!!
« Reply #4 on: January 17, 2006, 12:22:11 am »
Check NC/NO wiring on joystick microswitches.

Living the delusional lifestyle.

_Iz-

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 703
  • Last login:Yesterday at 05:10:59 pm
  • Time to coin up!
Re: Joystick stuck after dying!!
« Reply #5 on: January 17, 2006, 12:54:19 am »
what are you using to interface the joysticks to the computer?

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Joystick stuck after dying!!
« Reply #6 on: January 17, 2006, 10:44:55 am »
I use an IPAC2 to interface.  You are right that it might not be after I die that things break.  It does appear to be random.

I am using standed wire for everything.

What I don't understand is that it works fine, then stops working all of a sudden.  Last night I tried to reproduce the problem, so I grabbed my wife and had her be player 1 and me be player 2.  We fired up Double Dragon and after about 20 minutes of playing we got tired and shut it down (it was late).  We played without ANY issue.  This is the first time I have ever seen a two player game not break. 

It is driving me nuts.  I was going to switch to an older mame version (so I grabbed v093) and will try to get someone to help me test again tonight.

I will double check the wiring again but I am not sure why it would work fine then suddenly go bad. 

I suspected the IPAC as well, but buying another to test would take a week and cost another $50 after the overseas shipping....

Oh and swapping joysticks would be a nightmare.  I have artwork and plexi on top of everything and don't want to remove it all.  I could however move the microswitches and handle and just leave the base screwed in.  That should be ok anyway since the base doesn't "do" anything anyway.

Oh, and when it does break the player ALWAYS is stuck moving to the left.  Not sure if that hints at anythin either.

jjd

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 89
  • Last login:June 17, 2025, 10:56:21 am
Re: Joystick stuck after dying!!
« Reply #7 on: January 17, 2006, 10:51:21 am »
Check all of your wires and connections (both on the joystick and IPAC).  If everything looks good, try sticking a new microswitch into the joystick and see if that fixes the problem.

Definitely do those things before spending any money or additional time with the software. 
I love deadlines. I like the whooshing sound they make as they fly by.

- Douglas Adams

Hoopz

  • Don't brand me a troublemaker!
  • Trade Count: (+8)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5285
  • Last login:June 13, 2025, 09:18:32 pm
  • Intellivision Rocks!
Re: Joystick stuck after dying!!
« Reply #8 on: January 17, 2006, 10:55:05 am »
Have you tested the Ipac in notepad to see if you are getting the proper letter when you move the joystick?

Does the LED on the Ipac flash multiple times when the pc is booted on?  The number of flashes indicates if there are any issues or not.

_Iz-

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 703
  • Last login:Yesterday at 05:10:59 pm
  • Time to coin up!
Re: Joystick stuck after dying!!
« Reply #9 on: January 17, 2006, 12:18:24 pm »
Make sure you don't have any joysticks installed in the windows control panel that aren't plugged in. Also make sure joystick support is OFF in the mame config.

It's also possible you have a intermittently bad microswitch on joy2left.



« Last Edit: January 17, 2006, 12:20:15 pm by _Iz- »

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Joystick stuck after dying!!
« Reply #10 on: January 17, 2006, 12:32:10 pm »
Make sure you don't have any joysticks installed in the windows control panel that aren't plugged in. Also make sure joystick support is OFF in the mame config.

It's also possible you have a intermittently bad microswitch on joy2left.





How many joysticks should show up in my case?  Here is my setup:
- 1 analog flight stick via the AKI board connected to 4 port USB hub
- 1 spinner (connected to 4 port USB hub)
- 1 trackball connected to 4 port USB hub
- 3 joysticks (2 8 way and a 4 way) via the IPAC connected to 4 port USB hub.

I am assumming 3 joysticks should show up in windows?

Also about the joystick support in mame config...  This is interesting.  Normally this is set to off right?  You are talking about this section right?
### Input device options ###
mouse                   0
joystick                0
lightgun                0
dual_lightgun           0
offscreen_reload        0
steadykey               0
keyboard_leds           1
led_mode                ps/2
a2d_deadzone            0.300000
# ctrlr                 <NULL> (not set)
paddle_device           keyboard
adstick_device          keyboard
pedal_device            keyboard
dial_device             keyboard
trackball_device        keyboard
lightgun_device         keyboard
digital                 none


Well I could not get my spinner or trackball to work unless I made this change:
dial_device                mouse
trackball_device        mouse

I think I set "mouse    1" as well.  I can't remember now and will have to check when I get home.

However once I did this my joysticks stopped working.  So I had to set "joystick     1" to make those work again.

Everything, in all the games I have played, works fine with this setup.  That doesn't mean it is correct however.   ::)

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: Joystick stuck after dying!!
« Reply #11 on: January 17, 2006, 02:33:07 pm »
sounds to me like you have the ground going throught the NO of one of the other buttons from player 1.  Liek player 2 button 2 ground is cut if player 1 up is being pressed. 

When I bought my arcade, it had this... no wonder they wanted to sell it...

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Joystick stuck after dying!!
« Reply #12 on: January 17, 2006, 09:40:01 pm »
sounds to me like you have the ground going throught the NO of one of the other buttons from player 1.  Liek player 2 button 2 ground is cut if player 1 up is being pressed. 

When I bought my arcade, it had this... no wonder they wanted to sell it...

Wouldn't this be a problem all the time?

My IPAC does not blink when I turn on the cab.   The light comes on and stays on.

When the problem occurs, I hit ESC and return to Mamewah.  Things work fine once back in mamewah, so the problem is with mame.

Is there a bug in mame?

Is there no one who has v0102 that experiences this problem.  I will try to investigate more with a different build (I download v93 too but haven't had much luck reproducing the problem there.  I need to find some to be player 2....)


Clonedsheep

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 414
  • Last login:March 29, 2025, 09:59:42 pm
Re: Joystick stuck after dying!!
« Reply #13 on: January 18, 2006, 01:03:00 pm »
I am having a problem with my controller right now and was going to post soon but wanted to troubleshoot. However since this one is started...here we go. My cabinet is used for most of my gaming nowdays. When I am not playing my classics, I hit my FPS's. I have no issues with using mame and joysticks but when I switch to regular pc games and use the common w,a,s,d on the keyboard my controls get stuck and movement will continue in the direction I have been moving too. This only happens after a few minutes into the game. When I disconnect the Ipac2 and use the keyboard from a warm boot everything works fine. So is my encoder going out?
The king of 1/2 done projects

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:July 18, 2024, 07:25:48 am
  • Your either on the bus or off the bus
Re: Joystick gets "stuck" in mame (was joystick gets stuck after dying!!)
« Reply #14 on: January 18, 2006, 02:47:36 pm »
Farmboy,

I posted a reply in your mamewah thread in the software forum.  Maybe your Mame problems and Mamewah problems are related. 

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Joystick stuck after dying!!
« Reply #15 on: January 18, 2006, 02:55:07 pm »

How many joysticks should show up in my case?  Here is my setup:
- 1 analog flight stick via the AKI board connected to 4 port USB hub
- 1 spinner (connected to 4 port USB hub)
- 1 trackball connected to 4 port USB hub
- 3 joysticks (2 8 way and a 4 way) via the IPAC connected to 4 port USB hub.

I am assumming 3 joysticks should show up in windows?
1 joystick - The AKI flightstick - the other joysticks are the connected to the I-PAC and considered keyboards to Windows.

Try unplugging everything from the USB hub except the I-PAC and see if that helps.  Maybe try swapping the hub out for a different brand as well, especially if it is USB 2.0 or non-powered.  Just a shot in the dark.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

ErikRuud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1709
  • Last login:March 05, 2021, 10:20:27 am
  • I'll build a cab for only 99.99.99!!!
    • Erik's humble video game page
Re: Joystick gets "stuck" in mame (was joystick gets stuck after dying!!)
« Reply #16 on: January 19, 2006, 08:21:47 am »
It sounds to me like you may have a variation of a problem I had a long time ago.

See this thread: http://forum.arcadecontrols.com/index.php?topic=6571.0

Real Life.  Still a poor substitute for video games!       
American Laser Games Wrapper
O2em Rom Utility

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Figured out why the joystick gets "stuck" in mame!!!
« Reply #17 on: January 21, 2006, 12:04:20 am »
Ah-ha!  I finally figured out the problem.  However the solution is painful so I hope someone here can help me out.

The player two joystick appears to be "stuck" but isn't really.  I can reproduce the problem at will.  While in a two player game, all I need to do is tap the analog flight stick on my control panel.  Player two will then start to go left and stay there.  Nothing fixes it except leaving mame, exiting back to mamewah, and coming back in.

So I went into the game setup and remapped the player two controls from:

P2 Right     G or J2 X Axis +

to
P2 Right     G

In other words, just G (which is the right direction on the p2 joystick).  When I do this (and for the other three directions as well) everything works fine.

Tapping the flight stick has no affect on player 2 and everything works great.  The flight does however move the player 1 character, but it doesn't get p1 "stuck".  It just moves them.  That is becasue the inputs, by default, map the movements to the p1 joystick as well as J1 X Axis, etc.

Now my question is how can I fix this so that I don't need to remap my controls for every two player game I play?

A potential relevant area in my mame.ini is (from the input device section):
mouse 1
joystick 1
...
...
dial_device    mouse
trackball_device   mouse

All other settings (in this section) are the defaults. 

Any ideas?

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Figured out why the joystick gets "stuck" in mame!!!
« Reply #18 on: January 21, 2006, 08:37:08 am »
I've seen a similar problem, but never pin-pointed it like that.

If this is a desktop controller, or a swappable panel cab - you can unplug the flightstick unless it is requred.

If you want it plugged in all the time, I recommend the following:

I assume you have more digital (joystick) 2-player games than Flightstick games.

Go into MAME and set Input-All games to disable J2 X Axis + and only map to "G".

This should solve the problem as you say the stick works for 1-Player games and I don't know of any games that would want the flight-stick for P2.

If you need to go beyond this - Eliminate the X Axis controls for ALL games, and then figure out which games use the flightstick (MAME32 or EmuLoader might help with this) and re-enable it for those games ONLY.

HTH . . .
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Figured out why the joystick gets "stuck" in mame!!!
« Reply #19 on: January 21, 2006, 10:18:05 am »
I've seen a similar problem, but never pin-pointed it like that.

If this is a desktop controller, or a swappable panel cab - you can unplug the flightstick unless it is requred.

If you want it plugged in all the time, I recommend the following:

I assume you have more digital (joystick) 2-player games than Flightstick games.

Go into MAME and set Input-All games to disable J2 X Axis + and only map to "G".

This should solve the problem as you say the stick works for 1-Player games and I don't know of any games that would want the flight-stick for P2.

If you need to go beyond this - Eliminate the X Axis controls for ALL games, and then figure out which games use the flightstick (MAME32 or EmuLoader might help with this) and re-enable it for those games ONLY.

HTH . . .


This is an excellent idea!!!   I don't know of any games where the flight stick would be required for player 2 either, so this should be perfect.

Sweet, thanks!