Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open source IPL3 alternative #42

Open
parasyte opened this issue Dec 28, 2020 · 2 comments
Open

Open source IPL3 alternative #42

parasyte opened this issue Dec 28, 2020 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@parasyte
Copy link
Collaborator

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.

@parasyte parasyte added enhancement New feature or request help wanted Extra attention is needed labels Dec 28, 2020
@moparisthebest
Copy link

Does https://github.com/hcs64/boot_stub meet the need? It doesn't have a license, but the comment says it's dedicated to the public domain.

@parasyte
Copy link
Collaborator Author

Unfortunately, that uses the RDRAM and cache init code from the official IPL3. But it's another one to add to the list. Thanks for the heads up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants