From 65db73b129f1d842ffec533f31db6eb18db6e147 Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Thu, 11 Apr 2019 12:33:58 -0700 Subject: [PATCH] Patch another memory function to 32 bit alignment --- src/debug/sandbox.c | 2 +- .../{ => osPatches}/patchPrvChunkNew.X68 | 0 .../{ => osPatches}/patchPrvChunkNew.func | Bin .../blobs/osPatches/patchPrvPtrResize.L68 | 32 ++++++++++++++++++ .../blobs/osPatches/patchPrvPtrResize.S68 | 3 ++ .../blobs/osPatches/patchPrvPtrResize.X68 | 25 ++++++++++++++ .../blobs/osPatches/patchPrvPtrResize.func | Bin 0 -> 24 bytes 7 files changed, 61 insertions(+), 1 deletion(-) rename tools/palm/muExpansionDriver/blobs/{ => osPatches}/patchPrvChunkNew.X68 (100%) rename tools/palm/muExpansionDriver/blobs/{ => osPatches}/patchPrvChunkNew.func (100%) create mode 100644 tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.L68 create mode 100644 tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.S68 create mode 100644 tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.X68 create mode 100644 tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.func diff --git a/src/debug/sandbox.c b/src/debug/sandbox.c index 4af6566..f19d536 100644 --- a/src/debug/sandbox.c +++ b/src/debug/sandbox.c @@ -1026,7 +1026,7 @@ uint32_t sandboxCommand(uint32_t command, void* data){ //when moving memory around some 16 bit aligned pointers still show up //patch PrvPtrResize to 32 bit alignment, this alone does not fix 32 bit alignment issues - //patchOsRom(0x2123C, "NEED REAL PATCH");//adds an extra 4 bytes if & 0x00000003 is true + patchOsRom(0x2123C, "202E000CC0BCFFFFFFFCB0AE000C6700000458805080504F");//adds an extra 4 bytes if & 0x00000003 is true //other functions that may need to be patched are: //PrvCompactHeap_10021A12 diff --git a/tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.X68 b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvChunkNew.X68 similarity index 100% rename from tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.X68 rename to tools/palm/muExpansionDriver/blobs/osPatches/patchPrvChunkNew.X68 diff --git a/tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.func b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvChunkNew.func similarity index 100% rename from tools/palm/muExpansionDriver/blobs/patchPrvChunkNew.func rename to tools/palm/muExpansionDriver/blobs/osPatches/patchPrvChunkNew.func diff --git a/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.L68 b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.L68 new file mode 100644 index 0000000..8a94242 --- /dev/null +++ b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.L68 @@ -0,0 +1,32 @@ +00001000 Starting Address +Assembler used: EASy68K Editor/Assembler v5.16.01 +Created On: 4/11/2019 12:27:03 + +00000000 1 *----------------------------------------------------------- +00000000 2 * Title :patchPrvPtrResize +00000000 3 * Written by :meepingsnesroms +00000000 4 *----------------------------------------------------------- +00001000 5 ORG $1000 +00001000 6 START: ; first instruction of program +00001000 7 +00001000 8 ; Patch to address 0x2123C of palmos41-en-m515.rom +00001000 202E 000C 9 move.l $C(a6), d0 +00001004 C0BC FFFFFFFC 10 and.l #$FFFFFFFC, d0 +0000100A B0AE 000C 11 cmp.l $C(a6), d0 +0000100E 6700 0004 12 beq done +00001012 5880 13 addq.l #4, d0 +00001014 14 done: +00001014 5080 15 addq.l #8, d0 +00001016 504F 16 addq.w #8, sp +00001018 17 +00001018 18 END START ; last line of source + +No errors detected +No warnings generated + + +SYMBOL TABLE INFORMATION +Symbol-name Value +------------------------- +DONE 1014 +START 1000 diff --git a/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.S68 b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.S68 new file mode 100644 index 0000000..819fe61 --- /dev/null +++ b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.S68 @@ -0,0 +1,3 @@ +S021000036384B50524F47202020323043524541544544204259204541535936384B6D +S11B1000202E000CC0BCFFFFFFFCB0AE000C6700000458805080504FE9 +S804001000EB diff --git a/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.X68 b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.X68 new file mode 100644 index 0000000..a98b18d --- /dev/null +++ b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.X68 @@ -0,0 +1,25 @@ +*----------------------------------------------------------- +* Title :patchPrvPtrResize +* Written by :meepingsnesroms +*----------------------------------------------------------- + ORG $1000 +START: ; first instruction of program + + ; Patch to address 0x2123C of palmos41-en-m515.rom + move.l $C(a6), d0 + and.l #$FFFFFFFC, d0 + cmp.l $C(a6), d0 + beq done + addq.l #4, d0 +done: + addq.l #8, d0 + addq.w #8, sp + + END START ; last line of source + + + +*~Font name~Courier New~ +*~Font size~10~ +*~Tab type~1~ +*~Tab size~4~ diff --git a/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.func b/tools/palm/muExpansionDriver/blobs/osPatches/patchPrvPtrResize.func new file mode 100644 index 0000000000000000000000000000000000000000..120e2a693eb27ef01566e2e5e8b0ddf39eb3e195 GIT binary patch literal 24 gcmY$;W8gWk=l}oze>SXR;7Mm-V2Nl5XbA8J0EQL`>;M1& literal 0 HcmV?d00001