Splitting .mc2 memory cards on Linux
I recently purchased a Memcard Pro2 for my PS2, it has a really cool feature where it can hotswap memory cards when games are loaded or when the Playstation 2 boots up.
I have a virtual memory card with FreeMcBoot mount on startup and then when I launch a game either via OPL or with a Disc, the Memcard Pro2 automatically mounts the game specific memory card. However, I've got an actual PS2 memory card with all my game saves and I had no idea how to go about transferring these over. The first thought was to create a virtual copy of my existing memory card:
- Create a new Virtual memory card on the Memcard Pro2
- Insert both into your PS2
- Use the PS2 memory card browser to copy the saves from the old memory card to the virtual memory card
Now I've got a .mc2 file with all my saves on the
Memcard Pro2's SD card! By using a program like
MyMC++ I can
browse the memory card:
# I use uv for python apps/packages since it makes managing them easier.
# This will take a while to launch initially while it installs!
uvx -v "mymcplusplus[gui]"
Using the MyMC++ GUI I can export each of the actual game saves off
the .mc2 file into individual .psu files
using export button in the header.
Once exported I created the following script in the same directory:
#!/bin/bash
for save in *.psu; do
FILENAME=$(basename -- "$save")
NO_EXTENSION=${FILENAME%.*}
NO_PREFIX=${NO_EXTENSION#"BI"}
GAME_ID=$(echo "$NO_PREFIX" | cut -f1 -d" " | cut -c1-10)
MEMCARD_FOLDER="memcards/$GAME_ID"
mkdir -p "$MEMCARD_FOLDER"
MEMCARD="$MEMCARD_FOLDER/$GAME_ID-1.mc2"
uvx mymcplusplus -i "$MEMCARD" format
uvx mymcplusplus "$MEMCARD" import "$save"
curl -s "https://raw.githubusercontent.com/niemasd/GameDB-PS2/refs/heads/main/games/$GAME_ID/title.txt" >"$MEMCARD_FOLDER/name.txt"
done
echo ""
echo "Done!"
This script loops over each of the saves, pulls the
GAME_ID from the file name, and then creates a dedicated
.mc2 folder & file for the game. Ready to add
directly to the Memcard Pro2!
Once copied onto the SD card the dir tree should look like this:
OS
PS1
PS2
├ SLPM-66621
│ ├ name.txt
│ └ SLPM-66621-1.mc2
└ SLPM-55117
├ name.txt
└ SLPM-55117-1.mc2