From cfd9bf0185ccce144da21192c235099d2c85107a Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Tue, 27 Aug 2019 09:23:37 +0800 Subject: [PATCH] Bugfix: I was using the wrong driver copy! --- ATALoad.a | 9 +++++---- ATALoad.a.o | Bin 0 -> 188 bytes ATALoad.dmp | 55 ++++++++++++++++++++++++++-------------------------- ataboot.py | 2 +- 4 files changed, 34 insertions(+), 32 deletions(-) create mode 100644 ATALoad.a.o diff --git a/ATALoad.a b/ATALoad.a index c197f4e..a55f82d 100644 --- a/ATALoad.a +++ b/ATALoad.a @@ -30,8 +30,8 @@ OriginalFunc NewFunc - link a6,#-4 - movem.l d5,-4(a6) + link a6,#-8 + movem.l a3/d5,-8(a6) ; 16(a6).L = !AfterSystemStartupTime ; 12(a6).L = $0701, the DDMap ID for a Mac driver @@ -51,6 +51,7 @@ NewFunc dc.w $A51E ; _NewPtrSys tst.l A0 beq.s @fail + move.l a0,a3 move.l a0,a1 lea *+2+'At',a0 ; LINKER SCRIPT @@ -70,7 +71,7 @@ NewFunc bset.l #31,d5 ; kAfterSystemStartupTime @rom - jsr 8(a0) ; ATAMgr v2 entry point + jsr 8(a3) ; ATAMgr v2 entry point ; never mind the spec, only set d5 ; move.l d0,a0 @@ -81,7 +82,7 @@ NewFunc @fail move.l #$FFFFDB93,d0 @return - movem.l -4(a6),d5 + movem.l -8(a6),a3/d5 unlk a6 rts diff --git a/ATALoad.a.o b/ATALoad.a.o new file mode 100644 index 0000000000000000000000000000000000000000..0cc8624923b4034b17143bf16b4c008e97116e20 GIT binary patch literal 188 zcmZQ%U|?clU=UPfiyC)05J<{7U_bi%Jq0JYD?4{{QfJ$D#252TvY5BLiQWi-JvXW>xA^Ij@d% z3pEcV5654QB@nR%dRlr6989eY4F4GvfGiIOrUoFBp{v15k3l$%h2toLyx(dDjs!LZ V8<2fIU~~QA{7TtDj+(&4005Nh', cut2 - i) if code[i:i+4] == b'Size': - code[i:i+4] = struct.pack('>l', cut2 - cut1) + code[i:i+4] = struct.pack('>L', len(code) - cut2) if code[i:i+2] == b'ID': # reference to original InitDevice, skipping the mangled 4-byte LINK code[i:i+2] = struct.pack('>h', (InitDevice+4) - i)