Advmame & Marble Madness trackball @45 degrees
-
@shrunkenmaster This does make sense. However, I think you may be stuck unless you are willing to compile your own updated version of AdvMAME.
It appears that the original Atarisys1 boards that had the trackball input controller were designed to take the inputs directly into its isometric landscape in which UP is already a diagonal. Either that or they combined the inputs on two axes which seems like extra development.
Of course, that doesn't work well for emulators where users will probably have a proper, vertically oriented trackball. AdvMAME devs figured that out and added a section to the driver code for Marble Madness to combine the axes and effectively "correct" for the orientation problem. Here's a quick explanation, and if you search google/github, you can find the code where this happens.
The problem is that the code has been tweaked for the exact opposite problem--it is built to allow normal trackball installations to work correctly with the game. However, if you know what you are doing with code, you could theoretically remove that section so that, once compiled, AdvMAME won't correct the rotation for this game.
It is probably too much to hope for a DIP switch setting in the game, but it is worth checking!
-
@shrunkenmaster you could drill new holes in a + pattern and then to cover the old holes you could buy a new overlay.
http://www.arcadeartshop.com/product/marble-madness-control-panel-overlay/
https://www.phoenixarcade.com/products/marble-madness/marble-madness-cpo
-
@caver01 There is no DIP switch setting. I checked. I think he's gonna have to remount the trackballs or use an original PCB.
-
@shrunkenmaster and those are probably "square" holes to accept the smooth-headed lag bolts with squares under the head. Filing them into shape should be easy enough if you want to keep the bolts smooth (as opposed to a replacement slotted/Philips head).
-
@AlexMurphy said in Advmame & Marble Madness trackball @45 degrees:
@caver01 There is no DIP switch setting. I checked. I think he's gonna have to remount the trackballs or use an original PCB.
Or drop that bit of code and compile from source--and do it again every time an update is released.
-
@caver01 Seems like a bit much. Sometimes a physical solution is better than a software one.
-
@caver01 Many thanks for the info, I had a feeling it would be something like this. I'm not that proficient in coding, but I know a couple of people who may be able to look into it. I asked about the input map after reading this:
http://advancemame-users.narkive.com/40V2e5DB/trackball-orientation-in-mame-advmame-specifically
but was a bit unsure as how to configure. I take it this wouldn't be a solution? -
@shrunkenmaster @AlexMurphy OOOH! OOOH! I found THIS!
It seems our illustrious advmame dev answered this question for someone a while back:
"You can do it, but only for orientations of 45 degree using a
multiple input mapping. The input mapping allow to use more input
sources and to negate them. For example you can use:"input_map[p1_stickx] mouse[0,x] mouse[0,y] input_map[p1_sticky] mouse[0,x] -mouse[0,y]
-
So, maybe that config setting is too far out of context, but there may be a better input config that would combine the axes for this game. Perhaps @amadvance can comment, as there are some very flexible things you can do with inputs in the advmame.rc config file.
-
You can also just keep those controllers to play Q*bert :)
Kidding, it's the only other game I know with controllers mounted 45°
Wondering how it could render with trackballs... -
I think you would replace p1_stickx and p1_sticky with the appropriate control, like p1_trackballx and such.
If I was at home, I think I could get this figured out in about 10 minutes of testing.
-
@shrunkenmaster Ok, so I proved the concept with the following lines in my
advmame.rc
file:marble/input_map[p1_trackballx] mouse[0,x] mouse[0,y] marble/input_map[p1_trackbally] mouse[0,x] -mouse[0,y]
This effectively rotated my trackball control 45 degrees for Marble Madness. Let's break it down:
First, both lines start with a rom prefix
marble/
. Why did I do this? Well, on my cabinet, I don't want every game to play this way--I am only testing this with one ROM, so I added the prefix which allows me to keep my existing trackball input lines as-is while I test these additional lines that will override for this ROM only.Next, we are configuring the controls for
[p1_trackballx]
and[p1_trackbally]
, each on their own line. For the original post, I would expect you would need another pair of inputs for[p2_trackballx]
and[p2_trackbally]
(player 2).Next, the mouse values are the references to the actual mouse sending the raw inputs. In my example, it is
mouse[0,x]
andmouse[0,y]
which is basically the X,Y axes of my trackball. You will need to figure this out for your setup by following all of the configuration details in the wiki first. Assuming you know what mouse represents each trackball, you can assign the appropriate index to
player 1 and 2.Finally, and this is the subtle part that looks like a typo but isn't--the inputs combine both the X and Y on each line, but on one of them, one of the mouse axes are inverted with the
-
(minus sign) in front. This mixing of inputs is effectively defining the mouse inputs such that, to move in one cardinal direction, you need BOTH axes to be changing. To move in the opposite direction, it is the inverse of one of them.Now, here's the catch: it was trivially easier for me to rotate my trackball inputs arbitrarily this way than it would be to specifically rotate them in a direction of my choosing. It will require a little trial and error for you to UN-ROTATE your trackballs. The key will be where you place the minus sign. Do you put it on trackballx? trackbally? Do you put it on the mouse X, or mouse Y? I don't know, but you have 4 choices, so you can figure that out easily I should think.
So, there you go. I think with just two input lines per trackball, you can rotate your input (or rather, UN-rotate) 45 degrees, provided you already have the inputs configured properly. And if you want to play other games with your rotated trackballs (two player Rampart!), just make these lines your default trackball inputs by removing any others in the config file, and leave off the ROM prefix.
-
@caver01 Thanks for the update, will give it a go after work today and post the results.
-
Well, all I can say is THANK YOU - I now have both trackballs rolling correctly! Here's what worked for me:
marble/input_map[p1_trackballx] mouse[1,x] -mouse[1,y] marble/input_map[p1_trackbally] mouse[1,x] mouse[1,y] marble/input_map[p2_trackballx] mouse[0,x] -mouse[0,y] marble/input_map[p2_trackbally] mouse[0,x] mouse[0,y]
Now I can crack on with finishing the cab :)
-
@shrunkenmaster That's awesome!
@AlexMurphy Sometimes a software solution is better than a hardware one. ;-)
-
@caver01 True! If anyone could sort this I knew it was you. I was going to tag you but I knew you would see it and help anyway in your own time. Well done.
-
@AlexMurphy Thanks. Well, it wasn't my first thought, I must admit. The recompile would have been a PITA. This is much better. Still, even though I primarily focus on lr-mame2003 as a default (even for trackball/spinner games now) I am continuously impressed with the matrix input capabilities of AdvanceMAME. It may be the only version we have that would allow two-player dual trackballs. Not only that, but you can mix the inputs like we have here?! The input control is pretty amazing. I only wish it could leverage retroarch shaders!
-
I have the exact same problem, I'm curious can this fix of rotating 45° the trackballs via software be handled when using MAME 2003 / Libretro ?! If not worst case I guess I'll need to use Advance MAME but prefer to use MAME 2003.
-
How do I do this in advmame ? I'm confused as to where to input this text:
marble/input_map[p1_trackballx] mouse[1,x] -mouse[1,y]
marble/input_map[p1_trackbally] mouse[1,x] mouse[1,y]
marble/input_map[p2_trackballx] mouse[0,x] -mouse[0,y]
marble/input_map[p2_trackbally] mouse[0,x] mouse[0,y]"advmame.rc" where is this file so I can locate and modify it using notepad++ and WinSCP ?!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.