A matching MIPS disassembler API and front-ends with built-in instruction analysis.
Currently supports all the CPU instructions for MIPS I, II, III and IV.
Mainly focused on supporting Nintendo 64 binaries, but it should work with other MIPS platforms too.
.text
, .data
, .rodata
and .bss
disassembly.
.text
, .data
,
.rodata
and .bss
).hi
/lo
pairing with high success rate.RO_
and
B_
for .rodata
and .bss
sections) or its type (STR_
, FLT_
and DBL_
for string, floats and doubles respectively).SN64
/PSYQ
:div
/divu
fix: tweaks a bit the produced div
, divu
and break
instructions.The recommended way to install is using from the PyPi release, via pip
:
python3 -m pip install -U spimdisasm
If you use a requirements.txt
file in your repository, then you can add
this library with the following line:
spimdisasm>=1.30.2,<2.0.0
The unstable development version is located at the develop branch. PRs should be made into that branch instead of the main one.
The recommended way to install a locally cloned repo is by passing the -e
(editable) flag to pip
.
python3 -m pip install -e .
In case you want to mess with the latest development version without wanting to clone the repository, then you could use the following command:
python3 -m pip uninstall spimdisasm
python3 -m pip install git+https://github.com/Decompollaborate/spimdisasm.git@develop
NOTE: Installing the development version is not recommended unless you know what you are doing. Proceed at your own risk.
This library follows Semantic Versioning. We try to always keep backwards compatibility, so no breaking changes should happen until a major release (i.e. jumping from 1.X.X to 2.0.0).
To see what changed on each release check either the CHANGELOG.md file or check the releases page on Github. You can also use this link to check the latest release.
This repo can be used either by using the existing front-end scripts or by creating new programs on top of the back-end API.
Every front-end CLI tool has its own --help
screen.
The included tool can be executed with either spimdisasm modulename
(for
example spimdisasm disasmdis --help
) or directly modulename
(for example
spimdisasm --help
)
singleFileDisasm
: Allows to disassemble a single binary file, producing
matching assembly files.
disasmdis
: Disassembles raw hex passed to the CLI as a MIPS instruction.
elfObjDisasm
: [EXPERIMENTAL] Allows to disassemble elf files. Generated
assembly files are not guaranteed to match or even be assemblable.
rspDisasm
: Disassemblies RSP binaries.
TODO
Check the already existing front-ends is recommended for now.