-
-
Notifications
You must be signed in to change notification settings - Fork 212
GB_set_boot_rom_load_callback
Lior Halphon edited this page Nov 30, 2024
·
3 revisions
typedef enum {
GB_BOOT_ROM_DMG_0,
GB_BOOT_ROM_DMG,
GB_BOOT_ROM_MGB,
GB_BOOT_ROM_SGB,
GB_BOOT_ROM_SGB2,
GB_BOOT_ROM_CGB_0,
GB_BOOT_ROM_CGB,
GB_BOOT_ROM_CGB_E,
GB_BOOT_ROM_AGB_0,
GB_BOOT_ROM_AGB,
} GB_boot_rom_t;
typedef void (*GB_boot_rom_load_callback_t)(GB_gameboy_t *gb, GB_boot_rom_t type);
void GB_set_boot_rom_load_callback(GB_gameboy_t *gb, GB_boot_rom_load_callback_t callback);
In gb.h
Sets an optional but recommended callback that lets the emulator instance request a specific boot ROM. This callback is required to allow the GB_BORDER_ALWAYS
border mode to use Super Game Boy borders while emulating a non-Super Game Boy model. When the callback is called, the callee must call either GB_load_boot_rom or GB_load_boot_rom_from_buffer to load a suitable boot ROM before returning.
The possible values for GB_boot_rom_t
are:
-
GB_BOOT_ROM_DMG_0
: A boot ROM for the original DMG revision, usually saved asdmg0_boot.bin
-
GB_BOOT_ROM_DMG
: A boot ROM for all other DMG revisions, usually saved asdmg_boot.bin
-
GB_BOOT_ROM_MGB
: A boot ROM for the MGB, usually saved asmgb_boot.bin
-
GB_BOOT_ROM_SGB
: A boot ROM for the SGB, usually saved assgb_boot.bin
-
GB_BOOT_ROM_SGB2
: A boot ROM for the SGB2, usually saved assgb2_boot.bin
-
GB_BOOT_ROM_CGB_0
: A boot ROM for the original CGB revision, usually saved ascgb0_boot.bin
-
GB_BOOT_ROM_CGB
: A boot ROM for the CGB revisions A to D, usually saved ascgb_boot.bin
-
GB_BOOT_ROM_CGB_E
: A boot ROM for CGB revision E, usually saved ascgbE_boot.bin
- If this boot ROM revision is not available, the callback can safely fall back to treating this value as
GB_BOOT_ROM_CGB
.
- If this boot ROM revision is not available, the callback can safely fall back to treating this value as
-
GB_BOOT_ROM_AGB_0
: A boot ROM for the original AGB revision, usually saved asagb0_boot.bin
- If this boot ROM revision is not available, the callback can safely fall back to treating this value as
GB_BOOT_ROM_AGB
.
- If this boot ROM revision is not available, the callback can safely fall back to treating this value as
-
GB_BOOT_ROM_AGB
: A boot ROM for all other AGB revisions, usually saved asagb_boot.bin
GB_set_boot_rom_load_callback
is thread-safe and can be called from any thread and context.