Skip to content

Open source IPL3 alternative #42

@parasyte

Description

@parasyte

cargo-n64 does not ship with an IPL ROM for copyright reasons, even though this code is required to cold boot a Nintendo 64. We should add a default open source IPL3, preferably one with MIT license (or equivalent).

I know of two open source IPL3s:

  1. https://github.com/PeterLemon/N64/tree/master/BOOTCODE It is unlicensed and looks like a direct copy of 6102.bin with some minor adjustments.
  2. https://github.com/pseudophpt/pseultra/blob/master/n64/boot/src/boot.sx Minimal implementation. Appears to be incomplete.

The biggest challenge is that IPL2 authenticates IPL3 with the PIF. Exact details of PIF authentication are out of scope for cargo-n64, but there is more on the topic in the links below:

This means that the easiest way to workaround the IPL2 checksum is including a custom CIC implementation with the IPL3 code that sends the appropriate precomputed checksum to the PIF.

Note that the IPL2 checksum is not a problem on emulators or on carts like 64Drive and EverDrive64. These carts include an UltraCIC implementation and boot into a menu (using CIC-NUS-6102).

The 64Drive has a special "USB mode" that makes the cart act like a bare N64 cart with a selectable CIC when powered on with a USB cable plugged in. When running a ROM created with a custom IPL3 in USB mode, it is necessary to reprogram the CIC emulation on the 64drive with the appropriate precomputed checksum. Unfortunately, this is not currently supported by 64drive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions