Skip to content

Commit 380a1e4

Browse files
committed
Draw the float register values and the paired singles in the error handler
The error handler will now have 3 pages, with the float register values being drawn on page 2, and the paired singles being drawn on page 3. The main reason that they are on separate pages is because the game consistantly crashes when both the float register values and the paired singles are drawn at the same time, and the cause is still unknown. Also changed the following: 1. The OSError variable holding the string for the type of OSError that occured is now stored in the ErrorHandlerStrings struct. 2. In the drawString auto function, the returned string from OSGetFontTexture is now used, the value returned is the pointer to the next character in the string. Therefore, the i variable in that function was removed.
1 parent d20fc55 commit 380a1e4

File tree

4 files changed

+267
-121
lines changed

4 files changed

+267
-121
lines changed

ttyd-tools/rel/include/assembly.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ int32_t forceNPCItemDrop(void *ptr);
4141
void *fallThroughMostObjects(void *ptr);
4242

4343
// draw.cpp
44-
bool disableDPadOptionsDisplay(uint16_t unkVar);;
44+
bool disableDPadOptionsDisplay(uint16_t unkVar);
45+
bool StartErrorHandlerCheckPairedSinglesEnabled();
4546
void StartErrorHandlerInterrupts();
4647

4748
}

ttyd-tools/rel/include/global.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,8 +799,11 @@ struct MenuPrevMenuAndOption
799799
struct ErrorHandlerStrings
800800
{
801801
#define MAX_LEVELS 32
802+
const char *OSError;
802803
char ContextAddress[32];
803804
char GeneralRegisterValues[32][11];
805+
char FloatRegisterValues[32][19];
806+
char PairedSinglesValues[32][19];
804807
char AdditionalRegisterValues[6][11];
805808
char AddressList[MAX_LEVELS * 3][11];
806809
char InstructionAndAddress[128];
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.global StartErrorHandlerCheckPairedSinglesEnabled
2+
3+
StartErrorHandlerCheckPairedSinglesEnabled:
4+
mfspr %r3,920 # 920 = HID2
5+
rlwinm %r3,%r3,3,31,31
6+
blr

0 commit comments

Comments
 (0)