iso2x
v0.1.6
Published
WebAssembly Xbox disc image converter
Maintainers
Readme
iso2x
An Xbox disc image converter library, which compiles to WebAssembly. Designed around streaming: sources are read on demand via a callback, and output is produced in chunks, so large images never need to sit fully in memory.
Supported environments:
- Node - read files in chunks, write output to disk or a stream.
- Browser - read a
File/Blobviaslice(), stream output to wherever you like.
Demo
iso2x-web - a browser-based tool built using this library.
Formats
Supported formats, as both source and target:
xiso - the raw XDVDFS disc image used by both the original Xbox and Xbox 360. Write mode (
XisoMode):'full'(default, full XDVDFS reauthor),'trim'(cut trailing padding only), or'zero'(zero unused sectors in place, no trim - Xbox 360 images are trimmed instead in this mode). Splits past ~4.28 GB intoname.N.xiso.isoparts.god - Xbox 360 Games-on-Demand, an STFS-family container that splits a title into
Data%04dparts, each hash-verified against a master/sub hash tree. Uses the sameScrubModeasciso/ccibelow.stfs - Xbox 360's general-purpose package format (
CON/LIVE/PIRSheader), the same familygodis built on but used for non-disc content: profiles, saved games, DLC, arcade titles. Also the target for profile/save transfer.cci - Cerbios Compressed Image, developed by Team Resurgent with Team Cerbios; per-sector LZ4-compressed, each split part fully self-contained with its own header and index. Uses
ScrubMode:'none'(straight copy),'partial'(trim + zero interior gaps), or'full'(default, reauthor). Splits past ~4.28 GB.ciso - Compressed ISO, per-sector LZ4-compressed with a shared index table in part 1. Same
ScrubModeoptions ascci. Splits past ~4 GiB (Stellar's CSO layout).zar - a zstd-compressed, name-addressed archive. No
ScrubModeequivalent.extracted - plain files, either straight from an ISO's XDVDFS tree or unpacked from a
zar/stfsarchive; also how XEX executables are reached for patching/inspection.
Any of the above can be converted to any other (subject to source/target compatibility). Extracted-folder sources can convert to any target format; image-backed sources (xiso/ciso/cci/god/zar/stfs files) can too - the crate opens whichever backing the resolved source needs per target.
Building from source
Requirements: cargo, wasm-bindgen-cli, wasm-opt (from
Binaryen), node
./build.shThis runs the Rust crate's test suite, compiles it to wasm32-unknown-unknown,
runs wasm-bindgen to generate JS/TS bindings, optimizes the binary with
wasm-opt, and builds the npm/ TypeScript package (copying the generated wasm
bindings into npm/dist/wasm).
TODO
- extend STFS package support
- add native (non-wasm) usage
- consider a non-streaming path for environments where that overhead isn't worth it
Attribution
- xdvdfs by antangelo
- iso2god-rs by iliazeus
- XGDTool by wiredopposite
- extract-xiso by XboxDev
- Repackinator by Team Resurgent
- attach-xbe-builder by greguz
- XboxToolkit by Team Resurgent
- ZArchive by Exzap
- Velocity by hetelek
- XboxUnity by Phoenix
