Home » Archimedes archive » Acorn User » AU 1997-04 A.adf » Features1 » StarInfo/Fletcher/FreeCell/PatchSrc

StarInfo/Fletcher/FreeCell/PatchSrc

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1997-04 A.adf » Features1
Filename: StarInfo/Fletcher/FreeCell/PatchSrc
Read OK:
File size: 05C3 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > Patch for <FreeCellHack$Dir>.!RunImage
   20REM Created by JFPatch v2.26 (28 May 1996) LEN Justin Fletcher
   30REM Intermediate code file created 26 Jun 1996
   40ON ERROR PROCError:END
   50PROCpatch_loadfile
   60sp=13:link=14:pc=15
   70vbit=1<<28:cbit=1<<29:zbit=1<<30:nbit=1<<31
   80P%=&8000:O%=MC%
   90FOR pass%=4 TO 6 STEP2
  100REM **** Start of main code ****
  110PROCpatch_setpc(&11018)
  120[ OPT pass%
  130   SWI     "WimpHack_ResizeIcon"
  140:
  150]
  160REM **** End of main code ****
  170REM Set final pointer to find the length of the code
  180PROCpatch_setpc(0)
  190NEXT pass%
  200PROCpatch_savefile
  240END
  250:
  260REM **** Filing procedures ****
  270:
  280DEF PROCpatch_loadfile
  290infile$="<FreeCellHack$Dir>.!RunImage"
  300SYS "OS_File",5,infile$ TO ex,,,,codelen
  310IF ex=0 THENERROR 999,"Input file not found"
  320DIM MC% codelen+&1400
  330SYS "OS_File",255,infile$,MC%
  340endofcode=(codelen+&8000+3) AND -4:max=codelen
  350L%=endofcode:__cap%=FALSE
  490ENDPROC
  500:
  510DEF PROCpatch_savefile
  520outfile$="<FreeCellHack$Dir>.!RunImageN"
  530OSCLI("Save "+outfile$+" "+STR$~MC%+" "+STR$~(max+MC%))
  540OSCLI("Settype "+outfile$+" Absolute")
  550patchdir$="ADFS::Gerph.$.Games.�.!Freecell.Hack"
  600ENDPROC
  610:
  620REM **** Error Handler ****
  630:
  640DEFPROCError
  650LOCAL ERROR
  660ON ERROR LOCAL:RESTORE ERROR:ERROR EXT ERR,REPORT$+" whilst in error handler at line "+STR$ERL
  770ERROR EXT ERR,REPORT$+" at line "+STR$ERL
  780ENDPROC
  790:
  900REM **** Utility procedures ****
  910:
  920DEFPROCpatch_setpc(n)
  930IF P%-&8000>max THENmax=P%-&8000
  940P%=n:O%=MC%+n-&8000
  950ENDPROC
  960:
  970DEFFNfindfreereg(a,b,c,d):LOCAL n:n=0
  980WHILE n=a OR n=b OR n=c OR n=d
  990 n+=1
 1000ENDWHILE
 1010=n
 1020:
32639REM JFPatch

.� > Patch for <FreeCellHack$Dir>.!RunImage
>� Created by JFPatch v2.26 (28 May 1996) � Justin Fletcher
0� Intermediate code file created 26 Jun 1996
(� � �Error:�
2�patch_loadfile
<sp=13:link=14:pc=15
F/vbit=1<<28:cbit=1<<29:zbit=1<<30:nbit=1<<31
PP%=&8000:O%=MC%
Z� pass%=4 � 6 �2
d"� **** Start of main code ****
n�patch_setpc(&11018)
x[ OPT pass%
�$   SWI     "WimpHack_ResizeIcon"
�:
�]
� � **** End of main code ****
�6� Set final pointer to find the length of the code
��patch_setpc(0)
�� pass%
��patch_savefile
��
�:
!� **** Filing procedures ****
:
� �patch_loadfile
"*infile$="<FreeCellHack$Dir>.!RunImage"
,*ș "OS_File",5,infile$ � ex,,,,codelen
6(� ex=0 �� 999,"Input file not found"
@� MC% codelen+&1400
J ș "OS_File",255,infile$,MC%
T0endofcode=(codelen+&8000+3) � -4:max=codelen
^L%=endofcode:__cap%=�
��
�:
�� �patch_savefile
,outfile$="<FreeCellHack$Dir>.!RunImageN"
1�("Save "+outfile$+" "+�~MC%+" "+�~(max+MC%))
&�("Settype "+outfile$+" Absolute")
&4patchdir$="ADFS::Gerph.$.Games.�.!Freecell.Hack"
X�
b:
l� **** Error Handler ****
v:
���Error
�� �
�=� � �:� �:� � �,�$+" whilst in error handler at line "+Þ
� � �,�$+" at line "+Þ
�
:
�"� **** Utility procedures ****
�:
���patch_setpc(n)
� � P%-&8000>max �max=P%-&8000
�P%=n:O%=MC%+n-&8000
��
�:
�"ݤfindfreereg(a,b,c,d):� n:n=0
�ȕ n=a � n=b � n=c � n=d
�	 n+=1
��
�=n
�:

� JFPatch
�
00000000  0d 00 0a 2e f4 20 3e 20  50 61 74 63 68 20 66 6f  |..... > Patch fo|
00000010  72 20 3c 46 72 65 65 43  65 6c 6c 48 61 63 6b 24  |r <FreeCellHack$|
00000020  44 69 72 3e 2e 21 52 75  6e 49 6d 61 67 65 0d 00  |Dir>.!RunImage..|
00000030  14 3e f4 20 43 72 65 61  74 65 64 20 62 79 20 4a  |.>. Created by J|
00000040  46 50 61 74 63 68 20 76  32 2e 32 36 20 28 32 38  |FPatch v2.26 (28|
00000050  20 4d 61 79 20 31 39 39  36 29 20 a9 20 4a 75 73  | May 1996) . Jus|
00000060  74 69 6e 20 46 6c 65 74  63 68 65 72 0d 00 1e 30  |tin Fletcher...0|
00000070  f4 20 49 6e 74 65 72 6d  65 64 69 61 74 65 20 63  |. Intermediate c|
00000080  6f 64 65 20 66 69 6c 65  20 63 72 65 61 74 65 64  |ode file created|
00000090  20 32 36 20 4a 75 6e 20  31 39 39 36 0d 00 28 10  | 26 Jun 1996..(.|
000000a0  ee 20 85 20 f2 45 72 72  6f 72 3a e0 0d 00 32 13  |. . .Error:...2.|
000000b0  f2 70 61 74 63 68 5f 6c  6f 61 64 66 69 6c 65 0d  |.patch_loadfile.|
000000c0  00 3c 17 73 70 3d 31 33  3a 6c 69 6e 6b 3d 31 34  |.<.sp=13:link=14|
000000d0  3a 70 63 3d 31 35 0d 00  46 2f 76 62 69 74 3d 31  |:pc=15..F/vbit=1|
000000e0  3c 3c 32 38 3a 63 62 69  74 3d 31 3c 3c 32 39 3a  |<<28:cbit=1<<29:|
000000f0  7a 62 69 74 3d 31 3c 3c  33 30 3a 6e 62 69 74 3d  |zbit=1<<30:nbit=|
00000100  31 3c 3c 33 31 0d 00 50  13 50 25 3d 26 38 30 30  |1<<31..P.P%=&800|
00000110  30 3a 4f 25 3d 4d 43 25  0d 00 5a 14 e3 20 70 61  |0:O%=MC%..Z.. pa|
00000120  73 73 25 3d 34 20 b8 20  36 20 88 32 0d 00 64 22  |ss%=4 . 6 .2..d"|
00000130  f4 20 2a 2a 2a 2a 20 53  74 61 72 74 20 6f 66 20  |. **** Start of |
00000140  6d 61 69 6e 20 63 6f 64  65 20 2a 2a 2a 2a 0d 00  |main code ****..|
00000150  6e 18 f2 70 61 74 63 68  5f 73 65 74 70 63 28 26  |n..patch_setpc(&|
00000160  31 31 30 31 38 29 0d 00  78 0f 5b 20 4f 50 54 20  |11018)..x.[ OPT |
00000170  70 61 73 73 25 0d 00 82  24 20 20 20 53 57 49 20  |pass%...$   SWI |
00000180  20 20 20 20 22 57 69 6d  70 48 61 63 6b 5f 52 65  |    "WimpHack_Re|
00000190  73 69 7a 65 49 63 6f 6e  22 0d 00 8c 05 3a 0d 00  |sizeIcon"....:..|
000001a0  96 05 5d 0d 00 a0 20 f4  20 2a 2a 2a 2a 20 45 6e  |..]... . **** En|
000001b0  64 20 6f 66 20 6d 61 69  6e 20 63 6f 64 65 20 2a  |d of main code *|
000001c0  2a 2a 2a 0d 00 aa 36 f4  20 53 65 74 20 66 69 6e  |***...6. Set fin|
000001d0  61 6c 20 70 6f 69 6e 74  65 72 20 74 6f 20 66 69  |al pointer to fi|
000001e0  6e 64 20 74 68 65 20 6c  65 6e 67 74 68 20 6f 66  |nd the length of|
000001f0  20 74 68 65 20 63 6f 64  65 0d 00 b4 13 f2 70 61  | the code.....pa|
00000200  74 63 68 5f 73 65 74 70  63 28 30 29 0d 00 be 0b  |tch_setpc(0)....|
00000210  ed 20 70 61 73 73 25 0d  00 c8 13 f2 70 61 74 63  |. pass%.....patc|
00000220  68 5f 73 61 76 65 66 69  6c 65 0d 00 f0 05 e0 0d  |h_savefile......|
00000230  00 fa 05 3a 0d 01 04 21  f4 20 2a 2a 2a 2a 20 46  |...:...!. **** F|
00000240  69 6c 69 6e 67 20 70 72  6f 63 65 64 75 72 65 73  |iling procedures|
00000250  20 2a 2a 2a 2a 0d 01 0e  05 3a 0d 01 18 15 dd 20  | ****....:..... |
00000260  f2 70 61 74 63 68 5f 6c  6f 61 64 66 69 6c 65 0d  |.patch_loadfile.|
00000270  01 22 2a 69 6e 66 69 6c  65 24 3d 22 3c 46 72 65  |."*infile$="<Fre|
00000280  65 43 65 6c 6c 48 61 63  6b 24 44 69 72 3e 2e 21  |eCellHack$Dir>.!|
00000290  52 75 6e 49 6d 61 67 65  22 0d 01 2c 2a c8 99 20  |RunImage"..,*.. |
000002a0  22 4f 53 5f 46 69 6c 65  22 2c 35 2c 69 6e 66 69  |"OS_File",5,infi|
000002b0  6c 65 24 20 b8 20 65 78  2c 2c 2c 2c 63 6f 64 65  |le$ . ex,,,,code|
000002c0  6c 65 6e 0d 01 36 28 e7  20 65 78 3d 30 20 8c 85  |len..6(. ex=0 ..|
000002d0  20 39 39 39 2c 22 49 6e  70 75 74 20 66 69 6c 65  | 999,"Input file|
000002e0  20 6e 6f 74 20 66 6f 75  6e 64 22 0d 01 40 17 de  | not found"..@..|
000002f0  20 4d 43 25 20 63 6f 64  65 6c 65 6e 2b 26 31 34  | MC% codelen+&14|
00000300  30 30 0d 01 4a 20 c8 99  20 22 4f 53 5f 46 69 6c  |00..J .. "OS_Fil|
00000310  65 22 2c 32 35 35 2c 69  6e 66 69 6c 65 24 2c 4d  |e",255,infile$,M|
00000320  43 25 0d 01 54 30 65 6e  64 6f 66 63 6f 64 65 3d  |C%..T0endofcode=|
00000330  28 63 6f 64 65 6c 65 6e  2b 26 38 30 30 30 2b 33  |(codelen+&8000+3|
00000340  29 20 80 20 2d 34 3a 6d  61 78 3d 63 6f 64 65 6c  |) . -4:max=codel|
00000350  65 6e 0d 01 5e 19 4c 25  3d 65 6e 64 6f 66 63 6f  |en..^.L%=endofco|
00000360  64 65 3a 5f 5f 63 61 70  25 3d a3 0d 01 ea 05 e1  |de:__cap%=......|
00000370  0d 01 f4 05 3a 0d 01 fe  15 dd 20 f2 70 61 74 63  |....:..... .patc|
00000380  68 5f 73 61 76 65 66 69  6c 65 0d 02 08 2c 6f 75  |h_savefile...,ou|
00000390  74 66 69 6c 65 24 3d 22  3c 46 72 65 65 43 65 6c  |tfile$="<FreeCel|
000003a0  6c 48 61 63 6b 24 44 69  72 3e 2e 21 52 75 6e 49  |lHack$Dir>.!RunI|
000003b0  6d 61 67 65 4e 22 0d 02  12 31 ff 28 22 53 61 76  |mageN"...1.("Sav|
000003c0  65 20 22 2b 6f 75 74 66  69 6c 65 24 2b 22 20 22  |e "+outfile$+" "|
000003d0  2b c3 7e 4d 43 25 2b 22  20 22 2b c3 7e 28 6d 61  |+.~MC%+" "+.~(ma|
000003e0  78 2b 4d 43 25 29 29 0d  02 1c 26 ff 28 22 53 65  |x+MC%))...&.("Se|
000003f0  74 74 79 70 65 20 22 2b  6f 75 74 66 69 6c 65 24  |ttype "+outfile$|
00000400  2b 22 20 41 62 73 6f 6c  75 74 65 22 29 0d 02 26  |+" Absolute")..&|
00000410  34 70 61 74 63 68 64 69  72 24 3d 22 41 44 46 53  |4patchdir$="ADFS|
00000420  3a 3a 47 65 72 70 68 2e  24 2e 47 61 6d 65 73 2e  |::Gerph.$.Games.|
00000430  a3 2e 21 46 72 65 65 63  65 6c 6c 2e 48 61 63 6b  |..!Freecell.Hack|
00000440  22 0d 02 58 05 e1 0d 02  62 05 3a 0d 02 6c 1d f4  |"..X....b.:..l..|
00000450  20 2a 2a 2a 2a 20 45 72  72 6f 72 20 48 61 6e 64  | **** Error Hand|
00000460  6c 65 72 20 2a 2a 2a 2a  0d 02 76 05 3a 0d 02 80  |ler ****..v.:...|
00000470  0b dd f2 45 72 72 6f 72  0d 02 8a 07 ea 20 85 0d  |...Error..... ..|
00000480  02 94 3d ee 20 85 20 ea  3a f7 20 85 3a 85 20 a2  |..=. . .:. .:. .|
00000490  20 9f 2c f6 24 2b 22 20  77 68 69 6c 73 74 20 69  | .,.$+" whilst i|
000004a0  6e 20 65 72 72 6f 72 20  68 61 6e 64 6c 65 72 20  |n error handler |
000004b0  61 74 20 6c 69 6e 65 20  22 2b c3 9e 0d 03 02 1b  |at line "+......|
000004c0  85 20 a2 20 9f 2c f6 24  2b 22 20 61 74 20 6c 69  |. . .,.$+" at li|
000004d0  6e 65 20 22 2b c3 9e 0d  03 0c 05 e1 0d 03 16 05  |ne "+...........|
000004e0  3a 0d 03 84 22 f4 20 2a  2a 2a 2a 20 55 74 69 6c  |:...". **** Util|
000004f0  69 74 79 20 70 72 6f 63  65 64 75 72 65 73 20 2a  |ity procedures *|
00000500  2a 2a 2a 0d 03 8e 05 3a  0d 03 98 14 dd f2 70 61  |***....:......pa|
00000510  74 63 68 5f 73 65 74 70  63 28 6e 29 0d 03 a2 20  |tch_setpc(n)... |
00000520  e7 20 50 25 2d 26 38 30  30 30 3e 6d 61 78 20 8c  |. P%-&8000>max .|
00000530  6d 61 78 3d 50 25 2d 26  38 30 30 30 0d 03 ac 17  |max=P%-&8000....|
00000540  50 25 3d 6e 3a 4f 25 3d  4d 43 25 2b 6e 2d 26 38  |P%=n:O%=MC%+n-&8|
00000550  30 30 30 0d 03 b6 05 e1  0d 03 c0 05 3a 0d 03 ca  |000.........:...|
00000560  22 dd a4 66 69 6e 64 66  72 65 65 72 65 67 28 61  |"..findfreereg(a|
00000570  2c 62 2c 63 2c 64 29 3a  ea 20 6e 3a 6e 3d 30 0d  |,b,c,d):. n:n=0.|
00000580  03 d4 1c c8 95 20 6e 3d  61 20 84 20 6e 3d 62 20  |..... n=a . n=b |
00000590  84 20 6e 3d 63 20 84 20  6e 3d 64 0d 03 de 09 20  |. n=c . n=d.... |
000005a0  6e 2b 3d 31 0d 03 e8 05  ce 0d 03 f2 06 3d 6e 0d  |n+=1.........=n.|
000005b0  03 fc 05 3a 0d 7f 7f 0d  f4 20 4a 46 50 61 74 63  |...:..... JFPatc|
000005c0  68 0d ff                                          |h..|
000005c3