GBDK 2020 Docs
4.4.0
API Documentation for GBDK 2020
|
Go to the source code of this file.
Macros | |
#define | MEGADUCK_HANDHELD_STANDARD 0u |
#define | MEGADUCK_LAPTOP_SPANISH 1u |
#define | MEGADUCK_LAPTOP_GERMAN 2u |
Functions | |
uint8_t | duck_check_model (void) |
#define MEGADUCK_HANDHELD_STANDARD 0u |
#define MEGADUCK_LAPTOP_SPANISH 1u |
#define MEGADUCK_LAPTOP_GERMAN 2u |
uint8_t duck_check_model | ( | void | ) |
Returns which MegaDuck Model the program is being run on
Possible models are:
This detection should be called immediately at the start of the program for most reliable results, since it relies on inspecting uncleared VRAM contents.
It works by checking for distinct font VRAM Tile Patterns (which aren't cleared before cart program launch) between the Spanish and German Laptop models which have slightly different character sets.
So VRAM must not be cleared or modified at program startup until after this function is called (not by the crt0.s, not by the program itself).