Homepage Forums RetroPie Project Everything else related to the RetroPie Project Need Help: Retrogame controls working correctly in menus but not in emulators

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #83587
    hobbes2222
    Participant

    I’ve been building a Game Boy with a Rasperry Pi inside according to these instructions: https://superpiboy.wordpress.com/. This involved putting a Pi in a Game Boy and mapping each Game Boy input to a GPIO pin using retrogame using a custom PCB board. I have my retrogame.c file configured just like the author does in the link above (toward the bottom of the page), except I added lines for Start and Select at the bottom.

    I had everything up and working a while ago but let the project get away from me. I just came back to it and found that for some reason, even though they were working fine when I left them, the controls are no longer working correctly.

    I have Retropie installed and use retrogame to map the controls. For some reason, the controls as I have them laid out in the retrogame.c file work correctly at the EmulationStation/Retropie menu screens (the screens for each emulator where you’re scrolling through games). All the controls work correctly: up is up, A is A, etc.

    However, once I load a game (any game, doesn’t matter which emulator), the controls no longer work correctly. Specifically, pressing A does nothing and pressing Left registers both Left and A simultaneously.

    I have checked and it’s not an issue with the soldering (e.g. the solder is not seeping over the inputs of Left and A), and the Game Boy inputs are connected to the right GPIO pins. The only thing I can think is that something behind the scenes is keeping the emulators from properly using the controls I’ve set up through retrogame.

    Unfortunately I don’t know enough about this behind-the-scenes process to fix it. Can anyone help me understand why my controls would work fine in Retropie/EmulationStation but not in the actual games themselves? Is there some process by which I need to tell Retropie what the controls are? I’d really appreciate it. I’m also happy to provide any other screenshots or info that would be helpful.

    #83592
    Floob
    Member

    I’m afraid I dont know much about the GPIO functions, but I do know when using the Pi / RetroPie normally, one file deals with the emulation station controls, and another for RetroArch based emulators (retroarch.cfg).
    Is there a chance that the games are trying to use a different controller config to emulationstation?

    My gameboy emulation is through RetroArch and so it uses controls in those config files

        <system>
            <fullname>Game Boy</fullname>
            <name>gb</name>
            <path>~/RetroPie/roms/gb</path>
            <extension>.gb .GB</extension>
            <command>/opt/retropie/supplementary/runcommand/runcommand.sh 1 "/opt/retropie/emulators/RetroArch/installdir/bin/retroarch -L /opt/retropie/emulatorcores/gambatte-libretro/libgambatte/gambatte_libretro.so --config /opt/retropie/configs/all/retroarch.cfg --appendconfig /opt/retropie/configs/gb/retroarch.cfg %ROM%"</command>
            <platform>gb</platform>
            <theme>gb</theme>
        </system>
    #83594
    hobbes2222
    Participant

    Thanks for your help. I think actually the problem is not with retrogame but with RetroArch based on what I found below, so hopefully you can help.

    I think I’ve gotten closer to figuring out where the problem may be, though I’m no closer to fixing it. I figured the problem has to do with the emulators recognizing the right inputs, so I went to the “Input Configuration” page of EmulationStation (see first image here: http://imgur.com/a/sAxWr).

    First off, I don’t know whether I should Disable or Enable RetroArch Autoconfig when I’m using retrogame.

    Second, I went to “Start ES-Config” and did all the configuration there (mapped the right inputs) and saved them for RetroArch but that didn’t fix it.

    Next I tried “Start basic input configuration” but that option just returned me to this same screen.

    Finally I went to “Open RGUI” and I saw this (second image here): http://imgur.com/a/sAxWr. It’s showing me that the Left key is mapped to “Accept/OK” which is the problem I’m having (hitting Left registers both Left and A). However, once at this screen I couldn’t do anything – I tried to press every button on the Game Boy and Keyboard but it wouldn’t let me continue past this page so I could change the controls.

    Do you think this could be my problem? How do I change the controls that I see at this RetroArch RGUI page?

    #83598
    Floob
    Member

    hmm, it looks like RetroPie 2.3 has been released since you started the project.
    Would it be worth using that?

    I’m afraid I’m not that experienced with the old version – I have a guide of how to hook up the controller, but I’m not sure how to go about it with the GPIO setup.

    Using the autoconfig will import the file that retroarch generates, but again, all the path references I would use are relating to RetroPie 2.3

    I’m pretty sure the GUI screen you show above can be manually edited in the retroarch.cfg file – so you could find that in your local install. If you use 2.3 I can help more with paths.

    #83614
    hobbes2222
    Participant

    I actually am using 2.3, so maybe you can help.

    [quote=83598]Using the autoconfig will import the file that retroarch generates, but again, all the path references I would use are relating to RetroPie 2.3[/quote]

    Can you explain what this means? If I select the Enable RetroArch Autoconfig option, what file will it import?

    And when you say I can manually edit the retroarch.cfg files, can you clarify a bit? If I recall correctly when I navigate to the RetroPie folder there’s a retroarch.cfg file in each emulator’s folder and then one under “all”. The files are quite big – when I scrolled through them I didn’t see anywhere that jumped out at me as pertaining to the control mapping. Can you direct me to where in the .cfg file I should be editing?

    #83624
    Floob
    Member

    The auto config files are in
    /opt/retropie/emulators/RetroArch/configs

    They relate to the specific controller you are using – you can tell which has been configured by looking at the last edited date (the comman is: ls -lah)

    The retroarch.cfg file will import those settings. Or you can type them in the retroarch.cfg file manually
    /opt/retropie/configs/all/retroarch.cfg

    Search the file for the text ‘joypad’ its towards the end and has examples in there – just under the keyboard config section. The above video should show it.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.