diff --git a/src/debug/sandbox.c b/src/debug/sandbox.c index f957c39..8319645 100644 --- a/src/debug/sandbox.c +++ b/src/debug/sandbox.c @@ -987,7 +987,7 @@ uint32_t sandboxCommand(uint32_t command, void* data){ IDs in sequential order, as always beginning with RAM heaps, followed by ROM heaps. */ - //this looks like the code that ensures heap alignment sizes are correct, if I force everything to a multiple of 4 that may fix ARM behavior + //PrvChunkNew alignment code /* ROM:10020D04 moveq #1,d0 ; Move Quick ROM:10020D06 and.l size(a6),d0 ; Check if size is a multiple of 2 @@ -1004,6 +1004,23 @@ uint32_t sandboxCommand(uint32_t command, void* data){ ROM:10020D1C */ + //PrvPtrResize alignment code + /* + ROM:1002123C moveq #1,d0 ; Move Quick + ROM:1002123E and.l arg_4(a6),d0 ; AND Logical + ROM:10021242 addq.w #8,sp ; Add Quick + ROM:10021244 beq.s loc_1002124E ; Branch if Equal + ROM:10021246 moveq #9,d0 ; Move Quick + ROM:10021248 add.l arg_4(a6),d0 ; Add + ROM:1002124C bra.s loc_10021254 ; Branch Always + ROM:1002124E ; --------------------------------------------------------------------------- + ROM:1002124E + ROM:1002124E loc_1002124E: ; CODE XREF: PrvPtrResize_100211F6+4E↑j + ROM:1002124E move.l arg_4(a6),d0 ; Move Data from Source to Destination + ROM:10021252 addq.l #8,d0 ; Add Quick + ROM:10021254 + */ + //patch PrvChunkNew to 32 bit alignment, this alone does not fix 32 bit alignment issues patchOsRom(0x20D04, "202E000AC0BCFFFFFFFCB0AE000A6700000458805080544F");//adds an extra 4 bytes if & 0x00000003 is true //when moving memory around some 16 bit aligned pointers still show up diff --git a/tools/palm/muExpansionDriver/blobs/patchMemChunkNew.X68 b/tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.X68 similarity index 93% rename from tools/palm/muExpansionDriver/blobs/patchMemChunkNew.X68 rename to tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.X68 index 35cdf61..d517612 100644 --- a/tools/palm/muExpansionDriver/blobs/patchMemChunkNew.X68 +++ b/tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.X68 @@ -1,5 +1,5 @@ *----------------------------------------------------------- -* Title :patchMemChunkNew +* Title :patchPrvChunkNew * Written by :meepingsnesroms *----------------------------------------------------------- ORG $1000 diff --git a/tools/palm/muExpansionDriver/blobs/patchMemChunkNew.func b/tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.func similarity index 100% rename from tools/palm/muExpansionDriver/blobs/patchMemChunkNew.func rename to tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.func