Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Help with Joystick Config and Understanding Retropie Controllers



  • ok, we have been using Retropie for running mame games and I just cannot grasp what retroarch and controllers work. What we have been doing is starting each mame game, and then pressing TAB to map each game individually for each controller.

    Now that I have purchased a Hori Mini 4 fightstick, I can map the joystick and buttons inside Emulation Station, but I cannot map the fightstick itself inside mame. The buttons are able to get mapped but not the Fightstick itself.

    I think I had better figure out what Retroarch is and how to properly use it to manage controls of Retropie. Can anyone shed some light into what I need to do to get the Hori 4 to work inside mame games?

    I can follow instructions, but still cannot grasp what Retroarch is. Am I even heading in the right direction? Right now, all the ROMS are inside the ROM folder.



  • ok, so I dug around and noticed this file was created today, located inside /opt/retropie/configs/all/retroarch/autoconfig/HORICO.,LTD.FightingStickmini4.cfg

    input_device = "HORI CO.,LTD. Fighting Stick mini 4"
    input_driver = "udev"
    input_l_btn = "6"
    input_load_state_btn = "6"
    input_start_btn = "8"
    input_exit_emulator_btn = "8"
    input_up_btn = "h0up"
    input_a_btn = "0"
    input_b_btn = "3"
    input_reset_btn = "3"
    input_down_btn = "h0down"
    input_r_btn = "7"
    input_save_state_btn = "7"
    input_r2_btn = "5"
    input_right_btn = "h0right"
    input_state_slot_increase_btn = "h0right"
    input_x_btn = "1"
    input_menu_toggle_btn = "1"
    input_select_btn = "9"
    input_enable_hotkey_btn = "9"
    input_y_btn = "2"
    input_left_btn = "h0left"
    input_state_slot_decrease_btn = "h0left"
    input_l2_btn = "4"
    

    Is there something manual that can be done to made this joystick with with mame. We want to play Pacman and Street Fighter 2 using this fightstick!



  • Which emulator are you using to play the arcade games?



  • @Floob Thx for the response. I am using Mame. Is there a way to force Mame like editing a text file somewhere to make it recognize the Hori 4 Mini?



  • @mealto When someone answers the question "Which emulator are you using to play arcade games?" with "I am using MAME", it makes very clear that the docs weren't read. :)

    It seems that you aren't aware that we have several MAME versions in RetroPie, some of them isn't executed with RetroArch. Please, read this: https://retropie.org.uk/docs/Arcade/



  • @meleu said in Help with Joystick Config and Understanding Retropie Controllers:

    @mealto When someone answers the question "Which emulator are you using to play arcade games?" with "I am using MAME", it makes very clear that the docs weren't read. :)

    It seems that you aren't aware that we have several MAME versions in RetroPie, some of them isn't executed with RetroArch. Please, read this: https://retropie.org.uk/docs/Arcade/

    Hey relax my man. Just because someone does not know the exact terminology does not always mean that they did not put in the time to read the docs. For the record, I did read many of those documents. I just don't have a deep enough understanding of the tech involved here.

    1. How to choose an emulator.
    2. How to tell which version I have.

    What I do know is I dump all the ROMs into ROMS\mame-mame4all and the games work. But I also see there is this folder: BIOS\mame2003

    I am using a Raspebrry Pi 2 and it looks like I should be using lr-mame2003. Maybe that is why I cannot get the fightstick to be recognized. Is there a tutorial on how I can re-set up the pi 2 using the right emulator?

    I am not on the same PC that I used to download the original RetroPie image but I was sure I chose the correct version here: https://retropie.org.uk/download/

    I will download the re-setup the micro SD card again.

    The main question is, after I setup RetroPie. In the Arcade section of the docs, it says "Step One: Choose an arcade emulator". How do I choose lr-mame2003? Is it simply by choosing the proper location of where to copy the ROMs?



  • @mealto
    When the game launches, hit a button when the "press any button to..." screen pops up. In this menu you can switch between emulators.
    I can recommend lr-mame2003, since it's retroarch based and works good with retropie, meaning that in the /opt/retropie/configs/all/ folder there's a retroarch.cfg file that retropie looks at for every options, including controller inputs. Beware that you have to make sure that your rom is from a mame2003 romset. I would start with finding a mame2003 0.78 complete romset online and copying the games you like into the corresponding folder.

    My setup is ipac based (meaning my input is like a keyboard), so as soon as I figured out which keypress each button on my setup corresponded with, I could fill out this retroarch.cfg file under input player 1 and player 2, and everything worked for all the retroarch based emulators.

    I'm also a newbie here, and only have experience with keyboard based inputs, but I would suggest you try copying some of the inputs from the file you found onto some of the retroarch.cfg file. Like input_up_btn = "h0up" you could fill in "h0up" in the input_player1_up field ? Maybe someone with gamepad/joypad experience could help out here?

    Anyways, that's what I would do. And remember to 1) backup your retroarch.cfg file first and 2) use a real texteditor to edit, not just notepad.



  • Thanks for the info. @AndersHP

    I was wondering if there is a way to inject the Hori 4 buttons to a default so I don't have to map for every game. I assume I just edit the retroarch config file? Just wanted to be sure before I make any changes. Thanks in advance!



  • @mealto Did you discover if you are using a RetroArch core for arcade games?

    If yes, the best way to configure joystick mappings specific to a core (and/or games) is using this method: https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration#core-input-remapping



  • @mealto
    Yes, generally, the software looks these three places when a rom boots:

    1. retroarch.cfg file in the all folder
    2. retroarch.cfg file in the emulator's folder
    3. [game name].cfg in the roms folder

    So if you want the same controls for all retroarch based emulators, editing the first mentioned cfg file will influence all. If you then want specific emulators to have other options, you can edit the second mentioned with the options you want to override from the cfg file in the all folder, and lastly, if just one game should have other options, you can make a cfg file with the game's name, with these options in it, and then these will override the above mentioned.

    Again, I haven't tried the specific controller you mention, so I don't know if this advice is better than what meleu talks about, this just did the trick for me with my ipac buttons and joysticks.



  • @AndersHP said in Help with Joystick Config and Understanding Retropie Controllers:

    So if you want the same controls for all retroarch based emulators, editing the first mentioned cfg file will influence all.

    I'm afraid this isn't the best approach, since it would hardcode the configs for every single joystick model you plug on your system (and not only the one he wants to configure). You've forgot to mention the RetroArch autoconfig feature and the files in /opt/retropie/configs/all/retroarch-joypads/. Where you can configure mappings to a specific joystick model.

    A reading at the docs should solve the issue here since the first day. I'm still not sure if @mealto is using a RetroArch core, but if so, the doc to read is https://retropie.org.uk/docs/RetroArch-Configuration/



  • @meleu im having a little hard work using FBA with your script. It works well with other, but with Fba i cannot choose the joysticks to play.
    Should i use lr-fba instead of Fba?
    I want only use joysticks here in fba cause mame roms.
    I use mame4all and i´ve already configured it with "tab" but i want to change to FBA cause there are more supported roms.
    Could you give me a clue?



  • @chan the script works for libretro/retroarch emulators only. Then, yes, it works fine with lr-fba (and any of those that start with lr-).



  • @meleu so if i change all the roms from fba to lr-fba i can update with your script. Correct?

    i cannot wait to try!

    i suppose that fba roms are valid for lr-fba...



  • @chan I'm not sure what "flavor" of fba you are talking when you say 'fba'. Do you mean pifba?



  • @meleu i think the folder was fba. and the emu too...
    When i pressed a button i was asked about using fba or lr-fba...i´m not usre right now, but, anyway, i need to change my roms to lr-fba and the use that emu instead of fba,pifba or whatever in order to use your script.

    Did you include n64 too? just for testing in future!



  • @chan

    Did you include n64 too?

    Any RetroArch emulator is covered, but I think most people uses the standalone (non-libretro) Mupen64plus due to performance reasons.



  • @meleu not yet, but im thinking on it. Pitty to not have such great tool as yours to configure it.
    Will dive on how to configure when i solve the FBa first. Step by step hehe



  • @chan if you discover how to do it for Mupen64plus, please share with me. If it is as simple as editing a file, I can add it to my script.

    Cheers.



  • @meleu i didn´t dive a lot but i discover that there is a lr-mupen64plus
    https://github.com/retropie/retropie-setup/wiki/Nintendo-64
    Could you add it easily?

    i saw this too:
    "lr-Mupen64plus and lr-GLupeN64 utilise RetroArch configurations
    Add custom retroarch controls to the retroarch.cfg file in
    /opt/retropie/configs/n64/retroarch.cfg"

    For sure that i could be a kindergarden game for an expert like you :)


Log in to reply
 

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.