Revert "Added function to check for newer emulators/hardware."

This reverts commit c267dd6ee6.

# TODOs changed:
# -: Needs to be updated if compiling for a different processor than the GBA's: 

# TODOs changed:
# -: Needs to be updated if compiling for a different processor than the GBA's: 

# TODOs changed:
# -: Needs to be updated if compiling for a different processor than the GBA's:
This commit is contained in:
Ariel A 2024-01-26 18:48:23 -05:00
parent 915f40c654
commit c990851473
2 changed files with 1 additions and 11 deletions

View file

@ -537,7 +537,7 @@ struct SaveBlock2
extern struct SaveBlock2 *gSaveBlock2Ptr;
extern bool8 IsAccurateGBA(void);
extern u8 UpdateSpritePaletteWithTime(u8);
struct SecretBaseParty
{

View file

@ -441,13 +441,3 @@ void ClearPokemonCrySongs(void)
{
CpuFill16(0, gPokemonCrySongs, MAX_POKEMON_CRIES * sizeof(struct PokemonCrySong));
}
// TODO: Needs to be updated if compiling for a different processor than the GBA's
bool8 IsAccurateGBA(void) { // tests to see whether running on either an accurate emulator in >=2020, or real hardware
u32 code[5] = {0xFF1EE12F, 0xE1DF00B0, 0xE12FFF1E, 0xAAAABBBB, 0xCCCCDDDD}; // ARM: _;ldrh r0, [pc];bx lr
u32 func = (u32) &code[0];
if (func & 3) // not word aligned; safer to just return false here
return FALSE;
func = (func & ~3) | 0x2; // misalign PC to test PC-relative loading
return ((u32 (*)(void)) func)() == code[3] >> 16;
}