• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Running ROM from shell ignores mapping [SOLVED]

Scheduled Pinned Locked Moved Help and Support
rfidnfcretroarchcontrollermapping
11 Posts 4 Posters 1.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    rbaker @retroisbest
    last edited by 16 Oct 2018, 12:19

    @retroisbest Hi, retroarch is not an emulator, it's a front end. There are 3 NES emulators that are "lr" - are you running the ones you think you are?

    R 1 Reply Last reply 16 Oct 2018, 12:25 Reply Quote 0
    • R
      retroisbest @rbaker
      last edited by retroisbest 16 Oct 2018, 12:25

      @rbaker Im using retroarch core lr-fceumm which is default for NES
      ps -a only shows retroarch as the parentprocess as like you say its the frontend.

      After looking at the config for emulationstation for NES i think i need to pass the config parameter to override retroarch's default mappings

      Thanks for the prompt in the right direction though, will report back!

      UPDATE: Pretty sure the runcommand.sh passes the --config parameter for the input overrides

      R 1 Reply Last reply 16 Oct 2018, 12:39 Reply Quote 0
      • R
        rbaker @retroisbest
        last edited by 16 Oct 2018, 12:39

        @retroisbest Didn't you set your retroarch mappings on first boot? If you are overriding them, what are you overriding them with?

        R 1 Reply Last reply 16 Oct 2018, 12:44 Reply Quote 0
        • R
          retroisbest @rbaker
          last edited by 16 Oct 2018, 12:44

          @rbaker If i launch the game via emulationstation via my controller the controller mappings work in game
          if i launch the game via the shell command the controller mappings are ignored,
          emulationstation by default overides the retroarch default mappings with its own as seen in /opt/retropie/configs/nes /retroarch.cfg

          the emulators.cfg points to this path :

          lr-fceumm = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg %ROM%"

          R M M 3 Replies Last reply 16 Oct 2018, 12:51 Reply Quote 0
          • R
            rbaker @retroisbest
            last edited by rbaker 16 Oct 2018, 12:51

            @retroisbest said in Running ROM from shell ignores mapping:

            controller mappings are ignored,

            Maybe it's to do with the hierarchy in the configs? You could try checking the override order according to https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration#hardcoded-configurations

            1 Reply Last reply Reply Quote 0
            • M
              mediamogul Global Moderator @retroisbest
              last edited by 16 Oct 2018, 14:41

              @retroisbest said in Running ROM from shell ignores mapping:

              emulationstation by default overides the retroarch default mappings with its own as seen in /opt/retropie/configs/nes /retroarch.cfg
              the emulators.cfg points to this path :
              lr-fceumm = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg %ROM%"

              Are you using this specific command yourself when trying to launch from the shell? If not, that's most likely the problem. Also, when doing so, keep in mind that %ROM% should be replaced with the full path to the ROM you want to launch.

              RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

              1 Reply Last reply Reply Quote 0
              • M
                mitu Global Moderator @retroisbest
                last edited by 16 Oct 2018, 17:45

                @retroisbest said in Running ROM from shell ignores mapping:

                @rbaker If i launch the game via emulationstation via my controller the controller mappings work in game
                if i launch the game via the shell command the controller mappings are ignored,
                emulationstation by default overides the retroarch default mappings with its own as seen in /opt/retropie/configs/nes /retroarch.cfg

                There are no controller overrides in the /opt/retropie/configs/nes /retroarch.cfg file. The default file is almost empty. RetroArch uses the joypad auto-configure feature to configure auto-detect and configure the controller. When you configure a controller in Emulationstation, a joypad auto-configuration file is created in /opt/retropie/configs/all/retroarch-joypads and RetroArch looks there for the controller configuration.

                the emulators.cfg points to this path :

                lr-fceumm = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-fceumm/fceumm_libretro.so --config /opt/retropie/configs/nes/retroarch.cfg %ROM%"

                Whay don't you use the launch command directly - as indicated by the Docs ? Your command is overly complicated and probably wrong - the sudo usage is unneeded and it's probably the reason why RetroArch cannot find its configuration file since RA is configured by the RetroPie scripts for the user (pi or whatever user has been used to perform the installation).

                R 1 Reply Last reply 16 Oct 2018, 22:06 Reply Quote 1
                • R
                  retroisbest @mitu
                  last edited by retroisbest 16 Oct 2018, 22:06

                  @mitu thankyou, i did try the direct command with %ROM% substituted for my full path, the only issue I have is controller mapping works fine but when I exit emulation station does not run again as my RFID script takes explicit control and emulation station fails to launch, where as the over complicated path command I use relaunches emulation station when the game has quit, the controller mappings are just ignored.

                  You are correct about using the sudo command, the userspace will be incorrect so I'll try and use it without as well.

                  1 Reply Last reply Reply Quote 0
                  • R
                    retroisbest
                    last edited by 17 Oct 2018, 09:52

                    Ok,
                    After testing the sudo command is needed for the openvt to operate otherwise i get unable to open tty1 permission denied errors, if i use the direct command the python script i use for RFID tag detection gets explicit priority and does not advance back to emulationstation.

                    So close ......

                    1 Reply Last reply Reply Quote 0
                    • R
                      retroisbest
                      last edited by 17 Oct 2018, 15:11

                      This is my workaround:-

                      my /opt/retropie/configs/all/autostart.sh:-

                      python ~/MFRC522-python/rfidlaunch.py &
                      emulationstation

                      my rfidlaunch.py contains:
                      subprocess.call("/home/pi/nesmario.sh &" , shell=True)
                      when a corresponding RFID card is detected

                      this nesmario.sh
                      contains :
                      /opt/retropie/supplementary/runcommand/runcommand.sh 0 SYS nes '/home/pi/RetroPie/roms/nes/Super Mario Bros..zip'
                      emulationstation

                      this means my RFID script runs all the time, when the RFID card is detected in emulationstation it kills emulationstation, runs the rom as user pi and when the rom has quit relaunches emulationstation.

                      Thanks for all your help everybody

                      1 Reply Last reply Reply Quote 3
                      11 out of 11
                      • First post
                        11/11
                        Last post

                      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.

                        This community forum collects and processes your personal information.
                        consent.not_received