spimdisasm


Namespimdisasm JSON
Version 1.31.3 PyPI version JSON
download
home_pageNone
SummaryMIPS disassembler
upload_time2024-12-21 19:25:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2022 Decompollaborate Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements rabbitizer
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # spimdisasm

[![PyPI - Downloads](https://img.shields.io/pypi/dm/spimdisasm)](https://pypi.org/project/spimdisasm/)
[![GitHub License](https://img.shields.io/github/license/Decompollaborate/spimdisasm)](https://github.com/Decompollaborate/spimdisasm/releases/latest)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Decompollaborate/spimdisasm)](https://github.com/Decompollaborate/spimdisasm/releases/latest)
[![PyPI](https://img.shields.io/pypi/v/spimdisasm)](https://pypi.org/project/spimdisasm/)
[![GitHub contributors](https://img.shields.io/github/contributors/Decompollaborate/spimdisasm?logo=purple)](https://github.com/Decompollaborate/spimdisasm/graphs/contributors)

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.

## Features

- Produces matching assembly.
- Supports `.text`, `.data`, `.rodata` and `.bss` disassembly.
  - The reloc section from Zelda 64 and some other games is supported too, but
    no front-end script uses it yet.
- Generates separated files for each section of a file (`.text`, `.data`,
  `.rodata` and `.bss`).
- Supports multiple files spliting from a single input binary.
- Automatic function detection.
  - Can detect if a function is handwritten too.
- `hi`/`lo` pairing with high success rate.
- Automatic pointer and symbol detection.
- Function spliting with rodata migration.
- Supports floats and doubles in rodata.
- String detection with medium to high success rate.
- Allows to set user-defined function and symbol names.
- Big, little and middle endian support.
- Autogenerated symbols can be named after the section they come from (`RO_` and
  `B_` for `.rodata` and `.bss` sections) or its type (`STR_`, `FLT_` and `DBL_`
  for string, floats and doubles respectively).
- Simple file boundary detection.
  - Detects boundaries on .text and .rodata sections
- Lots of features can be turned on and off.
- MIPS instructions features:
  - Named registers for MIPS VR4300's coprocessors.
  - Support for many pseudoinstructions.
  - Properly handle move to/from coprocessor instructions.
  - Support for numeric, o32, n32 and n64 ABI register names.
- Some workarounds for some specific compilers/assemblers:
  - `SN64`/`PSYQ`:
    - `div`/`divu` fix: tweaks a bit the produced `div`, `divu` and `break` instructions.
- Support for specific MIPS instruction sets:
  - N64's RSP instruction disassembly support.
    - RSP decoding has been tested to build back to matching assemblies with
      [armips](https://github.com/Kingcom/armips/).
  - PS1's R3000 GTE instruction set support.
  - PSP's R4000 ALLEGREX instruction set support.
  - PS2's R5900 EE instruction set support.
- (Experimental) Same VRAM overlay support.
  - Overlays which are able to reference symbols from other overlays in other
    categories/types is supported too.
  - NOTE: This feature lacks lots of testing and probably has many bugs.

## Installing

The recommended way to install is using from the PyPi release, via `pip`:

```bash
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:

```txt
spimdisasm>=1.31.3,<2.0.0
```

### Development version

The unstable development version is located at the [develop](https://github.com/Decompollaborate/spimdisasm/tree/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`.

```bash
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:

```bash
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.

## Versioning and changelog

This library follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
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](CHANGELOG.md)
file or check the [releases page on Github](https://github.com/Decompollaborate/spimdisasm/releases).
You can also use [this link](https://github.com/Decompollaborate/spimdisasm/releases/latest)
to check the latest release.

## How to use

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.

### Front-end

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.

### Back-end

TODO

Check the already existing front-ends is recommended for now.

## References

- <https://techpubs.jurassic.nl/manuals/0620/developer/Cplr_PTG/sgi_html/apa.html>
- <http://www.iquebrew.org/index.php?title=IO>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spimdisasm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Anghelo Carvajal <angheloalf95@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/02/17/8ea5c3f972d0776e1ac56bf804473ac6dc401c70cfcd1d85709c909692ef/spimdisasm-1.31.3.tar.gz",
    "platform": null,
    "description": "# spimdisasm\n\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/spimdisasm)](https://pypi.org/project/spimdisasm/)\n[![GitHub License](https://img.shields.io/github/license/Decompollaborate/spimdisasm)](https://github.com/Decompollaborate/spimdisasm/releases/latest)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Decompollaborate/spimdisasm)](https://github.com/Decompollaborate/spimdisasm/releases/latest)\n[![PyPI](https://img.shields.io/pypi/v/spimdisasm)](https://pypi.org/project/spimdisasm/)\n[![GitHub contributors](https://img.shields.io/github/contributors/Decompollaborate/spimdisasm?logo=purple)](https://github.com/Decompollaborate/spimdisasm/graphs/contributors)\n\nA matching MIPS disassembler API and front-ends with built-in instruction analysis.\n\nCurrently supports all the CPU instructions for MIPS I, II, III and IV.\n\nMainly focused on supporting Nintendo 64 binaries, but it should work with other\nMIPS platforms too.\n\n## Features\n\n- Produces matching assembly.\n- Supports `.text`, `.data`, `.rodata` and `.bss` disassembly.\n  - The reloc section from Zelda 64 and some other games is supported too, but\n    no front-end script uses it yet.\n- Generates separated files for each section of a file (`.text`, `.data`,\n  `.rodata` and `.bss`).\n- Supports multiple files spliting from a single input binary.\n- Automatic function detection.\n  - Can detect if a function is handwritten too.\n- `hi`/`lo` pairing with high success rate.\n- Automatic pointer and symbol detection.\n- Function spliting with rodata migration.\n- Supports floats and doubles in rodata.\n- String detection with medium to high success rate.\n- Allows to set user-defined function and symbol names.\n- Big, little and middle endian support.\n- Autogenerated symbols can be named after the section they come from (`RO_` and\n  `B_` for `.rodata` and `.bss` sections) or its type (`STR_`, `FLT_` and `DBL_`\n  for string, floats and doubles respectively).\n- Simple file boundary detection.\n  - Detects boundaries on .text and .rodata sections\n- Lots of features can be turned on and off.\n- MIPS instructions features:\n  - Named registers for MIPS VR4300's coprocessors.\n  - Support for many pseudoinstructions.\n  - Properly handle move to/from coprocessor instructions.\n  - Support for numeric, o32, n32 and n64 ABI register names.\n- Some workarounds for some specific compilers/assemblers:\n  - `SN64`/`PSYQ`:\n    - `div`/`divu` fix: tweaks a bit the produced `div`, `divu` and `break` instructions.\n- Support for specific MIPS instruction sets:\n  - N64's RSP instruction disassembly support.\n    - RSP decoding has been tested to build back to matching assemblies with\n      [armips](https://github.com/Kingcom/armips/).\n  - PS1's R3000 GTE instruction set support.\n  - PSP's R4000 ALLEGREX instruction set support.\n  - PS2's R5900 EE instruction set support.\n- (Experimental) Same VRAM overlay support.\n  - Overlays which are able to reference symbols from other overlays in other\n    categories/types is supported too.\n  - NOTE: This feature lacks lots of testing and probably has many bugs.\n\n## Installing\n\nThe recommended way to install is using from the PyPi release, via `pip`:\n\n```bash\npython3 -m pip install -U spimdisasm\n```\n\nIf you use a `requirements.txt` file in your repository, then you can add\nthis library with the following line:\n\n```txt\nspimdisasm>=1.31.3,<2.0.0\n```\n\n### Development version\n\nThe unstable development version is located at the [develop](https://github.com/Decompollaborate/spimdisasm/tree/develop)\nbranch. PRs should be made into that branch instead of the main one.\n\nThe recommended way to install a locally cloned repo is by passing the `-e`\n(editable) flag to `pip`.\n\n```bash\npython3 -m pip install -e .\n```\n\nIn case you want to mess with the latest development version without wanting to\nclone the repository, then you could use the following command:\n\n```bash\npython3 -m pip uninstall spimdisasm\npython3 -m pip install git+https://github.com/Decompollaborate/spimdisasm.git@develop\n```\n\nNOTE: Installing the development version is not recommended unless you know what\nyou are doing. Proceed at your own risk.\n\n## Versioning and changelog\n\nThis library follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\nWe try to always keep backwards compatibility, so no breaking changes should\nhappen until a major release (i.e. jumping from 1.X.X to 2.0.0).\n\nTo see what changed on each release check either the [CHANGELOG.md](CHANGELOG.md)\nfile or check the [releases page on Github](https://github.com/Decompollaborate/spimdisasm/releases).\nYou can also use [this link](https://github.com/Decompollaborate/spimdisasm/releases/latest)\nto check the latest release.\n\n## How to use\n\nThis repo can be used either by using the existing front-end scripts or by\ncreating new programs on top of the back-end API.\n\n### Front-end\n\nEvery front-end CLI tool has its own `--help` screen.\n\nThe included tool can be executed with either `spimdisasm modulename` (for\nexample `spimdisasm disasmdis --help`) or directly `modulename` (for example\n`spimdisasm --help`)\n\n- `singleFileDisasm`: Allows to disassemble a single binary file, producing\n  matching assembly files.\n\n- `disasmdis`: Disassembles raw hex passed to the CLI as a MIPS instruction.\n\n- `elfObjDisasm`: \\[EXPERIMENTAL\\] Allows to disassemble elf files. Generated\n  assembly files are not guaranteed to match or even be assemblable.\n\n- `rspDisasm`: Disassemblies RSP binaries.\n\n### Back-end\n\nTODO\n\nCheck the already existing front-ends is recommended for now.\n\n## References\n\n- <https://techpubs.jurassic.nl/manuals/0620/developer/Cplr_PTG/sgi_html/apa.html>\n- <http://www.iquebrew.org/index.php?title=IO>\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Decompollaborate  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "MIPS disassembler",
    "version": "1.31.3",
    "project_urls": {
        "Changelog": "https://github.com/Decompollaborate/spimdisasm/blob/master/CHANGELOG.md",
        "Issues": "https://github.com/Decompollaborate/spimdisasm/issues",
        "Repository": "https://github.com/Decompollaborate/spimdisasm"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "676478cb1e2cdc29082f065e43521c0eb674fb2df3048f393b731a31b795e40f",
                "md5": "2fd517310e0f0063a99d315e0690c8a0",
                "sha256": "7769610376ee2ff80456d6cc5b9f4a2e214f7ed975024d0ee224d27c2ca27d9b"
            },
            "downloads": -1,
            "filename": "spimdisasm-1.31.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2fd517310e0f0063a99d315e0690c8a0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 134534,
            "upload_time": "2024-12-21T19:25:51",
            "upload_time_iso_8601": "2024-12-21T19:25:51.995673Z",
            "url": "https://files.pythonhosted.org/packages/67/64/78cb1e2cdc29082f065e43521c0eb674fb2df3048f393b731a31b795e40f/spimdisasm-1.31.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02178ea5c3f972d0776e1ac56bf804473ac6dc401c70cfcd1d85709c909692ef",
                "md5": "c43a05fc20d263747e2da33e09ea1b30",
                "sha256": "a27485f57fd92db71e97d7299856cbe0f98cf821466fa0136f9f7705bd8bf4e5"
            },
            "downloads": -1,
            "filename": "spimdisasm-1.31.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c43a05fc20d263747e2da33e09ea1b30",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 103903,
            "upload_time": "2024-12-21T19:25:54",
            "upload_time_iso_8601": "2024-12-21T19:25:54.390642Z",
            "url": "https://files.pythonhosted.org/packages/02/17/8ea5c3f972d0776e1ac56bf804473ac6dc401c70cfcd1d85709c909692ef/spimdisasm-1.31.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-21 19:25:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Decompollaborate",
    "github_project": "spimdisasm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "rabbitizer",
            "specs": [
                [
                    "<",
                    "2.0.0"
                ],
                [
                    ">=",
                    "1.12.5"
                ]
            ]
        }
    ],
    "lcname": "spimdisasm"
}
        
Elapsed time: 0.41084s