Skip to content

Commit

Permalink
feat: add debug to allocateAMDHWAlignManager
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualEhrmanntraut committed Oct 23, 2024
1 parent 3bbb2d7 commit 41ee3f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions NootedRed/X5000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,9 @@ UInt64 X5000::wrapAdjustVRAMAddress(void *that, UInt64 addr) {

static UInt32 fakeGetPreferredSwizzleMode2(void *, void *pIn) { return getMember<UInt32>(pIn, 0x10); }

void *X5000::wrapAllocateAMDHWAlignManager() {
auto *hwAlignManager = FunctionCast(wrapAllocateAMDHWAlignManager, callback->orgAllocateAMDHWAlignManager)();
void *X5000::wrapAllocateAMDHWAlignManager(void *that) {
DBGLOG("X5000", "allocateAMDHWAlignManager << (that: %p)", that);
auto *hwAlignManager = FunctionCast(wrapAllocateAMDHWAlignManager, callback->orgAllocateAMDHWAlignManager)(that);
auto *vtableNew = IOMalloc(0x238);
auto *vtableOriginal = getMember<void *>(hwAlignManager, 0);
memcpy(vtableNew, vtableOriginal, 0x230);
Expand Down
2 changes: 1 addition & 1 deletion NootedRed/X5000.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class X5000 {
static void wrapInitializeFamilyType(void *that);
static void *wrapAllocateAMDHWDisplay(void *that);
static UInt64 wrapAdjustVRAMAddress(void *that, UInt64 addr);
static void *wrapAllocateAMDHWAlignManager();
static void *wrapAllocateAMDHWAlignManager(void *that);
static UInt32 wrapGetDeviceType();
static UInt32 wrapReturnZero();
static void *wrapObtainAccelChannelGroup(void *that, UInt32 priority);
Expand Down

0 comments on commit 41ee3f1

Please sign in to comment.