Skip to content

Commit

Permalink
Filled in missing EU addresses (#212)
Browse files Browse the repository at this point in the history
With EU support in the decomp, it is now possible to precisely
identify the address of any NA/EU symbol when given an address
in the other game version. I updated the syncing script within the
decomp project to fill in any missing addresses between EU/NA
(mostly EU). There were a handful of cases where EU and NA were
pointing to different symbols, which I also ironed out.
  • Loading branch information
AnonymousRandomPerson authored Nov 23, 2023
1 parent a8602ee commit c4a1754
Show file tree
Hide file tree
Showing 27 changed files with 505 additions and 15 deletions.
2 changes: 1 addition & 1 deletion headers/data/overlay29.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ extern int32_t ATK_STAT_IDX;
extern int32_t ROLLOUT_DAMAGE_MULT_TABLE[10];
extern struct rgba MAP_COLOR_TABLE[9];
extern bool CORNER_CARDINAL_NEIGHBOR_IS_OPEN[4][8];
extern int16_t GUMMI_LIKE_STRING_IDS[4];
extern int16_t GUMMI_IQ_STRING_IDS[5];
extern int16_t GUMMI_LIKE_STRING_IDS[4];
extern int16_t DAMAGE_STRING_IDS[27];
extern struct dungeon* DUNGEON_PTR;
extern struct dungeon* DUNGEON_PTR_MASTER;
Expand Down
4 changes: 3 additions & 1 deletion headers/functions/arm7.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef HEADERS_FUNCTIONS_ARM7_H_
#define HEADERS_FUNCTIONS_ARM7_H_

void EntryArm7(void);
void _start_arm7(void);
void do_autoload_arm7(void);
void StartAutoloadDoneCallbackArm7(void);
void NitroSpMain(void);
void HardwareInterrupt(void);
void ReturnFromInterrupt(void);
Expand Down
2 changes: 1 addition & 1 deletion headers/functions/arm9.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include "arm9/itcm.h"

void SvcWaitByLoop(void);
void SvcSoftReset(void);
void SvcWaitByLoop(void);
void SvcCpuSet(void);
void _start(void);
void MIiUncompressBackward(void);
Expand Down
14 changes: 12 additions & 2 deletions symbols/arm7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ arm7:
Speaking generally, this is the program run by the Nintendo DS's secondary ARM7TDMI CPU, which handles the audio I/O, the touch screen, Wi-Fi functions, cryptography, and more.
Memory map: (binary is initially loaded at 0x2380000)
0x2380000-0x23801E8 => Contains EntryArm7 and two more methods, all related to memory mapping.
0x2380000-0x23801E8 => Contains _start_arm7 and two more methods, all related to memory mapping.
0x23801E8-0x238F7F0 => Mapped to 0x37F8000, contains NitroSpMain and functions crucial to execution.
0x238F7F0-0x23A7068 => Mapped to 0x27E0000, contains everything else that won't fit in the fast WRAM.
Note that while the length for the main EU/NA/JP block is defined as 0x27080 above, after memory mappings, the block located at that address is only a 0x1E8 long ENTRY block, containing 3 functions solely used for the initial memory mapping. The memory following this block is reused and its purpose is undocumented at the moment.
functions:
- name: EntryArm7
- name: _start_arm7
address:
EU: 0x2380000
NA: 0x2380000
Expand All @@ -56,6 +56,16 @@ arm7:
Once the memory mapping has been completed, a constant containing the address to NitroSpMain is loaded into a register (r1), and a `bx` branch will jump to NitroSpMain.
No params.
- name: do_autoload_arm7
address:
EU: 0x2380118
NA: 0x2380118
JP: 0x2380118
- name: StartAutoloadDoneCallbackArm7
address:
EU: 0x2380188
NA: 0x2380188
JP: 0x2380188
- name: NitroSpMain
address:
EU: 0x23801E8
Expand Down
Loading

0 comments on commit c4a1754

Please sign in to comment.