Create patches from the CLI

Build a patch from an original ROM and a modified one, and test the result before publishing it. New to the CLI? Start with your first apply.

Create a patch

Build a patch from an original ROM and a changed one:

rom-weaver patch create \
  --original original.gba \
  --modified modified.gba \
  --format bps \
  --output release.bps

For a SOLID patch with game and author metadata:

rom-weaver patch create \
  --original original.sfc \
  --modified translated.sfc \
  --output translation.solid \
  --solid-system SNES \
  --solid-game "Example Game" \
  --solid-hack "English Translation" \
  --solid-version 1.0 \
  --solid-author "Example Team"

To create a patch from cheat codes instead of a changed ROM, see Share a cheat as a patch.

Pipe the patch to another program

Set the patch format explicitly and use --output -:

rom-weaver patch create \
  --original original.gba \
  --modified modified.gba \
  --format bps --output - | gzip > release.bps.gz

The binary pipeline reference lists storage requirements and incompatible options.

Test what you built

Apply the created patch to the clean Original, then compare the rebuilt file with Modified:

rom-weaver patch apply -i original.gba --patch release.bps -o rebuilt.gba
rom-weaver checksum -i rebuilt.gba --algo sha256
rom-weaver checksum -i modified.gba --algo sha256

The SHA-256 values must match. Test the rebuilt file in the emulator or hardware you support. patch validate checks the values stored in the patch. It cannot compare with a separate Modified file, so keep the reconstruction check above.

Where next