Skip to content

Debugging N64 Roms with CEN64

Matthew LaRocca edited this page Oct 21, 2022 · 3 revisions

The N64 development container is setup to allow debugging with cen64 running on your host OS.

Configure cen64

On linux/Mac OS cen64 can easily be built by cloning the repo and building with CMake. On windows, it is easier to download a binary package from GitHub Actions

You will also need a pifdata.bin file to run the ROMs.

Debugging a ROM in Visual Studio Code

  1. Ensure that you have an active Debug Cmake variant
  2. Build the rom you wish to debug.
  3. Set breakpoints in the desired location of your code.
  4. Start cen64 using the -debug localhost:8080 parameter and point it to your newly built ROM. The emulator will start in a paused state. Note that you should not specify the multithread option to cen64 when using debugging.
  5. From the Visual Studio Code Run and Debug Panel click the gear icon to edit launch.json. Change the pats in the program and execFile sections to the correct path of the ROM you are debugging.
  6. Save the file and click the green triangle to start debugging.

Viewing Data Array via Pointer in VSCode:

Add an expression such as this to the watch window:

*(fw64Node(*)[15])scene->nodes
Clone this wiki locally