@rom-weaver/cli 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -10
- package/docs/completions/_rom-weaver +1288 -0
- package/docs/completions/rom-weaver.bash +1817 -0
- package/docs/completions/rom-weaver.elv +763 -0
- package/docs/completions/rom-weaver.fish +723 -0
- package/docs/completions/rom-weaver.ps1 +824 -0
- package/docs/man/rom-weaver-bundle-create.1 +213 -0
- package/docs/man/rom-weaver-bundle-parse.1 +98 -0
- package/docs/man/rom-weaver-bundle-schema.1 +67 -0
- package/docs/man/rom-weaver-bundle.1 +69 -0
- package/docs/man/rom-weaver-checksum.1 +110 -0
- package/docs/man/rom-weaver-completions.1 +84 -0
- package/docs/man/rom-weaver-compress.1 +125 -0
- package/docs/man/rom-weaver-extract.1 +111 -0
- package/docs/man/rom-weaver-ingest.1 +98 -0
- package/docs/man/rom-weaver-patch-apply.1 +356 -0
- package/docs/man/rom-weaver-patch-create.1 +166 -0
- package/docs/man/rom-weaver-patch-validate.1 +161 -0
- package/docs/man/rom-weaver-patch.1 +69 -0
- package/docs/man/rom-weaver-probe.1 +93 -0
- package/docs/man/rom-weaver-tools-ppf-undo.1 +71 -0
- package/docs/man/rom-weaver-tools.1 +63 -0
- package/docs/man/rom-weaver-trim.1 +111 -0
- package/docs/man/rom-weaver-weave.1 +356 -0
- package/docs/man/rom-weaver.1 +124 -0
- package/package.json +11 -10
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.ie \n(.g .ds Aq \(aq
|
|
2
|
+
.el .ds Aq '
|
|
3
|
+
.TH rom-weaver-trim 1 "rom-weaver-trim "
|
|
4
|
+
.SH NAME
|
|
5
|
+
rom\-weaver\-trim \- Cut the padding off a ROM, or put it back
|
|
6
|
+
.SH SYNOPSIS
|
|
7
|
+
\fBrom\-weaver trim\fR <\fB\-i\fR|\fB\-\-input\fR> [\fB\-\-json\fR] [\fB\-o\fR|\fB\-\-output\fR] [\fB\-\-progress\fR] [\fB\-e\fR|\fB\-\-extension\fR] [\fB\-\-no\-progress\fR] [\fB\-\-in\-place\fR] [\fB\-\-log\-level\fR] [\fB\-n\fR|\fB\-\-dry\-run\fR] [\fB\-v\fR|\fB\-\-verbose\fR]... [\fB\-q\fR|\fB\-\-quiet\fR] [\fB\-\-revert\fR] [\fB\-\-dep\-trace\fR] [\fB\-\-no\-recursive\fR] [\fB\-\-color\fR] [\fB\-\-no\-filter\fR] [\fB\-\-no\-color\fR] [\fB\-\-no\-extract\fR] [\fB\-\-revert\-marker\fR] [\fB\-j\fR|\fB\-\-threads\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
|
8
|
+
.SH DESCRIPTION
|
|
9
|
+
Cut the unused padding off the end of a ROM, making the file smaller without
|
|
10
|
+
changing what a console or emulator reads from it.
|
|
11
|
+
.PP
|
|
12
|
+
Works on NDS\-family ROMs (.nds, .dsi, .srl), GBA (.gba), 3DS (.3ds), XISO
|
|
13
|
+
images, and RVZ scrub candidates.
|
|
14
|
+
.PP
|
|
15
|
+
By default a new file is written. \-\-in\-place overwrites the original, and
|
|
16
|
+
\-n/\-\-dry\-run reports what would change without touching anything.
|
|
17
|
+
.PP
|
|
18
|
+
\-\-revert pads a trimmed file back out (NDS, GBA, and 3DS only). To make that
|
|
19
|
+
exact rather than approximate, trim with \-\-revert\-marker, which stores a small
|
|
20
|
+
footer recording what was cut.
|
|
21
|
+
.SH OPTIONS
|
|
22
|
+
.TP
|
|
23
|
+
\fB\-i\fR, \fB\-\-input\fR \fI<INPUT>\fR
|
|
24
|
+
File or folder to trim. Repeat for each one
|
|
25
|
+
.TP
|
|
26
|
+
\fB\-o\fR, \fB\-\-output\fR \fI<OUTPUT>\fR
|
|
27
|
+
Where to write the trimmed file. Only valid with a single trimmable input
|
|
28
|
+
.TP
|
|
29
|
+
\fB\-e\fR, \fB\-\-extension\fR \fI<EXTENSION>\fR
|
|
30
|
+
Save next to each original under this extension. {ext} stands for the original one, as in trim.{ext}
|
|
31
|
+
.TP
|
|
32
|
+
\fB\-\-in\-place\fR
|
|
33
|
+
Overwrite the original instead of writing a new file
|
|
34
|
+
.TP
|
|
35
|
+
\fB\-n\fR, \fB\-\-dry\-run\fR
|
|
36
|
+
Report what would be trimmed without writing anything
|
|
37
|
+
.TP
|
|
38
|
+
\fB\-\-revert\fR
|
|
39
|
+
Pad a trimmed file back to full size. `\-\-untrim` and `\-\-restore` do the same
|
|
40
|
+
thing.
|
|
41
|
+
|
|
42
|
+
If the file carries a revert footer from an earlier \-\-revert\-marker run, the
|
|
43
|
+
original is restored byte for byte. Otherwise the size is worked out from the
|
|
44
|
+
ROM header (NDS and 3DS) or rounded up to the next power of two (GBA), which
|
|
45
|
+
usually matches but is not guaranteed to.
|
|
46
|
+
|
|
47
|
+
XISO and RVZ scrub cannot be reverted.
|
|
48
|
+
.TP
|
|
49
|
+
\fB\-\-no\-recursive\fR
|
|
50
|
+
When an input is a folder, look only at its top level
|
|
51
|
+
.TP
|
|
52
|
+
\fB\-\-no\-filter\fR
|
|
53
|
+
Consider every file inside an archive, not just the ones that look like ROMs
|
|
54
|
+
.TP
|
|
55
|
+
\fB\-\-no\-extract\fR
|
|
56
|
+
Do not look inside archives; trim only the files named directly
|
|
57
|
+
.TP
|
|
58
|
+
\fB\-\-revert\-marker\fR
|
|
59
|
+
Add a small footer recording what was cut, so \-\-revert can restore the original exactly
|
|
60
|
+
.TP
|
|
61
|
+
\fB\-j\fR, \fB\-\-threads\fR \fI<auto|N>\fR [default: auto]
|
|
62
|
+
How many threads to use at most. auto uses every core; a format may still use fewer
|
|
63
|
+
.TP
|
|
64
|
+
\fB\-h\fR, \fB\-\-help\fR
|
|
65
|
+
Print help (see a summary with \*(Aq\-h\*(Aq)
|
|
66
|
+
.SH "GLOBAL OPTIONS"
|
|
67
|
+
.TP
|
|
68
|
+
\fB\-\-json\fR
|
|
69
|
+
Print one JSON object per line instead of human\-readable output
|
|
70
|
+
.TP
|
|
71
|
+
\fB\-\-progress\fR
|
|
72
|
+
Show progress even when output is piped to a file or another program
|
|
73
|
+
.TP
|
|
74
|
+
\fB\-\-no\-progress\fR
|
|
75
|
+
Hide progress
|
|
76
|
+
.TP
|
|
77
|
+
\fB\-\-log\-level\fR \fI<LOG_LEVEL>\fR
|
|
78
|
+
How much rom\-weaver logs to stderr. Separate from the normal output [default: off]
|
|
79
|
+
.br
|
|
80
|
+
|
|
81
|
+
.br
|
|
82
|
+
\fIPossible values:\fR
|
|
83
|
+
.RS 14
|
|
84
|
+
.IP \(bu 2
|
|
85
|
+
off
|
|
86
|
+
.IP \(bu 2
|
|
87
|
+
error
|
|
88
|
+
.IP \(bu 2
|
|
89
|
+
warn
|
|
90
|
+
.IP \(bu 2
|
|
91
|
+
info
|
|
92
|
+
.IP \(bu 2
|
|
93
|
+
debug
|
|
94
|
+
.IP \(bu 2
|
|
95
|
+
trace
|
|
96
|
+
.RE
|
|
97
|
+
.TP
|
|
98
|
+
\fB\-v\fR, \fB\-\-verbose\fR
|
|
99
|
+
Log more: \-v for info, \-vv for debug, \-vvv for trace
|
|
100
|
+
.TP
|
|
101
|
+
\fB\-q\fR, \fB\-\-quiet\fR
|
|
102
|
+
Log errors only
|
|
103
|
+
.TP
|
|
104
|
+
\fB\-\-dep\-trace\fR
|
|
105
|
+
Also log trace output from bundled libraries (for bug reports)
|
|
106
|
+
.TP
|
|
107
|
+
\fB\-\-color\fR
|
|
108
|
+
Keep colors even when output is piped
|
|
109
|
+
.TP
|
|
110
|
+
\fB\-\-no\-color\fR
|
|
111
|
+
Turn colors off
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
.ie \n(.g .ds Aq \(aq
|
|
2
|
+
.el .ds Aq '
|
|
3
|
+
.TH rom-weaver-weave 1 "rom-weaver-weave "
|
|
4
|
+
.SH NAME
|
|
5
|
+
rom\-weaver\-weave \- Apply one or more patches to a ROM, in order (same as `patch apply`)
|
|
6
|
+
.SH SYNOPSIS
|
|
7
|
+
\fBrom\-weaver weave\fR <\fB\-i\fR|\fB\-\-input\fR> [\fB\-\-json\fR] [\fB\-\-progress\fR] [\fB\-s\fR|\fB\-\-select\fR] [\fB\-\-no\-progress\fR] [\fB\-\-target\fR] [\fB\-\-filter\fR] [\fB\-\-log\-level\fR] [\fB\-\-no\-extract\fR] [\fB\-v\fR|\fB\-\-verbose\fR]... [\fB\-\-no\-ignore\fR] [\fB\-q\fR|\fB\-\-quiet\fR] [\fB\-\-dep\-trace\fR] [\fB\-\-patch\fR] [\fB\-\-color\fR] [\fB\-o\fR|\fB\-\-output\fR] [\fB\-\-bundle\fR] [\fB\-\-no\-color\fR] [\fB\-\-with\fR] [\fB\-\-without\fR] [\fB\-\-no\-compress\fR] [\fB\-\-compress\-format\fR] [\fB\-\-compress\-codec\fR] [\fB\-\-compress\-level\fR] [\fB\-\-assume\-in\fR] [\fB\-\-expect\-in\fR] [\fB\-\-patch\-header\fR] [\fB\-\-patch\-basis\fR] [\fB\-\-output\-header\fR] [\fB\-\-repair\-checksum\fR] [\fB\-\-n64\-byte\-order\fR] [\fB\-\-ignore\-checksum\-validation\fR] [\fB\-\-expect\-out\fR] [\fB\-\-code\fR] [\fB\-\-code\-system\fR] [\fB\-\-code\-kind\fR] [\fB\-\-emit\-bundle\fR] [\fB\-\-tui\fR] [\fB\-j\fR|\fB\-\-threads\fR] [\fB\-h\fR|\fB\-\-help\fR]
|
|
8
|
+
.SH DESCRIPTION
|
|
9
|
+
Apply one or more patches to a ROM, in order.
|
|
10
|
+
.PP
|
|
11
|
+
`rom\-weaver weave` runs this same command under a shorter name, and is what
|
|
12
|
+
most of the examples use.
|
|
13
|
+
.PP
|
|
14
|
+
Repeat \-\-patch once per patch. They run left to right, each one on the result
|
|
15
|
+
of the last. \-\-input takes a plain ROM, an archive or disc image (the ROM
|
|
16
|
+
inside is found for you), or a rom\-weaver\-bundle.json that already names the
|
|
17
|
+
ROM, the patches, and the output.
|
|
18
|
+
.PP
|
|
19
|
+
The result is compressed by default, into whatever container the \-\-output
|
|
20
|
+
extension names. Pass \-\-no\-compress for a plain ROM file.
|
|
21
|
+
.PP
|
|
22
|
+
Patch formats: IPS, IPS32, SOLID, BPS, UPS, VCDIFF, xdelta, GDIFF,
|
|
23
|
+
HDiffPatch/HPatchZ, APS (N64), APSGBA, RUP, PPF, PAT/FFP, EBP, BDF/BSDIFF40,
|
|
24
|
+
BSP, MOD/PMSR, DLDI, DPS, and DCP (Dreamcast).
|
|
25
|
+
.PP
|
|
26
|
+
Not supported: PDS; NINJA1 (recognized, but cannot be applied); HDiffPatch
|
|
27
|
+
directory patches, HDIFF19 (single\-file .hdiff and .hpatchz are fine).
|
|
28
|
+
.PP
|
|
29
|
+
DCP needs a Dreamcast .cue or .gdi input. It rebuilds the whole disc, so it
|
|
30
|
+
cannot be combined with other patches or with the header and checksum options.
|
|
31
|
+
.SH OPTIONS
|
|
32
|
+
.TP
|
|
33
|
+
\fB\-i\fR, \fB\-\-input\fR \fI<PATH>\fR
|
|
34
|
+
ROM to patch. May be an archive, a disc sheet (.cue/.gdi), or a bundle
|
|
35
|
+
.TP
|
|
36
|
+
\fB\-s\fR, \fB\-\-select\fR \fI<SELECT>\fR
|
|
37
|
+
Pick which file to use when the ROM or a patch is inside an archive, by exact name, prefix, or glob (repeatable)
|
|
38
|
+
.TP
|
|
39
|
+
\fB\-\-target\fR \fI<TARGET>\fR
|
|
40
|
+
For a .cue or .gdi input, which track gets the patch. Matched like \-\-select and must hit exactly one track
|
|
41
|
+
.TP
|
|
42
|
+
\fB\-\-filter\fR \fI<FILTER>\fR
|
|
43
|
+
Consider only files that look like a rom or a patch, judged by extension (repeatable, comma\-separable)
|
|
44
|
+
.br
|
|
45
|
+
|
|
46
|
+
.br
|
|
47
|
+
\fIPossible values:\fR
|
|
48
|
+
.RS 14
|
|
49
|
+
.IP \(bu 2
|
|
50
|
+
rom
|
|
51
|
+
.IP \(bu 2
|
|
52
|
+
patch
|
|
53
|
+
.RE
|
|
54
|
+
.TP
|
|
55
|
+
\fB\-\-no\-extract\fR
|
|
56
|
+
Do not look inside archives; treat the input and every patch as raw files
|
|
57
|
+
.TP
|
|
58
|
+
\fB\-\-no\-ignore\fR
|
|
59
|
+
Also consider files normally skipped inside archives: readmes, images, checksum sidecars, and OS clutter such as .DS_Store
|
|
60
|
+
.TP
|
|
61
|
+
\fB\-\-patch\fR \fI<PATCHES>\fR
|
|
62
|
+
Patch to apply. Repeat once per patch; they run in the order given, each on the
|
|
63
|
+
result of the last.
|
|
64
|
+
|
|
65
|
+
Leave it out and rom\-weaver looks for RetroArch\-style patches sitting next to
|
|
66
|
+
the ROM inside the input archive.
|
|
67
|
+
.TP
|
|
68
|
+
\fB\-o\fR, \fB\-\-output\fR \fI<OUTPUT>\fR
|
|
69
|
+
Where to write the patched ROM. Optional when a bundle already names the output
|
|
70
|
+
.TP
|
|
71
|
+
\fB\-\-bundle\fR \fI<BUNDLE>\fR
|
|
72
|
+
Follow a rom\-weaver\-bundle.json recipe, which lists the patches, their order,
|
|
73
|
+
and the expected checksums. Takes a file path or an http(s) URL.
|
|
74
|
+
|
|
75
|
+
You can usually skip this flag. A bundle is picked up automatically when
|
|
76
|
+
\-\-input is a rom\-weaver\-bundle.json (optionally .gz, .bz2, .xz, or .zst), or an
|
|
77
|
+
archive with one at its root, and you passed no \-\-patch of your own.
|
|
78
|
+
.TP
|
|
79
|
+
\fB\-\-with\fR \fI<GLOB>\fR
|
|
80
|
+
Turn on a bundle patch the bundle leaves off by default, matched by name or file name (repeatable)
|
|
81
|
+
.TP
|
|
82
|
+
\fB\-\-without\fR \fI<GLOB>\fR
|
|
83
|
+
Turn off a bundle patch, matched by name or file name (repeatable)
|
|
84
|
+
.TP
|
|
85
|
+
\fB\-\-no\-compress\fR
|
|
86
|
+
Write a plain ROM instead of compressing the result
|
|
87
|
+
.TP
|
|
88
|
+
\fB\-\-compress\-format\fR \fI<COMPRESS_FORMAT>\fR
|
|
89
|
+
Format to compress the patched ROM into, such as zip, 7z, chd, rvz, or z3ds.
|
|
90
|
+
|
|
91
|
+
Normally you do not need this: the format comes from the \-\-output extension.
|
|
92
|
+
Pass it when the output name has no usable extension. If it disagrees with the
|
|
93
|
+
extension, this flag wins and a warning is printed. Use \-\-no\-compress to write
|
|
94
|
+
a plain ROM instead.
|
|
95
|
+
.TP
|
|
96
|
+
\fB\-\-compress\-codec\fR \fI<COMPRESS_CODEC>\fR
|
|
97
|
+
Compression method for the patched ROM, written as codec or codec:level.
|
|
98
|
+
|
|
99
|
+
Each format has its own codecs, and each picks a sensible one on its own, so
|
|
100
|
+
this is only for overriding that choice. CHD takes a list, tried in order:
|
|
101
|
+
|
|
102
|
+
\-\-compress\-codec cdzs:19,cdzl,cdfl
|
|
103
|
+
|
|
104
|
+
Without :level, a codec follows the \-\-compress\-level profile.
|
|
105
|
+
.TP
|
|
106
|
+
\fB\-\-compress\-level\fR \fI<COMPRESS_LEVEL>\fR
|
|
107
|
+
How hard to compress: min, very\-low, low, medium, high, very\-high, or max [default: max]
|
|
108
|
+
.br
|
|
109
|
+
|
|
110
|
+
.br
|
|
111
|
+
\fIPossible values:\fR
|
|
112
|
+
.RS 14
|
|
113
|
+
.IP \(bu 2
|
|
114
|
+
min
|
|
115
|
+
.IP \(bu 2
|
|
116
|
+
very\-low
|
|
117
|
+
.IP \(bu 2
|
|
118
|
+
low
|
|
119
|
+
.IP \(bu 2
|
|
120
|
+
medium
|
|
121
|
+
.IP \(bu 2
|
|
122
|
+
high
|
|
123
|
+
.IP \(bu 2
|
|
124
|
+
very\-high
|
|
125
|
+
.IP \(bu 2
|
|
126
|
+
max
|
|
127
|
+
.RE
|
|
128
|
+
.TP
|
|
129
|
+
\fB\-\-assume\-in\fR \fI<ALGO=HEX>\fR
|
|
130
|
+
Take this checksum on trust instead of reading the ROM to compute it, as in
|
|
131
|
+
crc32=1234abcd. Repeatable and comma\-separable.
|
|
132
|
+
|
|
133
|
+
This is a speed option for scripts that already know the checksum: it skips a
|
|
134
|
+
full read of a large ROM. It does not verify anything. To check a ROM against a
|
|
135
|
+
checksum, use \-\-expect\-in.
|
|
136
|
+
.TP
|
|
137
|
+
\fB\-\-expect\-in\fR \fI<ALGO=HEX>\fR
|
|
138
|
+
Stop unless the ROM about to be patched has this checksum, as in
|
|
139
|
+
crc32=1234abcd. Repeatable and comma\-separable.
|
|
140
|
+
|
|
141
|
+
Use it when a patch\*(Aqs readme publishes a source checksum, to be sure you are
|
|
142
|
+
starting from the ROM the author used. The size gates size=N and min\-size=N
|
|
143
|
+
work on `patch validate` only.
|
|
144
|
+
.TP
|
|
145
|
+
\fB\-\-patch\-header\fR \fI<PATCH_HEADER>\fR
|
|
146
|
+
Whether a patch applies to the ROM with or without its copier header.
|
|
147
|
+
|
|
148
|
+
Some ROMs carry a small header added by old copier hardware, and a patch may
|
|
149
|
+
have been made either with it or without it. Getting this wrong makes the patch
|
|
150
|
+
fail or produce a broken ROM.
|
|
151
|
+
|
|
152
|
+
auto Work it out per patch (the default). The header is stripped or put
|
|
153
|
+
back only when the patch\*(Aqs own source checksum proves which form it
|
|
154
|
+
expects. With no such proof, the bytes are left alone.
|
|
155
|
+
keep Apply to the bytes as they are.
|
|
156
|
+
strip Remove the header first.
|
|
157
|
+
|
|
158
|
+
Repeatable, and each occurrence binds to the \-\-patch before it and carries
|
|
159
|
+
forward until the next one:
|
|
160
|
+
|
|
161
|
+
\-\-patch a.bps \-\-patch\-header strip \-\-patch b.ups strips for both
|
|
162
|
+
\-\-patch a.bps \-\-patch b.ups \-\-patch\-header strip strips for b.ups only
|
|
163
|
+
|
|
164
|
+
An occurrence before any \-\-patch applies to every patch.
|
|
165
|
+
|
|
166
|
+
Headers detected: A78, LNX, NES, FDS, and SMC signatures, plus the SNES and PCE
|
|
167
|
+
copier size rules.
|
|
168
|
+
.br
|
|
169
|
+
|
|
170
|
+
.br
|
|
171
|
+
\fIPossible values:\fR
|
|
172
|
+
.RS 14
|
|
173
|
+
.IP \(bu 2
|
|
174
|
+
keep
|
|
175
|
+
.IP \(bu 2
|
|
176
|
+
strip
|
|
177
|
+
.IP \(bu 2
|
|
178
|
+
auto
|
|
179
|
+
.RE
|
|
180
|
+
.TP
|
|
181
|
+
\fB\-\-patch\-basis\fR \fI<PATCH_BASIS>\fR
|
|
182
|
+
Which ROM the preceding \-\-patch was built against, and so which one its
|
|
183
|
+
checksums describe.
|
|
184
|
+
|
|
185
|
+
auto Work it out from the checksums (the default).
|
|
186
|
+
base The original ROM. It is verified once up front, and the patch\*(Aqs own
|
|
187
|
+
checks are skipped when it runs later in the chain.
|
|
188
|
+
previous The output of the patch before it.
|
|
189
|
+
|
|
190
|
+
Reach for this when several patches in a chain were each written against the
|
|
191
|
+
unmodified ROM rather than against each other. Binds to the most recent
|
|
192
|
+
\-\-patch.
|
|
193
|
+
.br
|
|
194
|
+
|
|
195
|
+
.br
|
|
196
|
+
\fIPossible values:\fR
|
|
197
|
+
.RS 14
|
|
198
|
+
.IP \(bu 2
|
|
199
|
+
auto
|
|
200
|
+
.IP \(bu 2
|
|
201
|
+
base
|
|
202
|
+
.IP \(bu 2
|
|
203
|
+
previous
|
|
204
|
+
.RE
|
|
205
|
+
.TP
|
|
206
|
+
\fB\-\-output\-header\fR \fI<OUTPUT_HEADER>\fR
|
|
207
|
+
Whether the finished ROM keeps its copier header.
|
|
208
|
+
|
|
209
|
+
auto Keep headers emulators need (iNES, FDS, LNX, A78) and drop the ones
|
|
210
|
+
they do not (SNES, PCE, Game Doctor). The default.
|
|
211
|
+
keep Put back a header that was stripped in order to patch.
|
|
212
|
+
strip Write a headerless ROM, removing the header if it is still there.
|
|
213
|
+
|
|
214
|
+
The chain produces one file, so this is a single setting; if repeated, the last
|
|
215
|
+
value wins.
|
|
216
|
+
|
|
217
|
+
When the header decision changes which extension is conventional, the output
|
|
218
|
+
extension follows (SNES .smc becomes headerless .sfc, for instance) and the
|
|
219
|
+
report says so. Extensions unrelated to headers are never touched.
|
|
220
|
+
.br
|
|
221
|
+
|
|
222
|
+
.br
|
|
223
|
+
\fIPossible values:\fR
|
|
224
|
+
.RS 14
|
|
225
|
+
.IP \(bu 2
|
|
226
|
+
keep
|
|
227
|
+
.IP \(bu 2
|
|
228
|
+
strip
|
|
229
|
+
.IP \(bu 2
|
|
230
|
+
auto
|
|
231
|
+
.RE
|
|
232
|
+
.TP
|
|
233
|
+
\fB\-\-repair\-checksum\fR
|
|
234
|
+
Recompute the ROM\*(Aqs internal header checksum afterwards, so the console does not reject it (SNES, NES, GB, GBA, Mega Drive, SMS, N64, NDS)
|
|
235
|
+
.TP
|
|
236
|
+
\fB\-\-n64\-byte\-order\fR \fI<N64_BYTE_ORDER>\fR
|
|
237
|
+
Byte order to put an N64 ROM in before each patch runs.
|
|
238
|
+
|
|
239
|
+
N64 dumps circulate in three interleavings (.z64 big\-endian, .v64 byte\-swapped,
|
|
240
|
+
\&.n64 little\-endian) and a patch only matches one of them.
|
|
241
|
+
|
|
242
|
+
auto Match whichever order the patch\*(Aqs source CRC32 names. The
|
|
243
|
+
default, and almost always right.
|
|
244
|
+
keep Leave the ROM as it is.
|
|
245
|
+
big\-endian Rewrite to .z64 order.
|
|
246
|
+
little\-endian Rewrite to .n64 order.
|
|
247
|
+
byte\-swapped Rewrite to .v64 order.
|
|
248
|
+
|
|
249
|
+
Repeatable, one per patch; a short list carries its last value forward. The
|
|
250
|
+
output is written back in the order the input arrived in.
|
|
251
|
+
.br
|
|
252
|
+
|
|
253
|
+
.br
|
|
254
|
+
\fIPossible values:\fR
|
|
255
|
+
.RS 14
|
|
256
|
+
.IP \(bu 2
|
|
257
|
+
auto
|
|
258
|
+
.IP \(bu 2
|
|
259
|
+
keep
|
|
260
|
+
.IP \(bu 2
|
|
261
|
+
big\-endian
|
|
262
|
+
.IP \(bu 2
|
|
263
|
+
little\-endian
|
|
264
|
+
.IP \(bu 2
|
|
265
|
+
byte\-swapped
|
|
266
|
+
.RE
|
|
267
|
+
.TP
|
|
268
|
+
\fB\-\-ignore\-checksum\-validation\fR
|
|
269
|
+
Apply the patch even when its own checksums do not match. Can produce a broken ROM
|
|
270
|
+
.TP
|
|
271
|
+
\fB\-\-expect\-out\fR \fI<ALGO=HEX>\fR
|
|
272
|
+
Fail unless the patched ROM has this checksum, as in sha1=abc... (repeatable, comma\-separable)
|
|
273
|
+
.TP
|
|
274
|
+
\fB\-\-code\fR \fI<CODES>\fR
|
|
275
|
+
Game Genie or GameShark/Pro Action Replay code to bake into the ROM. Repeat for each code
|
|
276
|
+
.TP
|
|
277
|
+
\fB\-\-code\-system\fR \fI<CODE_SYSTEM>\fR
|
|
278
|
+
Console the \-\-code values are for (nes, snes, genesis, gameboy), when the ROM header does not say
|
|
279
|
+
.TP
|
|
280
|
+
\fB\-\-code\-kind\fR \fI<CODE_KIND>\fR [default: auto]
|
|
281
|
+
Which cheat scheme the \-\-code values use: auto, game\-genie, or gameshark/par
|
|
282
|
+
.TP
|
|
283
|
+
\fB\-\-emit\-bundle\fR \fI<PATH>\fR
|
|
284
|
+
Also write a rom\-weaver\-bundle.json recording this run, so someone else can repeat it
|
|
285
|
+
.TP
|
|
286
|
+
\fB\-\-tui\fR
|
|
287
|
+
Ask for each patch\*(Aqs name, version, and author, then apply and write a bundle. Needs a terminal
|
|
288
|
+
.TP
|
|
289
|
+
\fB\-j\fR, \fB\-\-threads\fR \fI<auto|N>\fR [default: auto]
|
|
290
|
+
How many threads to use at most. auto uses every core; a format may still use fewer
|
|
291
|
+
.TP
|
|
292
|
+
\fB\-h\fR, \fB\-\-help\fR
|
|
293
|
+
Print help (see a summary with \*(Aq\-h\*(Aq)
|
|
294
|
+
.SH "GLOBAL OPTIONS"
|
|
295
|
+
.TP
|
|
296
|
+
\fB\-\-json\fR
|
|
297
|
+
Print one JSON object per line instead of human\-readable output
|
|
298
|
+
.TP
|
|
299
|
+
\fB\-\-progress\fR
|
|
300
|
+
Show progress even when output is piped to a file or another program
|
|
301
|
+
.TP
|
|
302
|
+
\fB\-\-no\-progress\fR
|
|
303
|
+
Hide progress
|
|
304
|
+
.TP
|
|
305
|
+
\fB\-\-log\-level\fR \fI<LOG_LEVEL>\fR
|
|
306
|
+
How much rom\-weaver logs to stderr. Separate from the normal output [default: off]
|
|
307
|
+
.br
|
|
308
|
+
|
|
309
|
+
.br
|
|
310
|
+
\fIPossible values:\fR
|
|
311
|
+
.RS 14
|
|
312
|
+
.IP \(bu 2
|
|
313
|
+
off
|
|
314
|
+
.IP \(bu 2
|
|
315
|
+
error
|
|
316
|
+
.IP \(bu 2
|
|
317
|
+
warn
|
|
318
|
+
.IP \(bu 2
|
|
319
|
+
info
|
|
320
|
+
.IP \(bu 2
|
|
321
|
+
debug
|
|
322
|
+
.IP \(bu 2
|
|
323
|
+
trace
|
|
324
|
+
.RE
|
|
325
|
+
.TP
|
|
326
|
+
\fB\-v\fR, \fB\-\-verbose\fR
|
|
327
|
+
Log more: \-v for info, \-vv for debug, \-vvv for trace
|
|
328
|
+
.TP
|
|
329
|
+
\fB\-q\fR, \fB\-\-quiet\fR
|
|
330
|
+
Log errors only
|
|
331
|
+
.TP
|
|
332
|
+
\fB\-\-dep\-trace\fR
|
|
333
|
+
Also log trace output from bundled libraries (for bug reports)
|
|
334
|
+
.TP
|
|
335
|
+
\fB\-\-color\fR
|
|
336
|
+
Keep colors even when output is piped
|
|
337
|
+
.TP
|
|
338
|
+
\fB\-\-no\-color\fR
|
|
339
|
+
Turn colors off
|
|
340
|
+
.SH EXTRA
|
|
341
|
+
Examples:
|
|
342
|
+
# One patch, plain ROM out
|
|
343
|
+
rom\-weaver weave \-\-input game.sfc \-\-patch hack.bps \\
|
|
344
|
+
\-\-output hacked.sfc \-\-no\-compress
|
|
345
|
+
|
|
346
|
+
# Two patches in order, straight out of and back into a zip
|
|
347
|
+
rom\-weaver weave \-\-input game.zip \\
|
|
348
|
+
\-\-patch translation.bps \-\-patch fixes.ips \-\-output hacked.zip
|
|
349
|
+
|
|
350
|
+
# Replay someone else\*(Aqs published recipe
|
|
351
|
+
rom\-weaver weave \-\-bundle rom\-weaver\-bundle.json \-\-input game.sfc
|
|
352
|
+
|
|
353
|
+
# Check the result against a checksum the patch author published
|
|
354
|
+
rom\-weaver weave \-\-input game.sfc \-\-patch hack.bps \\
|
|
355
|
+
\-\-output hacked.sfc \-\-no\-compress \\
|
|
356
|
+
\-\-expect\-out sha1=0123456789abcdef0123456789abcdef01234567
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
.ie \n(.g .ds Aq \(aq
|
|
2
|
+
.el .ds Aq '
|
|
3
|
+
.TH rom-weaver 1 "rom-weaver 0.11.0"
|
|
4
|
+
.SH NAME
|
|
5
|
+
rom\-weaver \- Inspect, extract, checksum, compress, trim, and patch ROMs and disc images
|
|
6
|
+
.SH SYNOPSIS
|
|
7
|
+
\fBrom\-weaver\fR [\fB\-\-json\fR] [\fB\-\-progress\fR] [\fB\-\-no\-progress\fR] [\fB\-\-log\-level\fR] [\fB\-v\fR|\fB\-\-verbose\fR]... [\fB\-q\fR|\fB\-\-quiet\fR] [\fB\-\-dep\-trace\fR] [\fB\-\-color\fR] [\fB\-\-no\-color\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] <\fIsubcommands\fR>
|
|
8
|
+
.SH DESCRIPTION
|
|
9
|
+
Inspect, extract, checksum, compress, trim, and patch ROMs and disc images.
|
|
10
|
+
.PP
|
|
11
|
+
rom\-weaver reads compressed input directly, so you rarely have to unpack a file
|
|
12
|
+
first. Point \-\-input at an archive or disc image and the ROM inside it is found
|
|
13
|
+
for you; pass \-\-no\-extract to work on the raw bytes instead.
|
|
14
|
+
.PP
|
|
15
|
+
Everything runs on your machine. Nothing is uploaded.
|
|
16
|
+
.SH OPTIONS
|
|
17
|
+
.TP
|
|
18
|
+
\fB\-h\fR, \fB\-\-help\fR
|
|
19
|
+
Print help (see a summary with \*(Aq\-h\*(Aq)
|
|
20
|
+
.TP
|
|
21
|
+
\fB\-V\fR, \fB\-\-version\fR
|
|
22
|
+
Print version
|
|
23
|
+
.SH "GLOBAL OPTIONS"
|
|
24
|
+
.TP
|
|
25
|
+
\fB\-\-json\fR
|
|
26
|
+
Print one JSON object per line instead of human\-readable output
|
|
27
|
+
.TP
|
|
28
|
+
\fB\-\-progress\fR
|
|
29
|
+
Show progress even when output is piped to a file or another program
|
|
30
|
+
.TP
|
|
31
|
+
\fB\-\-no\-progress\fR
|
|
32
|
+
Hide progress
|
|
33
|
+
.TP
|
|
34
|
+
\fB\-\-log\-level\fR \fI<LOG_LEVEL>\fR
|
|
35
|
+
How much rom\-weaver logs to stderr. Separate from the normal output [default: off]
|
|
36
|
+
.br
|
|
37
|
+
|
|
38
|
+
.br
|
|
39
|
+
\fIPossible values:\fR
|
|
40
|
+
.RS 14
|
|
41
|
+
.IP \(bu 2
|
|
42
|
+
off
|
|
43
|
+
.IP \(bu 2
|
|
44
|
+
error
|
|
45
|
+
.IP \(bu 2
|
|
46
|
+
warn
|
|
47
|
+
.IP \(bu 2
|
|
48
|
+
info
|
|
49
|
+
.IP \(bu 2
|
|
50
|
+
debug
|
|
51
|
+
.IP \(bu 2
|
|
52
|
+
trace
|
|
53
|
+
.RE
|
|
54
|
+
.TP
|
|
55
|
+
\fB\-v\fR, \fB\-\-verbose\fR
|
|
56
|
+
Log more: \-v for info, \-vv for debug, \-vvv for trace
|
|
57
|
+
.TP
|
|
58
|
+
\fB\-q\fR, \fB\-\-quiet\fR
|
|
59
|
+
Log errors only
|
|
60
|
+
.TP
|
|
61
|
+
\fB\-\-dep\-trace\fR
|
|
62
|
+
Also log trace output from bundled libraries (for bug reports)
|
|
63
|
+
.TP
|
|
64
|
+
\fB\-\-color\fR
|
|
65
|
+
Keep colors even when output is piped
|
|
66
|
+
.TP
|
|
67
|
+
\fB\-\-no\-color\fR
|
|
68
|
+
Turn colors off
|
|
69
|
+
.SH SUBCOMMANDS
|
|
70
|
+
.TP
|
|
71
|
+
rom\-weaver\-probe(1)
|
|
72
|
+
Identify a file: its format, its platform, and any header it carries
|
|
73
|
+
.TP
|
|
74
|
+
rom\-weaver\-extract(1)
|
|
75
|
+
Unpack an archive or disc image
|
|
76
|
+
.TP
|
|
77
|
+
rom\-weaver\-checksum(1)
|
|
78
|
+
Compute checksums for a file, or for a ROM inside an archive
|
|
79
|
+
.TP
|
|
80
|
+
rom\-weaver\-ingest(1)
|
|
81
|
+
Sort a file into ROMs and patches, unpacking and hashing along the way
|
|
82
|
+
.TP
|
|
83
|
+
rom\-weaver\-compress(1)
|
|
84
|
+
Pack files into an archive or a compressed disc image
|
|
85
|
+
.TP
|
|
86
|
+
rom\-weaver\-trim(1)
|
|
87
|
+
Cut the padding off a ROM, or put it back
|
|
88
|
+
.TP
|
|
89
|
+
rom\-weaver\-patch(1)
|
|
90
|
+
Apply, create, or check ROM patches
|
|
91
|
+
.TP
|
|
92
|
+
rom\-weaver\-bundle(1)
|
|
93
|
+
Build and read rom\-weaver\-bundle.json patch recipes
|
|
94
|
+
.TP
|
|
95
|
+
rom\-weaver\-tools(1)
|
|
96
|
+
One\-off recovery tools
|
|
97
|
+
.TP
|
|
98
|
+
rom\-weaver\-weave(1)
|
|
99
|
+
Apply one or more patches to a ROM, in order (same as `patch apply`)
|
|
100
|
+
.TP
|
|
101
|
+
rom\-weaver\-completions(1)
|
|
102
|
+
Print a tab\-completion script for your shell
|
|
103
|
+
.SH EXTRA
|
|
104
|
+
Examples:
|
|
105
|
+
# What is this file?
|
|
106
|
+
rom\-weaver probe \-\-input game.iso
|
|
107
|
+
|
|
108
|
+
# Apply a patch, writing a plain ROM
|
|
109
|
+
rom\-weaver weave \-\-input game.sfc \-\-patch hack.bps \\
|
|
110
|
+
\-\-output hacked.sfc \-\-no\-compress
|
|
111
|
+
|
|
112
|
+
# Two patches in order; the .zip extension compresses the result
|
|
113
|
+
rom\-weaver weave \-\-input game.sfc \\
|
|
114
|
+
\-\-patch base.ips \-\-patch fixes.ups \-\-output hacked.zip
|
|
115
|
+
|
|
116
|
+
# Hash a ROM, including one inside an archive
|
|
117
|
+
rom\-weaver checksum \-\-input game.zip \-\-algo crc32,sha1
|
|
118
|
+
|
|
119
|
+
# Shrink a disc image; the .cue brings its tracks along
|
|
120
|
+
rom\-weaver compress \-\-input game.cue \-\-output game.chd
|
|
121
|
+
|
|
122
|
+
Full guide: https://github.com/rom\-weaver/rom\-weaver/blob/main/docs/cli/reference.md
|
|
123
|
+
.SH VERSION
|
|
124
|
+
v0.11.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rom-weaver/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"author": "Brandon Casey",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"description": "Local-first toolkit for ROMs and disc images: inspect, extract, compress, and apply, create, or bundle patches. Offline via a browser service-worker PWA or CLI.",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"files": [
|
|
54
54
|
"bin/rom-weaver.mjs",
|
|
55
55
|
"docs/man/*.1",
|
|
56
|
+
"docs/completions/*",
|
|
56
57
|
"LICENSE"
|
|
57
58
|
],
|
|
58
59
|
"publishConfig": {
|
|
@@ -63,15 +64,15 @@
|
|
|
63
64
|
"node": ">=22"
|
|
64
65
|
},
|
|
65
66
|
"optionalDependencies": {
|
|
66
|
-
"@rom-weaver/darwin-arm64": "0.
|
|
67
|
-
"@rom-weaver/darwin-x64": "0.
|
|
68
|
-
"@rom-weaver/linux-arm64-musl": "0.
|
|
69
|
-
"@rom-weaver/linux-ia32-musl": "0.
|
|
70
|
-
"@rom-weaver/linux-x64-gnu": "0.
|
|
71
|
-
"@rom-weaver/linux-x64-musl": "0.
|
|
72
|
-
"@rom-weaver/win32-arm64-msvc": "0.
|
|
73
|
-
"@rom-weaver/win32-ia32-msvc": "0.
|
|
74
|
-
"@rom-weaver/win32-x64-msvc": "0.
|
|
67
|
+
"@rom-weaver/darwin-arm64": "0.11.0",
|
|
68
|
+
"@rom-weaver/darwin-x64": "0.11.0",
|
|
69
|
+
"@rom-weaver/linux-arm64-musl": "0.11.0",
|
|
70
|
+
"@rom-weaver/linux-ia32-musl": "0.11.0",
|
|
71
|
+
"@rom-weaver/linux-x64-gnu": "0.11.0",
|
|
72
|
+
"@rom-weaver/linux-x64-musl": "0.11.0",
|
|
73
|
+
"@rom-weaver/win32-arm64-msvc": "0.11.0",
|
|
74
|
+
"@rom-weaver/win32-ia32-msvc": "0.11.0",
|
|
75
|
+
"@rom-weaver/win32-x64-msvc": "0.11.0"
|
|
75
76
|
},
|
|
76
77
|
"scripts": {
|
|
77
78
|
"docs:lint": "markdownlint-cli2",
|