From 2cefcb06575cbe076545baffbe476386971fb83c Mon Sep 17 00:00:00 2001 From: Zane Kaminski Date: Fri, 2 Apr 2021 01:01:32 -0400 Subject: [PATCH] change patch24 args --- bin/driver7M5.bin | Bin 1519 -> 1511 bytes bin/rom8M.bin | Bin 8388608 -> 8388608 bytes rdisk.c | 12 ++++++------ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/driver7M5.bin b/bin/driver7M5.bin index 74610c99f6e61e833fc85941e99929a6f1d9f787..caae6e1b026e7383eb84716ffc2e0a981210b035 100755 GIT binary patch delta 300 zcmaFQ{hWJ(v*RV7`^*e}r5?{24kR+LiXrnDJ3zbyC5RmJEf9|pd`2Bdj@U+fd#Pw4I<45wwk<3{A2;fUPgw=^B9x4^;7~Rv>4>l z7#Q;=^Dya3UlOulEMa0~V3c8g!dJj}roo9-gw2a3je+6Ck$E}2-%#%+|2|4 D&|Oto delta 304 zcmaFP{hoV*v*Qh)`^*e}r5?{24kR+L$|3U@`#`(|C5RmJBM^@#gMpDjDvb}OgJsLa zmUvxeHGKwwTow5mpd`EFdj@s^fd#Pw4GQ@TJc8>PL@XE(Vrue}xfpvHIVR6wOy)LF z36RiYkV|7=ESSv3q$_Os-Wwcl z)ArpV5<{_{V!BJH;{TJJ$fi_asdIeIrh;A}MTzPDd*Ph4=X@$zncv_D#fpWVrglYs z374il>(ngI*uS|#4<&8OubxU_yLHv=st>h$tA*bbvfobYs;+dVs96r?NFmD{KimWI zlND8-+_=*eV%Gkss~Y*i{;jK));?jpo)@C0DgMwb3XF!weJ`}a$gF5gybF)}+v8)V z*T}xU)HH+L&+|gozFO*R(@;TKWj{8Qug)8lskvd95(`FoT3A8|V_+l}4lK?_Iy@o7 z;+2Puj;Sw(dXkej-5?V07bfG6l0k)BEJGfaBOfjlU<2 zr6_|Be&{f;4gmxaLOCi>i7Ko|HEK|cI@F^98_t=Nto*oj>T zBZ4S)V-NOXANC`L1IYf%LA2oz5;%-@9Klf>LkEuI1Ww`rjse`jP29pDhA@oV7{Ms+;4ad*hx=2>;DhJi{s6q80muLV delta 823 zcmYk#J4};d6vpxM_Uj835KBd@K>K~rTIEs;UW&)imRL+qza?S<)-WU7Y z{oRnnWY;hGG$`8te^RgVDOLNoGk)Y#$%rVaOqc$9;asp+eL5L7LJ@I~2F+RO!q|!w zy4|n)-C1i)O3LP?JSuCukZI5O^-JZlU8Wu?ZVL8#>&2fIHEvItI$ZU|6IBxqC92x^ zSvszkvK_j-Anr_yEZZMV-Jm|(%cgE=s~2lH8h@7dTGQ=wzPF~kDu2Fr9OO}4&c%BSs6rd0;tV0osQG)d-#Rj-h1`jr(9Gg&q&G2FiDp7@M_~3^L z3pJ=k06}a;2-~n7b*M)J8WF}0M9_q0?8GkY#vbg&K19)i{WySDwBaBQp&c=F;4nII z1V?cUT{w<7PM{knkw6c6aSDAnjWallb2yI+xQI)*j4SBJ0Fp>y5LYpTYq*XyhB1O0 pxQSc1jZxge7{+lI_i!H*n8XwwAcJYl;2~!52#*(&fhTXi{Q*hx_d);w diff --git a/rdisk.c b/rdisk.c index f75a763..f2e86d0 100644 --- a/rdisk.c +++ b/rdisk.c @@ -53,12 +53,12 @@ void C24(Ptr sourcePtr, Ptr destPtr, unsigned long byteCount) { } // Switch to 32-bit mode and patch -typedef void (*RDiskPatch_t)(Ptr, long, char); -void __attribute__ ((noinline)) P24(Ptr ramdisk, long index, char patch) { - if (index < 0) { return; } // Don't patch if index < 0 +typedef void (*RDiskPatch_t)(Ptr, char); +#pragma parameter P24(__A0, __D0) +void __attribute__ ((noinline)) P24(Ptr ptr, char patch) { signed char mode = true32b; SwapMMUMode(&mode); - ramdisk[index] = patch; // Patch byte + *ptr = patch; // Patch byte SwapMMUMode(&mode); } @@ -166,8 +166,8 @@ static void RDInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) { // Patch debug and CD-ROM enable bytes if (c->ramdisk) { RDiskPatch_t fun = P24; - if (!dbgEN) { fun(c->ramdisk, 0x00000031UL, *RDiskDBGDisByte); } - if (!cdrEN) { fun(c->ramdisk, 0x00012CAFUL, 0x44); } + if (!dbgEN /*&& *RDiskDBGDisPos >= 0*/) { fun(c->ramdisk + 0x00000031UL, *RDiskDBGDisByte); } + if (!cdrEN /*&& *RDiskCDRDisPos >= 0*/) { fun(c->ramdisk + 0x00012CAFUL, *RDiskCDRDisByte); } } // Unmount if not booting from ROM disk