Skip to content

Commit 5b27775

Browse files
committed
Prevented the custom error handler from being implemented
There are some display issues with it on console, so it is being disabled for now.
1 parent 4552cd5 commit 5b27775

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

USER_MANUAL.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,3 @@ There are several other changes that have been made outside of the menu:
154154
* When defeating Blooper with an attack that causes both the body and the left tentacle to be defeated at roughly the same time.
155155
7. The cutscene before the final Shadow Queen fight has been adjusted to prevent one of the game's heaps from becoming corrupted. The change is that less textboxes will appear at the start of the cutscene.
156156
8. A memory leak that would occur when starting a new file has been fixed. This specific memory leak would occur when allocating memory that would be used for the inventory, as the game doesn't check if the memory has already been allocated or not.
157-
9. In the event that the game crashes, a custom-made error handler will be displayed automatically. The main purpose of this is to display specific values that were present just before the crash occurred, as well as the exact address at which the game crashed. The controls for how to use it will be displayed automatically, and are as follows:
158-
* Press/hold the D-Pad to move the text
159-
* Press X to go to the next page
160-
* Press Y to go to the previous page
161-
* Press A to zoom in
162-
* Press B to zoom out

ttyd-tools/rel/source/main.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,9 @@ void initAddressOverwrites()
789789
void *FixBlooperCrash1Address = reinterpret_cast<void *>(0x8010F810);
790790
void *FixBlooperCrash2Address = reinterpret_cast<void *>(0x8010F888);
791791
void *PreventTextboxSelectionAddress = reinterpret_cast<void *>(0x800D214C);
792+
void *BacktraceScreenFontSizeAddress = reinterpret_cast<void *>(0x80428BC0);
793+
void *BacktraceScreenPPCHaltBranchAddress = reinterpret_cast<void *>(0x8025E4A4);
794+
void *BacktraceScreenEndBranchAddress = reinterpret_cast<void *>(0x8025E4A8);
792795
void *DisableDPadOptionsDisplayAddress = reinterpret_cast<void *>(0x8013D148);
793796
void *FixEvtMapBlendSetFlagPartnerCrashAddress = reinterpret_cast<void *>(0x800389C4);
794797
void *FixEvtMapBlendSetFlagFollowerCrashAddress = reinterpret_cast<void *>(0x80038A0C);
@@ -815,6 +818,7 @@ void initAddressOverwrites()
815818
void *FixBlooperCrash1Address = reinterpret_cast<void *>(0x8010A724);
816819
void *FixBlooperCrash2Address = reinterpret_cast<void *>(0x8010A79C);
817820
void *PreventTextboxSelectionAddress = reinterpret_cast<void *>(0x800CE01C);
821+
void *BacktraceScreenFontSizeAddress = reinterpret_cast<void *>(0x80422618);
818822
void *DisableDPadOptionsDisplayAddress = reinterpret_cast<void *>(0x80137C1C);
819823
void *FixEvtMapBlendSetFlagPartnerCrashAddress = reinterpret_cast<void *>(0x80038328);
820824
void *FixEvtMapBlendSetFlagFollowerCrashAddress = reinterpret_cast<void *>(0x80038370);
@@ -841,6 +845,9 @@ void initAddressOverwrites()
841845
void *FixBlooperCrash1Address = reinterpret_cast<void *>(0x801106E8);
842846
void *FixBlooperCrash2Address = reinterpret_cast<void *>(0x80110760);
843847
void *PreventTextboxSelectionAddress = reinterpret_cast<void *>(0x800D2F44);
848+
void *BacktraceScreenFontSizeAddress = reinterpret_cast<void *>(0x804356C8);
849+
void *BacktraceScreenPPCHaltBranchAddress = reinterpret_cast<void *>(0x8026207C);
850+
void *BacktraceScreenEndBranchAddress = reinterpret_cast<void *>(0x80262080);
844851
void *DisableDPadOptionsDisplayAddress = reinterpret_cast<void *>(0x8013EC30);
845852
void *FixEvtMapBlendSetFlagPartnerCrashAddress = reinterpret_cast<void *>(0x80038AAC);
846853
void *FixEvtMapBlendSetFlagFollowerCrashAddress = reinterpret_cast<void *>(0x80038AF4);
@@ -904,6 +911,14 @@ void initAddressOverwrites()
904911

905912
*reinterpret_cast<uint32_t *>(msgWindowMrAddress) = 0x38830001; // addi r4,r3,1
906913

914+
*reinterpret_cast<float *>(BacktraceScreenFontSizeAddress) = 0.66;
915+
916+
#ifndef TTYD_JP
917+
// This part of the backtrace screen does not need to be modified in JP
918+
*reinterpret_cast<uint32_t *>(BacktraceScreenPPCHaltBranchAddress) = 0x3B400000; // li r26,0
919+
*reinterpret_cast<uint32_t *>(BacktraceScreenEndBranchAddress) = 0x4BFFFDD4; // b -0x22C
920+
#endif
921+
907922
// Set the initial value for the debug mode variable
908923
*reinterpret_cast<int32_t *>(
909924
reinterpret_cast<uint32_t>(

ttyd-tools/rel/source/mod.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ void Mod::init()
131131
return gMod->displayActionCommandsTimingHook(battleUnitPtr, attackParams);
132132
});
133133

134-
mPFN_systemErrorHandler_trampoline = patch::hookFunction(
134+
/* mPFN_systemErrorHandler_trampoline = patch::hookFunction(
135135
ttyd::mariost::N_systemErrorHandler, [](uint16_t error,
136136
gc::OSContext::OSContext *context, uint32_t dsisr, uint32_t dar)
137137
{
138138
// Enable the FPU registers
139139
StartErrorHandlerEnableFPU();
140140
gMod->errorHandler(error, context, dsisr, dar);
141-
});
141+
}); */
142142

143143
mPFN_npcNameToPtr_trampoline = patch::hookFunction(
144144
ttyd::npcdrv::npcNameToPtr, [](const char *name)

0 commit comments

Comments
 (0)