From c9908514736ac7406eb88a67b2d65ec8c6a5dc83 Mon Sep 17 00:00:00 2001 From: Ariel A <24759293+aarant@users.noreply.github.com> Date: Fri, 26 Jan 2024 18:48:23 -0500 Subject: [PATCH] Revert "Added function to check for newer emulators/hardware." This reverts commit c267dd6ee6e9766c70a1522adf6f0a812e337ae6. # 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: --- include/global.h | 2 +- src/main.c | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/global.h b/include/global.h index 92370fcdcd..ec091bb233 100644 --- a/include/global.h +++ b/include/global.h @@ -537,7 +537,7 @@ struct SaveBlock2 extern struct SaveBlock2 *gSaveBlock2Ptr; -extern bool8 IsAccurateGBA(void); +extern u8 UpdateSpritePaletteWithTime(u8); struct SecretBaseParty { diff --git a/src/main.c b/src/main.c index d4831b0e24..5f12a2996e 100644 --- a/src/main.c +++ b/src/main.c @@ -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; -}