camthesaxman / pikmin2

A decompilation of Pikmin 2 (USA) brought to you by a bunch of clever folks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pikmin 2

Pikmin 2 decompilation to C++/C

- INFORMATION! -

The ROM this repository builds can be shifted! Meaning you are able to now
add and remove code as you see fit, for modding or research purposes.

It builds the following DOL: pikmin2.usa.dol: sha1: 90d328bf8f190c90472e8c19e7e53c6ad0fe0d1a

Credits

  • Revo
  • intns
  • EpochFlame
  • GibHaltmannKill
  • kiwi
  • shibboleet
  • wowjinxy
  • nerduminer
  • sodium
  • JHawk
  • Meeo

Building

Required Tools

Instructions

  • WINDOWS ONLY STEP:
    • Launch msys2(Provided by devkitPro) and run the command pacman -S gcc.
  • OPTIONAL:
    • Obtain a clean DOL of Pikmin 2 USA 1.0 and place it in the base working directory and rename it to baserom.dol.
  1. Download GC_WII_COMPILERS.zip from (https://cdn.discordapp.com/attachments/704241951972524063/801641758249320478/GC_WII_COMPILERS.zip) and extract it to tools/mwcc_compiler/.
  2. Create a copy of the 2.7 folder in tools/mwcc_compiler/ and name it 2.7e.
  3. Run the make command.

Modifications to the CW compiler

In order for a correct compile to occur, the v2.7 linker executable is modified as follows:

Offset From To
0x36510 0x74 0x75

The byte's value is changed from 0x74 to 0x75 at offset 0x36510 (fixes an issue regarding destructor generation)

When compiling the project, this patch is automatically applied, if it fails to patch you can also patch the executable yourself with a hex editor

Project Organisation

  • For each namespace that types and functions are contained within, create a folder. E.g. the structure Game::GameSystem will go in include/Game/GameSystem.h.
  • The exception is only when adding extra folders becomes useless, for example having to add multiple folders that are empty, you can instead opt for creating a header file with the namespace's definitions inside.
  • The project is actively formatted using .clang-format, for a consistent code style.

Progress

DONE

WIP

About

A decompilation of Pikmin 2 (USA) brought to you by a bunch of clever folks.


Languages

Language:Assembly 69.2%Language:C++ 28.7%Language:C 2.0%Language:Makefile 0.1%Language:Python 0.1%Language:Shell 0.0%