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: Best practices for switching UltraStik 360 maps  (Read 11748 times)

0 Members and 1 Guest are viewing this topic.

digitalhobbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 22
  • Last login:April 13, 2016, 02:59:15 am
  • I want to build my own arcade controls!
Best practices for switching UltraStik 360 maps
« on: November 07, 2012, 09:05:46 pm »
I'm getting close to finishing my arcade cabinet, and finishing the control panel and software setup right now. I have two UltraStik 360s with 6 buttons each.

I'm still torn between Windows and Linux (see this thread: http://forum.arcadecontrols.com/index.php/topic,128288.0.html), but starting to run into some UltraStik (lack of) software related hurdles on Linux. Before going too much further, I'd like to better understand how people are using these joysticks in general.

As far as I understand it, the two main options are:

1) Keep the U360 in analog mode, and let the emulator (e.g. Mame) translate this to the appropriate controls for the game (e.g. 4-way for Pacman). Not sure if Mame is the only emulator that supports this, or if Mess and other console emulators can handle this as well.

2) Use software to load the appropriate U360 map before running Mame.

On Windows, there seem to be several alternatives for 2):

2.a) Use a frontend with built-in U360 map switching support, such as Mala
2.b) Configure the frontend to invoke UltraMap or LEDBlinky to switch the map before invoking the actual emulator

Am I correct so far, or missing anything?

I believe that Mame automatically "knows" the control scheme for any given ROM and is thus able to interpret the analog input correctly. Is this correct?

When using a frontend, is the control scheme typically part of the game list? And how is this generally translated to an appropriate U360 map? How are custom maps handled (say I want to create a special diagonal map for Q-Bert)? Is it usually possible to define a sane default (say 8-way) and only override this for certain games (such as old 4-way games)?

Is there any real benefit in going with 2) instead of 1), as long as the emulator is capable of interpreting the analog input correctly?

Bonus question: Do you know if any Linux frontends have either built-in support for switching U360 maps, or are able to invoke a map switching tool? (note that I haven't been able to compile any of the Linux tools on a recent Ubuntu distribution...).

Thanks!

-Mirko

gildahl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 185
  • Last login:May 16, 2025, 02:57:45 pm
Re: Best practices for switching UltraStik 360 maps
« Reply #1 on: November 08, 2012, 05:22:08 pm »
2b is the way I do it.  On my computer I have a profiles folder.  In that folder is a default configuration file for MAME (mame.ugc).  For me, this configuration file defines the player 1 & 2 joysticks as 8-way and the third one as a 4-way.  I then wrote an AHK script that is launched by my front end just before MAME is launched.  This script takes the name of the about-to-be launched game rom as a command line parameter (provided by the front end).  When executed, the script looks in the profiles folder for a ugc file with the having the same name as the rom (like qbert.ugc).  If it finds it, it runs UltraMap with that configuration.  If it doesn't find it, it loads the default configuration instead.

Using this technique, anytime I want to configure a game to use a joystick configuration that is not the default, all I need to do is create a custom configuration file that has the same name as the game and drop it into the profiles folder.  There is nothing else to configure.  I follow this exact same procedure with WinIPAC for the control panel as well.

digitalhobbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 22
  • Last login:April 13, 2016, 02:59:15 am
  • I want to build my own arcade controls!
Re: Best practices for switching UltraStik 360 maps
« Reply #2 on: November 08, 2012, 05:55:55 pm »
Thanks for the info, gildahl! That sounds like a good approach.

I finally found some information that should help me get map loading working on Linux, so once this is setup, I'll see if I can configure my frontend (probably WahCade) to invoke the map loader first (or otherwise via a mame wrapper script).

Out of curiosity, aside from special cases like Q-Bert, what are the real benefits of doing the 4-way / 8-way mapping via the U360's map, rather than keeping it in analog mode and having Mame deal with this?

gildahl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 185
  • Last login:May 16, 2025, 02:57:45 pm
Re: Best practices for switching UltraStik 360 maps
« Reply #3 on: November 08, 2012, 10:55:21 pm »
Out of curiosity, aside from special cases like Q-Bert, what are the real benefits of doing the 4-way / 8-way mapping via the U360's map, rather than keeping it in analog mode and having Mame deal with this?

In MAME, I'm not sure there's any real benefit (q-bert and its ilk aside).  For example, 2-way and 4-way games seem to work no different in analog mode vs. having an explicit 2-way or 4-way map. So I'm not sure there is any downside to using analog as the default.  In other emulators YMMV. 

cmoses

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 718
  • Last login:July 27, 2023, 05:19:00 pm
Best practices for switching UltraStik 360 maps
« Reply #4 on: November 09, 2012, 10:31:39 am »
I thought the advantage to mapping was that it would make the joystick inputs more definitive. For example with a 2 way horizontal map for a game like Galaga there is a small dead zone vertically but everything else is either right or left. The dead zone needs to be there for when you want to not move left or right. With this mapping every analog input is either right, left or no movement.   You can see the difference in the UltraMap utility. In analog mode the joystick box will show the the joystick moving, move the joystick a little left and it moves the '+' symbol a little left. Move it all the way left and the '+' symbol moves all the way to the edge. When you are in 2 way mode left and right, the slightest move left will put the '+' symbol all the way over to the left. The same is true even if you move it up and left or down and left. The stick sees all those as pure left and moves the '+' symbol to the center left position.

This applies for all of the directional maps. Every joystick position is a exact value, up, down, left, right, diagonal, etc. In analog mode I think it needs to interpret it more. It still works but I think the maps make it more definitive.

gkarnik

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 9
  • Last login:December 07, 2019, 09:36:07 pm
  • I want to build my own arcade controls!
Re: Best practices for switching UltraStik 360 maps
« Reply #5 on: November 09, 2012, 11:06:20 am »
I use option 1.
I keep the U360s in analog mode. With this, use 'joystick_map auto' in MAME.INI. Doing some snooping around the source code, I found that this means that the code is using one of these maps (src/emu/input.c):

joystick_map_8way[] = "7778...4445";
joystick_map_4way_sticky[] = "s8.4s8.44s8.4445";
joystick_map_4way_diagonal[] = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666";

Expanding out the shorthand notation and plotting visually:
 joystick_map_8way:       joystick_map_4way_sticky:       joystick_map_4way_diagonal:
    777888999.                  s8888888s.                  4444s8888.
    777888999.                  4s88888s6.                  4444s8888.
    777888999.                  44s888s66.                  444458888.
    444555666.                  444555666.                  444555888.
    444555666.                  444555666.                  ss55555ss.
    444555666.                  444555666.                  222555666.
    111222333.                  44s222s66.                  222256666.
    111222333.                  4s22222s6.                  2222s6666.
    111222333                   s2222222s                   2222s6666

The only hitch I ran into so far is that the Q-bert controls don't seem to work right (i.e., the joystick_map_4way_diagonal map does not seem to apply as it should). To fix this, I tweaked the map myself and overrode the "auto' with my own:

ini\qbert.ini
joystick_map 4444s8888.4444s8888.4444s8888.444458888.sss555sss.222256666.2222s6666.2222s6666.2222s6666

Now Q-Bert works great. Visually it looks like this:

4444s8888.
4444s8888.
4444s8888.
444555888.
sss555sss.
222555666.
2222s6666.
2222s6666.
2222s6666


marioxb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 250
  • Last login:May 27, 2025, 11:07:43 am
  • I want to build my own arcade controls!
Re: Best practices for switching UltraStik 360 maps
« Reply #6 on: November 09, 2012, 12:27:42 pm »
Can anyone post these ini files and whatnot for download for those of us not *ahem* smart enough to make them ourselves or understand this technical mumbo jumbo?

dgame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 620
  • Last login:June 01, 2025, 11:09:55 pm
  • I am no Jedi
Re: Best practices for switching UltraStik 360 maps
« Reply #7 on: November 09, 2012, 04:04:38 pm »
Try headkaze's Mame Analog Joystick Map Editor:
http://headsoft.com.au/index.php?category=mame&page=joymap

It includes qbert.ini and others

Thread here:
http://forum.arcadecontrols.com/index.php?topic=86315.0

digitalhobbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 22
  • Last login:April 13, 2016, 02:59:15 am
  • I want to build my own arcade controls!
Re: Best practices for switching UltraStik 360 maps
« Reply #8 on: November 09, 2012, 04:07:07 pm »
Thanks for the info, gkarnik! That approach sounds pretty simple to me, so I might try this before going with any custom U360 maps, at least for Mame.

That analog map editor also looks very useful, dgame.

Thanks for the suggestions, everyone!

-Mirko

gildahl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 185
  • Last login:May 16, 2025, 02:57:45 pm
Re: Best practices for switching UltraStik 360 maps
« Reply #9 on: November 09, 2012, 08:19:04 pm »
I thought the advantage to mapping was that it would make the joystick inputs more definitive. For example with a 2 way horizontal map for a game like Galaga there is a small dead zone vertically but everything else is either right or left.

I have all my maps explicitly configured as you say; however, after digitalhobbit's comments I went back and tried a few in analog mode (Galaga included) and really couldn't tell any difference.  Doing it that way would also result in fewer maps to manage.  I'm going to do a bit more testing on some other titles, but so far I haven't detected any practical difference.

drasher25

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:March 03, 2021, 02:17:48 pm
  • I want to build my own arcade controls!
Re: Best practices for switching UltraStik 360 maps
« Reply #10 on: February 20, 2021, 03:52:31 pm »
I just wanted to publicly thank the writer of this post.  I just installed an Ultrastick 360FS, and this info about how to automatically configure the stick with MAME ini files is INCREDIBLY useful.

I use option 1.
I keep the U360s in analog mode. With this, use 'joystick_map auto' in MAME.INI. Doing some snooping around the source code, I found that this means that the code is using one of these maps (src/emu/input.c):

joystick_map_8way[] = "7778...4445";
joystick_map_4way_sticky[] = "s8.4s8.44s8.4445";
joystick_map_4way_diagonal[] = "4444s8888..444458888.444555888.ss5.222555666.222256666.2222s6666.2222s6666";

Expanding out the shorthand notation and plotting visually:
 joystick_map_8way:       joystick_map_4way_sticky:       joystick_map_4way_diagonal:
    777888999.                  s8888888s.                  4444s8888.
    777888999.                  4s88888s6.                  4444s8888.
    777888999.                  44s888s66.                  444458888.
    444555666.                  444555666.                  444555888.
    444555666.                  444555666.                  ss55555ss.
    444555666.                  444555666.                  222555666.
    111222333.                  44s222s66.                  222256666.
    111222333.                  4s22222s6.                  2222s6666.
    111222333                   s2222222s                   2222s6666

The only hitch I ran into so far is that the Q-bert controls don't seem to work right (i.e., the joystick_map_4way_diagonal map does not seem to apply as it should). To fix this, I tweaked the map myself and overrode the "auto' with my own:

ini\qbert.ini
joystick_map 4444s8888.4444s8888.4444s8888.444458888.sss555sss.222256666.2222s6666.2222s6666.2222s6666

Now Q-Bert works great. Visually it looks like this:

4444s8888.
4444s8888.
4444s8888.
444555888.
sss555sss.
222555666.
2222s6666.
2222s6666.
2222s6666