//Pascal &or the FreePascal use of nintendo 2ds, 3ds regime // // Copyright (c) 2013, 2015, 2017 Kenneth Dwayne Lee Bsc. // all rights reserved // type CFG_Region = (CFG_REGION_JPN := 0,CFG_REGION_USA := 1, CFG_REGION_EUR := 2,CFG_REGION_AUS := 3, CFG_REGION_CHN := 4,CFG_REGION_KOR := 5, CFG_REGION_TWN := 6); {/ Configuration language values. } {/< Japanese } {/< English } {/< French } {/< German } {/< Italian } {/< Spanish } {/< Simplified Chinese } {/< Korean } {/< Dutch } {/< Portugese } {/< Russian } {/< Traditional Chinese } CFG_Language = (CFG_LANGUAGE_JP := 0,CFG_LANGUAGE_EN := 1, CFG_LANGUAGE_FR := 2,CFG_LANGUAGE_DE := 3, CFG_LANGUAGE_IT := 4,CFG_LANGUAGE_ES := 5, CFG_LANGUAGE_ZH := 6,CFG_LANGUAGE_KO := 7, CFG_LANGUAGE_NL := 8,CFG_LANGUAGE_PT := 9, CFG_LANGUAGE_RU := 10,CFG_LANGUAGE_TW := 11 ); {/ Initializes CFGU. } function cfguInit:s32;cdecl;external; {/ Exits CFGU. } procedure cfguExit;cdecl;external; {* * @brief Gets the system's region from secure info. * @param region Pointer to output the region to. (see @ref CFG_Region) } function CFGU_SecureInfoGetRegion(region:Pu8):s32;cdecl;external; {* * @brief Generates a console-unique hash. * @param appIDSalt Salt to use. * @param hash Pointer to output the hash to. } function CFGU_GenHashConsoleUnique(appIDSalt:u32; hash:Pu64):s32;cdecl;external; {* * @brief Gets whether the system's region is Canada or USA. * @param value Pointer to output the s32 to. (0 = no, 1 = yes) } function CFGU_GetRegionCanadaUSA(value:Pu8):s32;cdecl;external; {* * @brief Gets the system's model. * @param model Pointer to output the model to. (0 = O3DS, 1 = O3DSXL, 2 = N3DS, 3 = 2DS, 4 = N3DSXL) } function CFGU_GetSystemModel(model:Pu8):s32;cdecl;external; {* * @brief Gets whether the system is a 2DS. * @param value Pointer to output the s32 to. (0 = yes, 1 = no) } function CFGU_GetModelNintendo2DS(value:Pu8):s32;cdecl;external; {* * @brief Gets a string representing a country code. * @param code Country code to use. * @param string Pointer to output the string to. } function CFGU_GetCountryCodeString(code:u16; _string:Pu16):s32;cdecl;external; {* * @brief Gets a country code ID from its string. * @param string String to use. * @param code Pointer to output the country code to. } function CFGU_GetCountryCodeID(_string:u16; code:Pu16):s32;cdecl;external; {* * @brief Gets a config info block with flags = 2. * @param size Size of the data to retrieve. * @param blkID ID of the block to retrieve. * @param outData Pointer to write the block data to. } function CFGU_GetConfigInfoBlk2(size:u32; blkID:u32; outData:Pu8):s32;cdecl;external; {* * @brief Gets a config info block with flags = 4. * @param size Size of the data to retrieve. * @param blkID ID of the block to retrieve. * @param outData Pointer to write the block data to. } function CFG_GetConfigInfoBlk4(size:u32; blkID:u32; outData:Pu8):s32;cdecl;external; {* * @brief Gets a config info block with flags = 8. * @param size Size of the data to retrieve. * @param blkID ID of the block to retrieve. * @param outData Pointer to write the block data to. } function CFG_GetConfigInfoBlk8(size:u32; blkID:u32; outData:Pu8):s32;cdecl;external; {* * @brief Sets a config info block with flags = 4. * @param size Size of the data to retrieve. * @param blkID ID of the block to retrieve. * @param inData Pointer to block data to write. } function CFG_SetConfigInfoBlk4(size:u32; blkID:u32; inData:Pu8):s32;cdecl;external; {* * @brief Sets a config info block with flags = 8. * @param size Size of the data to retrieve. * @param blkID ID of the block to retrieve. * @param inData Pointer to block data to write. } function CFG_SetConfigInfoBlk8(size:u32; blkID:u32; inData:Pu8):s32;cdecl;external; {* * @brief Writes the CFG buffer in memory to the savegame in NAND. } function CFG_UpdateConfigNANDSavegame:s32;cdecl;external; {* * @brief Gets the system's language. * @param language Pointer to write the language to. (see @ref CFG_Language) } function CFGU_GetSystemLanguage(language:Pu8):s32;cdecl;external;