Skip to content
Buu342 edited this page Apr 11, 2023 · 5 revisions

Welcome to the UNFLoader wiki

This wiki contains information relevant to developers wishing to extend the UNFLoader tool and/or libraries.

These pages document useful information about the UNFLoader tool, the libraries, and the supported flashcarts. Explanations on how to extend the tool's functionalities are also provided.

For simplification of the documentation process, the pages were ordered in a specific way and it is recommended that you read the pages in the order they are numbered (as subsequent entries build on knowledge from the last ones). The chapters are short and will give you a very good overview of the program and libraries.

There are two competing SDKs for the N64, libultra and libdragon. To make the code nicer to read, the low level IO functions provided by the SDK have been wrapped into their own custom functions. These functions will be referenced throughout the wiki so it will help to be familiar with them. Here's a handy dandy table to help you quickly convert between the USB library's implementation and your SDK's:

USB Library libultra libdragon
usb_io_read osPiReadIo io_read
usb_io_write osPiWriteIo io_write
usb_dma_read osPiStartDma with OS_READ dma_read
usb_dma_write osPiStartDma with OS_WRITE dma_write
No wrapper exists osWritebackDCache data_cache_hit_writeback
No wrapper exists osInvalDCache data_cache_hit_invalidate
No wrapper exists osWritebackDCacheAll data_cache_hit_writeback_invalidate