- Go 91.3%
- JavaScript 5.1%
- HTML 2.1%
- Dockerfile 1%
- Just 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| cmd | ||
| internal | ||
| web | ||
| .dockerignore | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| Justfile | ||
| main.go | ||
| plan.md | ||
| README.md | ||
WARNING! THIS WAS FULLY VIBE CODED!
Make a backup of the files before using this program.
ps2-memcard
CLI tool (plus a browser UI) for reading and modifying PlayStation 2
memory card images (.ps2, as created by PCSX2): list game saves,
extract their files, and import saves back — from a directory or from a
.psu single-save archive (uLaunchELF/mymc format).
Writes maintain what strict readers require: recomputed ECC checksums
on every page, FAT chains inside the allocatable area, and tight .
length bookkeeping (the BIOS enumerates slots [0, length)).
Build
Requires Go 1.27+.
# native CLI
go build -o ps2-memcard .
# or
just build
# WebAssembly bundle for the browser UI
just build-wasm
CLI usage
The card defaults to ./Mcd001.ps2; override with --card (place it
before the command):
ps2-memcard --card Mcd001.ps2 info
ps2-memcard --card Mcd001.ps2 list
ps2-memcard --card Mcd001.ps2 list BESLES-53064-fifast
ps2-memcard --card Mcd001.ps2 extract BESLES-53064-fifast out/
ps2-memcard --card Mcd001.ps2 import ./ac04 --as BASLUS-20152AC04
ps2-memcard --card Mcd001.ps2 import-psu game.psu [--as NAME] [--force]
ps2-memcard --card Mcd001.ps2 export BASLUS-20152AC04 ac04.psu
ps2-memcard --card Mcd001.ps2 delete BASLUS-20152AC04 [--yes]
ps2-memcard --card Mcd001.ps2 check [--fix-ecc] [--fix-dirs]
| Command | What it does |
|---|---|
info |
superblock geometry (page/cluster sizes, counts, FAT size) |
list [GAME] |
root save directories, or files inside one save |
extract (x) |
dump a save's files into a directory (GAME OUTDIR) |
import |
import a directory as a new save (SRCDIR, --as, --force) |
import-psu |
import a .psu archive, preserving its timestamps |
export |
write a save out as a .psu archive (GAME FILE.psu) |
delete |
delete a save and free its clusters (prompts, --yes to skip) |
check |
validate structure + per-page ECC; --fix-ecc re-stamps checksums, --fix-dirs tightens . lengths and zeroes in-range 0xFF slots |
import/import-psu fail if the save already exists unless --force
is given (existing save is deleted first). Timestamps come from the
.psu on that path, otherwise from the current time.
Browser UI
just build-wasm, then serve the web/ directory (plain file://
won't load .wasm).
Upload a .ps2 file to list its saves, export per-save .psu files,
import .psu files, delete saves, and download the modified .ps2
image. Everything runs locally in the page.
Layout
internal/ps2— card format: pages, superblock, FAT, directory entries, ECC, read/write,check/RepairDirsinternal/psu—.psuarchive parser/serializercmd/— cobra commands;web/— WASM bridge + single-page UI