intns / dpostproc

A set of tools developed in C# aiding disassembly and conversion of PowerPC to C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dpostproc

Decompilation post-processing

VTBL Generator

This tool generates C++ source code from a supplied virtual table in the console.

Example

Input:

__vt__Q24Game17EnemyAnimKeyEvent:
.4byte 0
.4byte 0
.4byte __dt__Q24Game17EnemyAnimKeyEventFv
.4byte getChildCount__5CNodeFv

Output:

struct CNode {
        virtual ~CNode();             // _00
        virtual void getChildCount(); // _04

        // _00 VTBL

};

namespace Game {
struct EnemyAnimKeyEvent : public CNode {
        virtual ~EnemyAnimKeyEvent(); // _00
        virtual void getChildCount(); // _04

        // _00 VTBL

};
} // namespace Game

The CNode class is not within the Game namespace, and as such this inconsistent scoping is accounted for when implementing the tool's output.

Shifter

This tool recognises and fixes hardcoded addresses in .s files, this "fix" is a simple annotation using a label and then referencing the label where the address is found.

You will have to do extra searches for false positives and .data to .data pointers, although this solution can decrease the amount of pointers from tens of thousands to hundreds, making it much quicker and easier for shiftability to occur (hence the name Shifter).

Common Decomp Filler

This is a "multi-tool" of sorts, the tool is only made for mapdas generated projects. Features:

  • Asks the user for known namespaces, for scope correction of functions
  • Fixes constructor / destructor functions (would have "void" prefixed)
  • Fixes certain improper const implementations from earlier versions of mapdas
  • Recognises simple ASM patterns and fills the code in automatically, such as:
    • "blr" functions (an empty function)
    • "li" -> "blr" functions that reference r3, so as to simply return a numeric value (automatically sets return value to u32 or s32)
    • "stw", "sth", "stb" functions where it can a) set a single member variable to an argument OR b) setting a single member variable to a constant
  • Adds an #include "types.h" to the start of each .cpp file if needed, to make sure it is compatible with the automatically generated code

About

A set of tools developed in C# aiding disassembly and conversion of PowerPC to C++

License:The Unlicense


Languages

Language:C# 100.0%