MioROM Command-Line Interface (CLI) Reference¶
MioROM includes a command-line interface (miorom) designed to automate routine reverse engineering, ROM extraction, binary inspection, patch generation, and translation batching workflows directly from the terminal.
Global Syntax¶
To display global help and version information:
Command Reference¶
1. unpack - Universal ROM & Container Extraction¶
Unpacks bootable ROMs, disk images, and containers into sys/ (system headers and executables) and root/ (filesystem data) with a miorom.meta.json manifest.
Arguments & Options¶
rom_file: Path to the input ROM or container.output_dir: Target directory for extracted assets.-f, --format: (Optional) Force container format (nds,gc,u8,narc,iso,cartridge). If omitted, format is auto-detected.
Examples¶
# Unpack a Nintendo DS ROM
miorom unpack "game.nds" "extracted_nds/"
# Unpack a GameCube / Wii ISO image
miorom unpack "game.iso" "extracted_iso/"
# Unpack a Nintendo U8 archive
miorom unpack "banner.arc" "extracted_arc/" -f u8
2. repack - Universal ROM & Container Reconstruction¶
Repacks directory trees into bit-aligned, hardware-compliant ROM images with automatic checksum recalculation (NDS CRC16, GBA complement, N64 CIC, etc.).
Arguments & Options¶
input_dir: Directory containingsys/,root/, andmiorom.meta.json.output_file: Destination path for the rebuilt ROM file.-f, --format: (Optional) Force target container format.
Examples¶
# Repack an unpacked Nintendo DS directory
miorom repack "extracted_nds/" "game_patched.nds"
# Repack a GameCube ISO directory
miorom repack "extracted_iso/" "game_repacked.iso"
3. inspect - Smart Binary & Container Inspector¶
Analyzes any unknown file or binary segment. Generates a forensic report including Shannon block entropy profiling, container fingerprints, multi-encoding probing (Shift-JIS, UTF-8, UTF-16, ASCII), and pointer table candidates.
Arguments & Options¶
input_file: Path to the binary file to analyze.
Example¶
4. scan - Text & Pointer Table Discovery¶
Scans binary files for text strings, detects contiguous text blocks, and searches for pointer tables referencing discovered strings. Can export directly to a translation CSV.
miorom scan <input_file> [-e ENCODING] [--min-len N] [--pointers] [--footer-scan BYTES] [--orphans] [--deep] [-o OUTPUT_CSV]
Arguments & Options¶
input_file: Binary file to scan.-e, --encoding: Text encoding (shift_jis,utf-8,utf-16-be,utf-16-le,ascii). Default:utf-8.--min-len: Minimum string length in characters. Default:4.--pointers: Search for candidate pointer tables.--footer-scan: Bytes to scan from the end of the file for secondary/footer pointer tables.--orphans: Identify strings not referenced by any detected pointer table.--deep: Run recursive format signature detection.-o, --output: Export discovered dialogue strings to a CSV file.
Example¶
# Scan a binary script for Shift-JIS text and export with pointers to CSV
miorom scan script.bin -e shift_jis --pointers --orphans -o script_dialog.csv
5. patch-create - Binary Patch Generator¶
Creates distribution patches comparing original and modified ROM files. Supports IPS (up to 16MB), BPS (with CRC32 integrity checks), and Xdelta (VCDIFF delta compression for large ISOs).
Arguments & Options¶
original: Path to unmodified ROM.modified: Path to modified ROM.-o, --output: Target patch filename.-f, --format: Patch format (ips,bps,xdelta). Default:bps.
Examples¶
# Create an Xdelta patch for a Wii/GameCube disc image
miorom patch-create "clean.iso" "translated.iso" -o "patch.xdelta" -f xdelta
# Create a BPS patch for a GBA ROM
miorom patch-create "game.gba" "game_id.gba" -o "patch.bps" -f bps
6. patch-apply - Binary Patch Applicator¶
Applies an IPS, BPS, or Xdelta patch to an original ROM file.
Arguments & Options¶
original: Path to unmodified ROM.patch: Path to distribution patch file.-o, --output: Path for output patched file.-f, --format: (Optional) Patch format (ips,bps,xdelta). Auto-detected if omitted.
Example¶
7. compress - Console BIOS Compressor¶
Compresses data using console-standard compression algorithms.
Arguments & Options¶
input_file: Uncompressed raw file.-o, --output: Path for compressed output file.-f, --format: Compression format (lz10,lz11,rle,yaz0,huffman4,huffman8).
Example¶
8. decompress - Console BIOS Decompressor¶
Decompresses binary assets, automatically identifying the compression format from header magic bytes.
Example¶
9. split - CSV Translation Batch Splitter¶
Splits a large dialogue CSV file into manageable batch chunks for distributed translation teams.
Arguments & Options¶
input_csv: Master CSV file containing dialogue rows.-o, --output-dir: Target directory for generated batch files.-s, --size: Number of rows per batch file. Default:500.-p, --prefix: Filename prefix for generated batches. Default:batch_.
Example¶
10. merge - CSV Translation Batch Merger¶
Merges translated batch CSV files back into a master translation CSV file, verifying row indices.
Arguments & Options¶
batch_dir: Directory containing translated batch files.-o, --output-csv: Merged master CSV destination.-m, --master: (Optional) Original master CSV file used for baseline comparison.
Example¶
11. validate - Textbox Overflow Validator¶
Audits a translation CSV against specified character-per-line and lines-per-box constraints to prevent in-game text clipping.
Arguments & Options¶
csv_file: Translation CSV to validate.--max-chars: Maximum allowed characters per line. Default:36.--max-lines: Maximum allowed lines per dialogue box. Default:3.
Example¶
12. toc - Paired Archive Inspector & Injector¶
Manages paired index/data archives (.bin TOC + .dat payload), allowing listing, extraction, and in-place injection without loading entire gigabyte archives into RAM.
miorom toc list <bin_file> <dat_file> [--limit N]
miorom toc extract <bin_file> <dat_file> <index> -o <output_file>
miorom toc inject <bin_file> <dat_file> <index> <input_file> [--out-bin PATH] [--out-dat PATH]
Examples¶
# List entries in a TOC pair
miorom toc list system.bin system.dat --limit 20
# Extract subfile at index 42
miorom toc extract system.bin system.dat 42 -o subfile_42.bin
# Inject modified subfile back into the archive
miorom toc inject system.bin system.dat 42 subfile_42_mod.bin
13. cheat - Action Replay & Gecko Cheat Generator¶
Generates RAM cheat codes by comparing original and modified binaries, producing Gecko, Action Replay, CWCheat, or GameShark codes.
miorom cheat <original> <modified> --base ADDRESS [--type TYPE] [--game-id ID] [--title TITLE] [-o OUTPUT]
Arguments & Options¶
original: Unmodified binary.modified: Modified binary.--base: Base RAM address (e.g.,0x80000000).--type: Code format (gecko,ar,cwcheat,gameshark). Default:gecko.--game-id: Target game ID (e.g.,RFFE01).--title: Cheat code label.-o, --output: Optional output file path.
Example¶
miorom cheat original.bin modified.bin --base 0x80200000 --type gecko --game-id RF3E01 -o cheats.txt
14. port-csv - Cross-Region Translation Porter¶
Transfers existing translations from one regional version (e.g. Japanese release) to another (e.g. USA/European release) using text matching or binary address correlation.
Arguments & Options¶
--source-csv: Source translation CSV.--target-csv: Target regional CSV to populate.-o, --output: Output path for ported CSV.--strategy: Matching strategy (text,offset,hybrid). Default:text.