2️⃣ Gaming synchronized between PlayStation 2 and smartphone
By OctoSpacc
Caution
The content of this page has been entirely machine-translated into English, from Italiano. Therefore, it might contain any kind of errors.
Those who have been following my adventures for long enough and with due attention perhaps know this, but the biggest problem in IT is: how to properly reconcile the discrepancies that are created when the problem of playing video games both at home and on a portable computer arises. ? Between games that in one case are comfortable to play and in another maybe don’t even run, and the saves that are spread across countless different devices, solving this problem completely will never be possible…
Yet, sometimes, the entropy of the brain is able to generate particularly useful ideas in this regard too, as happened to me the other day for the PS2.
In fact, I have a real PlayStation 2, a home console which when you find a way to use it is certainly appreciable… and which I often found myself not using, for the reasons mentioned above: neither directly, because I often don’t feel like it at home, nor with emulator on the smartphone, because I would feel that at home I wouldn’t use the real console since the updated saves would only be on the phone.
And then, just the other day, staring at the console (I’m not sure why), I think there should be a way to have the saves easily synchronized between it and the phone…
Problem 1: USB stick or memory card?
At the time, the simplest idea I thought of was: there are adapters to use a microSD card like PlayStation memory cards (which instead use a non-standard interface)… it might be better to buy one of those, so I keep all the saves there, and if desired I can also access them from other devices by moving the card around.1
With a card of several GB (there aren’t any small ones around anymore anyway), furthermore, I could even do without the USB stick and keep all the games only on the memory card!
Luckily, this is not the only way, at least for certain games: Open PS2 Loader, the homebrew that runs commercial games from backup memories (like USB sticks), supports the use of virtual memory cards (VMC) which are saved as files on the USB drive. Games are quite slow to save on that (the PS2 only supports USB 1.1, plus there’s some strange overhead), but it’s a seemingly workable solution.
Hitch 2: Save conversion
Regardless of the previous choice, however, I discover another obstacle: the saves should be converted to be passed from the console to the emulator (at least AetherSX2, for better or for worse the only truly decent one to date ) and then vice versa.
Fortunately, I immediately found mymc, a program so old that it requires Python 2 (while at the moment we’ve been at 3 for years and years), but it works, and thank goodness it offers a command line interface.
It doesn’t do true virtual memory card conversions per se, but it allows you to manipulate the files contained in it in various ways. All very crude, but fortunately exploitable enough to do just what I need, after assembling an ideal script.
I won’t try to explain how it works, at the bottom of the article you can download it and read it, it’s boring. I packaged mymc inside the script, so that it doesn’t have to be installed separately.
Hitch 3: Converting from your phone
Note 2023-10-18: I found a modern fork (in Python 3) of mymc, mymc+… haven’t tried it (yet), but it’s possible that this could work on Android too, eliminating the fiddly setup that follows, so I mention it.
Unfortunately, mymc has some problems working in Termux (the very convenient native Linux environment for this type of integrations) on my Android: I don’t know what’s to blame, but in practice the program has problems reading VMC files, throwing an error of the type file.vmc: Bad file descriptor
. I couldn’t find any solutions online, not even for general searches of the problem, so I had to make do. Maybe using a containerized GNU+Linux system in root, with its libraries and a different build of Python 2.7, would be enough to solve the problem, but who knows.
For my part, I was starting to get annoyed, and so I opted to delegate the conversion to my Debian server, having a Termux script carry out the simple task of loading the VMC on the server, running the actual conversion script there, and then download the converted file to the right location locally.
Before I forget: on Android 13 and above (but already from some past versions) root permissions are needed to read and write files from/to external memories (such as the USB stick) and private application folders (such as the one where AetherSX2 preserves virtual memory cards).
From what I have been able to prove, if you don’t have root you will necessarily have to use a suitable file manager (and I don’t think there are scriptable ones, so you have to use your hands), or perhaps ADB, to move the files around… thank Google.
In any case, my scripts have written in the special paths used for all the ambaradan.
Using Termux:Widget, I finally added two shortcuts to my system launcher, for VMC conversion:
- one that goes from PS2 to emulator format, to run when I want to play on my phone but the saves on the pen drive were last modified by the PS2;
- the other for the reverse conversion, to be performed when I want to go and play on the PS2 once the emulator has updated my saves.
To explain it I realize that it seems very complicated, in practice I just have to press a button and wait a few seconds.
In practice: the value of unique memory
Once the problems have been eliminated, the configuration is done, and its strong point lies in the centralization of games and saves on a single device: the USB key. In this way:
- I avoid the confusion generated by games that I have on one side but not the other, especially when I want to modify my collection;
- I don’t need a much larger microSD in my smartphone to contain all the games I already have on another portable memory, with advantages for the stability of the other data and the weight of the wallet;
- there is no extra confusion for managing saves too, these being managed as I said before.
On the PS2 I normally attach the pen drive when I need it, however on the smartphone I have to use a USB-C OTG adapter, which is on average inconvenient but there is little that can be done. To avoid losing these things around, I then attached a carabiner to the USB stick, and a key ring in the hole for the lanyards on the phone cover.
In conclusion: chain ideas
I believe this is the most ideal system given my initial conditions, and in the following days I will test it thoroughly.
However, I will probably have to get a larger external memory to store more games, because the 32 GB one I use now has always been too small for me.
Maybe, by taking a large enough one, and writing a specific homebrew, I think I can adapt this system of mine for Wii games too, using the same memory for those too… spoilers? 👀
In true end, here are the additional resources for this article:
- My initial question and brief system discussion on Sony Hacking Zone: https://t.me/SonyHacking/46784;
- Guide to using VMC on OPL: https://youtube.com/watch?v=tBrKcJC_E4U
- My conversion scripts (on GitLab): direct, [via server](https://gitlab.com /octospacc/Snippets/-/blob/main/Ps2EmuVmcConvertCloud.sh);
- AetherSX2 Android build I play (latest without adware): https://www.apkmirror.com/apk/aethersx2/aethersx2/aethersx2-v1-4-3060-release/aethersx2-v1-4-3060-android -apk-download/.
- On this finding, I find conflicting opinions or advice that is not too clear, so be careful: it is not clear whether these adapters also work as normal memory cards for saving games (and therefore also possibly as cards for FMCB), or only as external memory for homebrew like OPL… in any case it would be a potentially valid purchase, considering the technical drawbacks of USB on PS2. ↩