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 ROMs from network share AND SD card together



  • Hi all,

    I want to be able to run some ROMs on the SD card for portability, and run ROMs elsewhere to keep a bigger library. There are several techniques for running these from USB, one of which is the Eazy Hax expansion method which I was planning on doing, but I'm curious if anyone has an idea for how to do this using a network share?

    I have had success in running all my ROMs from a network share and it worked great, but the issue is a lack of portability. You can only play at home (where my network share is).

    Is there a way I can use a network share in a similar way to the Eazy Hax USB method? That would be ideal.


  • Global Moderator

    Well, that's easy - put your ROMs as usual on the SD card. You'll be able to play them as you wish. Then, configure the ROM folder to be mounted from the network.
    When you're at home, the ROMs will be loaded from the network. When you don't have the share available, the ROMs from the sdcard will be used.



  • @mitu that's an interesting way to go about it, I hadn't considered it would be this easy. The only thing that separates this from the way the expanded USB method works, is you can have different ROMs in both places and retropie will see them as one big library. This saves on duplication. Would there be any way to do this?



  • @2fst4u
    What I did and it is probably similar to the Easy Hax USB, though I made the entries by hand and without a script. I added the usb device to /etc/fstab
    sudo blkid
    you should see a line like this
    /dev/sda1: LABEL="SONY_16M1" UUID="*1A61-F7C1" TYPE="vfat" PARTUUID="******-**"
    then the line I added to fstab looked like this copying the UUID and making up a mount directory
    UUID=1A92-F7C1 /home/pi/RetroPie/Sony vfat nofail,user,uid=pi,gid=pi 0 2

    then I made symlinks with ln -s for folders into my roms directory.
    I couldn't think of a more creative way, I mostly linked only the dos and ports.

    Finally I added a /home/pi/RetroPie/Sonyto samba @ /etc/samba/smb.conf.
    At the very end I just copied the layout of the other shares.

    I wanted to change the mount point but I was too lazy and I realized that I would have to redo the symlinks.

    You should probably just go with the Easy script, unless you want more control. Or have more creativity for using links and what.

    I don't think it has any issues with the usb disconnected or at all with another usb port. Other than the dos folder is empty and the ported games wont work.

    Additionally for RetroArch, I added the savestate directory to be within a folder on the usb, and then turned on autosave on exit, so that I have backups. I do not know what happens to the savestates while the usb is disconnected. They may go into that directory on the sdcard. It might be possible to limit permission so that it is unwritable folder on sdcard, and that may cause issues, and that is as far as I've gone and my case has the usb inside so I don't ever remove it.

    Thinking about it, it is like a pseudo backup, I have autoloadstate on as well. But you only have one shot, and if you loaded a psx game up to find the memory card broken, then if you exit the emulator at the menu you will have virtually no progress saved.
    Then there is the setting for auto-index savestate which I think loops through the numbers 0-9.

    For psx games you might expect the mcr/.srm not to be overwritten when loading a savestate, and there is an option for that but it is disabled by default. To be honest I didn't turn on savestate for psx yet so I don't know, but this could be a way to lose your memory card if you leave it disabled.

    So yeah its up to you're creativity. And I totally mental blocked that you were going for a Network share. But maybe some of this applies there.

    So if I blocked overwriting the saveram on loading savestate. If I decided to turn it on, I could load the savestate and have the states memory card? I don't know why this seemed so off when thinking about memory cards and not supernintendo carts. I guess I'm all to familiar with the sting of losing a memory card or having something saved over.

    But then, if I had an autostate load just to skip the intro, I would never make progress, because it would always be overwriting the .srm.
    Obviously this setting should be enabled by default, and the really confusing part is that it is not.

    And instead of this settings disclaimer being "Might potentially lead to buggy games." should be "Might pull a Toby Fox, and remember the decisions you made."



  • @Efriim that's all good information! If I don't use it then I'm sure someone else will find it helpful haha. You've given me some good ideas and let me know about some features that didn't exist.



  • @2fst4u
    Yeah the autoload state is a feature that the new nintendo virtual-console employs on all its emulators. I wasn't a fan at first but it is pretty amazing to zoom back into the state you left it. Like I said towards the end; there is that tricky option set as default, it could be the precursor and culprit to people losing their saved games.


  • Global Moderator

    @2fst4u said in Running ROMs from network share AND SD card together:

    Would there be any way to do this?

    Well, sort of - via unionfs. It would combine 2 filesystems and mount them under a single folder (roms), showing files from both sources. I'm not sure though how writing files in this combined folder works, so save-states might be a problem - you play one game with the network folder attached, then when you take your PI on the road you discover you don't have the state. This can be mitigated by setting the saves folder on the SD card (so you always have your saves on the Pi), but it's already another setup in addition to the unionfs setup and it makes the whole configuration a bit fragile.
    I think @Efriim's suggestion is more practical - mount your 'big' ROM folder from the network (PS1, Sega-CD, PCEngine-CD, basically any large ROM systems) and keep the other systems on the SDcard. My suggestion was geared towards your 'take the PI on the road' scenario, where you'd keep a library of ROMs on the card and have the full library on the network shared drive. Note that you'd still get some issues with save-states in this case - you're playing without your network share attached, then when you get 'home' and the ROMs folder is taken from the network share, the save state would be missing.



  • @mitu yea it seems a bit tricky but would definitely be cool if it could be done cleanly. It might be a long-term project.

    In the meantime USB sounds like the simplest option for me.



  • @2fst4u
    You can use the fstab to mount server shares on availability as well but I have never done this. Nor have I learned about layering filesystems.
    the ubuntu fstab help page, example
    //server/share /media/samba cifs user=user,uid=1000,gid=100 0 0


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.