Metadata-Version: 2.1
Name: ppcdis-protobuf
Version: 0.0.2
Summary: NOTE: this is NOT the upstream ppcdis, this is m8's branch that uses protobuf persistence
Author: Seeky
Maintainer: em-eight
License: MIT License
        
        Copyright (c) 2022 Seeky
        
        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.
        
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: colorama
Requires-Dist: capstone ==5.0.1
Requires-Dist: pyelftools
Requires-Dist: pylibyaml
Requires-Dist: protobuf ==4.21.0
Requires-Dist: PyYAML

# ppcdis

GC/Wii PowerPC disassembly & decompilation tools.

These tools are focused on automatically generating as much as possible, and doing it in a way that can be regenerated at any time. This makes things more future-proof (for example, projects have often had to go back and do a lot of manual labelling when adding new binaries like rels, whereas that's handled automatically here), reduces bloat in the github repo, and reduces manual editing (which, in the case of undecompiled assembly, can be a big time saver - renaming symbols, splitting files, and correcting pointers for shiftability can be very tedious in most existing setups, whereas they're just quick yml edits here). The pointer tracking in disassembly is also more in-depth than that of doldisasm.py, so more of the work towards shiftability should be done already.

**These tools in an early state and therefore large changes may still happen. No backwards compatibility will be guaranteed.**

See [TOOLS.md](TOOLS.md) for information on each tool. (Documentation is currently pretty lacking, so feel free to reach out to me for help)

See the [Super Paper Mario Decompilation](https://github.com/SeekyCt/spm-decomp) for an example of a project using these tools.

## Building locally
Building this repository requires the existence of a `protoc` executable (protobuf compiler). To create wheel and source distributions:
```
pip install build
python -m build -s -w
```

To create editable installs, you currently have to manually invoke proto first (idk enough python to make stetuptools automatically do this).
```
protoc -Iproto --python_out=ppcdis proto/labelinfo.proto
protoc -Iproto --python_out=ppcdis proto/relocinfo.proto
```

## APIs

- The main API for these tools is the command line API
- A python API is exposed in the `ppcdis` folder for pure python build systems to make use of too
    - Generally, any new features for the python API should also be exposed by the command line API too
    - Importing anything that isn't included in `__init__.py` isn't officially supported
    - Like the rest of the project, the API won't be guaranteed any backwards compatibility (and is likely to change more than the command line API will). **This means users should not be required to install this globally (use something like venv instead), and that installs should be tied to a specific working version for the project**
- Installing the folder with pip can be used for the python API, but the command line API does not require this

## Credits

- camthesaxman for writing the original doldisasm.py
- riidefi, terorie and stebler for the [Mario Kart Wii Decompilation's tools](https://github.com/riidefi/mkw), which heavily inspired this
- All contributors to Tockdom's [DOL](https://wiki.tockdom.com/wiki/DOL_(File_Format)) and [REL](https://wiki.tockdom.com/wiki/REL_(File_Format)) file format documentation
