For those of you who like to play Emulators, it’s highly possible you have had the desire to play your save file on multiple platforms. Maybe you have two different PCs that you’d like to play your games on. Most of the time this isn’t a problem, since a majority of gaming platforms offer cloud save solutions. In my case, I wanted this to work with my Citra Emulator, so I could play my Pokemon Ultra Moon save on both my laptop and my Desktop PC. However, I had a specific issue preventing me from being able to do that: The Citra 3DS emulator saves a lot of its data in the User\Appdata\roaming folder, including save data. I also can’t reconfigure the save game directory. WTF CITRA???? How am I supposed to auto-sync my saves using the DreadNAS Drive (my dropbox like syncing solution)?
I have had similar issues for my arcade cabinet’s Hyperspin deployment. I wanted to create a build that I could put on other machines and have it still work. Ideally, you would download “pocket editions” of emulators to help accomplish this task. Normal programs you install will typically put files all over the place- from appdata, to roaming, to your “documents” folder, etc. These files could be config files, save data, etc. This is where “Pocket Edition” versions of software come into play. Designed to work from things like thumb drives, Pocket Edition versions are self-contained within a single directory, which is great if you want a USB deployment, or maybe you are syncing between devices with a Dropbox like solution. In my case, I use my own “DreadNAS” solution. “Pocket Edition” like software has been really cool for me. Since all the files, saves included, are entirely within a single folder, they are amazing for keeping inside a file-sync service. It’s basically cloud-sync for that specific package, and it rocks. Dwarf Fortress being one such awesome example, although in Dwarf Fortress’s case, the game was designed to keep everything inside of the install directory.
Of course, my arcade build had more problems other than simple “pocket edition” issues. I won’t get into all the complications here since it can get very VERY lengthy. Some emulators for example, don’t offer pocket editions. In these cases, I have to figure out what doesn’t migrate on a case-by-case basis. I often will simply ignore these files when copying my Hyperspin deployment. Typically, it isn’t enough to break the emulator from working. In these cases, the config files are regenerated upon “first-launch”, and key bindings or directory locations must be reconfigured within the emulator settings before everything works again. Sometimes, fixed drive letters for file paths will be required to be defined within the config files on some of the emulators. You can imagine how this makes moving a deployment between drives difficult, as you break the configs whenever you move it (unless you are moving it to a partition with the exact same letter)
For my Hyperspin build, I had to simply accept that some stuff would not get copied over if I decided to deploy the build elsewhere. Because of this, I had lots of re-configuring to do for each emulator to ensure that it worked wherever I copied it. For the Arcade Cabinet, you aren’t doing any extended play sessions typically, so save sync isn’t really a “need”. Doing all that work whenever you switch deployments is fine since you only need to do it once every few years or so. If you want to play your save game across several different devices, copying and pasting files between devices every single time you want to play on a different one is not gonna happen. You simply wouldn’t do it.
OK OK- I have rambled long enough. Let’s get into the MEAT of the article. The reason I’m writing this. I found a cool solution!
Citra, and syncing your save data. The magic of Hard links.
The problem is Citra has a fixed location that it stores all of it’s data, from save files to config data. It’s under Appdata\Citra. I want to sync the contents of this folder with my other PC, and I want to do it so that after I have everything setup, I don’t have to do or touch anything to get my data to auto-sync between devices. I want a seamless experience moving between devices.
I found a cool solution: Hard links. For a little reading, Go here! Typically, hard links isn’t something you will ever have to use on Windows. You may have seen similar links on Linux between directories or files. My goal is to move all the Citra data from \Appdata\Roaming\Citra to a folder that syncs to my DreadNAS Drive, then I will create a hard link to that folder inside the \Appdata\Roaming folder.
Ultimately, what a Hard Link can do is let you have files or directories accessible from two separate locations. Most Windows users are used to the concept of a “shortcut” where you can create a shortcut to a folder or file, and have that shortcut somewhere convenient, like your desktop. The files aren’t actually on your desktop, but the shortcut takes you to where the files ARE. That’s similar to how a hard link works, but it’s MORE than that. It creates a proper link between the two locations. A shortcut will take you to the file or directory that the shortcut was made for, where as a Hard Link will allow a file or directory to exist in multiple locations. You could also say that a single file or directory could exist in multiple places at once- modify either, and you modify both. As far as the system is concerned, those files are legitimately in both places. You can read and write to either location, or reference either location inside of configs. The Hard Linked directories are basically pointing to the exact same data on an NTFS partition.
Since I use my “DreadNAS” Drive software to sync files inside my Drive folder, and I can’t change the directory that Citra uses to store the save data, I have no choice but to make a hard link to fix the problem. A hard link will allow me to sync the contents within \appdata\roaming\citra with a folder I made within my Drive folder… Sweet!
This solution totally works. Thanks to the Hard Link, my Appdata\Roaming\Citra folder now syncs with my Citra folder within my Drive. The last step is to create the same exact link on my other PC. With that complete, the contents of the Appdata\Roaming\Citra folders on both my Laptop and Desktop are completely in sync. I tested this last night by starting a Pokemon Ultra Moon save on my laptop, and continuing the save where I left off on my desktop at home… Awesome! There’s nothing that isn’t possible with the power of a little research.
Now I wait for someone to tell me that I COULD indeed change the save location all along, and I just didn’t look hard enough… lol – Regardless, this will help me a lot in the future.
If you are interested in how to create a Hard Link, I found a cool GUIDE HERE.