N64FlashcartMenu
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
flashcart.c File Reference

Flashcart functions implementation. More...

Functions

char * flashcart_convert_error_message (flashcart_err_t err)
 Convert a flashcart error code to a human-readable message.
 
flashcart_err_t flashcart_init (const char **storage_prefix)
 Initialize the flashcart.
 
flashcart_err_t flashcart_deinit (void)
 Deinitialize the flashcart.
 
bool flashcart_has_feature (flashcart_features_t feature)
 Check if the flashcart has a specific feature.
 
flashcart_firmware_version_t flashcart_get_firmware_version (void)
 Get the firmware version of the flashcart.
 
flashcart_err_t flashcart_load_rom (char *rom_path, bool byte_swap, flashcart_progress_callback_t *progress)
 Load a ROM into the flashcart.
 
flashcart_err_t flashcart_load_file (char *file_path, uint32_t rom_offset, uint32_t file_offset)
 Load a file into the flashcart.
 
flashcart_err_t flashcart_load_save (char *save_path, flashcart_save_type_t save_type)
 Load a save file into the flashcart.
 
flashcart_err_t flashcart_load_64dd_ipl (char *ipl_path, flashcart_progress_callback_t *progress)
 Load the 64DD IPL into the flashcart.
 
flashcart_err_t flashcart_load_64dd_disk (char *disk_path, flashcart_disk_parameters_t *disk_parameters)
 Load a 64DD disk into the flashcart.
 
flashcart_err_t flashcart_set_next_boot_mode (flashcart_reboot_mode_t boot_mode)
 

Detailed Description

Flashcart functions implementation.

Function Documentation

◆ flashcart_convert_error_message()

char * flashcart_convert_error_message ( flashcart_err_t err)

Convert a flashcart error code to a human-readable message.

Convert a flashcart error code to a human-readable error message.

Parameters
errThe flashcart error code.
Returns
char* The error message.

◆ flashcart_init()

flashcart_err_t flashcart_init ( const char ** storage_prefix)

Initialize the flashcart.

Parameters
storage_prefixPointer to the storage prefix.
Returns
flashcart_err_t Error code.

◆ flashcart_deinit()

flashcart_err_t flashcart_deinit ( void )

Deinitialize the flashcart.

Returns
flashcart_err_t Error code.

◆ flashcart_has_feature()

bool flashcart_has_feature ( flashcart_features_t feature)

Check if the flashcart has a specific feature.

Parameters
featureThe feature to check.
Returns
true if the feature is supported, false otherwise.

◆ flashcart_get_firmware_version()

flashcart_firmware_version_t flashcart_get_firmware_version ( void )

Get the firmware version of the flashcart.

Get the flashcart firmware version.

Returns
flashcart_firmware_version_t The firmware version.

◆ flashcart_load_rom()

flashcart_err_t flashcart_load_rom ( char * rom_path,
bool byte_swap,
flashcart_progress_callback_t * progress )

Load a ROM into the flashcart.

Load a ROM onto the flashcart.

Parameters
rom_pathPath to the ROM file.
byte_swapFlag indicating whether to byte swap the ROM.
progressProgress callback function.
Returns
flashcart_err_t Error code.

◆ flashcart_load_file()

flashcart_err_t flashcart_load_file ( char * file_path,
uint32_t rom_offset,
uint32_t file_offset )

Load a file into the flashcart.

Load a file onto the flashcart.

Parameters
file_pathPath to the file.
rom_offsetROM offset.
file_offsetFile offset.
Returns
flashcart_err_t Error code.

◆ flashcart_load_save()

flashcart_err_t flashcart_load_save ( char * save_path,
flashcart_save_type_t save_type )

Load a save file into the flashcart.

Load a save file onto the flashcart.

Parameters
save_pathPath to the save file.
save_typeThe save type.
Returns
flashcart_err_t Error code.

◆ flashcart_load_64dd_ipl()

flashcart_err_t flashcart_load_64dd_ipl ( char * ipl_path,
flashcart_progress_callback_t * progress )

Load the 64DD IPL into the flashcart.

Load the 64DD IPL (BIOS) onto the flashcart.

Parameters
ipl_pathPath to the IPL file.
progressProgress callback function.
Returns
flashcart_err_t Error code.

◆ flashcart_load_64dd_disk()

flashcart_err_t flashcart_load_64dd_disk ( char * disk_path,
flashcart_disk_parameters_t * disk_parameters )

Load a 64DD disk into the flashcart.

Load a 64DD disk onto the flashcart.

Parameters
disk_pathPath to the disk file.
disk_parametersPointer to the disk parameters.
Returns
flashcart_err_t Error code.