- Rust 75%
- HTML 16.4%
- CSS 8.6%
| .cargo | ||
| docs | ||
| marketing-site | ||
| save-games | ||
| src | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
JAPS1ME
JAPS1ME - Just A PS1 Memory Card Editor is a command-line tool for managing
PlayStation 1 memory-card saves for RetroArch and DuckStation. It converts
DexDrive (.gme) card images to raw card images, lists saves on .gme and raw
(.srm/.mcd/.mcr) cards, and imports, deletes, exports save icons, copies,
and installs saves and cards.
| Made for | Developed on |
|---|---|
Features
- Convert DexDrive
.gmefiles (including headerless/zeroed-header variants) to raw card images with validated stripping. - Import a named save from a
.gmefile (or a raw card misnamed.gme) into a raw card, with duplicate and free-space checks. - Delete saves from raw cards by slot number or save name.
- Export a save's 16x16 icon as a PNG image, optionally upscaled with an integer nearest-neighbor factor.
- Copy an emulator card from the RetroArch or DuckStation saves directory into this workspace for JAPS1ME work (bare file name or prefix; asks before overwriting).
- Infer RetroArch
.srmversus DuckStation.mcdfrom conventional directory names, without an emulator prompt. - Configure the emulator memory-card directory ahead of time with
setup. - Install a raw card into your RetroArch or DuckStation directory (remembers the directory, backs up the replaced card).
- Browse one or more cards with slot numbers, save names, Shift-JIS game titles, regions, block counts, payload sizes, and free slots.
- Read-only
list;convertvalidates before writing and never overwrites an existing output file.
Build
You need a Rust toolchain with Cargo installed.
cargo build --release
The executable is created at target/release/japs1me.
Cross-compiling a Windows build from Linux
Install the Rust GNU Windows target and MinGW-w64 linker tools:
rustup target add x86_64-pc-windows-gnu
sudo apt install g++-mingw-w64-x86-64
The repository's .cargo/config.toml selects x86_64-w64-mingw32-gcc as the
linker. Build the release executable with:
cargo build --release --target x86_64-pc-windows-gnu
The Windows executable is target/x86_64-pc-windows-gnu/release/japs1me.exe.
Usage
| Command | Purpose |
|---|---|
japs1me --version |
Print the version (-V is also supported). |
japs1me list <CARD.gme|CARD.srm|CARD.mcd>... |
List saves and free slots for one or more cards. |
japs1me convert <INPUT.gme> <OUTPUT.srm|OUTPUT.mcd> |
Convert a DexDrive .gme file to a raw card image (use .mcd when targeting DuckStation). |
japs1me import <CARD.srm|CARD.mcd> <SOURCE.gme> <SAVE-NAME> |
Import a save from a .gme (or raw misnamed .gme) file into a raw card. |
japs1me delete <CARD.srm|CARD.mcd> <SLOT-OR-SAVE> |
Delete a save from a raw card by 1-based slot number or save name. |
japs1me export-icon <CARD.gme|CARD.srm|CARD.mcd> <SLOT-OR-SAVE> <OUTPUT.png> |
Export a save's 16x16 icon as a PNG image (--scale N upscales; --frame circle and --palette NAME|#RRGGBB restyle it). |
japs1me copy <SOURCE.srm|SOURCE.mcd> <DEST|DEST-DIR> |
Copy an emulator card into the workspace; a directory destination keeps the source filename. |
japs1me setup |
Configure the RetroArch or DuckStation memory-card directory used by copy and install. |
japs1me install [--new|-n] <SOURCE.srm|SOURCE.mcd> |
Install into the configured emulator directory; --new creates a convention-named card and converts its extension. |
Examples:
target/release/japs1me list save-games/pro-evolution-soccer-2.22507.gme
target/release/japs1me list save-games/*.gme
target/release/japs1me convert save-games/pro-evolution-soccer-2.22507.gme pes2.srm
target/release/japs1me import mysaves.srm save-games/pro-evolution-soccer-2.22507.gme BESLES-03946PES-OPT
target/release/japs1me delete mysaves.srm BESLES-03946PES-OPT
target/release/japs1me export-icon save-games/pro-evolution-soccer-2.22507.gme BESLES-03946PES-OPT pes2-icon.png
target/release/japs1me export-icon mysaves.srm 1 icon-8x.png --scale 8
target/release/japs1me export-icon mysaves.srm 1 avatar.png --frame circle --palette BLUE --scale 8
target/release/japs1me export-icon mysaves.srm 1 avatar.png --frame circle --palette "#33AAFF" --scale 8
target/release/japs1me copy "ISS Pro Evolution (USA).srm" /tmp/work.srm
target/release/japs1me copy "ISS Pro Evolution (USA).srm" .
target/release/japs1me setup
target/release/japs1me install mysaves.srm
target/release/japs1me install --new "Crash Bandicoot (USA).srm"
For DuckStation, configure its memcards directory (for example
~/.local/share/duckstation/memcards). JAPS1ME detects DuckStation from a
memcards or duckstation path component, uses .mcd cards there, and keeps
the .mcd extension when copying them into the workspace. Other configured
paths are treated as RetroArch and use .srm (including paths such as
…/RetroArch/saves/<core>).
list
- Accepts
.gmefiles and raw images (.srm,.mcr, …) detected by size andMCsignature. - Accepts one or more card paths; shell-expanded globs such as
japs1me list *.srmlist each card in its own labeled table. - Shows each save's 1-based slot, save name, game title (Shift-JIS decoded, falling back to the save name), region, block count, payload size, and active/deleted status.
- The footer reports free slots out of 15. Directory checksum mismatches and orphaned links are reported as warnings on stderr.
convert
- Accepts DexDrive
.gmeinput only (134976 bytes with anMCsignature at offset 3904). Files with a missing/zeroed header are accepted with a warning. - A raw 131072-byte input is rejected with an “already a raw
.srmimage” error; copy or rename it instead of converting. - Writes the raw 131072-byte payload verbatim via a temporary file; existing output files are not overwritten.
import
- Copies one save (matched by exact save name, e.g.
BESLES-03946PES-OPT) from a.gmesource into a raw.srmcard, using the first free slots in slot order. A raw 131072-byte source starting withMCis also accepted (with a warning) for.gmefiles that are actually misnamed raw images. - If the save already exists on the target, asks
Save <name> already exists on <card>, overwrite it with the one from <source>? (y/n)on interactive terminals. Onlyy/yesproceeds; anything else cancels and leaves the card unchanged. The old save is freed first, so replacements with a different block count work. - When stdin is not a terminal, an existing save is a hard error instead of a prompt.
- Link bytes are relinked to the new slots, the size field is recomputed, and touched directory checksums are regenerated. Identity bytes (region, product code, identifier, title, save data) are preserved verbatim; saves imported from a deleted source slot are normalized to active.
- The target is staged in a temporary file, re-validated, and only then replaced.
delete
- Deletes one save selected by 1-based slot number (the save's initial slot, as shown in
list) or exact save name. All-digit selections are slot numbers. - The save's slots are reset to formatted with fresh checksums and zeroed data, freeing them for future imports.
.srmtargets only; the updated card is staged, re-validated, and only then replaced.
export-icon
- Exports one save's 16x16 game icon as a PNG. Accepts
.gmefiles and raw.srm/.mcd/.mcrimages; the card is read-only and never modified. - The save is selected by 1-based slot number (the initial slot shown in
list) or exact save name, the same waydeleteselects one. --scale N(integer, default1) upscales the icon with nearest-neighbor sampling, so--scale 8produces a 128x128 image.--frame circlescales the icon down to fit inside the canvas's inscribed circle (the whole square stays visible, nothing is cropped), centers it on transparent padding, then applies the circular alpha mask. The output stays square;--scalesets that square canvas size. Whole-number zooms are preferred so the pixel art stays crisp.--palette NAMEor--palette #RRGGBBchanges palette hues in HSL while preserving saturation and lightness.NAMEisRED,GREEN,BLUE,YELLOW,PURPLE, orORANGE(case-insensitive); hex colors may be written with or without#and must be saturated (grayscale is rejected because it has no hue). Transparent colors, exact black/white, and gray shades remain unchanged.- The output path must end in
.png; transparent palette entries are preserved as an alpha channel. Existing output files are not overwritten, and the file is written via a temporary file.
copy
- Pull an emulator save out of the configured RetroArch or DuckStation directory into this workspace copy, so
list/import/deletework happens here and the emulator original is never modified (raw.srm/.mcd, 131072 bytes starting withMC). - A bare source file name (no
/) that does not exist as given resolves inside the configured emulator directory (./.japs1mesavedirwins over the global config when both exist); paths with a separator or that exist literally are used as-is. Exact filename, then same stem across extensions, then prefix matching is used; no match errors, one match is used, and several show a numbered picker. - An existing destination asks
Overwrite <dest> with <source>? (y/n)on interactive terminals; onlyy/yesproceeds. Piped stdin fails instead of overwriting. Copying a file onto itself is refused. - If the destination is
.or an existing directory, the resolved source filename is used inside that directory; other destinations are treated as exact file paths. - The destination is staged in a temporary file and re-validated before it becomes visible. Copies from DuckStation retain the
.mcdextension.
install
- On first use (no saved directory configured), asks for the RetroArch or DuckStation memory-card directory and saves it as a single line (
$XDG_CONFIG_HOMEis honored when set; falls back to./.japs1mesavedirwhen no user config directory resolves, e.g. on Windows). A./.japs1mesavedirfile in the invocation directory overrides the global config when both exist, so a workspace can point elsewhere. - Infers DuckStation when the configured path contains a
memcardsorduckstationcomponent (case-insensitive); other paths are treated as RetroArch. It scans for.mcdin DuckStation directories and.srmotherwise. - When the source stem matches a card in the saves directory, that card is inferred even if the source extension differs, and the numbered picker is skipped. Otherwise it asks which matching-emulator card to overwrite. A second strict
y/yesconfirmation follows; anything else cancels. install --new <SOURCE>or selectingnin the overwrite picker creates a new per-game card. The source filename must followGAMENAME (REGIONCODE)with an optional DuckStation_SLOTsuffix. RetroArch names the resultGAMENAME (REGIONCODE).srm; DuckStation names itGAMENAME (REGIONCODE)_SLOT.mcd(default slot 1). The extension and slot suffix are converted to match the configured emulator.- If the derived name already exists, JAPS1ME asks before overwriting and backs up the existing card. New files are staged and validated before being created. If the directory has no cards, use
--newto create one. - Multi-disc names such as
(Disc 1)trigger a warning: RetroArch users should manually copy and rename the card when progressing to another disc; DuckStation shares its per-game card across discs. - Backs up the existing card to
<name>.<ext>.japs1me-bakfirst, replacing an existing regular-file backup with the card currently being overwritten, then replaces the target's contents in place so the filename still matches the game's disc basename. - Prompts require an interactive terminal; piped stdin fails with an error instead.
setup
- Configure the RetroArch or DuckStation PS1 memory-card directory used by
copyandinstallwithout starting an install. The emulator is inferred from the path;memcards/duckstationselects DuckStation, otherwise RetroArch. - Reuses a valid configured directory; if the setting is missing or points to a nonexistent directory, prompts for a valid one and saves it using the same local/global config rules as
install.
Safety
- Back up saves before converting.
convertrefuses to overwrite; delete or rename a previous.srmfirst if you intend to replace it.importanddeletereplace the target raw card after staging and validation; back it up first and keep the emulator closed while modifying it.export-icononly reads the source card and refuses to overwrite an existing output file.installbacks up the overwritten card automatically as<card>.<ext>.japs1me-bak, but keep an independent backup of anything irreplaceable.- Avoid testing against your only copy of a save; the fixture in
save-games/is read-only test input.
Design compared with JAPS2ME
JAPS1ME's CLI mirrors JAPS2ME, but the workflow differs because the emulators manage cards differently:
- PCSX2 and its derivatives share one memory card across many games, so
JAPS2ME trades in single-save containers (
.cbs/.max) imported into a shared card. - RetroArch and DuckStation use one memory card per game, with
.srmand.mcdrespectively and the basename matching the disc image. These are equivalent raw card images;setup,copy, andinstallinfer which extension to use from the configured directory. Whole-cardconvertandinstallare therefore the primary workflow here. - Importing individual saves out of a shared card image only makes sense from
.gmeDexDrive archives (raw images misnamed.gmeare also accepted as sources), soimportis limited to.gme/raw sources; there is no single-save (.mcs/.psx) support.
Scope compared with MemcardRex
JAPS1ME focuses on .gme → .srm conversion, save listing, and save
importing rather than general memory-card editing:
listcovers saves and free slots; there is no per-frame browser.converthandles DexDrive.gmeonly; there is no VGS/VMP/MCX support and no reverse conversion.importcopies whole saves from.gme(or misnamed raw) into.srm; there is no single-save (.mcs/.psx) support and no import into.gme.export-iconwrites the primary 16x16 icon as a PNG only; there is no JPEG output or multi-frame animation export.- There is no GUI, card formatting, comment editing, or hardware (DexDrive/serial) support. JAPS1ME validates directory checksums read-only and never recalculates them, except when relinking frames during imports and resetting them during deletions.
For details about the card formats, see the technical format guide. The save-games collection lists the saves shared in this repository.
Tests
Run formatting, tests, lint checks, and a release build from the repository root:
cargo fmt --check
cargo test
cargo clippy --all-targets -- -D warnings
cargo build --release
License
Copyright (C) 2026 Mark Robillard Jr (MARKMENTAL).
JAPS1ME is licensed under the GNU General Public License, version 3 or (at your option) any later version (SPDX: GPL-3.0-or-later). See LICENSE for the full text. This project license does not automatically apply to the individual save files in save-games/; see that directory's README for contribution and attribution guidance.
Acknowledgements
Thanks to ShendoXT and the MemcardRex project, an advanced PlayStation 1 memory-card editor. Its implementation provided a valuable technical reference for understanding the PS1 memory-card and DexDrive formats.