From aecfede1f34f2526b9c6b00cfa8948def28f3502 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Mon, 8 May 2023 15:25:33 -0700 Subject: [PATCH] move more files ram sections to sym files --- include/gba/defines.h | 1 + src/agb_flash.c | 11 ++++ src/bg_control.c | 12 ++-- src/bg_palette_buffer.c | 4 +- src/code_800C9CC.c | 2 +- src/debug.c | 4 +- src/dungeon_music.c | 3 +- src/dungeon_random.c | 2 +- src/exclusive_pokemon.c | 2 +- src/file_system.c | 14 ++--- src/friend_area.c | 4 +- src/game_options.c | 5 +- src/ground_main.c | 8 ++- src/input.c | 14 ++--- src/items.c | 8 +-- src/m4a.c | 24 ++++--- src/main.c | 8 +-- src/memory.c | 5 +- src/moves.c | 3 +- src/music.c | 17 +++-- src/other_random.c | 2 +- src/personality_test.c | 4 +- src/play_time.c | 4 +- src/pokemon.c | 3 +- src/random.c | 2 +- src/rescue_team_info.c | 4 +- src/save.c | 8 +-- sym_ewram.txt | 136 ++++++---------------------------------- sym_ewram2.txt | 119 +++++++---------------------------- 29 files changed, 139 insertions(+), 294 deletions(-) diff --git a/include/gba/defines.h b/include/gba/defines.h index 3dc76f63f..070cc77fe 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -8,6 +8,7 @@ #define IWRAM_DATA __attribute__((section("iwram_data"))) #define EWRAM_DATA __attribute__((section("ewram_data"))) +#define EWRAM_DATA_2 __attribute__((section("ewram_data_2"))) #define UNUSED __attribute__((unused)) #define NAKED __attribute__((naked)) diff --git a/src/agb_flash.c b/src/agb_flash.c index 11e2085a6..101995b9a 100644 --- a/src/agb_flash.c +++ b/src/agb_flash.c @@ -6,6 +6,17 @@ static u16 sTimerCount; static vu16 *sTimerReg; static u16 sSavedIme; +EWRAM_DATA_2 u8 gFlashTimeoutFlag = {0}; +EWRAM_DATA_2 u8 (*PollFlashStatus)(u8 *) = {0}; +EWRAM_DATA_2 u16 (*WaitForFlashWrite)(u8 phase, u8 *addr, u8 lastData) = {0}; +EWRAM_DATA_2 u16 (*ProgramFlashSector)(u16 sectorNum, u8 *src) = {0}; +EWRAM_DATA_2 const struct FlashType *gFlash = {0}; +// u16 (*ProgramFlashByte)(u16 sectorNum, u32 offset, u8 data); // not used in PMD: Red +EWRAM_DATA_2 u16 gFlashNumRemainingBytes = {0}; +EWRAM_DATA_2 u16 (*EraseFlashChip)() = {0}; +EWRAM_DATA_2 u16 (*EraseFlashSector)(u16 sectorNum) = {0}; +EWRAM_DATA_2 const u16 *gFlashMaxTime = {0}; + void SetReadFlash1(u16 *dest); void SwitchFlashBank(u8 bankNum) diff --git a/src/bg_control.c b/src/bg_control.c index 31f949cb4..afec0db32 100644 --- a/src/bg_control.c +++ b/src/bg_control.c @@ -2,13 +2,13 @@ #include "input.h" #include "bg.h" -EWRAM_DATA struct BGControlStruct gBG0Control; -EWRAM_DATA struct BGControlStruct gBG1Control; -EWRAM_DATA struct BGControlStruct gBG2Control; -EWRAM_DATA struct BGControlStruct gBG3Control; +EWRAM_DATA struct BGControlStruct gBG0Control = {0}; +EWRAM_DATA struct BGControlStruct gBG1Control = {0}; +EWRAM_DATA struct BGControlStruct gBG2Control = {0}; +EWRAM_DATA struct BGControlStruct gBG3Control = {0}; +EWRAM_DATA u8 gBldAlpha_CoeffA = {0}; +EWRAM_DATA u8 gBldAlpha_CoeffB = {0}; -EWRAM_DATA u8 gBldAlpha_CoeffA; -EWRAM_DATA u8 gBldAlpha_CoeffB; EWRAM_DATA u16 gBldAlpha; EWRAM_DATA u16 gBldCnt; EWRAM_DATA u8 gUnknown_202D7FE; diff --git a/src/bg_palette_buffer.c b/src/bg_palette_buffer.c index 6a1936265..e15280d39 100644 --- a/src/bg_palette_buffer.c +++ b/src/bg_palette_buffer.c @@ -3,8 +3,8 @@ #define BG_PALETTE_BUFFER_SIZE 512 #define BG_PALETTE_BUFFER_CHUNK_SIZE 16 -EWRAM_DATA u16 gBGPaletteBuffer[BG_PALETTE_BUFFER_SIZE]; -EWRAM_DATA bool8 gBGPaletteUsed[BG_PALETTE_BUFFER_SIZE / BG_PALETTE_BUFFER_CHUNK_SIZE]; +EWRAM_DATA bool8 gBGPaletteUsed[BG_PALETTE_BUFFER_SIZE / BG_PALETTE_BUFFER_CHUNK_SIZE] = {0}; +EWRAM_DATA u16 gBGPaletteBuffer[BG_PALETTE_BUFFER_SIZE] = {0}; extern void CpuCopy(void* src, void* dest, u32 size); diff --git a/src/code_800C9CC.c b/src/code_800C9CC.c index 17a45b714..5da46b6d1 100644 --- a/src/code_800C9CC.c +++ b/src/code_800C9CC.c @@ -5,8 +5,8 @@ void sub_800BA5C(); void xxx_update_bg_sound_input(); -extern u16 gRawKeyInput; extern u32 gUnknown_203B0B8; +extern u16 gRawKeyInput; void sub_800CB20(void) { diff --git a/src/debug.c b/src/debug.c index b6a6846df..fac6dea8e 100644 --- a/src/debug.c +++ b/src/debug.c @@ -7,8 +7,8 @@ extern void Hang(); static void FatalErrorHang(void) __attribute__((noreturn)); -extern bool32 gNDS_DebugEnabled; -extern u8 gUnknown_203B150; +EWRAM_DATA_2 bool32 gNDS_DebugEnabled = {0}; +EWRAM_DATA_2 u8 gUnknown_203B150 = {0}; ALIGNED(4) const char gFuncFileLineString[] = "func = '%s'\nfile = '%s' line = %5d"; diff --git a/src/dungeon_music.c b/src/dungeon_music.c index 4d4ae5ea3..549de2be6 100644 --- a/src/dungeon_music.c +++ b/src/dungeon_music.c @@ -16,7 +16,8 @@ struct unkStruct_202EE10 extern struct unkStruct_202EE10 gUnknown_202EE10; -extern u32 gUnknown_203B458; +EWRAM_DATA_2 u32 gUnknown_203B458 = {0}; + extern u8 *gUnknown_80FE6F4[]; extern u8 gUnknown_810AC60; // 0xC extern u8 gUnknown_810AC62; // 0xC diff --git a/src/dungeon_random.c b/src/dungeon_random.c index ad7bdf0ba..bcfc04e6e 100644 --- a/src/dungeon_random.c +++ b/src/dungeon_random.c @@ -1,7 +1,7 @@ #include "global.h" #include "dungeon_random.h" -extern u32 gDungeonRngState; +EWRAM_DATA_2 u32 gDungeonRngState = {0}; void InitDungeonRNG(u32 value) { diff --git a/src/exclusive_pokemon.c b/src/exclusive_pokemon.c index 4bdbb0fee..ae97d7595 100644 --- a/src/exclusive_pokemon.c +++ b/src/exclusive_pokemon.c @@ -27,7 +27,7 @@ const u8 filler_ex1[8] = }; extern struct ExclusivePokemonData *gUnknown_203B498; -EWRAM_DATA struct ExclusivePokemonData gExclusivePokemonInfo; +EWRAM_DATA struct ExclusivePokemonData gExclusivePokemonInfo = {0}; void LoadExclusivePokemon(void) diff --git a/src/file_system.c b/src/file_system.c index e2b78d4a8..232a2c36e 100644 --- a/src/file_system.c +++ b/src/file_system.c @@ -1,17 +1,17 @@ #include "global.h" #include "file_system.h" -extern struct OpenedFile gFileCache[64]; +EWRAM_DATA u32 gUnknown_202D2A4 = {0}; +EWRAM_DATA struct OpenedFile gFileCache[64] = {0}; +EWRAM_DATA u32 *gDecompressBufferPtr = {0}; +EWRAM_DATA u32 *gDecompressBufferStart = {0}; +EWRAM_DATA u32 gDecompressBufferCurrent = {0}; +EWRAM_DATA u32 gDecompressBufferByteInInt = {0}; -extern u32 gFileCacheCursorPosition; -extern u32 gUnknown_202D2A4; +EWRAM_DATA_2 u32 gFileCacheCursorPosition = {0}; extern const u32 gByteShiftLookup[4]; -extern u32 *gDecompressBufferPtr; -extern u32 *gDecompressBufferStart; -extern u32 gDecompressBufferCurrent; -extern u32 gDecompressBufferByteInInt; extern int sprintf(char *, const char *, ...); diff --git a/src/friend_area.c b/src/friend_area.c index 2e6c52808..139882e9a 100644 --- a/src/friend_area.c +++ b/src/friend_area.c @@ -5,8 +5,8 @@ #include "pokemon.h" #include "code_800D090.h" -bool8 gBoughtFriendAreas[NUM_FRIEND_AREAS]; -EWRAM_DATA bool8 *gFriendAreas; +EWRAM_DATA bool8 gBoughtFriendAreas[NUM_FRIEND_AREAS] = {0}; +EWRAM_DATA_2 bool8 *gFriendAreas = {0}; extern bool8 *gFriendAreas; diff --git a/src/game_options.c b/src/game_options.c index fe0619421..a662e5199 100644 --- a/src/game_options.c +++ b/src/game_options.c @@ -1,3 +1,4 @@ +#include "gba/defines.h" #include "global.h" #include "game_options.h" #include "code_8092334.h" @@ -16,8 +17,8 @@ struct unkStruct_8094CB0 extern struct WindowBG gWindowBGColors; -extern struct GameOptions *gGameOptionsRef; -extern struct GameOptions gGameOptions; +EWRAM_DATA_2 struct GameOptions *gGameOptionsRef = {0}; +EWRAM_DATA struct GameOptions gGameOptions = {0}; extern void SetWindowBGColor(void); extern void sub_80099F0(u32); diff --git a/src/ground_main.c b/src/ground_main.c index ce83e66e9..373d237ed 100644 --- a/src/ground_main.c +++ b/src/ground_main.c @@ -8,13 +8,15 @@ extern u32 gUnknown_20398A8; extern u32 gUnknown_20398AC; extern u32 gUnknown_20398B0; extern u32 gUnknown_20398B4; +extern u8 gUnknown_20398B8; extern u8 gUnknown_20398B9; extern u8 gUnknown_20398BA; +extern u16 gUnknown_20398BE; extern u32 gUnknown_20398C0; extern s16 gUnknown_20398C4; -extern u16 gUnknown_20398BE; -extern u8 gUnknown_203B49D; -extern u8 gUnknown_203B49C; + +EWRAM_DATA_2 u8 gUnknown_203B49C = {0}; +EWRAM_DATA_2 u8 gUnknown_203B49D = {0}; const char gUnknown_8115F5C[] = "GroundMain ground request %3d %3d"; const char gUnknown_8115F80[] = "GroundMain recue request %3d %3d"; diff --git a/src/input.c b/src/input.c index d1fca00fb..d5285952d 100644 --- a/src/input.c +++ b/src/input.c @@ -1,13 +1,13 @@ #include "global.h" #include "input.h" -EWRAM_DATA struct Inputs gRealInputs; -EWRAM_DATA struct UnusedInputStruct gUnusedInputsRelated; -EWRAM_DATA u32 gUnusedScrambledInputJunk; -EWRAM_DATA struct Inputs gBufferedInputs; -EWRAM_DATA struct Inputs gCurrentInputs; -EWRAM_DATA struct Inputs gLastInputs; -EWRAM_DATA struct InputTimers gInputTimers; +EWRAM_DATA struct Inputs gRealInputs = {0}; +EWRAM_DATA struct UnusedInputStruct gUnusedInputsRelated = {0}; +EWRAM_DATA u32 gUnusedScrambledInputJunk = {0}; +EWRAM_DATA struct Inputs gBufferedInputs = {0}; +EWRAM_DATA struct Inputs gCurrentInputs = {0}; +EWRAM_DATA struct Inputs gLastInputs = {0}; +EWRAM_DATA struct InputTimers gInputTimers = {0}; void ReadKeyInput(struct Inputs *r0); diff --git a/src/items.c b/src/items.c index da6682e3c..83ccac068 100644 --- a/src/items.c +++ b/src/items.c @@ -13,8 +13,6 @@ #include -extern struct TeamInventory *gTeamInventory_203B460; -extern struct TeamInventory gUnknown_20389A8; extern struct FileArchive gSystemFileArchive; extern const char gItemParaFileName[]; extern const char gUnknown_8109794[]; @@ -34,8 +32,10 @@ extern u8 gUnknown_8108F64[0x3f][32]; // some sort of bit lookup table extern s16 gTypeGummiIQBoost[0x12][NUMBER_OF_GUMMIS]; extern u8 gInvalidItemIDs[0x10]; -EWRAM_DATA struct OpenedFile *gItemParametersFile; -EWRAM_DATA struct ItemDataEntry *gItemParametersData; +EWRAM_DATA struct OpenedFile *gItemParametersFile = {0}; +EWRAM_DATA struct ItemDataEntry *gItemParametersData = {0}; +EWRAM_DATA struct TeamInventory gUnknown_20389A8 = {0}; +EWRAM_DATA_2 struct TeamInventory *gTeamInventory_203B460 = {0}; extern s32 sub_8090FEC(s32 a1, u8* a2, u8 a3); extern void sub_80073B8(u32); diff --git a/src/m4a.c b/src/m4a.c index 37ab0afde..1af358097 100644 --- a/src/m4a.c +++ b/src/m4a.c @@ -6,17 +6,21 @@ extern const u8 gCgb3Vol[]; IWRAM_DATA char SoundMainRAM_Buffer[0x400] = {0}; -extern struct MusicPlayerInfo gMPlayInfo_SE4; -extern struct MusicPlayerInfo gMPlayInfo_SE5; -extern struct MusicPlayerInfo gMPlayInfo_BGM; // BGM?? -extern struct MusicPlayerInfo gMPlayInfo_SE6; -extern struct MusicPlayerInfo gMPlayInfo_Fanfare; -extern struct MusicPlayerInfo gMPlayInfo_SE1; -extern struct MusicPlayerInfo gMPlayInfo_SE3; -extern struct MusicPlayerInfo gMPlayInfo_SE2; - -extern struct SoundInfo gSoundInfo; +EWRAM_DATA struct MusicPlayerInfo gMPlayInfo_SE4 = {0}; +EWRAM_DATA struct MusicPlayerInfo gMPlayInfo_SE5 = {0}; +EWRAM_DATA struct MusicPlayerInfo gMPlayInfo_BGM = {0}; // BGM?? +EWRAM_DATA struct MusicPlayerInfo gMPlayInfo_SE6 = {0}; +EWRAM_DATA struct MusicPlayerInfo gMPlayInfo_Fanfare = {0}; +EWRAM_DATA struct MusicPlayerInfo gMPlayInfo_SE1 = {0}; +EWRAM_DATA struct MusicPlayerInfo gMPlayInfo_SE3 = {0}; +EWRAM_DATA u8 gMPlayMemAccArea[0x10] = {0}; +EWRAM_DATA struct MusicPlayerInfo gMPlayInfo_SE2 = {0}; +EWRAM_DATA_2 struct SoundInfo gSoundInfo = {0}; +EWRAM_DATA_2 MPlayFunc gMPlayJumpTable[0x22] = {0}; +EWRAM_DATA_2 u32 gUnknown_203AF08 = {0}; +EWRAM_DATA_2 u32 gUnknown_203AF0C = {0}; +EWRAM_DATA_2 struct CgbChannel gCgbChans[4] = {0}; u32 MidiKeyToFreq(struct WaveData *wav, u8 key, u8 fineAdjust) { diff --git a/src/main.c b/src/main.c index 120b08e4d..a8c90c3b2 100644 --- a/src/main.c +++ b/src/main.c @@ -8,12 +8,12 @@ extern char ewram_start[]; typedef void (*IntrCallback)(void); -EWRAM_DATA u8 IntrMain_Buffer[0x120]; -EWRAM_DATA IntrCallback gIntrTable[6]; -EWRAM_DATA IntrCallback gIntrCallbacks[6]; +EWRAM_DATA u8 IntrMain_Buffer[0x120] = {0}; +EWRAM_DATA IntrCallback gIntrTable[6] = {0}; +EWRAM_DATA IntrCallback gIntrCallbacks[6] = {0}; extern u16 gBldCnt; extern u8 gUnknown_202D7FE; -extern u8 gInterruptsEnabled; +EWRAM_DATA_2 u8 gInterruptsEnabled = {0}; extern u16 gUnknown_203B0AC; extern s16 gUnknown_203B0AE; diff --git a/src/memory.c b/src/memory.c index 3ac877201..92f43c1a7 100644 --- a/src/memory.c +++ b/src/memory.c @@ -3,9 +3,10 @@ extern struct HeapFreeListElement gMainHeapFreeList[32]; extern u8 gMainHeap[HEAP_SIZE]; -extern u32 gHeapCount; extern struct HeapDescriptor gMainHeapDescriptor; -extern struct HeapDescriptor *gHeapDescriptorList[8]; + +EWRAM_DATA struct HeapDescriptor *gHeapDescriptorList[8] = {0}; +EWRAM_DATA u32 gHeapCount = {0}; extern void CpuClear(u32 *dest, s32 size); diff --git a/src/moves.c b/src/moves.c index ab5383007..86df447e2 100644 --- a/src/moves.c +++ b/src/moves.c @@ -25,6 +25,7 @@ struct MoveDataFile extern struct unkStruct_80928C0 gUnknown_81098C4; extern struct FileArchive gSystemFileArchive; + extern struct OpenedFile *gWazaParametersFile; extern struct MoveDataEntry *gMovesData; extern struct MoveLearnset *gMoveLearnsets[420]; @@ -1659,4 +1660,4 @@ bool8 DoesMoveCharge(u16 move) if(move == MOVE_DIG) return TRUE; return FALSE; -} \ No newline at end of file +} diff --git a/src/music.c b/src/music.c index 2e5ad1907..07edf2fd9 100644 --- a/src/music.c +++ b/src/music.c @@ -3,17 +3,14 @@ #include "music.h" #include "constants/bg_music.h" -EWRAM_DATA u16 gBGMusicPlayerState; -EWRAM_DATA u16 gCurrentBGSong; -EWRAM_DATA u16 gQueuedBGSong; -EWRAM_DATA u16 gCurrentFanfareSong; -EWRAM_DATA u16 gFanfareMusicPlayerState; -EWRAM_DATA u16 gMusicTransitionCounter; -EWRAM_DATA bool8 gRestartBGM; +EWRAM_DATA u16 gBGMusicPlayerState = {0}; +EWRAM_DATA u16 gCurrentBGSong = {0}; +EWRAM_DATA u16 gQueuedBGSong = {0}; +EWRAM_DATA u16 gCurrentFanfareSong = {0}; +EWRAM_DATA u16 gFanfareMusicPlayerState = {0}; +EWRAM_DATA u16 gMusicTransitionCounter = {0}; +EWRAM_DATA bool8 gRestartBGM = {0}; -extern struct MusicPlayerInfo gMPlayInfo_BGM; // BGM?? - -// IWRAM IWRAM_DATA struct PMDMusicPlayer gBGMusicPlayers[NUM_BG_PLAYERS] = {0}; IWRAM_DATA struct PMDMusicPlayer gSEMusicPlayers[NUM_SE_PLAYERS] = {0}; diff --git a/src/other_random.c b/src/other_random.c index 7f390d99a..6e96397e2 100644 --- a/src/other_random.c +++ b/src/other_random.c @@ -1,7 +1,7 @@ #include "global.h" #include "other_random.h" -extern u16 gOtherRngState; +EWRAM_DATA_2 u16 gOtherRngState = {0}; static s32 OtherRandom16(void) { diff --git a/src/personality_test.c b/src/personality_test.c index 9333b835c..be6930cff 100644 --- a/src/personality_test.c +++ b/src/personality_test.c @@ -34,8 +34,8 @@ enum PERSONALITY_TEST_END, }; -EWRAM_DATA struct PersonalityTestTracker *gPersonalityTestTracker; -EWRAM_DATA struct PersonalityStruct_203B404 *gUnknown_203B404; +EWRAM_DATA_2 struct PersonalityTestTracker *gPersonalityTestTracker = {0}; +EWRAM_DATA_2 struct PersonalityStruct_203B404 *gUnknown_203B404 = {0}; extern void sub_801317C(u32 *); diff --git a/src/play_time.c b/src/play_time.c index 97a9754da..ce531c552 100644 --- a/src/play_time.c +++ b/src/play_time.c @@ -2,8 +2,8 @@ #include "play_time.h" #include "code_8092334.h" -extern struct PlayTimeStruct *gPlayTimeRef; -EWRAM_DATA struct PlayTimeStruct gPlayTime; +EWRAM_DATA_2 struct PlayTimeStruct *gPlayTimeRef = {0}; +EWRAM_DATA struct PlayTimeStruct gPlayTime = {0}; void InitializePlayTime(void) diff --git a/src/pokemon.c b/src/pokemon.c index ccd01e234..bbd331e35 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8,9 +8,10 @@ extern const char gUnknown_81075F4; EWRAM_DATA struct MonsterDataEntry *gMonsterParameters; EWRAM_DATA struct OpenedFile *gMonsterParametersFile; EWRAM_DATA struct unkStruct_203B45C gRecruitedPokemon; -extern struct unkStruct_203B45C *gRecruitedPokemonRef; EWRAM_DATA u16 gLevelCurrentPokeId; +EWRAM_DATA_2 struct unkStruct_203B45C *gRecruitedPokemonRef = {0}; + void LoadMonsterParameters(void) { diff --git a/src/random.c b/src/random.c index 3f992f581..864f0b107 100644 --- a/src/random.c +++ b/src/random.c @@ -1,7 +1,7 @@ #include "global.h" #include "random.h" -extern s32 gPRNGSequenceNum; +EWRAM_DATA_2 s32 gPRNGSequenceNum = {0}; void SeedRng(u8 *seed) { diff --git a/src/rescue_team_info.c b/src/rescue_team_info.c index a2493fd8b..cd3c8f02c 100644 --- a/src/rescue_team_info.c +++ b/src/rescue_team_info.c @@ -2,8 +2,8 @@ #include "rescue_team_info.h" #include "code_8092334.h" -extern struct RescueTeamData *gRescueTeamInfoRef; -EWRAM_DATA struct RescueTeamData gRescueTeamInfo; +EWRAM_DATA_2 struct RescueTeamData *gRescueTeamInfoRef = {0}; +EWRAM_DATA struct RescueTeamData gRescueTeamInfo = {0}; extern bool8 sub_80023E4(u32); extern void sub_80922B4(u8 *buffer, u8 *string, s32 size); diff --git a/src/save.c b/src/save.c index 9caa813a7..3a593fc64 100644 --- a/src/save.c +++ b/src/save.c @@ -34,7 +34,7 @@ struct SavePakRead u32 readStatus; }; -EWRAM_DATA struct SavePakRead *gSavePakRead; +EWRAM_DATA_2 struct SavePakRead *gSavePakRead = {0}; struct SavePakWrite { @@ -52,7 +52,7 @@ struct SavePakWrite u16 pokeID; }; -EWRAM_DATA struct SavePakWrite *gSavePakWrite; +EWRAM_DATA_2 struct SavePakWrite *gSavePakWrite = {0}; struct QuickSaveRead { @@ -61,7 +61,7 @@ struct QuickSaveRead u32 size; bool8 saveValid; }; -EWRAM_DATA struct QuickSaveRead *gQuickSaveRead; +EWRAM_DATA_2 struct QuickSaveRead *gQuickSaveRead = {0}; struct QuickSaveWrite { @@ -71,7 +71,7 @@ struct QuickSaveWrite u8 unkC; u32 quickSaveStatus; }; -EWRAM_DATA struct QuickSaveWrite *gQuickSaveWrite; +EWRAM_DATA_2 struct QuickSaveWrite *gQuickSaveWrite = {0}; extern s32 gUnknown_202DE28; diff --git a/sym_ewram.txt b/sym_ewram.txt index db77488b0..f052bbc6a 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1,30 +1,5 @@ -gMPlayInfo_SE4: /* 2000870 */ - .space 0x40 - -gMPlayInfo_SE5: /* 20008B0 */ - .space 0x40 - -gMPlayInfo_BGM: /* 20008F0 */ - .space 0x40 - -gMPlayInfo_SE6: /* 2000930 */ - .space 0x40 - -gMPlayInfo_Fanfare: /* 2000970 */ - .space 0x40 - -gMPlayInfo_SE1: /* 20009B0 */ - .space 0x40 - -gMPlayInfo_SE3: /* 20009F0 */ - .space 0x40 - -gMPlayMemAccArea: /* 2000A30 */ - .space 0x10 - -gMPlayInfo_SE2: /* 2000A40 */ - .space 0x40 + .include "src/m4a.o" gUnknown_2000A80: /* 2000A80 */ .space 0x8 @@ -32,11 +7,7 @@ gUnknown_2000A80: /* 2000A80 */ gUnknown_2000A88: /* 2000A88 */ .space 0x400 -gHeapDescriptorList: /* 2000E88 */ - .space 0x20 - -gHeapCount: /* 2000EA8 */ - .space 0x4 + .include "src/memory.o" .align 4 @@ -49,11 +20,7 @@ gMainHeapFreeList: /* 2000ED0 */ gMainHeap: /* 20011D0 */ .space 0x24000 -gBGPaletteUsed: /* 20251D0 */ - .space 0x20 - -gBGPaletteBuffer: /* 20251F0 */ - .space 0x400 + .include "src/bg_palette_buffer.o" gRealInputs: /* 20255F0 */ .space 0x10 @@ -256,32 +223,8 @@ gUnknown_202D240: /* 202D240 */ gUnknown_202D2A0: /* 202D2A0 */ .space 0x4 -gUnknown_202D2A4: /* 202D2A4 */ - .space 0x4 - -gFileCache: /* 202D2A8 */ - .space 0x200 - -gDecompressBufferPtr: /* 202D4A8 */ - .space 0x4 - -gDecompressBufferStart: /* 202D4AC */ - .space 0x4 - -gDecompressBufferCurrent: /* 202D4B0 */ - .space 0x4 - -gDecompressBufferByteInInt: /* 202D4B4 */ - .space 0x4 - -IntrMain_Buffer: /* 202D4B8 */ - .space 0x120 - -gIntrTable: /* 202D5D8 */ - .space 0x18 - -gIntrCallbacks: /* 202D5F0 */ - .space 0x18 + .include "src/file_system.o" + .include "src/main.o" gUnknown_202D608: /* 202D608 */ .space 0x40 @@ -289,44 +232,11 @@ gUnknown_202D608: /* 202D608 */ gUnknown_202D648: /* 202D648 */ .space 0x40 -gBGMusicPlayerState: /* 202D688 */ - .space 0x2 + .include "src/music.o" + .space 0x3 -gCurrentBGSong: /* 202D68A */ - .space 0x2 - -gQueuedBGSong: /* 202D68C */ - .space 0x2 - -gCurrentFanfareSong: /* 202D68E */ - .space 0x2 - -gFanfareMusicPlayerState: /* 202D690 */ - .space 0x2 - -gMusicTransitionCounter: /* 202D692 */ - .space 0x2 - -gRestartBGM: /* 202D694 */ - .space 0x4 - -gBG0Control: /* 202D698 */ - .space 0x8 - -gBG1Control: /* 202D6A0 */ - .space 0x8 - -gBG2Control: /* 202D6A8 */ - .space 0x8 - -gBG3Control: /* 202D6B0 */ - .space 0x8 - -gBldAlpha_CoeffA: /* 202D6B8 */ - .space 0x1 - -gBldAlpha_CoeffB: /* 202D6B9 */ - .space 0x141 + .include "src/bg_control.o" + .space 0x140 gBldAlpha: /* 202D7FA */ .space 0x2 @@ -887,20 +797,13 @@ gLevelCurrentPokeId: /* 20384E8 */ gLevelCurrentData: /* 20384F0 */ .space 0x4B0 -gItemParametersFile: /* 20389A0 */ + .include "src/items.o" + + .include "src/rescue_team_info.o" .space 0x4 -gItemParametersData: /* 20389A4 */ - .space 0x4 - -gUnknown_20389A8: /* 20389A8 */ - .space 0x268 - -gRescueTeamInfo: /* 2038C10 */ - .space 0x18 - -gBoughtFriendAreas: /* 2038C28 (one byte for each friend area) */ - .space 0x3C + .include "src/friend_area.o" + .space 0x2 gWazaParametersFile: /* 2038C64 */ .space 0x4 @@ -911,11 +814,8 @@ gMovesData: /* 2038C68 */ gMoveLearnsets: /* 2038C6C */ .space 0x4 -gGameOptions: /* 2038C70 */ - .space 0x10 - -gPlayTime: /* 2038C80 */ - .space 0x8 + .include "src/game_options.o" + .include "src/play_time.o" gUnknown_2038C88: /* 2038C88 */ .space 0x600 @@ -935,8 +835,8 @@ gUnknown_2039448: /* 2039448 */ gUnknown_2039778: /* 2039778 */ .space 0xC8 -gExclusivePokemonInfo: /* 2039840 */ - .space 0x68 +.include "src/exclusive_pokemon.o" +.space 0x4 gUnknown_20398A8: /* 20398A8 */ .space 0x4 diff --git a/sym_ewram2.txt b/sym_ewram2.txt index 127a59442..f650dd005 100644 --- a/sym_ewram2.txt +++ b/sym_ewram2.txt @@ -1,46 +1,7 @@ .align 2 -gSoundInfo: /* 2039ED0 */ - .space 0xFB0 - -gMPlayJumpTable: /* 203AE80 */ - .space 0x88 - -gUnknown_203AF08: /* 203AF08 */ - .space 0x4 - -gUnknown_203AF0C: /* 203AF0C */ - .space 0x4 - -gCgbChans: /* 203AF10 */ - .space 0x100 - -gFlashTimeoutFlag: /* 203B010 */ - .space 0x4 - -PollFlashStatus: /* 203B014 */ - .space 0x4 - -WaitForFlashWrite: /* 203B018 */ - .space 0x4 - -ProgramFlashSector: /* 203B01C */ - .space 0x4 - -gFlash: /* 203B020 */ - .space 0x4 - -gFlashNumRemainingBytes: /* 203B024 */ - .space 0x4 - -EraseFlashChip: /* 203B028 */ - .space 0x4 - -EraseFlashSector: /* 203B02C */ - .space 0x4 - -gFlashMaxTime: /* 203B030 */ - .space 0x4 + .include "src/m4a.o" + .include "src/agb_flash.o" errno: /* 203B034 */ .space 0x4 @@ -56,8 +17,9 @@ gUnknown_203B03C: /* 203B03C */ gUnknown_203B040: /* 203B040 */ .space 0x30 -gOtherRngState: /* 203B070 */ - .space 0x4 + .include "src/other_random.o" + + .space 0x2 gUnknown_203B074: /* 203B074 */ .space 0x4 @@ -65,8 +27,7 @@ gUnknown_203B074: /* 203B074 */ gUnknown_203B078: /* 203B078 */ .space 0x4 -gPRNGSequenceNum: /* 203B07C */ - .space 0x4 + .include "src/random.o" gUnknown_203B080: /* 203B080 */ .space 0x4 @@ -83,11 +44,8 @@ gUnknown_203B08C: /* 203B08C */ gUnknown_203B090: /* 203B090 */ .space 0x4 -gFileCacheCursorPosition: /* 203B094 */ - .space 0x4 - -gInterruptsEnabled: /* 203B098 */ - .space 0x1 + .include "src/file_system.o" + .include "src/main.o" gUnknown_203B099: /* 203B099 */ .space 0x1 @@ -161,11 +119,8 @@ gUnknown_203B0E8: /* 203B0E8 */ gUnknown_203B0EC: /* 203B0EC */ .space 0x60 -gNDS_DebugEnabled: /* 203B14C */ - .space 0x4 - -gUnknown_203B150: /* 203B150 */ - .space 0x2C + .include "src/debug.o" + .space 0x2B gUnknown_203B17C: /* 203B17C */ .space 0x4 @@ -176,17 +131,7 @@ gUnknown_203B180: /* 203B180 */ gUnknown_203B184: /* 203B184 */ .space 0x4 -gSavePakRead: /* 203B188 */ - .space 0x4 - -gSavePakWrite: /* 203B18C */ - .space 0x4 - -gQuickSaveRead: /* 203B190 */ - .space 0x4 - -gQuickSaveWrite: /* 203B194 */ - .space 0x4 +.include "src/save.o" gUnknown_203B198: /* 203B198 */ .space 0x60 @@ -524,11 +469,7 @@ gUnknown_203B3F8: /* 203B3F8 */ gUnknown_203B3FC: /* 203B3FC */ .space 0x4 -gPersonalityTestTracker: /* 203B400 */ - .space 0x4 - -gUnknown_203B404: /* 203B404 */ - .space 0x4 + .include "src/personality_test.o" gUnknown_203B408: /* 203B408 */ .space 0x4 @@ -578,26 +519,13 @@ gUnknown_203B444: /* 203B444 */ gLeaderPointer: /* 203B450 */ .space 0x4 -gDungeonRngState: /* 203B454 */ - .space 0x4 - -gUnknown_203B458: /* 203B458 */ - .space 0x4 - -gRecruitedPokemonRef: /* 203B45C */ - .space 0x4 - -gTeamInventory_203B460: /* 203B460 */ - .space 0x4 - -gRescueTeamInfoRef: /* 203B464 */ - .space 0x4 - -gFriendAreas: /* 203B468 */ - .space 0x4 - -gGameOptionsRef: /* 203B46C */ - .space 0x4 + .include "src/dungeon_random.o" + .include "src/dungeon_music.o" + .include "src/pokemon.o" + .include "src/items.o" + .include "src/rescue_team_info.o" + .include "src/friend_area.o" + .include "src/game_options.o" gUnknown_203B470: /* 203B470 */ .space 0x4 @@ -605,8 +533,7 @@ gUnknown_203B470: /* 203B470 */ gUnknown_203B474: /* 203B474 */ .space 0x8 -gPlayTimeRef: /* 203B47C */ - .space 0x4 + .include "src/play_time.o" gUnknown_203B480: /* 203B480 */ .space 0x4 @@ -629,11 +556,9 @@ gUnknown_203B494: /* 203B494 */ gUnknown_203B498: /* 203B498 */ .space 0x4 -gUnknown_203B49C: /* 203B49C */ - .space 0x1 -gUnknown_203B49D: /* 203B49D */ - .space 0x3 + .include "src/ground_main.o" + .space 0x2 gUnknown_203B4A0: /* 203B4A0 */ .space 0xC