Skip to content

Commit 865a1bb

Browse files
committed
Revert "Added support for ACE loaders"
This reverts commit ed96950.
1 parent 6f66cc3 commit 865a1bb

File tree

4 files changed

+14
-31
lines changed

4 files changed

+14
-31
lines changed

ttyd-tools/rel/include/patch.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace mod::patch {
66

77
void clear_DC_IC_Cache(void *ptr, uint32_t size);
8-
void overwriteAddressValue(void *address, uint32_t value);
98
void writeStandardBranches(void *address, void functionStart(), void functionBranchBack());
109
void writeBranch(void *ptr, void *destination);
1110
void writeBranchBL(void *ptr, void *destination);

ttyd-tools/rel/source/main.cpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -770,23 +770,20 @@ void initAddressOverwrites()
770770

771771
patch::writeBranchBL(FallThroughMostObjectsBowserAddress, reinterpret_cast<void *>(StartFallThroughMostObjectsBowser));
772772

773-
patch::overwriteAddressValue(DebugModeInitialzeAddress, 0x3800FFFF); // li r0,-1
773+
*reinterpret_cast<uint32_t *>(DebugModeInitialzeAddress) = 0x3800FFFF; // li r0,-1
774+
*reinterpret_cast<uint32_t *>(DebugModeShowBuildDateAddress) = 0x60000000; // nop
774775

775-
patch::overwriteAddressValue(DebugModeShowBuildDateAddress, 0x60000000); // nop
776+
*reinterpret_cast<uint32_t *>(PauseMenuPartnerMenuAddress) = 0x60000000; // nop
777+
*reinterpret_cast<uint32_t *>(PauseMenuBadgeMenuAddress) = 0x60000000; // nop
776778

777-
patch::overwriteAddressValue(PauseMenuPartnerMenuAddress, 0x60000000); // nop
779+
*reinterpret_cast<uint32_t *>(PreventImportantItemCutscenesAddress) = 0x48000030; // b 0x30
778780

779-
patch::overwriteAddressValue(PauseMenuBadgeMenuAddress, 0x60000000); // nop
780-
781-
patch::overwriteAddressValue(PreventImportantItemCutscenesAddress, 0x48000030); // b 0x30
782-
783-
patch::overwriteAddressValue(msgWindowMrAddress, 0x38830001); // addi r4,r3,1
781+
*reinterpret_cast<uint32_t *>(msgWindowMrAddress) = 0x38830001; // addi r4,r3,1
784782

785783
// Set the initial value for the debug mode variable
786-
int32_t *DebugModeVar = reinterpret_cast<int32_t *>(
787-
reinterpret_cast<uint32_t>(ttyd::seq_title::seqTitleWorkPointer2) + 0x30);
788-
789-
patch::overwriteAddressValue(DebugModeVar, static_cast<uint32_t>(-1));
784+
*reinterpret_cast<int32_t *>(
785+
reinterpret_cast<uint32_t>(
786+
ttyd::seq_title::seqTitleWorkPointer2) + 0x30) = -1;
790787
}
791788

792789
void Mod::run()

ttyd-tools/rel/source/mod.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,12 @@ void Mod::init()
146146
return gMod->checkForNpcNameToPtrError(name);
147147
});
148148

149-
// Initialize typesettings early
150-
// Only run if an ACE loader was not used
151-
uint32_t LoaderValue = *reinterpret_cast<uint32_t *>(0x80004148);
152-
if (LoaderValue == 0)
153-
{
154-
// ACE loader was not used, so run the functions
155-
ttyd::fontmgr::fontmgrTexSetup();
156-
ttyd::windowdrv::windowTexSetup();
157-
}
158-
159-
// Prevent the functions from being ran again
149+
// Initialize typesetting early
150+
ttyd::fontmgr::fontmgrTexSetup();
160151
patch::hookFunction(ttyd::fontmgr::fontmgrTexSetup, [](){});
152+
153+
// Initialize typesetting early
154+
ttyd::windowdrv::windowTexSetup();
161155
patch::hookFunction(ttyd::windowdrv::windowTexSetup, [](){});
162156

163157
// Skip the logo

ttyd-tools/rel/source/patch.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ void clear_DC_IC_Cache(void *ptr, uint32_t size)
1212
gc::OSCache::ICInvalidateRange(ptr, size);
1313
}
1414

15-
void overwriteAddressValue(void *address, uint32_t value)
16-
{
17-
uint32_t *tempAddress = reinterpret_cast<uint32_t *>(address);
18-
*tempAddress = value;
19-
clear_DC_IC_Cache(address, sizeof(uint32_t));
20-
}
21-
2215
void writeStandardBranches(void *address, void functionStart(), void functionBranchBack())
2316
{
2417
void *BranchBackAddress = reinterpret_cast<void *>(

0 commit comments

Comments
 (0)