remove free scene buffer

did a bunch of research and the way stuff gets free'd on scene transition is the main heap is destroyed and recreated. that happens at 803754ec

because of that, we don't need to explicitly free anything that persists for the entire scene. that includes this scene buffer
This commit is contained in:
Jas Laferriere
2025-09-25 15:21:47 -04:00
parent 476af86196
commit 7a543008ad
11 changed files with 27 additions and 29 deletions

View File

@@ -26,6 +26,13 @@ CODE_START:
# On Dolphin a buffer has been allocated from the heap created in Bootloader/main.asm.
# We want to free that buffer the first time we execute this logic so that the
# buffer always exists prior and after.
# NOTE: There's some really weird stuff going on here that I don't understand.
# The buffer we're freeing here was actually allocated on a different heap than
# the main heap. By running Free like this we are freeing the memory on the main heap
# despite the fact that it was allocated on a different heap. That said, if I try to free
# it using its original heap ID, it does not fix the GFX issue when eating food. I have
# no idea why free'ing it on a different heap fixes the GFX issues.
bl DATA_BLRL
mflr r4
lbz r3, 0x0(r4)

View File

@@ -1,14 +0,0 @@
################################################################################
# Address: 0x801a41d8
################################################################################
.include "Common/Common.s"
.include "Online/Online.s"
# Look at AllocSceneBuffer.asm for context
lwz r3, OFST_R13_SB_ADDR(r13)
branchl r12, HSD_Free
# Original
li r3, 11

View File

@@ -591,7 +591,12 @@ C21D4FD8 00000012 #Recording/Stages/SendStadiumInfo.asm
818DB650 398C0009
918DB650 BB610084
60000000 00000000
C21A4CB4 00000008 #Common/AllocBuffer.asm
C21A4CB4 0000000D #Common/AllocSceneBuffer.asm
4800000C 4E800021
00000000 4BFFFFF9
7C8802A6 88640000
2C030000 40820028
38600001 98640000
806DAFC4 2C030000
41820014 3D808037
618CF1B0 7D8903A6

Binary file not shown.

Binary file not shown.

View File

@@ -291,7 +291,7 @@
"InjectionAddress": "801A4CB4",
"Name": "Slippi Recording",
"Codetype": "Auto",
"Annotation": "Common/AllocBuffer.asm",
"Annotation": "Common/AllocSceneBuffer.asm",
"Tags": ""
},
{

View File

@@ -515,7 +515,7 @@
"InjectionAddress": "801A4CB4",
"Name": "Required: Slippi Recording",
"Codetype": "Auto",
"Annotation": "Common/AllocBuffer.asm",
"Annotation": "Common/AllocSceneBuffer.asm",
"Tags": ""
},
{

View File

@@ -1244,11 +1244,6 @@ C21A4CB4 0000000D #Common/AllocSceneBuffer.asm
7D8903A6 4E800421
906DAFC4 38000000
60000000 00000000
C21A41D8 00000004 #Common/FreeSceneBuffer.asm
806DAFC4 3D808037
618CF1B0 7D8903A6
4E800421 3860000B
60000000 00000000
C20055F8 0000000F #Common/GetIsFollower.asm
7C0802A6 90010004
9421FF20 BE8100B0

View File

@@ -1243,11 +1243,6 @@ C21A4CB4 0000000D #Common/AllocSceneBuffer.asm
7D8903A6 4E800421
906DAFC4 38000000
60000000 00000000
C21A41D8 00000004 #Common/FreeSceneBuffer.asm
806DAFC4 3D808037
618CF1B0 7D8903A6
4E800421 3860000B
60000000 00000000
C20055F8 0000000F #Common/GetIsFollower.asm
7C0802A6 90010004
9421FF20 BE8100B0

View File

@@ -862,7 +862,12 @@ C216E8C8 00000005 #Playback/Core/Stadium/Enable Home Run Contest Distance.asm
4182000C 819F0044
4800000C 3D808018
618C1998 00000000
C21A4CB4 00000008 #Common/AllocBuffer.asm
C21A4CB4 0000000D #Common/AllocSceneBuffer.asm
4800000C 4E800021
00000000 4BFFFFF9
7C8802A6 88640000
2C030000 40820028
38600001 98640000
806DAFC4 2C030000
41820014 3D808037
618CF1B0 7D8903A6

View File

@@ -861,7 +861,12 @@ C216E8C8 00000005 #Playback/Core/Stadium/Enable Home Run Contest Distance.asm
4182000C 819F0044
4800000C 3D808018
618C1998 00000000
C21A4CB4 00000008 #Common/AllocBuffer.asm
C21A4CB4 0000000D #Common/AllocSceneBuffer.asm
4800000C 4E800021
00000000 4BFFFFF9
7C8802A6 88640000
2C030000 40820028
38600001 98640000
806DAFC4 2C030000
41820014 3D808037
618CF1B0 7D8903A6