Skip to content

Environment Setup: Getting Started

Sammi Husky edited this page Oct 25, 2019 · 7 revisions

Getting started

NOTE: Either Windows Subsystem for Linux, MinGW, or a Mac/Linux system is required. This is due to essential developer tools such as make and git are needed. Setting these up properly will make your life easier.

  1. Install devkitpro (and devkitA64), make sure you have DEVKITPRO in path. Windows Subsystem for Linux is recommended for windows users. Instructions on how to do so can be found here: https://switchbrew.org/wiki/Setting_up_Development_Environment.
  2. Create a folder where ever you'd like to create your projects in the future. Think of this as your "workbench" of sorts.
  3. From within said folder, run the following commands:
git clone --recursive https://github.com/ultimate-research/code-mod-example.git
rm -rf code-mod-example/.git/

Creating a new project

NOTE: this section is written under the assumption that you are setup in a similar manner to the "Getting Started" section.

  1. Make a copy of the code-mod-example folder, name it whatever you'd like (this is just so you don't have to redownload the template every time you start a new project). Alternatively, if there has been an update, you may want to reclone the reposititory.
  2. Change the name of your code-mod-example folder to whatever you'd like your project to be named. The final plugin will be named after this folder.

Building and installing a project

To build our plugin, run the following command in the root of our project:

make clean && make

This will generate an elf which can be placed into SaltyNX's plugin folder (with SaltyNX already installed) in order to apply our functionality when the game launches.

Researching with GHIDRA

This section is likely only necessary if you would like to do code editing or further understand how exactly Ultimate implements some functionality.

The code in Ultimate can be found in many files, and all are precompiled binaries. So, in order to read or replace any functions, we'd recommend GHIDRA with the switch GHIDRA loader.

Clone this wiki locally