Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: digitalhobbit 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 (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
-
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.
-
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?
-
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.
-
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.
-
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
-
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?
-
Try headkaze's Mame Analog Joystick Map Editor:
http://headsoft.com.au/index.php?category=mame&page=joymap (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 (http://forum.arcadecontrols.com/index.php?topic=86315.0)
-
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
-
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.
-
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