attempt to fix the crash when loading back the neutral stage

This commit is contained in:
KELLZ
2025-08-13 01:01:45 -02:30
parent aac7d76cba
commit 30687560a1
4 changed files with 84 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
################################################################################
# Address: 0x801c65c8
# Tags: [affects-gameplay]
################################################################################
.include "Common/Common.s"
.set REG_DATA, 31
.set HSD_FreeToHeap, 0x80015CA8
CODE_START:
mr. REG_DATA, r3
beq EXIT
lwz r4, 0(REG_DATA)
addis r0, r4, 1
cmplwi r0, 65535 # if the file size is not -1
beq ZERO_MEM
# check if this area has been zeroed already. if it was, this was probably a rollback
lwz r0, 0(REG_DATA)
lwz r3, 4(REG_DATA)
or r3, r0, r3
lwz r0, 8(REG_DATA)
or. r3, r0, r3
beq EXIT
# when we reach here, it means we are probably freeing the transformation file back to the heap
lwz r3, 8(REG_DATA)
cmplwi r3, 1
bne ZERO_MEM
li r3, 0
lwz r4, 0(REG_DATA)
branchl r12, HSD_FreeToHeap
ZERO_MEM:
mr r3, REG_DATA
li r4, 12
branchl r12, Zero_AreaLength
EXIT:
branch r12, 0x801c660c # end of function

View File

@@ -749,6 +749,13 @@
"Annotation": "Online/Core/Hacks/Stadium/ChangeJumbotronText.asm",
"Tags": ""
},
{
"InjectionAddress": "801C65C8",
"Name": "Required: Slippi Online",
"Codetype": "Auto",
"Annotation": "Online/Core/Hacks/Stadium/CustomZeroBuffer.asm",
"Tags": "[affects-gameplay]"
},
{
"InjectionAddress": "801D4760",
"Name": "Required: Slippi Online",

View File

@@ -2459,6 +2459,23 @@ C21D2D38 00000016 #Online/Core/Hacks/Stadium/ChangeJumbotronText.asm
800100E4 382100E0
7C0803A6 7FC3F378
60000000 00000000
C21C65C8 00000010 #Online/Core/Hacks/Stadium/CustomZeroBuffer.asm
7C7F1B79 41820068
809F0000 3C040001
2800FFFF 41820040
801F0000 807F0004
7C031B78 801F0008
7C031B79 41820040
807F0008 28030001
4082001C 38600000
809F0000 3D808001
618C5CA8 7D8903A6
4E800421 7FE3FB78
3880000C 3D808000
618CC160 7D8903A6
4E800421 3D80801C
618C660C 7D8903A6
4E800420 00000000
C21D4760 0000000A #Online/Core/Hacks/Stadium/GrPsxIsValid.asm
38600002 3D80801C
618C2BA4 7D8903A6

View File

@@ -2458,6 +2458,23 @@ C21D2D38 00000016 #Online/Core/Hacks/Stadium/ChangeJumbotronText.asm
800100E4 382100E0
7C0803A6 7FC3F378
60000000 00000000
C21C65C8 00000010 #Online/Core/Hacks/Stadium/CustomZeroBuffer.asm
7C7F1B79 41820068
809F0000 3C040001
2800FFFF 41820040
801F0000 807F0004
7C031B78 801F0008
7C031B79 41820040
807F0008 28030001
4082001C 38600000
809F0000 3D808001
618C5CA8 7D8903A6
4E800421 7FE3FB78
3880000C 3D808000
618CC160 7D8903A6
4E800421 3D80801C
618C660C 7D8903A6
4E800420 00000000
C21D4760 0000000A #Online/Core/Hacks/Stadium/GrPsxIsValid.asm
38600002 3D80801C
618C2BA4 7D8903A6