some effect symbols (#1210)

This commit is contained in:
z64a 2024-09-30 00:03:14 -04:00 committed by GitHub
parent ba9d8213d8
commit ba4499e2a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 20 additions and 17 deletions

View File

@ -5,11 +5,13 @@
typedef s32 TlbEntry[0x1000 / 4];
typedef TlbEntry TlbMappablePage[15];
#define EFFECT_GLOBALS_TLB_IDX 0x10
BSS EffectGraphics gEffectGraphicsData[15];
EffectInstance* gEffectInstances[96];
extern TlbMappablePage D_80197000;
extern Addr D_801A6000;
extern TlbMappablePage gEffectDataBuffer;
extern Addr gEffectGlobals;
#define FX_ENTRY(name, gfx_name) { \
name##_main, effect_##name##_ROM_START, effect_##name##_ROM_END, effect_##name##_VRAM, gfx_name##_ROM_START, \
@ -44,8 +46,8 @@ void clear_effect_data(void) {
}
osUnmapTLBAll();
osMapTLB(0x10, NULL, _325AD0_VRAM, (s32)&D_801A6000 & 0xFFFFFF, -1, -1);
DMA_COPY_SEGMENT(_325AD0);
osMapTLB(EFFECT_GLOBALS_TLB_IDX, OS_PM_4K, effect_globals_VRAM, (s32)&gEffectGlobals & 0xFFFFFF, -1, -1);
DMA_COPY_SEGMENT(effect_globals);
}
void func_80059D48(void) {
@ -320,7 +322,7 @@ s32 load_effect(s32 effectIndex) {
ASSERT(i < ARRAY_COUNT(gEffectGraphicsData));
// Map space for the effect
tlbMappablePages = &D_80197000;
tlbMappablePages = &gEffectDataBuffer;
osMapTLB(i, OS_PM_4K, effectEntry->dmaDest, (s32)((*tlbMappablePages)[i]) & 0xFFFFFF, -1, -1);
// Copy the effect into the newly mapped space

View File

@ -5,8 +5,8 @@
typedef s32 TlbEntry[0x1000 / 4];
typedef TlbEntry TlbMappablePage[15];
BSS TlbMappablePage D_80197000 ALIGNED(0x1000);
BSS u8 D_801A6000[0x1000] ALIGNED(0x1000);
BSS TlbMappablePage gEffectDataBuffer ALIGNED(0x1000);
BSS u8 gEffectGlobals[0x1000] ALIGNED(0x1000);
BSS u8 BattleEntityHeapBottom[0x3000] ALIGNED(0x1000);
BSS u8 AuHeapBase[AUDIO_HEAP_SIZE] ALIGNED(0x1000);
BSS u8 D_80200000[0x4000] ALIGNED(0x1000);

View File

@ -1562,12 +1562,12 @@ segments:
###############
### Effects ###
###############
- name: 325AD0
- name: effect_globals
type: code
start: 0x36E520
vram: 0xE0200000
subsegments:
- [auto, c, 325AD0]
- [auto, c, effect_utils]
- [0x36E930, pm_effect_shims, effect_shims]
- [0x36EBB0]
- name: effect_gfx_big_smoke_puff

View File

@ -1490,12 +1490,12 @@ segments:
###############
### Effects ###
###############
- name: 325AD0
- name: effect_globals
type: code
start: 0x32DDD0
vram: 0xE0200000
subsegments:
- [0x32DDD0, c, 325AD0]
- [0x32DDD0, c, effect_utils]
- [0x32E1E0, pm_effect_shims, effect_shims]
- [0x32E460]
- name: effect_gfx_big_smoke_puff

View File

@ -52,8 +52,8 @@ obfuscated_obfuscation_shims_VRAM = 0x7599F6D8;
obfuscated_obfuscation_shims_ROM_START = 0xF79E611F;
// subsequent segments
D_80197000 = 0x80197000;
D_801A6000 = 0x801A6000;
gEffectDataBuffer = 0x80197000;
gEffectGlobals = 0x801A6000;
AuHeapBase = 0x801AA000;
D_80200000 = 0x80200000;
gBackgroundImage = 0x80200000;

View File

@ -1177,12 +1177,12 @@ segments:
###############
### Effects ###
###############
- name: 325AD0
- name: effect_globals
type: code
start: 0x34E890
vram: 0xE0200000
subsegments:
- [0x34E890, c, 325AD0]
- [0x34E890, c, effect_utils]
- [0x34ECA0, pm_effect_shims, effect_shims]
- [0x34EF20]
- name: effect_gfx_big_smoke_puff

View File

@ -1643,11 +1643,12 @@ segments:
###############
### Effects ###
###############
- type: code
- name: effect_globals
type: code
start: 0x325AD0
vram: 0xE0200000
subsegments:
- [auto, c, 325AD0]
- [auto, c, effect_utils]
- [0x325EE0, pm_effect_shims, effect_shims]
- [0x326160]
- name: effect_gfx_big_smoke_puff