A plain JavaScript (ESM) port of
spimdisasm, the MIPS
disassembler splat uses to turn N64 and PS1 binaries into assembly and data
files. It reproduces the output of three spimdisasm releases byte for byte,
selected at run time. No Python is needed.
License: MIT (spimdisasm and the port). The Japanese codec tables, float
formatting and set iteration order follow CPython (PSF-2.0, Copyright (c)
2001 Python Software Foundation). See LICENSE and NOTICE.
, and translate the Python package
module by module. The command-line frontends (, ,
, ) are not ported.
How romdev uses it
romdev-splat loads it as its
disassembler backend. romdevtools' decomp tool runs splat when it sets up or
imports an N64 or PS1 decomp project (decomp({op:'setup'}),
decomp({op:'import'})), with the spimdisasm version the project pins.
API
import * as spimdisasm from "romdev-spimdisasm";spimdisasm.configureVersion("1.39.3"); // before building any Context or sectionconst { common, mips, elf32 } = spimdisasm;
The module mirrors the Python package layout: the common, mips and elf32
namespaces keep upstream's class, function and attribute names.
configureVersion(v) (alias setVersion) selects the release to reproduce and
activates the paired rabbitizer; getVersion(), __version__,
SUPPORTED_VERSIONS, DEFAULT_VERSION and RABBITIZER_VERSION_FOR describe
the selection. setRabbitizer lets a caller supply its own rabbitizer
namespace. Exports: . only.
Requirements
Node >= 24, ESM only. Depends on
romdev-rabbitizer. No
Python, no native code.
Versions
romdev-spimdisasm 0.1.0 reproduces spimdisasm 1.42.4, 1.39.3 and 1.35.0.