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: Help needed for two interesting 49-way joystick issues in mame  (Read 3609 times)

0 Members and 1 Guest are viewing this topic.

m_mcgover

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 133
  • Last login:July 18, 2025, 12:30:24 pm
My set up is:


2 49-way Williams sticks controlled by 2 gpwiz-49 controllers.  The gpwiz-49s are being used for all joysticks/button encoding.  I also have an arcadevga driving a jpac in an arcade cabinet.  I have a keyboard currently attached to the pass-through connector on the jpac.  I am using Mala as my frontend and using set49way to select a joystick program when launching a game.

Issue#1:
All is fine with the leftmost stick (usb device #1).  When I test it in windows, all buttons work, and all directions are correct.  The leftmost stick works fine in Mame, too.  The rightmost stick (usb device#2) is giving me a problem in every game I've tested in Mame.  When I test in Windows, all buttons work, and all directions are correct for joystick#2.  However, in Mame, for joystick #2 the up direction registers as down no matter what I do (the other directions are all correct).  When I go to program the direction in Mame via the tab key, I will not be able to program it up, despite pushing it in that direction.  Instead it will register as down or "down down-left", etc.  This is consistant across every game I've tested.  At first, I thought it was a joystick hardware problem, but the fact that it seems to work fine in Windows in the control panel, seems to suggest a Mame setup issue?

Issue#2:
I cannot seem to program any directions in Mame for q-bert.  I tab to select setup for "this game only" and I select the direction to program via the keyboard.  However, neither joystick will register in the programming mode.  Furthermore, none of the default directions work either.

Are these issues related?  Are they independent?  What would cause them?

All help and suggestions are greatly appreciated --  Thanks in advance!
Sinistar, 25" Smash TV, Major Havoc 720, Star Wars cockpit w/ESB kit, Robotron cocktail, Warlords cocktail, Back to the Future pinball

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Help needed for two interesting 49-way joystick issues in mame
« Reply #1 on: August 04, 2009, 12:26:14 pm »
I've never used an analog joystick, but it should be the same as any other analog device.  When you are in a game where the stick is switched, go to the analog settings and check to see that "reverse axis" is set correctly.  That should take care of it!

I'm not sure about qbert, but I would guess you need to adjust something in the joystick configuration software GGG provided.

m_mcgover

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 133
  • Last login:July 18, 2025, 12:30:24 pm
Re: Help needed for two interesting 49-way joystick issues in mame
« Reply #2 on: August 04, 2009, 12:35:08 pm »
Thanks for the reply.  I'll take a look at that later today.  One thing is that down-left, down, and down-right work (as do right and left), it is that all of my up directions also get mapped to down directions...so I'm curious if there was a reverse axis setting, why both up and downs wouldn't be messed up.  I will definitely check it though.

Any other thoughts?
Sinistar, 25" Smash TV, Major Havoc 720, Star Wars cockpit w/ESB kit, Robotron cocktail, Warlords cocktail, Back to the Future pinball

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Help needed for two interesting 49-way joystick issues in mame
« Reply #3 on: August 04, 2009, 02:43:02 pm »
#1  It's not analog reverse in mame; that is for analog games, IOW, it reverses the analog info just before sending it to a game, so only games that expect analog data can be reversed.  Games that expect digital data aren't effected.

When you say it works in windows, does all 7 verticla position?  (the three up, center and 3 down)


#2  Mame currently has qbert as a 4-way stick.  Mame has a default analog-2-digital 9x9 grid map that automatically is applied for 4-way games that disables joystick diagonals.  So, instead of using the normal tab remap, the best way to fix it is make mame use a different a2d map.  Either create a qbert.ini file with only joystick_map 888856666....5.444452222 in it.  More info on joystick_map in mame's docs/config.txt file, but the above creates the following map:

888856666
888856666
888856666
888856666
555555555
444452222
444452222
444452222
444452222

I can go into more detail if you want.
Robin
Knowledge is Power

m_mcgover

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 133
  • Last login:July 18, 2025, 12:30:24 pm
Re: Help needed for two interesting 49-way joystick issues in mame
« Reply #4 on: August 04, 2009, 02:53:44 pm »
#1  It's not analog reverse in mame; that is for analog games, IOW, it reverses the analog info just before sending it to a game, so only games that expect analog data can be reversed.  Games that expect digital data aren't effected.

When you say it works in windows, does all 7 verticla position?  (the three up, center and 3 down)

I will double check, but yes I believe that all positions work for both sticks properly in Windows XP (under control panel->Game controllers->properties) test.  It is only in Mame and it strangely is only Joystick 2 that exhibits this problem.

Quote
#2  Mame currently has qbert as a 4-way stick.  Mame has a default analog-2-digital 9x9 grid map that automatically is applied for 4-way games that disables joystick diagonals.  So, instead of using the normal tab remap, the best way to fix it is make mame use a different a2d map.  Either create a qbert.ini file with only joystick_map 888856666....5.444452222 in it.  More info on joystick_map in mame's docs/config.txt file, but the above creates the following map:

888856666
888856666
888856666
888856666
555555555
444452222
444452222
444452222
444452222

I can go into more detail if you want.

Yes, more detail would be great.  I thought I did not need to do anything special for qbert as there is a diagonal only DRS mode that is available to the 49-way joysticks (and is set correctly as I checked it) by set49way which is called by Mala prior to executing Mame.  So, are you saying that I need to do something in mame to disable a built in mame controller map that is fouling up the set49way process?
Sinistar, 25" Smash TV, Major Havoc 720, Star Wars cockpit w/ESB kit, Robotron cocktail, Warlords cocktail, Back to the Future pinball

m_mcgover

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 133
  • Last login:July 18, 2025, 12:30:24 pm
Re: Help needed for two interesting 49-way joystick issues in mame
« Reply #5 on: August 04, 2009, 10:22:43 pm »
#1  It's not analog reverse in mame; that is for analog games, IOW, it reverses the analog info just before sending it to a game, so only games that expect analog data can be reversed.  Games that expect digital data aren't effected.

When you say it works in windows, does all 7 verticla position?  (the three up, center and 3 down)

I will double check, but yes I believe that all positions work for both sticks properly in Windows XP (under control panel->Game controllers->properties) test.  It is only in Mame and it strangely is only Joystick 2 that exhibits this problem.

I have double checked and joystick is completely functional in Windows.  All directions register properly.  Joystick #2 still doesn't work correctly in mame.  Are there special provisions for having 2 49-ways working via the gpwiz-49 encoders?


Sinistar, 25" Smash TV, Major Havoc 720, Star Wars cockpit w/ESB kit, Robotron cocktail, Warlords cocktail, Back to the Future pinball

Thurman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 97
  • Last login:March 12, 2018, 09:15:33 pm
  • The suspense is terrible . . . I hope it'll last.
Re: Help needed for two interesting 49-way joystick issues in mame
« Reply #6 on: August 05, 2009, 09:15:35 am »
Since everything is working properly in Windows but not in Mame, I'd just delete all of the mame config files (including game-specific config files) and start from scratch.  I had 2 gpwiz-49 encoders and mame recognized them just fine.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Help needed for two interesting 49-way joystick issues in mame
« Reply #7 on: August 05, 2009, 04:24:38 pm »
Since everything is working properly in Windows but not in Mame, I'd just delete all of the mame config files (including game-specific config files) and start from scratch.  I had 2 gpwiz-49 encoders and mame recognized them just fine.

Yeah, that's the quickest way to fix it.  You'll lose all remaps you've done already, though: you might want to back 'em up first just in case.  The sticks should work with mame's defaults if they work in windows (assuming they're joystick #1 & #2 to windows/directX).  Also, check if you're using a ctrlr file.

Yes, more detail would be great.  I thought I did not need to do anything special for qbert as there is a diagonal only DRS mode that is available to the 49-way joysticks (and is set correctly as I checked it) by set49way which is called by Mala prior to executing Mame.  So, are you saying that I need to do something in mame to disable a built in mame controller map that is fouling up the set49way process?

You asked for it.   ;)

Alright, first quick time line: qbert, mame, ggg qpwiz49, mame's -joystick_map. 

When Qbert came out in arcades, it used a standard 4-way joystick, but it was rotated 45 degrees so what the joystick sent on pacman's up was activated by the player moving the stick up-right.  The stick was still sending up it "thought" was up.

So mame came around and emulated qbert.  To mame, there were two (four, but I'm ignoring the two 2-ways) X-way types of input: 8-way and 4-way.  4-way sticks only send one cardinal direction (up, down, left, right) at a time.  8-way can send the cardinal directions and the diagonals (up&left, up&right, down&left, down&right).  Diagonals happen when two cardinal switches are closed at the same time.  Since qbert used 4-way sticks that had only one switch closed at a time, mame used the 4-way type.  Mame, just before sending the data to the game, would check if two directions were pressed at the same time (aka "diagonals") and removed one of the directions.  (Exactly how which one to be removed was desided changed a couple times.)  Gamepad and keyboard encoders were treated the same.

Then GpWiz49 came along, and with it the diagonals only mode.  If you enabled this and remaped mame so qbert's up was mapped to the stick's upright, etc, things were great.

Then mame changed how it converted analog joysticks to digital inputs.  This improved things in most cases, but caused problems in some.  It also treated gamepad/joystick inputs differently that keyboard inputs, since windows treats all joystick inputs as analog.  Mame converts the analog data into a 9x9 grid, modeled much like 49-way's 7x7 grid, and converts it to digital much like GGG DRS modes, but in software.  Three a2d maps were added, 4-way, 8-way, and rotated 4-way.  Qbert was given the rotated 4-way map initially.  The initial changes actually worked perfect with the above diagonal only as you didn't need to remap mame as like above and worked great with any analog stick, but "broke" rotated 4-way sticks hooked to PC through a joystick encoder (but not keyboard encoders).  Some people complained, so qbert was switched to use the 4-way a2d map, which fixed the problems of the complainers.  But it totally "broke" the DRS diagonal only, and partialy "broke" analog sticks as they acted like unrotated 4-way sticks.

I quote broke because the user could override the default a2d map in all cases, and fix the problem in all cases. 

Or Randy could come out with a rotated 4-way mode; IIRC he'd have to sacrfice another mode, though, which was why it wasn't added before.  And since diagonal only works fine to okay on older mames....  Well, no R4W ATM.

Rehash: Mame is currently applying an analog 2 digital map that doesn't work with DRS diagonal only mode for qbert.  You need to match mame's a2d map to work with whatever the mode you have the gpwiz in, which gives many opinions.

analog mode + either mame a2d map:
888856666....5.444452222  (the same I gave above)
4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666  (mame's old default for qbert)

DRS diag only mode +
either of the above
any map that has the corners as follows:
8xxxxxxx6
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
xxxx5xxxx
xxxxxxxxx
xxxxxxxxx
xxxxxxxxx
4xxxxxxx2

(Only bold matters, since that's all DRS diag only mode sends)
The easiest of these:
855555556.5.......4555552

analog or DRS diag only mode, and simple mame source edit (add "PORT_ROTATED" to 8 lines) and recompile
Robin
Knowledge is Power