N64FlashcartMenu
Loading...
Searching...
No Matches
boot.h File Reference

Flashcart Boot Subsystem. More...

Go to the source code of this file.

Data Structures

struct  boot_params_t
 Boot Parameters Structure. More...
 

Enumerations

enum  boot_device_type_t { BOOT_DEVICE_TYPE_ROM = 0 , BOOT_DEVICE_TYPE_64DD = 1 }
 Boot device type enumeration. More...
 
enum  boot_reset_type_t { BOOT_RESET_TYPE_COLD = 0 , BOOT_RESET_TYPE_NMI = 1 }
 Reset type enumeration. More...
 
enum  boot_tv_type_t { BOOT_TV_TYPE_PAL = 0 , BOOT_TV_TYPE_NTSC = 1 , BOOT_TV_TYPE_MPAL = 2 , BOOT_TV_TYPE_PASSTHROUGH = 3 }
 TV type enumeration. More...
 

Functions

void boot (boot_params_t *params)
 Boot the system with the specified parameters.
 

Detailed Description

Flashcart Boot Subsystem.


Data Structure Documentation

◆ boot_params_t

struct boot_params_t

Boot Parameters Structure.

Data Fields
boot_device_type_t device_type

Type of boot device

boot_tv_type_t tv_type

TV type

uint8_t cic_seed

CIC seed

bool detect_cic_seed

Flag to detect CIC seed

uint32_t * cheat_list

Pointer to the cheat list

Enumeration Type Documentation

◆ boot_device_type_t

Boot device type enumeration.

Enumerator
BOOT_DEVICE_TYPE_ROM 

Boot from ROM

BOOT_DEVICE_TYPE_64DD 

Boot from 64DD

◆ boot_reset_type_t

Reset type enumeration.

Enumerator
BOOT_RESET_TYPE_COLD 

Cold reset

BOOT_RESET_TYPE_NMI 

Non-maskable interrupt reset

◆ boot_tv_type_t

TV type enumeration.

Enumerator
BOOT_TV_TYPE_PAL 

PAL TV type

BOOT_TV_TYPE_NTSC 

NTSC TV type

BOOT_TV_TYPE_MPAL 

MPAL TV type

BOOT_TV_TYPE_PASSTHROUGH 

Passthrough TV type

Function Documentation

◆ boot()

void boot ( boot_params_t * params)

Boot the system with the specified parameters.

Parameters
paramsPointer to the boot parameters structure.

Prepare system hardware, load reboot code and IPL3, install cheats, and transfer control to the reboot routine using the provided boot parameters.

This performs CIC detection (and optionally populates the CIC seed), normalizes passthrough TV type, configures and resets CPU/SP/PI/VI/AI state, programs PI DOM timing from the boot device, copies the reboot routine into SP IMEM and IPL3 into SP DMEM, installs cheats, arranges boot-time registers, and jumps to the in-memory reboot entry. If control returns, the function loops indefinitely.

Parameters
paramsBoot configuration and state. Fields read include device_type, tv_type, detect_cic_seed, and cheat_list. On return this function may modify params->tv_type (when passthrough normalization is applied) and params->cic_seed (when detect_cic_seed is true).