• Go 91.3%
  • JavaScript 5.1%
  • HTML 2.1%
  • Dockerfile 1%
  • Just 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniil Tsivinsky 07dd2ac53b
All checks were successful
/ build (push) Successful in 1m12s
add vibecoding warning in ui too
2026-09-11 20:27:35 +03:00
.forgejo/workflows make 2 separate workflows (build and deploy) 2026-09-11 19:34:18 +03:00
cmd rename to ps2-memcard 2026-09-11 16:40:32 +03:00
internal fix the thing and add wasm build with simple ui 2026-09-11 16:30:07 +03:00
web add vibecoding warning in ui too 2026-09-11 20:27:35 +03:00
.dockerignore add Dockerfile and workflow setup 2026-09-11 16:48:24 +03:00
Dockerfile add Dockerfile and workflow setup 2026-09-11 16:48:24 +03:00
go.mod rename to ps2-memcard 2026-09-11 16:40:32 +03:00
go.sum init 2026-09-11 15:20:52 +03:00
Justfile rename to ps2-memcard 2026-09-11 16:40:32 +03:00
main.go rename to ps2-memcard 2026-09-11 16:40:32 +03:00
plan.md rename to ps2-memcard 2026-09-11 16:40:32 +03:00
README.md update warning message 2026-09-11 18:17:21 +03:00

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/RepairDirs
  • internal/psu.psu archive parser/serializer
  • cmd/ — cobra commands; web/ — WASM bridge + single-page UI