rom-weaver

Trim a ROM from the CLI

Cut the padding off a ROM with rom-weaver trim, check the saving before you commit to it, and pad a trimmed file back out again.

See what would change

-n/--dry-run reports the result without writing anything:

rom-weaver trim --input game.nds --dry-run

Write a trimmed copy

rom-weaver trim --input game.nds --output game-trimmed.nds

--extension names the copy from the input instead:

rom-weaver trim --input game.nds --extension trimmed.nds

--in-place rewrites the source file. Keep a known-good copy first; a trimmed ROM is not always the file a patch expects.

Make the trim reversible

--revert-marker writes a small footer that records the exact padding:

rom-weaver trim --input game.gba --output game-trimmed.gba --revert-marker

Put the padding back

rom-weaver trim --input game-trimmed.gba --output game.gba --revert

--revert works for NDS, GBA, and 3DS. XISO and RVZ scrub cannot be reverted. Without a footer from --revert-marker, the restored padding is reconstructed and may not be byte-identical.

Trim files inside an archive

trim opens archives for you and filters to ROMs by default:

rom-weaver trim --input games.zip --select 'game*.nds' --output game-trimmed.nds

--no-filter considers every member instead.

Look up what is supported

Trim support lists every trim target and every flag alias. For whether to trim at all, see Choosing a compression format.