mirror of
https://github.com/project-slippi/slippi-ssbm-asm.git
synced 2025-10-05 15:42:49 +02:00
add additional output on game crash
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -222,6 +222,7 @@ pip-log.txt
|
||||
.vscode
|
||||
|
||||
Output/Console/install.bat
|
||||
Output/Console/install-core-only.bat
|
||||
Output/Netplay/install.bat
|
||||
Output/Netplay/build-netplay.bat - Shortcut.lnk
|
||||
Output/Playback/install.bat
|
||||
|
47
Debugging/AdditionalCrashInfo/AdditionalCrashInfo.asm
Normal file
47
Debugging/AdditionalCrashInfo/AdditionalCrashInfo.asm
Normal file
@@ -0,0 +1,47 @@
|
||||
################################################################################
|
||||
# Address: 0x80394a68
|
||||
################################################################################
|
||||
|
||||
.include "Common/Common.s"
|
||||
.include "Debugging/AdditionalCrashInfo/AdditionalCrashInfoStatic.s"
|
||||
|
||||
b CODE_START
|
||||
|
||||
STATIC_MEMORY_TABLE_BLRL:
|
||||
blrl
|
||||
createAdditionalCrashInfoStaticMem
|
||||
|
||||
FN_PRINT_STR_AT_OFFSET:
|
||||
backup
|
||||
|
||||
# Get string to print, save to r3
|
||||
mr r31, r3
|
||||
bl STATIC_MEMORY_TABLE_BLRL
|
||||
mflr r3
|
||||
add r3, r3, r31
|
||||
|
||||
# Call OSReport function, r4+ and f1+ args should have been set by caller
|
||||
branchl r12, OSReport
|
||||
|
||||
restore
|
||||
blr
|
||||
|
||||
CODE_START:
|
||||
addi r27, r4, 0 # replaced code line
|
||||
|
||||
li r3, ACISMO_NEW_LINE_CHAR_STR
|
||||
bl FN_PRINT_STR_AT_OFFSET
|
||||
li r3, ACISMO_VERSION_STR
|
||||
bl FN_PRINT_STR_AT_OFFSET
|
||||
li r3, ACISMO_NEW_LINE_CHAR_STR
|
||||
bl FN_PRINT_STR_AT_OFFSET
|
||||
li r3, ACISMO_CONSOLE_RUNTIME_STR
|
||||
loadwz r4, 0x804d7420 # Console runtime frame count
|
||||
bl FN_PRINT_STR_AT_OFFSET
|
||||
li r3, ACISMO_SCENE_RUNTIME_STR
|
||||
loadGlobalFrame r4 # Scene runtime frame count
|
||||
bl FN_PRINT_STR_AT_OFFSET
|
||||
li r3, ACISMO_NEW_LINE_CHAR_STR
|
||||
bl FN_PRINT_STR_AT_OFFSET
|
||||
|
||||
EXIT:
|
17
Debugging/AdditionalCrashInfo/AdditionalCrashInfoStatic.s
Normal file
17
Debugging/AdditionalCrashInfo/AdditionalCrashInfoStatic.s
Normal file
@@ -0,0 +1,17 @@
|
||||
# Define additional crash info static mem offsets, these must be synced with the static mem
|
||||
# defined below
|
||||
.set ACISMO_VERSION_STR, 0 # char[64]
|
||||
.set ACISMO_CONSOLE_RUNTIME_STR, ACISMO_VERSION_STR + 64 # char[29]
|
||||
.set ACISMO_SCENE_RUNTIME_STR, ACISMO_CONSOLE_RUNTIME_STR + 29 # char[27]
|
||||
.set ACISMO_NEW_LINE_CHAR_STR, ACISMO_SCENE_RUNTIME_STR + 27 # char[2]
|
||||
|
||||
.macro createAdditionalCrashInfoStaticMem
|
||||
# The string below should be overwritten by the application to provide correct version
|
||||
# IMPORTANT: The version string should ALWAYS be first
|
||||
.string "Placeholder for Version and Application: v00.00.00-000-00000000"
|
||||
.string " Console runtime: %d frames\n"
|
||||
.string " Scene runtime: %d frames\n"
|
||||
.string "\n"
|
||||
|
||||
.align 2
|
||||
.endm
|
BIN
Output/Console/g_crash_output.bin
Normal file
BIN
Output/Console/g_crash_output.bin
Normal file
Binary file not shown.
38
Output/Console/g_crash_output.txt
Normal file
38
Output/Console/g_crash_output.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
$Crash Output [Fizzi]
|
||||
*Outputs additional information when the game crashes
|
||||
C2394A68 00000023 #Debugging/AdditionalCrashInfo/AdditionalCrashInfo.asm
|
||||
480000C8 4E800021
|
||||
506C6163 65686F6C
|
||||
64657220 666F7220
|
||||
56657273 696F6E20
|
||||
616E6420 4170706C
|
||||
69636174 696F6E3A
|
||||
20763030 2E30302E
|
||||
30302D30 30302D30
|
||||
30303030 30303000
|
||||
20436F6E 736F6C65
|
||||
2072756E 74696D65
|
||||
3A202564 20667261
|
||||
6D65730A 00205363
|
||||
656E6520 72756E74
|
||||
696D653A 20256420
|
||||
6672616D 65730A00
|
||||
0A000000 7C0802A6
|
||||
90010004 9421FF20
|
||||
BE8100B0 7C7F1B78
|
||||
4BFFFF6D 7C6802A6
|
||||
7C63FA14 3D808034
|
||||
618C56A8 7D8903A6
|
||||
4E800421 BA8100B0
|
||||
800100E4 382100E0
|
||||
7C0803A6 4E800020
|
||||
3B640000 38600078
|
||||
4BFFFFB5 38600000
|
||||
4BFFFFAD 38600078
|
||||
4BFFFFA5 38600040
|
||||
3C80804D 60847420
|
||||
80840000 4BFFFF91
|
||||
3860005D 3C808048
|
||||
80849D60 4BFFFF81
|
||||
38600078 4BFFFF79
|
||||
60000000 00000000
|
34
build-console-all.bat
Normal file
34
build-console-all.bat
Normal file
@@ -0,0 +1,34 @@
|
||||
@echo off
|
||||
echo Building console_core.json for Port A...
|
||||
gecko build -c console_core.json -defsym "STG_EXIIndex=0" -o "Output/Console/g_core_porta.bin"
|
||||
echo.
|
||||
|
||||
echo Building console_core.json...
|
||||
gecko build -c console_core.json -defsym "STG_EXIIndex=1" -o "Output/Console/g_core.bin"
|
||||
echo.
|
||||
|
||||
set list=console_UCF.json
|
||||
set list=%list%;console_UCF_stealth.json
|
||||
set list=%list%;console_mods_stealth.json
|
||||
set list=%list%;console_mods_tournament.json
|
||||
set list=%list%;console_mods_friendlies.json
|
||||
set list=%list%;console_PAL.json
|
||||
set list=%list%;console_stages_stadium.json
|
||||
set list=%list%;console_stages_all.json
|
||||
set list=%list%;console_gameplay_lgl.json
|
||||
set list=%list%;console_gameplay_wobbling.json
|
||||
set list=%list%;console_gameplay_both.json
|
||||
set list=%list%;console_lag_pd.json
|
||||
set list=%list%;console_lag_pdhalfvb.json
|
||||
set list=%list%;console_screen_wide.json
|
||||
set list=%list%;console_screen_wide_shutters.json
|
||||
set list=%list%;console_safety.json
|
||||
set list=%list%;console_crash_output.json
|
||||
|
||||
for %%a in (%list%) do (
|
||||
echo Building %%a...
|
||||
gecko build -c %%a
|
||||
echo.
|
||||
)
|
||||
|
||||
pause
|
@@ -31,6 +31,7 @@ set list=%list%;console_lag_pdhalfvb.json
|
||||
set list=%list%;console_screen_wide.json
|
||||
set list=%list%;console_screen_wide_shutters.json
|
||||
set list=%list%;console_safety.json
|
||||
set list=%list%;console_crash_output.json
|
||||
|
||||
for %%a in (%list%) do (
|
||||
echo Building %%a...
|
||||
|
28
console_crash_output.json
Normal file
28
console_crash_output.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"outputFiles": [
|
||||
{
|
||||
"file": "Output/Console/g_crash_output.bin"
|
||||
},
|
||||
{
|
||||
"file": "Output/Console/g_crash_output.txt"
|
||||
}
|
||||
],
|
||||
"codes": [
|
||||
{
|
||||
"name": "Crash Output",
|
||||
"authors": [
|
||||
"Fizzi"
|
||||
],
|
||||
"description": [
|
||||
"Outputs additional information when the game crashes"
|
||||
],
|
||||
"build": [
|
||||
{
|
||||
"type": "injectFolder",
|
||||
"sourceFolder": "Debugging/AdditionalCrashInfo",
|
||||
"annotation": "Prints crash info [Fizzi]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user