Mame 2014 questions !
-
Hey all !
I'm new to the Retropie community, as i've bought myself a Picade Cab some time ago, finished building it recently and i've been tinkering with Retropie for a few weeks now :)
I'll pass on wondering why the sound was weird at times and inexistant in-game (i solved that one by simply.... plugging the audio cable in... tadaaa :D )
But i'm still scratching my head on a few problems / questions with Mame so here i am !
For one game in particular (that would be Heavy Unit, i even own an arcade PCB of it ^^ ) I've compiled Mame 2014.
I've set up runcommand to launch lrmame2014 for arcade games and everything seems to run ok but this :-
first off, once a game is running i cannot escape Mame. ESC key will bring me back either to the runcommand launch screen ("lauching game ...") or loop between several native MAME setup screens.
Is there a key / combo or a configuration i'm missing to get back to Emulation Station when exiting a game ? -
second and more annoying, Mame2014 seems to respond weird to keystrokes. I'm about to make more tests : uninstall Mame2014 and run the supported version to see if it's better.
What i can tell so far is that the TurboGrafx/PCE emulator doesnt show the same problems.
On Mame2014, when i push the joystick in any direction Mame will receive several inputs at once, like a diagonal when i push left only. It's more obvious in the Mame key setup screen. When i try to configure one input and push a single key, i get several keycodes at once.
No such problem on the PCE emulator where directions are ok
Has anyone met similar issues with Mame 2014 ? The key ones mostly ?
I still have to test with a different version of Mame... i'll post the results too.
-
-
@caz The multiple inputs when mapping in the MAME GUI could be the same as lr-mame2003 which detects the virtual retropad, but also raw key inputs when using a keyboard controller.
-
@caver01 said in Mame 2014 questions !:
@caz The multiple inputs when mapping in the MAME GUI could be the same as lr-mame2003 which detects the virtual retropad, but also raw key inputs when using a keyboard controller.
Sorry to reply so late, i've run several tests and i have the same input problem with lr-meme2000 and 2003 apparently.
On the Picade cabinet the joystick and buttons are hooked to a Picade PCB which emulate keyboard keys. So i've tested both with the picade pcb connected and with an actual keyboard connected, same behavior for both.
I have not checked if the mame input setup screen kept the previous config i had in mame2014, which was messy due to the multiple inputs issue.
You're seeing this is a known issue on lr-mame2003 ? Is there a way to make it right ?
(I searched the forum for similar problems on 2014, i'll search for 2003 too then!)
Very nice portable cocktail setup by the way !!
-
@caz Thanks.
So, it is definitely a circumstance of MAME detecting both the virtual joypad from RetroArch simultaneous with detecting RAW keys. I opened this as an issue a while back, and dankcushions added a few more details. However, aside from seeing the dual mapping in the MAME gui, it is hard to characterize this as causing any problems, save one. The one functional problem it creates is an inability to do <CODE_NOT> mapping. This is rare circumstance, and only a few people would care, and those that do would only be keyboard controller users like us.
There is also workarounds for us. We could, for example, set player inputs to "nul" in retroarch configs. I do this on a per-ROM basis if I ever need to do complex multi-key input mapping, such as defining a single joystick tankstick for a game like Vindicators. The rest of the time, having dual mapping in MAME is not causing any problems.
Detecting RAW inputs is actually a very handy situation for everyone else. It is what allows folks to hook up a USB keyboard and press TAB to access the MAME menu. If not for the detection of RAW inputs, there would be no way to issue a TAB command.
I will say that you can avoid some remapping confusion if you try to stick to MAME defaults with your keyboard key assignments, but in the end, if you can keep the layers of input abstraction straight, it shouldn't matter what keys you use.
-
@caver01 as the virtual joypad is involved, i get it better why the ghost inputs always seem to be joypad related; like buttons + direction or multiple directions at once and not actual random key codes.
What is weird though is that not everybody seems to have this problem when using keyboard controllers ?
I'll look into retroarch configs. You seem to have tamed that beast yourself, but i may ask for your assistance to get there :)
If i get it right, deactivating the virtual joypad should be enough ? That's what the NULL player inputs config does ?
I have not looked into the retroarch configs yet so i'm not familiar with it, I'll go have a look.As for the opened issue, is there a place where i can see the pending issue and second it maybe ?
-
@caz The opened issue is in the libretro repo for lr-mame2003, but honestly, this is probably more trouble to "fix" than it is worth, and I don't know how I feel about adding pressure when we have a workable way around it.
As for others seeing the problem, I think most people just don't notice it. I found it fast because of my build. I play vertical games from controls on the opposite ends of the cabinet (effectively from my Player3 and 4 positions) so I do a lot of remapping inside MAME GUI. I noticed it as more of a visual annoyance at first. It wasn't until I tried <CODE_NOT> mapping a joystick for tank games that it was a problem. Because of dual inputs, it was impossible to do a <NOT> key map. Doing this is rare, so almost nobody cares.
The workaround when necessary is to setup a
ROMname.zip.cfg
file next to the given ROM that sets all player inputs to'nul'
, which effectively disables the virtual gamepad for those inputs and allows just the raw keys to hit the emulator. I only do this for games like Vindicators, Toobin, etc, when I am trying to do a complex combination of ORs, ANDs and NOTs.That said, I already have my keys mapped from Emulation Station first run where you setup your controller the first time, but then I edited the
opt/retropie/configs/all/retroarch.cfg
and added all of my 4 player inputs. This is where people have the most trouble because of all of the layers of abstraction. You have a keyboard controller which sends certain keystrokes for each switch triggered. Then, you wire those to arcade controls that you arrange any way you please. Then, you are mapping these keys to typical gamepad buttons via RetroArch. Finally, MAME has raw key defaults which can often conflict. . . it is messy and there are a couple of good (but long) threads on the topic, and a work in progress WIKI page for keyboard controllers.I think most of the confusion comes as a result of mixing multiple emulators. FBA has their own idea about what virtual gamepad inputs should be associated with arcade buttons. MAME has defaults, and of course, console games are not the same as arcade games. How do you drop a coin? (answer: by pressing SELECT). It is a lot of detail to juggle.
-
@caver01 Thank you for your time and feedback, that's quite informative.
I'm still surprised because to me it's more than an annoyance, the games are barely playable, to say the least, because of the messy inputs. I move to the right by pushing right right/down, some diagonals by pushing just a single way, left is randomly obtained by searching for some random combo pushing to the left, several keys won't work or will have different effects pressed at the same time as others...
A or B buttons on my joystick for instance can act either as intended, or not at all, or as both at the same time, or as random A or B effect + one direction.It's not a wiring / soldering problem either as playing with an actual keyboard is the same.
So if the issue is the conflicting virtual pad one, i didnt have to venture into rare conditions to run into it :)
So i have to apply the workaround either globally (maybe opt/retropie/configs/all/retroarch.cfg is the way to go if i can wrap my head around it!) or for every single game.I have not tested any other MAME version on the cab yet besides Retroarch ones but i will next week-end or so, but the only other emulator i've tested so far, the Nec one, plays alright.
The conf files feel impressive but reading your posts i think the solution is there.
(The, once we have it sorted out, i'll be very interested in a few tech details about your setup!)
-
@caz If your keys deviate from MAME defaults, I can see this happening, but it seems to me you could go through the MAME GUI and select the menu for editing controls for ALL GAMES and simply map everything as you have it and fix all games at once.
I thought about using the global /all/retroarch.cfg and setting player inputs to nul, but this would break other emulators that don't use raw keys. Namely, lr-fbalpha would break.
If all you use is one version of MAME for arcade, your challenge won't be that hard, but if you are like me, you end up using several versions of MAME plus FBA to get the best experience. For example, I only play vector games using Advancemame due to its ability to properly render the vector lines at my display's native resolution (other MAME versions use an arbitrary 640x480.) And because AdvanceMAME is not a libretro core, the RetroArch settings do not apply. Because I am using MAME default keys for things, it isn't too bad, and AdvanceMAME does a great job with inputs, although if you try it, you should file away this recommendation: set your keyboard driver to RAW.
Overall, I end up spending a lot of effort get titles to work in their respective emulators. For me, there is no quick and easy answer.
-
@caver01 Definitely, my setup will be much simpler as i intend this cab to run one version of Mame mostly and maybe a few consoles as a bonus.
You're making it much more complicated indeed, but judging from the hardware you put up and how much you already achieved, it's well worth the effort !Yep i tried using the MAME control menu for all games, and that's how i clearly saw that i got multiple inputs for each keystroke.
I tried that menu hoping to fix the situation so there was a situation already despite the default setting, but now that you mention i dont clearly remember how bad the situation was; and yes, it's obvious now that i made things worse by force-configuring multiple inputs for some controls... Duh, i give it just a few minutes a day, that's how i miss such things... hope the week-end will be more productive !Ok so i should get back to square one, restore my mame2014 enabled SD image, check the MAME default config.
Then if there's anything to change, i change it directly in MAME conf files.I also check how bad the problem is with the default conf, not trying to change anything, and then put a global NUL in retroarch controls see if it goes better.
If it does, then i should even be able to use the MAME GUI to edit key mapping.I'll try that step by step as soon as possible !
-
@caz You will run into trouble with your " maybe a few consoles as a bonus" because those will need the retroarch mapping. In other words, a global config for nul will be problematic with your other emulators. My suggestion is to go a step below global, and just set player inputs to nul inside a cfg file for the ROM folder you are using. In other words, if using mame-libretro, use the corresponding config file for that, or arcade, or wherever applies for how you are organizing your ROMs. That way, you can keep the global mapping intact for other libretro cores.
-
Good point about retroarch console emulators; but so far i've tested only one console emulator (Nec PCE / Supergrafx), it did not have the problem. I think there are a bunch of independant console emulators that dont depend on retroarch config that i could use.
I keep my focus on MAME anyway, extra emulators would be a bonus but as i focus on MAME i'll understand better whats going on anyway.
Thank you for clarifying : set a config file file per ROM folder ! I understood one per game at first, that felt overwhelming :D thus the preference for a global config !
I won't have time until saturday to try all this, i keep you posted ! -
@caz You understood what I was suggesting the first time. I did mean per individual ROM since only a handful of mine require nul values. Taking the global approach is a good idea, but it is too much, as only the MAME emulators are affected by the dual inputs. The compromise is to use the emulator folder configs as you now understand it. This is good because it will allow you to preserve retroarch mapping for other emulators (FBA, console systems, etc.). You are right, standalone (non retroarch) emulators are immune because they don't use the retroarch configs.
-
I'm back with no plan :D
Ok i'm in the middle of testing and, i must, getting mad.
I've restored the lr-mame2014 image i had and i checked that this image had default settings configured in MAME gui.
During play, the conflicting keys mosly affect the up/down/left/right directions.
This also affects the GUI of course, for instance if i press the down key in the DIP switches menu it will both modify the current line settings and move to the next setting at the same time (which is the combined effect of left or right + down, obtained by pressing just down)So, i chose the global route, found the retroarch.cfg file and the input lines. I changed the direction keys to nul.
Rebooted and tested : things were worse, directions were even messier, randomly configured with some direction out of reach.So, i went back to the retroarch config file, set all the player 1 inputs to nul, rebooted and tested.
Expectedly, no coin/start key were working so i could not test a game. Sadly i didnt think of testing the GUI at the time.
Went back to the retroarch config file, added just the 2 keys for start/select, rebooted, tested.
I'm at that point but for some reason the game i use to test now boots in service mode. Trying to get out of it, i ran into the other problem i mention in my initial post and got stuck in a MAME game selection screen.
I'll make another round testing both the in game experience and the GUI... -
I'll make another round testing both the in game experience and the GUI...
Testing done.
Service mode was of course due to the messy input in DIP switches GUI screen, so i fixed it.Bottom line : with just the select and start keys affected in the retroarch.cfg files (all other player 1 inputs to nul) i can start a game, but the directions are still completely wrong.
Changing the retroarch.cfg does change the keys effects but that's not fixing the problem.
Another test i've made is this : i noticed that the default config in the retroarch.cfg is set for a vertical use of the joypad, namely left=up and so on.
So my first test was to put it right, left=left and see what it did.
The config did have it's effect, but it was then so difficult to test that i didn't bother checking whether i got exactly the same problems i had pressing key "up" as i had before pressing key "right" :)Also, the key problem affects both the Picade cabinet joystick and the USB keyboard, and i only have the problem on the Retroarch versions of MAME i've tested. So the problem is on the software side.
The way i see it, there must be something getting in the way... but what ?? -
@caz I think you need to do tests outside of any game. I Mina, testing directions as their raw keys to see what 8s actually getting sent as a key for each action. For example, when I push left on my joystick, it sends a left arrow key, not because of any retroarch setup—but because that’s is the raw key that gets sent. Even at a command prompt, left is the same as left arrow.
Once you know all of your keys for your directions, does it make sense? I mean, player 1 defaults in MAME will have directions matching the arrow keys. If yours are different, that might explain why it is messed up on a new image with retroarch configured with nul inputs. Only the raw keys get sent, and if they are not a matcn to MAME defaults, it will be confusing.
-
@caver01 I could not make more tests yet. Yes i thought of some kind of lower level conflict too...
BUT ! in the only non-retroarch emulator i've tested, no problem at all. Also, everything is ok in command line. In the Nano text editor where i use all 4 direction keys, no problem either.I've been thinking of something else, as i read something in a forum about the automatic controller detection feature. I saw that config line in the retroarch.cfg file so i could test disabling it.
Another test i should do is run a non-retroarch Mame, see how controls do. I have to make sure i have compatible roms first...
Finally, i could also start anew from a fresh image, make due upgrades and only then compile mame2014.
Thank you for your support !
-
@caz All good points. Your research has given you a lot of good background info for troubleshooting.
I recommend trying AdvanceMAME for non-retroarch MAME testing. It is a great emulator and you can make adjustments by pressing TAB or you can directly edit the .rc config file.
As for the automatic mapping, good points there too. However, the retroarch.cfg in
opt/retropie/configs/all
will override any automatic joypads. Still, you should check to see what you have inopt/retropie/configs/retroarch-joypads
-
Ok, so... bottom line : it was all my fault !
I explain below then i go hide under a rock.Basically it was initially a joystick wiring problem. At first launch i used the key configuration wizard and i did not pay attention to the keycode i got at that time.
Since then i made an SD image from this install and never thought of that part again.So what happened was that Retropie/Emulation station and non-retroarch emulators were ok as the key conf was properly propagated. I had a difference in directional key usage between the front end and the text-mode graphical menus but at some point i stopped thinking it would be related.
Retroarch is where everything went wrong because key config was not properly propagated but i suspect there still must be conflicts involved in such a situation anyways.I get it much better now what you were facing when building your own setup.
I can also imagine how putting together a vertical screen setup could be a problem, for instance. Not a clear and defined project of mine but i'm considering it.Ultimately, starting anew with a fresh image made me realize this.
Once i figured it out, i just had to rewire my joystick and all my tests are now ok on all emulators :)So... it is now solved, thank you again for your help !
As i said, i just had a few minutes a week to look into it, rushing things is never good.
Good thing i could spend more time yesterday (vacation helps!)Again, thank you for your support !
Now i'll go hide under a rock, and i bring my minicab with me :D -
@caz I sorta knew you would figure it out from your last post. But don’t hide under a rock! Meeting these challenges and working through them is actually the whole point of this enterprise in my opinion. You must have such a supreme sense of accomplishment now, despite overlooking a fundamental flaw for a time. I guess I would simply focus on the silver lining—the fact that the troubleshooting forced you to learn a whole lot about controller configuration. It is far and away the number one challenge people face here, and you are now somewhat of an expert, at least as it applies to your own build.
I hope you are wiling to share some photos of your project. It is always nice to see what other people are building.
-
@caver01 Absolutely right i learned a lot going through this and with your help !
Things i would have felt much more comfortable keeping away from, actually :D so i had to and it's valuable experience.
Also it brought lots of ideas for new expriments or projects! The Pimoroni PIcade cabinet is a kit, but i would feel capable to build my own gaming machine now :)Time is of the essence.... that's the limit :)
I will share pictures when i have the ROMs sorted, i'm on vacation this week so i'll do it by the end of the week !
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.