Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord
    1. Home
    2. MinZe
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 20
    • Best 1
    • Controversial 0
    • Groups 0

    Posts made by MinZe

    • How to emulate nintendo ds?

      Hello, is there any known way to emulate ds with drastic? With retropie works perfectly.
      If there isn't, how can I package the emulator (I know there is no apt get) and test it?

      posted in Emulator Arcade/PC/Console
      MinZe
      MinZe
    • RE: [Tutorial] How to sync saves/roms to the cloud

      @substring It's true I forgot that, is there any way to edit the post? Can't find it though I can for answers.
      And yeah it can be risky, I haven't thought about that

      posted in Your discoveries
      MinZe
      MinZe
    • [Tutorial] How to sync saves/roms to the cloud

      Hello, I've managed to run rclone to have synced any folder on almost any cloud.
      The clouds available are all those listed here: https://rclone.org/

      Step 1: Download the necessary files.

      open ssh and run those commands:

      cd ~
      mkdir -p rpi-sync    
      wget -O rclone-install.sh https://raw.github.com/pageauc/rclone4pi/master/rclone-install.sh   
      wget -O rclone-sync.sh https://raw.github.com/pageauc/rclone4pi/master/rclone-sync.sh   
      wget -O rpi-sync/Readme.md https://raw.github.com/pageauc/rclone4pi/master/Readme.md
      

      now we have all the necessary files, but we have to modify rclone-install.sh
      run: nano ./rclone-install.sh
      Delete all the sudo on the file, at the end you should have something like that:
      0_1524321467750_Screenshot from 2018-04-21 16-33-36.png
      now let's finish with the commands

      chmod +x rclone-install.sh
      chmod +x rclone-sync.sh
      ./rclone-install.sh 
      

      Step 2: Add an account

      Go to https://rclone.org/docs/ and pick any cloud service.
      The steps don't change for Recalbox (at least for Google Drive, which is what I used).

      Step 3: Execute it on start

      Now that we can sync saves, it's time to automate it.
      We have to create a startup script; run:

      cd /etc/init.d/
      nano ./S99Sync
      

      Now we will create the startup script

      #!/bin/bash
      case "$1" in
              start)
      # check that is online to run the first sync command
      while :
      do
              wget -q --spider http://google.com
              if [ $? -eq 0 ]; then
                      # Run the command that will execute only once at the start
                      # this is for GDive, it will copy every folder and file
                      # and it'll delete those that have been deleted
                      /usr/bin/rclone sync gdmedia:rpi /recalbox/share/saves/ &
                      wait $!
                      break
              else
              fi
      done
      # This is the main loop
      while :
      do
              # I prefer to have an external script to run my rclone commands
              /etc/init.d/Copy.sh &
              # the wait will make this script wait until the Copy.sh has finished
              # it's important not to run twice any rclone script at the same time
              wait $!
      done
      ;;
      stop)
      rclone copy /recalbox/share/saves/ gdmedia:rpi
      ;;
      restart|reload)
      rclone copy /recalbox/share/saves/ gdmedia:rpi
      
      ;;
      *)
      esac
      
      exit $?
      

      Exit and save that file.
      Now we will create the Copy.sh file that will have our scripts

      nano ./Copy.sh
      

      This is what I have:

      /usr/bin/rclone copy /recalbox/share/saves/ gdmedia:rpi
      

      This copies the new/modified folders/files from /recalbox/share/saves/ to my google drive folder called rpi
      You can do whatever you want to be executed all the time there.
      Now let's make them executable

      chmod +x Sync
      chmod +x Copy.sh
      

      Perfect! now if you restart your recalbox.... it won't work.
      Even though you can run it from any ssh and it'll work, it won't work itself we have to fix something more

      Step 4: Make it work

      make sure to do this step everytime that you change your rclone configuration.
      You have to copy the rclone.conf from /recalbox/share/system/.config/rclone to /.config/rclone
      I did it manually, but you should be able to do it with this command
      cp -i /recalbox/share/system/.config/rclone/rclone.conf /.config/rclone

      Problems

      1. The startup of any game will be from 1 to 15 seconds slower.

      Special Thanks

      Special thanks to @substring and @voljega for all the help provided to me with this.
      And of course rclone for making this possible, and pageauc for making the rclone4pi

      Sync more things than saves

      I made that to only sync saves, but you are able to sync everything that you want, just change the folder where you want to sync and that you want to sync

      posted in Your discoveries
      MinZe
      MinZe
    • RE: daemon(startup script) not executing what ssh does

      @substring Thanks to that I've found that on the daemon, it searched for one .conf on another place. Now I've solved and it's fully working without problem.
      If I have time, this weekend I'll make the tutorial for recalbox. If I do it, it'll be at least for GDrive, maybe for onedrive too (can't promise anything as it should be almost the same).

      posted in Recalbox General
      MinZe
      MinZe
    • RE: daemon(startup script) not executing what ssh does

      @substring About the rclone, I haven't, I added the full path for rclone and still doesn't work like it does on ssh. The script that calls rclone I have done chmod u+x and it's in /etc/init.d/
      Is there someway to see the actual recalbox terminal without having to exit emulationstation and/or from the pc?

      posted in Recalbox General
      MinZe
      MinZe
    • RE: daemon(startup script) not executing what ssh does

      @voljega well the other posts' main problem are solved, but as the main thing is not, I haven put [solved] in the title

      posted in Recalbox General
      MinZe
      MinZe
    • daemon(startup script) not executing what ssh does

      Hello, my custom start script doesnt execute correctly what my ssh does... its about rclone (uses rsync) and even though it does the infinite and execute the echo and the recallog, the rclone's commands don't, while executing the same file over ssh allows me to do so.
      My daemon script works because it calls the other script with the command.
      the script that the daemon calls:

      #!/bin/bash
      rclone copy /recalbox/share/saves/ gdmedia:rpi > /dev/null
      

      edit: I tried without !/bin/bash too

      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      @substring Yeah I want to execute the script:

      1. On start, once wifi is enabled.
      2. When any game is launched.
      3. if possible, when any game is closed
      posted in Recalbox General
      MinZe
      MinZe
    • RE: [bash/python] know if wifi is connected

      What I wanted to test was if it was connection it didn't matter if it was through wifi or ethernet, I have found an script that I will post here if it works.

      posted in Recalbox General
      MinZe
      MinZe
    • [bash/python] know if wifi is connected

      Is there anyway to know if wifi is connected?
      I need to run a script once wifi is connected for the first time, doing it on the startup it seems that it doesn't work because wifi is not connected yet

      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      @voljega Yeah, I'll take a look at it too

      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      @voljega Ooh, I thought that as I that script was in the same folder that the py, I could use that, yeah it makes sense that it doesn't make sense. Thanks ❤ i'll try it as soon as I arrive home.

      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      @voljega Well that was an script to see if it worked because it produces changes easy to see.
      And the script should be launched everytime a game is ran right? at least that's what I thought.
      Should I modify the script like that?
      edit:(I've modified the .sh to have an start argument)

      if __name__ == '__main__':
          signal.signal(signal.SIGINT, signal_handler)
      
          pa**er = argpa**e.ArgumentPa**er(description='emulator-launcher script')
          pa**er.add_argument("-p1index", help="player1 controller index", type=int, required=False)
          pa**er.add_argument("-p1guid", help="player1 controller SDL2 guid", type=str, required=False)
          pa**er.add_argument("-p1name", help="player1 controller name", type=str, required=False)
          pa**er.add_argument("-p1devicepath", help="player1 controller device", type=str, required=False)
          pa**er.add_argument("-p1nbaxes", help="player1 controller number of axes", type=str, required=False)
          pa**er.add_argument("-p2index", help="player2 controller index", type=int, required=False)
          pa**er.add_argument("-p2guid", help="player2 controller SDL2 guid", type=str, required=False)
          pa**er.add_argument("-p2name", help="player2 controller name", type=str, required=False)
          pa**er.add_argument("-p2devicepath", help="player2 controller device", type=str, required=False)
          pa**er.add_argument("-p2nbaxes", help="player2 controller number of axes", type=str, required=False)
          pa**er.add_argument("-p3index", help="player3 controller index", type=int, required=False)
          pa**er.add_argument("-p3guid", help="player3 controller SDL2 guid", type=str, required=False)
          pa**er.add_argument("-p3name", help="player3 controller name", type=str, required=False)
          pa**er.add_argument("-p3devicepath", help="player3 controller device", type=str, required=False)
          pa**er.add_argument("-p3nbaxes", help="player3 controller number of axes", type=str, required=False)
          pa**er.add_argument("-p4index", help="player4 controller index", type=int, required=False)
          pa**er.add_argument("-p4guid", help="player4 controller SDL2 guid", type=str, required=False)
          pa**er.add_argument("-p4name", help="player4 controller name", type=str, required=False)
          pa**er.add_argument("-p4devicepath", help="player4 controller device", type=str, required=False)
          pa**er.add_argument("-p4nbaxes", help="player4 controller number of axes", type=str, required=False)
          pa**er.add_argument("-p5index", help="player5 controller index", type=int, required=False)
          pa**er.add_argument("-p5guid", help="player5 controller SDL2 guid", type=str, required=False)
          pa**er.add_argument("-p5name", help="player5 controller name", type=str, required=False)
          pa**er.add_argument("-p5devicepath", help="player5 controller device", type=str, required=False)
          pa**er.add_argument("-p5nbaxes", help="player5 controller number of axes", type=str, required=False)
          pa**er.add_argument("-system", help="select the system to launch", type=str, required=True)
          pa**er.add_argument("-rom", help="rom absolute path", type=str, required=True)
          pa**er.add_argument("-emulator", help="force emulator", type=str, required=False)
          pa**er.add_argument("-core", help="force emulator core", type=str, required=False)
          pa**er.add_argument("-ratio", help="force game ratio", type=str, required=False)
          pa**er.add_argument("-demo", help="mode demo", type=bool, required=False)
          pa**er.add_argument("-netplay", help="host/client", type=str, required=False)
      
          args = pa**er.pa**e_args()
          command = './syncFiles.sh start'
          os.popen(command)
          exitcode = main(args)
          time.sleep(1)
          exit(exitcode)
          
      
      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      @voljega Yeah, I figured out at midnight, the thing is that right now I think that I wasn't able to execute-it.
      this is my code for the .sh:

      #!/bin/bash
      rclone sync gdmedia:rpi /recalbox/share/saves/
      echo finished
      

      and this is for my emulatorlauncher.py

      [...]
      def main(args):
          subprocess.call('./syncFiles.sh')
          playersControllers = dict()
          if not args.demo:
      [...]
      

      what am I doing wrong?

      PS: As soon as I fix that I'll make a tutorial, because there is no one yet on how to sync files with drive/dropbox/etc

      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      I have been able to sync saves to google drive thanks to rclone, which uses rsync. now what I need is to know how to activate an script everytime a game is closed

      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      @idarius Thanks, Im giving a look at it.

      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      Right now I'm trying to install syncthing but I can't install the package... is there any way? apt-get and things like that doesn't work

      posted in Recalbox General
      MinZe
      MinZe
    • RE: Syncing saves

      @Substring I'm studying informatics engineering at university, I'm almost sure I won't have problem ^^

      posted in Recalbox General
      MinZe
      MinZe
    • Syncing saves

      Hi, I have retroarch on my android device too and I want to sync my savegames, I could use onedrive, google drive, dropbox, an own ftp online server, almost anything would be useful. What I need is to send the changed savegame and to download it too when started the recalbox or the game(it could be both).

      posted in Recalbox General
      MinZe
      MinZe