Home » Archimedes archive » Acorn User » AU 1995-04.adf » !StarInfo_StarInfo » !Patch/ReadMe
!Patch/ReadMe
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 1995-04.adf » !StarInfo_StarInfo |
Filename: | !Patch/ReadMe |
Read OK: | ✔ |
File size: | 2A0A bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Writing patch definitions for !Patch. ------------------------------------- It is recommended that any patch files supplied separately from !Patch be neatly bundled into an application directory which Filer_Runs them all for you when you double click on it. In this way a path variable can be set up for the directory, allowing unambiguous yet directory and filing system independent file paths to be quoted for accessing other patch files, transform files and *commands. Directory verification. ----------------------- When writing patch files, you should remember that !Patch needs to be able to verify that the correct application directory is being dealt with. So for example the sole purpose of the patch may be to put a !Sprites22 file into the application directory, but this will not be sufficient for !Patch to be certain that it is patching the correct directory. The best way is to specify some words in the !RunImage that !Patch can verify. It will then only move the !Sprites22 file in if the words in the !RunImage match. There should always be some words, bytes or strings in a patch that actually change (or a file which is created or deleted). If not, !Patch cannot tell the difference between a directory which has had the patch applied to it and one which has not. This is not a particularly great restriction - there is always a version number in some file or other that should be modified anyway. File extension. --------------- It is possible to extend the file being patched, simply by specifying ChangeWord commands which are off the end of the file. In this case, the old bytes should be specified as &00. File types. ----------- When specifying file types, as well as the standard (real) file types the following numbers may be used: &2000 Application directory &1000 Standard directory 0 File type not important (anything will match) -1 Untyped file (load and exec addresses) Patch file format. ------------------ The BootStrap patch file inside !Patch is read on startup, which causes the patch files stored inside the Patches sub-directory to be read. Patch files should have a filetype of Patch (&FC3). Files with any other filetype will be ignored. The patch files are textual in nature. Each line of a patch file can be one of: blank start with a # to be a comment line of the form Command:other parameters Blank and comment lines are ignored. Other lines have the following meanings: PatchesDir:<file or directory path> This causes the path specified to be recursively scanned for more patch files. This is typically used so that you only have to Filer_Run one patch file (eg. Filer_Run MyPatch:StartUp) in your !Run file to get !Patch to automatically find all the patch files in the directory specified. eg. PatchesDir:Patch:Patches TransformsFile:<file path> This adds the file specified to the list of files looked in to build the *commands for performing transformations. eg: TransformsFile:Patch:Transforms Application:<program name> <file type> This introduces some patches for the named application. eg: Application:!PCEm &2000 Description:<program description> This is a textual description of the application. eg: Description:Acorn PC Emulator Patch:<patch name> This introduces a patch and gives it a textual name. This name will be what is quoted in the patch query window. eg: Patch:Fix bug in version 1.60 with DOSDisc hard disk images File:<file name> <file type> This introduces some patches for the named file in the application. Note that the file name quoted should always start with the application directory - this allows individual files to have patches for them. eg: File:!PCEm.!RunImage &FF8 Transform:<transform> This optional field indicates that the file has had the named transform applied to it. The patches will be applied to the untransformed form of the file. A list of default transforms can be found in the Transforms file of !Patch. Currently this is Squeeze, and do nothing (Copy). eg: Transform:Squeeze Location:<location> This indicates the byte location in the unsqueezed (or whatever) file for the following changes. To specify in decimal just give the number. To specify in hex prefix the number with an &. The location is always in the unpatched file. Where the patched file ends up with a different�length, appropriate adjustments are made to the location in the target file. Effectively this means that two locations are maintained. eg: Location:&1B2D0 ChangeWord:<from> <to> This describes the change required to a single word at the current location. Location advances by four each change, so you may give a sequence. The current location should be word aligned (a multiple of four) when this keyword is specified. eg: ChangeWord:&059D0008 &13500003 ChangeWord:&028DD010 &13A00000 ChangeWord:&13A00000 &059D0008 ChangeWord:&128DD010 &E95BA800 VerifyWord:<word> This specifies that the word at the current location must match the word specified. The locations are advanced by four. eg: VerifyWord:&54230001 ChangeByte:<from> <to> This describes the change required to a single byte at the current location. Location advances by one each change, so you may give a sequence. eg: ChangeByte:&BD 65 VerifyByte:<byte> This specifies that the byte at the current location must match the byte specified. The locations are advanced by one. eg: VerifyByte:&23 ChangeString:<from> <to> This describes the change required to a string at the given location. <from> and <to> must be of the same length, and are in GSTrans format. The strings must not contain spaces, as space is the seperator between the two strings. Use <32> instead of space. The current location advances by the length of the strings, so you may give a sequence. eg: ChangeString:Verify<32>:4|M Verify<32>4|M<0> VerifyString:<string> This specifies a string which must match the string found at the current location. The locations are then advanced by the length of the string. eg: VerifyString:<127>foobar<32><0> ReplaceFile:<file name> OldContents:<file name> <file type> NewContents:<file name> <file type> This causes the file in the application directory to be replaced with a new version of the file supplied within the patches directory. The old version of the file is also supplied in the patches directory to allow patch removal. No checking of the file contents is performed, so you should ensure there is enough verify or change data for other files in the application to allow !Patch to be certain it is dealing with the correct directory eg. verify some words in the !RunImage. You may use verify data for the file to be replaced, so for example you could verify the comment string at the start of a !Run file since that is unlikely to have been edited by the user. If you do this, the data verified must be present and correct in both the OldContents file and the NewContents file. eg: ReplaceFile:!PCEm.!Boot OldContents:Patch:Files.Acorn.PCEm.Old.!Boot &FEB NewContents:Patch:Files.Acorn.PCEm.New.!Boot &FEB CreateFile:<file name> NewContents:<file name> <file type> This causes the file in the application directory to be created, its contents being taken from the file specified in the patches directory. eg: CreateFile:!PCEm.!Sprites22 NewContents:Patch:Files.Acorn.PCEm.New.!Sprites22 &FF9 CreateFile:!PCEm.!Sprites23 NewContents:Patch:Files.Acorn.PCEm.New.!Sprites23 &FF9 DeleteFile:<file name> OldContents:<file name> <file type> This causes the file in the application directory to be deleted. Its contents are provided to allow patch removal. eg: DeleteFile:!PCEm.!Boot OldContents:Patch:Files.Acorn.PCEm.Old.!Boot &FEB Transforms file format. ----------------------- The transforms files are processed using MessageTrans. The tokens looked up for a given transform are <transform>_Prepare and <transform>_Finish to get the actual *commands, and <transform>_PrepareSlot and <transform>_FinishSlot to get the Wimp slot size (in K) that each command gets to start with. The documentation for the transforms is here rather than in the Transforms file as MessageTrans reads the entire of the Transforms file into memory, comments and all. For <transform>_Prepare, %0 is the initial file and %1 is the file that will actually be patched. For <transform>_Finish, %0 is the patched file and %1 is the final file. In both cases, %2 is a filename that printed output from the transforming program should be redirected to. For a program that does not print anything (eg. UnSqueeze) it need not be specified. After the transformation program has been run, if the error file exists and is of non zero size its contents will be displayed in an error box. !Patch will then attempt to continue ie. it is not assumed that the presence of output means an error occured. In fact in the case of squeeze, if there is any output there was an error, and !Patch will get a "File not found" error when it attempts to continue. (Note that use of %2 in this way is not yet implemented.) After SWI MessageTrans_GSLookup has been called, the results should be a valid *command which will perform the job, which is passed to SWI Wimp_StartTask. This may of course be an Obey file. Application space may be used however you like, as the *command is running as a new wimp task with its own application space. The Prepare transformation is exercised a lot. Not only is it used while performing the actual patching but it is also used while scanning directories and after patching has been performed to work out whether the patches for a file can be applied, removed, or neither. Therefore the prepare transformation should ideally be fast, small and memory resident eg. UnSqueeze is performed by a small module loaded by !Patch.!Run. The benefit of being memory resident is that you have to swap floppy disks much less often. The benefit of being small is that you can afford to be memory resident. Squeeze takes a lot of memory to run, so you should not rmload huge modules just so you can have memory resident prepare transforms as this may then mean there is insufficient memory for Squeeze to run when a particularly large file is patched eg. !DTP.!RunImage. 'Copy' is the standard "transform" used for files which need no transforming. This is because we patch in <Wimp$Scrap> and the transform performs the copying operations. 'Squeeze' is the transform used for programs which have been run through the squeeze program supplied with the Acorn C and Assembler packages. eg: Copy_PrepareSlot/Copy_FinishSlot:8 Copy_Prepare/Copy_Finish:Copy %0 %1 ~A ~C ~D F ~L ~N ~P Q ~R S ~T ~V Squeeze_PrepareSlot:0 Squeeze_Prepare:UnSqueeze %0 %1 Squeeze_FinishSlot:32 Squeeze_Finish:Run Patch:Library.squeeze %0 %1
00000000 0a 57 72 69 74 69 6e 67 20 70 61 74 63 68 20 64 |.Writing patch d| 00000010 65 66 69 6e 69 74 69 6f 6e 73 20 66 6f 72 20 21 |efinitions for !| 00000020 50 61 74 63 68 2e 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d |Patch..---------| 00000030 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000040 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 49 74 20 |------------.It | 00000050 69 73 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 74 |is recommended t| 00000060 68 61 74 20 61 6e 79 20 70 61 74 63 68 20 66 69 |hat any patch fi| 00000070 6c 65 73 20 73 75 70 70 6c 69 65 64 20 73 65 70 |les supplied sep| 00000080 61 72 61 74 65 6c 79 20 66 72 6f 6d 20 21 50 61 |arately from !Pa| 00000090 74 63 68 20 62 65 0a 6e 65 61 74 6c 79 20 62 75 |tch be.neatly bu| 000000a0 6e 64 6c 65 64 20 69 6e 74 6f 20 61 6e 20 61 70 |ndled into an ap| 000000b0 70 6c 69 63 61 74 69 6f 6e 20 64 69 72 65 63 74 |plication direct| 000000c0 6f 72 79 20 77 68 69 63 68 20 46 69 6c 65 72 5f |ory which Filer_| 000000d0 52 75 6e 73 20 74 68 65 6d 20 61 6c 6c 20 66 6f |Runs them all fo| 000000e0 72 0a 79 6f 75 20 77 68 65 6e 20 79 6f 75 20 64 |r.you when you d| 000000f0 6f 75 62 6c 65 20 63 6c 69 63 6b 20 6f 6e 20 69 |ouble click on i| 00000100 74 2e 20 49 6e 20 74 68 69 73 20 77 61 79 20 61 |t. In this way a| 00000110 20 70 61 74 68 20 76 61 72 69 61 62 6c 65 20 63 | path variable c| 00000120 61 6e 20 62 65 20 73 65 74 20 75 70 0a 66 6f 72 |an be set up.for| 00000130 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 2c 20 | the directory, | 00000140 61 6c 6c 6f 77 69 6e 67 20 75 6e 61 6d 62 69 67 |allowing unambig| 00000150 75 6f 75 73 20 79 65 74 20 64 69 72 65 63 74 6f |uous yet directo| 00000160 72 79 20 61 6e 64 20 66 69 6c 69 6e 67 20 73 79 |ry and filing sy| 00000170 73 74 65 6d 0a 69 6e 64 65 70 65 6e 64 65 6e 74 |stem.independent| 00000180 20 66 69 6c 65 20 70 61 74 68 73 20 74 6f 20 62 | file paths to b| 00000190 65 20 71 75 6f 74 65 64 20 66 6f 72 20 61 63 63 |e quoted for acc| 000001a0 65 73 73 69 6e 67 20 6f 74 68 65 72 20 70 61 74 |essing other pat| 000001b0 63 68 20 66 69 6c 65 73 2c 0a 74 72 61 6e 73 66 |ch files,.transf| 000001c0 6f 72 6d 20 66 69 6c 65 73 20 61 6e 64 20 2a 63 |orm files and *c| 000001d0 6f 6d 6d 61 6e 64 73 2e 0a 0a 44 69 72 65 63 74 |ommands...Direct| 000001e0 6f 72 79 20 76 65 72 69 66 69 63 61 74 69 6f 6e |ory verification| 000001f0 2e 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |..--------------| 00000200 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 57 68 65 6e 20 77 |---------.When w| 00000210 72 69 74 69 6e 67 20 70 61 74 63 68 20 66 69 6c |riting patch fil| 00000220 65 73 2c 20 79 6f 75 20 73 68 6f 75 6c 64 20 72 |es, you should r| 00000230 65 6d 65 6d 62 65 72 20 74 68 61 74 20 21 50 61 |emember that !Pa| 00000240 74 63 68 20 6e 65 65 64 73 20 74 6f 20 62 65 20 |tch needs to be | 00000250 61 62 6c 65 0a 74 6f 20 76 65 72 69 66 79 20 74 |able.to verify t| 00000260 68 61 74 20 74 68 65 20 63 6f 72 72 65 63 74 20 |hat the correct | 00000270 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 69 72 65 |application dire| 00000280 63 74 6f 72 79 20 69 73 20 62 65 69 6e 67 20 64 |ctory is being d| 00000290 65 61 6c 74 20 77 69 74 68 2e 20 53 6f 0a 66 6f |ealt with. So.fo| 000002a0 72 20 65 78 61 6d 70 6c 65 20 74 68 65 20 73 6f |r example the so| 000002b0 6c 65 20 70 75 72 70 6f 73 65 20 6f 66 20 74 68 |le purpose of th| 000002c0 65 20 70 61 74 63 68 20 6d 61 79 20 62 65 20 74 |e patch may be t| 000002d0 6f 20 70 75 74 20 61 20 21 53 70 72 69 74 65 73 |o put a !Sprites| 000002e0 32 32 20 66 69 6c 65 0a 69 6e 74 6f 20 74 68 65 |22 file.into the| 000002f0 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 64 69 72 | application dir| 00000300 65 63 74 6f 72 79 2c 20 62 75 74 20 74 68 69 73 |ectory, but this| 00000310 20 77 69 6c 6c 20 6e 6f 74 20 62 65 20 73 75 66 | will not be suf| 00000320 66 69 63 69 65 6e 74 20 66 6f 72 0a 21 50 61 74 |ficient for.!Pat| 00000330 63 68 20 74 6f 20 62 65 20 63 65 72 74 61 69 6e |ch to be certain| 00000340 20 74 68 61 74 20 69 74 20 69 73 20 70 61 74 63 | that it is patc| 00000350 68 69 6e 67 20 74 68 65 20 63 6f 72 72 65 63 74 |hing the correct| 00000360 20 64 69 72 65 63 74 6f 72 79 2e 20 54 68 65 20 | directory. The | 00000370 62 65 73 74 0a 77 61 79 20 69 73 20 74 6f 20 73 |best.way is to s| 00000380 70 65 63 69 66 79 20 73 6f 6d 65 20 77 6f 72 64 |pecify some word| 00000390 73 20 69 6e 20 74 68 65 20 21 52 75 6e 49 6d 61 |s in the !RunIma| 000003a0 67 65 20 74 68 61 74 20 21 50 61 74 63 68 20 63 |ge that !Patch c| 000003b0 61 6e 20 76 65 72 69 66 79 2e 20 49 74 0a 77 69 |an verify. It.wi| 000003c0 6c 6c 20 74 68 65 6e 20 6f 6e 6c 79 20 6d 6f 76 |ll then only mov| 000003d0 65 20 74 68 65 20 21 53 70 72 69 74 65 73 32 32 |e the !Sprites22| 000003e0 20 66 69 6c 65 20 69 6e 20 69 66 20 74 68 65 20 | file in if the | 000003f0 77 6f 72 64 73 20 69 6e 20 74 68 65 20 21 52 75 |words in the !Ru| 00000400 6e 49 6d 61 67 65 0a 6d 61 74 63 68 2e 0a 0a 54 |nImage.match...T| 00000410 68 65 72 65 20 73 68 6f 75 6c 64 20 61 6c 77 61 |here should alwa| 00000420 79 73 20 62 65 20 73 6f 6d 65 20 77 6f 72 64 73 |ys be some words| 00000430 2c 20 62 79 74 65 73 20 6f 72 20 73 74 72 69 6e |, bytes or strin| 00000440 67 73 20 69 6e 20 61 20 70 61 74 63 68 20 74 68 |gs in a patch th| 00000450 61 74 0a 61 63 74 75 61 6c 6c 79 20 63 68 61 6e |at.actually chan| 00000460 67 65 20 28 6f 72 20 61 20 66 69 6c 65 20 77 68 |ge (or a file wh| 00000470 69 63 68 20 69 73 20 63 72 65 61 74 65 64 20 6f |ich is created o| 00000480 72 20 64 65 6c 65 74 65 64 29 2e 20 49 66 20 6e |r deleted). If n| 00000490 6f 74 2c 20 21 50 61 74 63 68 0a 63 61 6e 6e 6f |ot, !Patch.canno| 000004a0 74 20 74 65 6c 6c 20 74 68 65 20 64 69 66 66 65 |t tell the diffe| 000004b0 72 65 6e 63 65 20 62 65 74 77 65 65 6e 20 61 20 |rence between a | 000004c0 64 69 72 65 63 74 6f 72 79 20 77 68 69 63 68 20 |directory which | 000004d0 68 61 73 20 68 61 64 20 74 68 65 20 70 61 74 63 |has had the patc| 000004e0 68 0a 61 70 70 6c 69 65 64 20 74 6f 20 69 74 20 |h.applied to it | 000004f0 61 6e 64 20 6f 6e 65 20 77 68 69 63 68 20 68 61 |and one which ha| 00000500 73 20 6e 6f 74 2e 20 54 68 69 73 20 69 73 20 6e |s not. This is n| 00000510 6f 74 20 61 20 70 61 72 74 69 63 75 6c 61 72 6c |ot a particularl| 00000520 79 20 67 72 65 61 74 0a 72 65 73 74 72 69 63 74 |y great.restrict| 00000530 69 6f 6e 20 2d 20 74 68 65 72 65 20 69 73 20 61 |ion - there is a| 00000540 6c 77 61 79 73 20 61 20 76 65 72 73 69 6f 6e 20 |lways a version | 00000550 6e 75 6d 62 65 72 20 69 6e 20 73 6f 6d 65 20 66 |number in some f| 00000560 69 6c 65 20 6f 72 20 6f 74 68 65 72 0a 74 68 61 |ile or other.tha| 00000570 74 20 73 68 6f 75 6c 64 20 62 65 20 6d 6f 64 69 |t should be modi| 00000580 66 69 65 64 20 61 6e 79 77 61 79 2e 0a 0a 46 69 |fied anyway...Fi| 00000590 6c 65 20 65 78 74 65 6e 73 69 6f 6e 2e 0a 2d 2d |le extension..--| 000005a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 49 74 |-------------.It| 000005b0 20 69 73 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 | is possible to | 000005c0 65 78 74 65 6e 64 20 74 68 65 20 66 69 6c 65 20 |extend the file | 000005d0 62 65 69 6e 67 20 70 61 74 63 68 65 64 2c 20 73 |being patched, s| 000005e0 69 6d 70 6c 79 20 62 79 20 73 70 65 63 69 66 79 |imply by specify| 000005f0 69 6e 67 0a 43 68 61 6e 67 65 57 6f 72 64 20 63 |ing.ChangeWord c| 00000600 6f 6d 6d 61 6e 64 73 20 77 68 69 63 68 20 61 72 |ommands which ar| 00000610 65 20 6f 66 66 20 74 68 65 20 65 6e 64 20 6f 66 |e off the end of| 00000620 20 74 68 65 20 66 69 6c 65 2e 20 49 6e 20 74 68 | the file. In th| 00000630 69 73 20 63 61 73 65 2c 20 74 68 65 0a 6f 6c 64 |is case, the.old| 00000640 20 62 79 74 65 73 20 73 68 6f 75 6c 64 20 62 65 | bytes should be| 00000650 20 73 70 65 63 69 66 69 65 64 20 61 73 20 26 30 | specified as &0| 00000660 30 2e 0a 0a 46 69 6c 65 20 74 79 70 65 73 2e 0a |0...File types..| 00000670 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 57 68 65 6e |-----------.When| 00000680 20 73 70 65 63 69 66 79 69 6e 67 20 66 69 6c 65 | specifying file| 00000690 20 74 79 70 65 73 2c 20 61 73 20 77 65 6c 6c 20 | types, as well | 000006a0 61 73 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 |as the standard | 000006b0 28 72 65 61 6c 29 20 66 69 6c 65 20 74 79 70 65 |(real) file type| 000006c0 73 20 74 68 65 0a 66 6f 6c 6c 6f 77 69 6e 67 20 |s the.following | 000006d0 6e 75 6d 62 65 72 73 20 6d 61 79 20 62 65 20 75 |numbers may be u| 000006e0 73 65 64 3a 0a 0a 20 20 20 20 20 20 20 20 26 32 |sed:.. &2| 000006f0 30 30 30 20 20 20 20 20 20 20 20 20 20 20 41 70 |000 Ap| 00000700 70 6c 69 63 61 74 69 6f 6e 20 64 69 72 65 63 74 |plication direct| 00000710 6f 72 79 0a 20 20 20 20 20 20 20 20 26 31 30 30 |ory. &100| 00000720 30 20 20 20 20 20 20 20 20 20 20 20 53 74 61 6e |0 Stan| 00000730 64 61 72 64 20 64 69 72 65 63 74 6f 72 79 0a 20 |dard directory. | 00000740 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20 20 | 0 | 00000750 20 20 20 20 20 20 20 46 69 6c 65 20 74 79 70 65 | File type| 00000760 20 6e 6f 74 20 69 6d 70 6f 72 74 61 6e 74 20 28 | not important (| 00000770 61 6e 79 74 68 69 6e 67 20 77 69 6c 6c 20 6d 61 |anything will ma| 00000780 74 63 68 29 0a 20 20 20 20 20 20 20 20 2d 31 20 |tch). -1 | 00000790 20 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 74 | Unt| 000007a0 79 70 65 64 20 66 69 6c 65 20 28 6c 6f 61 64 20 |yped file (load | 000007b0 61 6e 64 20 65 78 65 63 20 61 64 64 72 65 73 73 |and exec address| 000007c0 65 73 29 0a 0a 50 61 74 63 68 20 66 69 6c 65 20 |es)..Patch file | 000007d0 66 6f 72 6d 61 74 2e 0a 2d 2d 2d 2d 2d 2d 2d 2d |format..--------| 000007e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 54 68 65 20 42 |----------.The B| 000007f0 6f 6f 74 53 74 72 61 70 20 70 61 74 63 68 20 66 |ootStrap patch f| 00000800 69 6c 65 20 69 6e 73 69 64 65 20 21 50 61 74 63 |ile inside !Patc| 00000810 68 20 69 73 20 72 65 61 64 20 6f 6e 20 73 74 61 |h is read on sta| 00000820 72 74 75 70 2c 20 77 68 69 63 68 20 63 61 75 73 |rtup, which caus| 00000830 65 73 20 74 68 65 0a 70 61 74 63 68 20 66 69 6c |es the.patch fil| 00000840 65 73 20 73 74 6f 72 65 64 20 69 6e 73 69 64 65 |es stored inside| 00000850 20 74 68 65 20 50 61 74 63 68 65 73 20 73 75 62 | the Patches sub| 00000860 2d 64 69 72 65 63 74 6f 72 79 20 74 6f 20 62 65 |-directory to be| 00000870 20 72 65 61 64 2e 20 50 61 74 63 68 20 66 69 6c | read. Patch fil| 00000880 65 73 0a 73 68 6f 75 6c 64 20 68 61 76 65 20 61 |es.should have a| 00000890 20 66 69 6c 65 74 79 70 65 20 6f 66 20 50 61 74 | filetype of Pat| 000008a0 63 68 20 28 26 46 43 33 29 2e 20 46 69 6c 65 73 |ch (&FC3). Files| 000008b0 20 77 69 74 68 20 61 6e 79 20 6f 74 68 65 72 20 | with any other | 000008c0 66 69 6c 65 74 79 70 65 20 77 69 6c 6c 0a 62 65 |filetype will.be| 000008d0 20 69 67 6e 6f 72 65 64 2e 0a 0a 54 68 65 20 70 | ignored...The p| 000008e0 61 74 63 68 20 66 69 6c 65 73 20 61 72 65 20 74 |atch files are t| 000008f0 65 78 74 75 61 6c 20 69 6e 20 6e 61 74 75 72 65 |extual in nature| 00000900 2e 20 45 61 63 68 20 6c 69 6e 65 20 6f 66 20 61 |. Each line of a| 00000910 20 70 61 74 63 68 20 66 69 6c 65 20 63 61 6e 0a | patch file can.| 00000920 62 65 20 6f 6e 65 20 6f 66 3a 0a 0a 20 20 20 20 |be one of:.. | 00000930 62 6c 61 6e 6b 0a 20 20 20 20 73 74 61 72 74 20 |blank. start | 00000940 77 69 74 68 20 61 20 23 20 74 6f 20 62 65 20 61 |with a # to be a| 00000950 20 63 6f 6d 6d 65 6e 74 20 6c 69 6e 65 0a 20 20 | comment line. | 00000960 20 20 6f 66 20 74 68 65 20 66 6f 72 6d 20 43 6f | of the form Co| 00000970 6d 6d 61 6e 64 3a 6f 74 68 65 72 20 70 61 72 61 |mmand:other para| 00000980 6d 65 74 65 72 73 0a 0a 42 6c 61 6e 6b 20 61 6e |meters..Blank an| 00000990 64 20 63 6f 6d 6d 65 6e 74 20 6c 69 6e 65 73 20 |d comment lines | 000009a0 61 72 65 20 69 67 6e 6f 72 65 64 2e 0a 4f 74 68 |are ignored..Oth| 000009b0 65 72 20 6c 69 6e 65 73 20 68 61 76 65 20 74 68 |er lines have th| 000009c0 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 65 61 6e |e following mean| 000009d0 69 6e 67 73 3a 0a 0a 50 61 74 63 68 65 73 44 69 |ings:..PatchesDi| 000009e0 72 3a 3c 66 69 6c 65 20 6f 72 20 64 69 72 65 63 |r:<file or direc| 000009f0 74 6f 72 79 20 70 61 74 68 3e 0a 54 68 69 73 20 |tory path>.This | 00000a00 63 61 75 73 65 73 20 74 68 65 20 70 61 74 68 20 |causes the path | 00000a10 73 70 65 63 69 66 69 65 64 20 74 6f 20 62 65 20 |specified to be | 00000a20 72 65 63 75 72 73 69 76 65 6c 79 20 73 63 61 6e |recursively scan| 00000a30 6e 65 64 20 66 6f 72 20 6d 6f 72 65 20 70 61 74 |ned for more pat| 00000a40 63 68 0a 66 69 6c 65 73 2e 20 54 68 69 73 20 69 |ch.files. This i| 00000a50 73 20 74 79 70 69 63 61 6c 6c 79 20 75 73 65 64 |s typically used| 00000a60 20 73 6f 20 74 68 61 74 20 79 6f 75 20 6f 6e 6c | so that you onl| 00000a70 79 20 68 61 76 65 20 74 6f 20 46 69 6c 65 72 5f |y have to Filer_| 00000a80 52 75 6e 20 6f 6e 65 0a 70 61 74 63 68 20 66 69 |Run one.patch fi| 00000a90 6c 65 20 28 65 67 2e 20 46 69 6c 65 72 5f 52 75 |le (eg. Filer_Ru| 00000aa0 6e 20 4d 79 50 61 74 63 68 3a 53 74 61 72 74 55 |n MyPatch:StartU| 00000ab0 70 29 20 69 6e 20 79 6f 75 72 20 21 52 75 6e 20 |p) in your !Run | 00000ac0 66 69 6c 65 20 74 6f 20 67 65 74 0a 21 50 61 74 |file to get.!Pat| 00000ad0 63 68 20 74 6f 20 61 75 74 6f 6d 61 74 69 63 61 |ch to automatica| 00000ae0 6c 6c 79 20 66 69 6e 64 20 61 6c 6c 20 74 68 65 |lly find all the| 00000af0 20 70 61 74 63 68 20 66 69 6c 65 73 20 69 6e 20 | patch files in | 00000b00 74 68 65 20 64 69 72 65 63 74 6f 72 79 0a 73 70 |the directory.sp| 00000b10 65 63 69 66 69 65 64 2e 0a 65 67 2e 0a 50 61 74 |ecified..eg..Pat| 00000b20 63 68 65 73 44 69 72 3a 50 61 74 63 68 3a 50 61 |chesDir:Patch:Pa| 00000b30 74 63 68 65 73 0a 0a 54 72 61 6e 73 66 6f 72 6d |tches..Transform| 00000b40 73 46 69 6c 65 3a 3c 66 69 6c 65 20 70 61 74 68 |sFile:<file path| 00000b50 3e 0a 54 68 69 73 20 61 64 64 73 20 74 68 65 20 |>.This adds the | 00000b60 66 69 6c 65 20 73 70 65 63 69 66 69 65 64 20 74 |file specified t| 00000b70 6f 20 74 68 65 20 6c 69 73 74 20 6f 66 20 66 69 |o the list of fi| 00000b80 6c 65 73 20 6c 6f 6f 6b 65 64 20 69 6e 20 74 6f |les looked in to| 00000b90 20 62 75 69 6c 64 20 74 68 65 0a 2a 63 6f 6d 6d | build the.*comm| 00000ba0 61 6e 64 73 20 66 6f 72 20 70 65 72 66 6f 72 6d |ands for perform| 00000bb0 69 6e 67 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 |ing transformati| 00000bc0 6f 6e 73 2e 0a 65 67 3a 0a 54 72 61 6e 73 66 6f |ons..eg:.Transfo| 00000bd0 72 6d 73 46 69 6c 65 3a 50 61 74 63 68 3a 54 72 |rmsFile:Patch:Tr| 00000be0 61 6e 73 66 6f 72 6d 73 0a 0a 41 70 70 6c 69 63 |ansforms..Applic| 00000bf0 61 74 69 6f 6e 3a 3c 70 72 6f 67 72 61 6d 20 6e |ation:<program n| 00000c00 61 6d 65 3e 20 3c 66 69 6c 65 20 74 79 70 65 3e |ame> <file type>| 00000c10 0a 54 68 69 73 20 69 6e 74 72 6f 64 75 63 65 73 |.This introduces| 00000c20 20 73 6f 6d 65 20 70 61 74 63 68 65 73 20 66 6f | some patches fo| 00000c30 72 20 74 68 65 20 6e 61 6d 65 64 20 61 70 70 6c |r the named appl| 00000c40 69 63 61 74 69 6f 6e 2e 0a 65 67 3a 0a 41 70 70 |ication..eg:.App| 00000c50 6c 69 63 61 74 69 6f 6e 3a 21 50 43 45 6d 20 26 |lication:!PCEm &| 00000c60 32 30 30 30 0a 0a 44 65 73 63 72 69 70 74 69 6f |2000..Descriptio| 00000c70 6e 3a 3c 70 72 6f 67 72 61 6d 20 64 65 73 63 72 |n:<program descr| 00000c80 69 70 74 69 6f 6e 3e 0a 54 68 69 73 20 69 73 20 |iption>.This is | 00000c90 61 20 74 65 78 74 75 61 6c 20 64 65 73 63 72 69 |a textual descri| 00000ca0 70 74 69 6f 6e 20 6f 66 20 74 68 65 20 61 70 70 |ption of the app| 00000cb0 6c 69 63 61 74 69 6f 6e 2e 0a 65 67 3a 0a 44 65 |lication..eg:.De| 00000cc0 73 63 72 69 70 74 69 6f 6e 3a 41 63 6f 72 6e 20 |scription:Acorn | 00000cd0 50 43 20 45 6d 75 6c 61 74 6f 72 0a 0a 50 61 74 |PC Emulator..Pat| 00000ce0 63 68 3a 3c 70 61 74 63 68 20 6e 61 6d 65 3e 0a |ch:<patch name>.| 00000cf0 54 68 69 73 20 69 6e 74 72 6f 64 75 63 65 73 20 |This introduces | 00000d00 61 20 70 61 74 63 68 20 61 6e 64 20 67 69 76 65 |a patch and give| 00000d10 73 20 69 74 20 61 20 74 65 78 74 75 61 6c 20 6e |s it a textual n| 00000d20 61 6d 65 2e 20 54 68 69 73 20 6e 61 6d 65 20 77 |ame. This name w| 00000d30 69 6c 6c 20 62 65 20 77 68 61 74 0a 69 73 20 71 |ill be what.is q| 00000d40 75 6f 74 65 64 20 69 6e 20 74 68 65 20 70 61 74 |uoted in the pat| 00000d50 63 68 20 71 75 65 72 79 20 77 69 6e 64 6f 77 2e |ch query window.| 00000d60 0a 65 67 3a 0a 50 61 74 63 68 3a 46 69 78 20 62 |.eg:.Patch:Fix b| 00000d70 75 67 20 69 6e 20 76 65 72 73 69 6f 6e 20 31 2e |ug in version 1.| 00000d80 36 30 20 77 69 74 68 20 44 4f 53 44 69 73 63 20 |60 with DOSDisc | 00000d90 68 61 72 64 20 64 69 73 6b 20 69 6d 61 67 65 73 |hard disk images| 00000da0 0a 0a 46 69 6c 65 3a 3c 66 69 6c 65 20 6e 61 6d |..File:<file nam| 00000db0 65 3e 20 3c 66 69 6c 65 20 74 79 70 65 3e 0a 54 |e> <file type>.T| 00000dc0 68 69 73 20 69 6e 74 72 6f 64 75 63 65 73 20 73 |his introduces s| 00000dd0 6f 6d 65 20 70 61 74 63 68 65 73 20 66 6f 72 20 |ome patches for | 00000de0 74 68 65 20 6e 61 6d 65 64 20 66 69 6c 65 20 69 |the named file i| 00000df0 6e 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f |n the applicatio| 00000e00 6e 2e 20 4e 6f 74 65 0a 74 68 61 74 20 74 68 65 |n. Note.that the| 00000e10 20 66 69 6c 65 20 6e 61 6d 65 20 71 75 6f 74 65 | file name quote| 00000e20 64 20 73 68 6f 75 6c 64 20 61 6c 77 61 79 73 20 |d should always | 00000e30 73 74 61 72 74 20 77 69 74 68 20 74 68 65 20 61 |start with the a| 00000e40 70 70 6c 69 63 61 74 69 6f 6e 20 64 69 72 65 63 |pplication direc| 00000e50 74 6f 72 79 0a 2d 20 74 68 69 73 20 61 6c 6c 6f |tory.- this allo| 00000e60 77 73 20 69 6e 64 69 76 69 64 75 61 6c 20 66 69 |ws individual fi| 00000e70 6c 65 73 20 74 6f 20 68 61 76 65 20 70 61 74 63 |les to have patc| 00000e80 68 65 73 20 66 6f 72 20 74 68 65 6d 2e 0a 65 67 |hes for them..eg| 00000e90 3a 0a 46 69 6c 65 3a 21 50 43 45 6d 2e 21 52 75 |:.File:!PCEm.!Ru| 00000ea0 6e 49 6d 61 67 65 20 26 46 46 38 0a 0a 54 72 61 |nImage &FF8..Tra| 00000eb0 6e 73 66 6f 72 6d 3a 3c 74 72 61 6e 73 66 6f 72 |nsform:<transfor| 00000ec0 6d 3e 0a 54 68 69 73 20 6f 70 74 69 6f 6e 61 6c |m>.This optional| 00000ed0 20 66 69 65 6c 64 20 69 6e 64 69 63 61 74 65 73 | field indicates| 00000ee0 20 74 68 61 74 20 74 68 65 20 66 69 6c 65 20 68 | that the file h| 00000ef0 61 73 20 68 61 64 20 74 68 65 20 6e 61 6d 65 64 |as had the named| 00000f00 20 74 72 61 6e 73 66 6f 72 6d 0a 61 70 70 6c 69 | transform.appli| 00000f10 65 64 20 74 6f 20 69 74 2e 20 54 68 65 20 70 61 |ed to it. The pa| 00000f20 74 63 68 65 73 20 77 69 6c 6c 20 62 65 20 61 70 |tches will be ap| 00000f30 70 6c 69 65 64 20 74 6f 20 74 68 65 20 75 6e 74 |plied to the unt| 00000f40 72 61 6e 73 66 6f 72 6d 65 64 20 66 6f 72 6d 20 |ransformed form | 00000f50 6f 66 0a 74 68 65 20 66 69 6c 65 2e 20 41 20 6c |of.the file. A l| 00000f60 69 73 74 20 6f 66 20 64 65 66 61 75 6c 74 20 74 |ist of default t| 00000f70 72 61 6e 73 66 6f 72 6d 73 20 63 61 6e 20 62 65 |ransforms can be| 00000f80 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 54 72 | found in the Tr| 00000f90 61 6e 73 66 6f 72 6d 73 0a 66 69 6c 65 20 6f 66 |ansforms.file of| 00000fa0 20 21 50 61 74 63 68 2e 20 43 75 72 72 65 6e 74 | !Patch. Current| 00000fb0 6c 79 20 74 68 69 73 20 69 73 20 53 71 75 65 65 |ly this is Squee| 00000fc0 7a 65 2c 20 61 6e 64 20 64 6f 20 6e 6f 74 68 69 |ze, and do nothi| 00000fd0 6e 67 20 28 43 6f 70 79 29 2e 0a 65 67 3a 0a 54 |ng (Copy)..eg:.T| 00000fe0 72 61 6e 73 66 6f 72 6d 3a 53 71 75 65 65 7a 65 |ransform:Squeeze| 00000ff0 0a 0a 4c 6f 63 61 74 69 6f 6e 3a 3c 6c 6f 63 61 |..Location:<loca| 00001000 74 69 6f 6e 3e 0a 54 68 69 73 20 69 6e 64 69 63 |tion>.This indic| 00001010 61 74 65 73 20 74 68 65 20 62 79 74 65 20 6c 6f |ates the byte lo| 00001020 63 61 74 69 6f 6e 20 69 6e 20 74 68 65 20 75 6e |cation in the un| 00001030 73 71 75 65 65 7a 65 64 20 28 6f 72 20 77 68 61 |squeezed (or wha| 00001040 74 65 76 65 72 29 20 66 69 6c 65 20 66 6f 72 0a |tever) file for.| 00001050 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 68 |the following ch| 00001060 61 6e 67 65 73 2e 20 54 6f 20 73 70 65 63 69 66 |anges. To specif| 00001070 79 20 69 6e 20 64 65 63 69 6d 61 6c 20 6a 75 73 |y in decimal jus| 00001080 74 20 67 69 76 65 20 74 68 65 20 6e 75 6d 62 65 |t give the numbe| 00001090 72 2e 20 54 6f 0a 73 70 65 63 69 66 79 20 69 6e |r. To.specify in| 000010a0 20 68 65 78 20 70 72 65 66 69 78 20 74 68 65 20 | hex prefix the | 000010b0 6e 75 6d 62 65 72 20 77 69 74 68 20 61 6e 20 26 |number with an &| 000010c0 2e 20 54 68 65 20 6c 6f 63 61 74 69 6f 6e 20 69 |. The location i| 000010d0 73 20 61 6c 77 61 79 73 20 69 6e 20 74 68 65 0a |s always in the.| 000010e0 75 6e 70 61 74 63 68 65 64 20 66 69 6c 65 2e 20 |unpatched file. | 000010f0 57 68 65 72 65 20 74 68 65 20 70 61 74 63 68 65 |Where the patche| 00001100 64 20 66 69 6c 65 20 65 6e 64 73 20 75 70 20 77 |d file ends up w| 00001110 69 74 68 20 61 20 64 69 66 66 65 72 65 6e 74 a0 |ith a different.| 00001120 6c 65 6e 67 74 68 2c 0a 61 70 70 72 6f 70 72 69 |length,.appropri| 00001130 61 74 65 20 61 64 6a 75 73 74 6d 65 6e 74 73 20 |ate adjustments | 00001140 61 72 65 20 6d 61 64 65 20 74 6f 20 74 68 65 20 |are made to the | 00001150 6c 6f 63 61 74 69 6f 6e 20 69 6e 20 74 68 65 20 |location in the | 00001160 74 61 72 67 65 74 20 66 69 6c 65 2e 0a 45 66 66 |target file..Eff| 00001170 65 63 74 69 76 65 6c 79 20 74 68 69 73 20 6d 65 |ectively this me| 00001180 61 6e 73 20 74 68 61 74 20 74 77 6f 20 6c 6f 63 |ans that two loc| 00001190 61 74 69 6f 6e 73 20 61 72 65 20 6d 61 69 6e 74 |ations are maint| 000011a0 61 69 6e 65 64 2e 0a 65 67 3a 0a 4c 6f 63 61 74 |ained..eg:.Locat| 000011b0 69 6f 6e 3a 26 31 42 32 44 30 0a 0a 43 68 61 6e |ion:&1B2D0..Chan| 000011c0 67 65 57 6f 72 64 3a 3c 66 72 6f 6d 3e 20 3c 74 |geWord:<from> <t| 000011d0 6f 3e 0a 54 68 69 73 20 64 65 73 63 72 69 62 65 |o>.This describe| 000011e0 73 20 74 68 65 20 63 68 61 6e 67 65 20 72 65 71 |s the change req| 000011f0 75 69 72 65 64 20 74 6f 20 61 20 73 69 6e 67 6c |uired to a singl| 00001200 65 20 77 6f 72 64 20 61 74 20 74 68 65 20 63 75 |e word at the cu| 00001210 72 72 65 6e 74 20 6c 6f 63 61 74 69 6f 6e 2e 0a |rrent location..| 00001220 4c 6f 63 61 74 69 6f 6e 20 61 64 76 61 6e 63 65 |Location advance| 00001230 73 20 62 79 20 66 6f 75 72 20 65 61 63 68 20 63 |s by four each c| 00001240 68 61 6e 67 65 2c 20 73 6f 20 79 6f 75 20 6d 61 |hange, so you ma| 00001250 79 20 67 69 76 65 20 61 20 73 65 71 75 65 6e 63 |y give a sequenc| 00001260 65 2e 20 54 68 65 0a 63 75 72 72 65 6e 74 20 6c |e. The.current l| 00001270 6f 63 61 74 69 6f 6e 20 73 68 6f 75 6c 64 20 62 |ocation should b| 00001280 65 20 77 6f 72 64 20 61 6c 69 67 6e 65 64 20 28 |e word aligned (| 00001290 61 20 6d 75 6c 74 69 70 6c 65 20 6f 66 20 66 6f |a multiple of fo| 000012a0 75 72 29 20 77 68 65 6e 20 74 68 69 73 0a 6b 65 |ur) when this.ke| 000012b0 79 77 6f 72 64 20 69 73 20 73 70 65 63 69 66 69 |yword is specifi| 000012c0 65 64 2e 0a 65 67 3a 0a 43 68 61 6e 67 65 57 6f |ed..eg:.ChangeWo| 000012d0 72 64 3a 26 30 35 39 44 30 30 30 38 20 26 31 33 |rd:&059D0008 &13| 000012e0 35 30 30 30 30 33 0a 43 68 61 6e 67 65 57 6f 72 |500003.ChangeWor| 000012f0 64 3a 26 30 32 38 44 44 30 31 30 20 26 31 33 41 |d:&028DD010 &13A| 00001300 30 30 30 30 30 0a 43 68 61 6e 67 65 57 6f 72 64 |00000.ChangeWord| 00001310 3a 26 31 33 41 30 30 30 30 30 20 26 30 35 39 44 |:&13A00000 &059D| 00001320 30 30 30 38 0a 43 68 61 6e 67 65 57 6f 72 64 3a |0008.ChangeWord:| 00001330 26 31 32 38 44 44 30 31 30 20 26 45 39 35 42 41 |&128DD010 &E95BA| 00001340 38 30 30 0a 0a 56 65 72 69 66 79 57 6f 72 64 3a |800..VerifyWord:| 00001350 3c 77 6f 72 64 3e 0a 54 68 69 73 20 73 70 65 63 |<word>.This spec| 00001360 69 66 69 65 73 20 74 68 61 74 20 74 68 65 20 77 |ifies that the w| 00001370 6f 72 64 20 61 74 20 74 68 65 20 63 75 72 72 65 |ord at the curre| 00001380 6e 74 20 6c 6f 63 61 74 69 6f 6e 20 6d 75 73 74 |nt location must| 00001390 20 6d 61 74 63 68 20 74 68 65 20 77 6f 72 64 0a | match the word.| 000013a0 73 70 65 63 69 66 69 65 64 2e 20 54 68 65 20 6c |specified. The l| 000013b0 6f 63 61 74 69 6f 6e 73 20 61 72 65 20 61 64 76 |ocations are adv| 000013c0 61 6e 63 65 64 20 62 79 20 66 6f 75 72 2e 0a 65 |anced by four..e| 000013d0 67 3a 0a 56 65 72 69 66 79 57 6f 72 64 3a 26 35 |g:.VerifyWord:&5| 000013e0 34 32 33 30 30 30 31 0a 0a 43 68 61 6e 67 65 42 |4230001..ChangeB| 000013f0 79 74 65 3a 3c 66 72 6f 6d 3e 20 3c 74 6f 3e 0a |yte:<from> <to>.| 00001400 54 68 69 73 20 64 65 73 63 72 69 62 65 73 20 74 |This describes t| 00001410 68 65 20 63 68 61 6e 67 65 20 72 65 71 75 69 72 |he change requir| 00001420 65 64 20 74 6f 20 61 20 73 69 6e 67 6c 65 20 62 |ed to a single b| 00001430 79 74 65 20 61 74 20 74 68 65 20 63 75 72 72 65 |yte at the curre| 00001440 6e 74 20 6c 6f 63 61 74 69 6f 6e 2e 0a 4c 6f 63 |nt location..Loc| 00001450 61 74 69 6f 6e 20 61 64 76 61 6e 63 65 73 20 62 |ation advances b| 00001460 79 20 6f 6e 65 20 65 61 63 68 20 63 68 61 6e 67 |y one each chang| 00001470 65 2c 20 73 6f 20 79 6f 75 20 6d 61 79 20 67 69 |e, so you may gi| 00001480 76 65 20 61 20 73 65 71 75 65 6e 63 65 2e 0a 65 |ve a sequence..e| 00001490 67 3a 0a 43 68 61 6e 67 65 42 79 74 65 3a 26 42 |g:.ChangeByte:&B| 000014a0 44 20 36 35 0a 0a 56 65 72 69 66 79 42 79 74 65 |D 65..VerifyByte| 000014b0 3a 3c 62 79 74 65 3e 0a 54 68 69 73 20 73 70 65 |:<byte>.This spe| 000014c0 63 69 66 69 65 73 20 74 68 61 74 20 74 68 65 20 |cifies that the | 000014d0 62 79 74 65 20 61 74 20 74 68 65 20 63 75 72 72 |byte at the curr| 000014e0 65 6e 74 20 6c 6f 63 61 74 69 6f 6e 20 6d 75 73 |ent location mus| 000014f0 74 20 6d 61 74 63 68 20 74 68 65 20 62 79 74 65 |t match the byte| 00001500 0a 73 70 65 63 69 66 69 65 64 2e 20 54 68 65 20 |.specified. The | 00001510 6c 6f 63 61 74 69 6f 6e 73 20 61 72 65 20 61 64 |locations are ad| 00001520 76 61 6e 63 65 64 20 62 79 20 6f 6e 65 2e 0a 65 |vanced by one..e| 00001530 67 3a 0a 56 65 72 69 66 79 42 79 74 65 3a 26 32 |g:.VerifyByte:&2| 00001540 33 0a 0a 43 68 61 6e 67 65 53 74 72 69 6e 67 3a |3..ChangeString:| 00001550 3c 66 72 6f 6d 3e 20 3c 74 6f 3e 0a 54 68 69 73 |<from> <to>.This| 00001560 20 64 65 73 63 72 69 62 65 73 20 74 68 65 20 63 | describes the c| 00001570 68 61 6e 67 65 20 72 65 71 75 69 72 65 64 20 74 |hange required t| 00001580 6f 20 61 20 73 74 72 69 6e 67 20 61 74 20 74 68 |o a string at th| 00001590 65 20 67 69 76 65 6e 20 6c 6f 63 61 74 69 6f 6e |e given location| 000015a0 2e 0a 3c 66 72 6f 6d 3e 20 61 6e 64 20 3c 74 6f |..<from> and <to| 000015b0 3e 20 6d 75 73 74 20 62 65 20 6f 66 20 74 68 65 |> must be of the| 000015c0 20 73 61 6d 65 20 6c 65 6e 67 74 68 2c 20 61 6e | same length, an| 000015d0 64 20 61 72 65 20 69 6e 20 47 53 54 72 61 6e 73 |d are in GSTrans| 000015e0 20 66 6f 72 6d 61 74 2e 0a 54 68 65 20 73 74 72 | format..The str| 000015f0 69 6e 67 73 20 6d 75 73 74 20 6e 6f 74 20 63 6f |ings must not co| 00001600 6e 74 61 69 6e 20 73 70 61 63 65 73 2c 20 61 73 |ntain spaces, as| 00001610 20 73 70 61 63 65 20 69 73 20 74 68 65 20 73 65 | space is the se| 00001620 70 65 72 61 74 6f 72 20 62 65 74 77 65 65 6e 20 |perator between | 00001630 74 68 65 0a 74 77 6f 20 73 74 72 69 6e 67 73 2e |the.two strings.| 00001640 20 55 73 65 20 3c 33 32 3e 20 69 6e 73 74 65 61 | Use <32> instea| 00001650 64 20 6f 66 20 73 70 61 63 65 2e 20 54 68 65 20 |d of space. The | 00001660 63 75 72 72 65 6e 74 20 6c 6f 63 61 74 69 6f 6e |current location| 00001670 20 61 64 76 61 6e 63 65 73 20 62 79 0a 74 68 65 | advances by.the| 00001680 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 20 73 | length of the s| 00001690 74 72 69 6e 67 73 2c 20 73 6f 20 79 6f 75 20 6d |trings, so you m| 000016a0 61 79 20 67 69 76 65 20 61 20 73 65 71 75 65 6e |ay give a sequen| 000016b0 63 65 2e 0a 65 67 3a 0a 43 68 61 6e 67 65 53 74 |ce..eg:.ChangeSt| 000016c0 72 69 6e 67 3a 56 65 72 69 66 79 3c 33 32 3e 3a |ring:Verify<32>:| 000016d0 34 7c 4d 20 56 65 72 69 66 79 3c 33 32 3e 34 7c |4|M Verify<32>4|| 000016e0 4d 3c 30 3e 0a 0a 56 65 72 69 66 79 53 74 72 69 |M<0>..VerifyStri| 000016f0 6e 67 3a 3c 73 74 72 69 6e 67 3e 0a 54 68 69 73 |ng:<string>.This| 00001700 20 73 70 65 63 69 66 69 65 73 20 61 20 73 74 72 | specifies a str| 00001710 69 6e 67 20 77 68 69 63 68 20 6d 75 73 74 20 6d |ing which must m| 00001720 61 74 63 68 20 74 68 65 20 73 74 72 69 6e 67 20 |atch the string | 00001730 66 6f 75 6e 64 20 61 74 20 74 68 65 20 63 75 72 |found at the cur| 00001740 72 65 6e 74 0a 6c 6f 63 61 74 69 6f 6e 2e 20 54 |rent.location. T| 00001750 68 65 20 6c 6f 63 61 74 69 6f 6e 73 20 61 72 65 |he locations are| 00001760 20 74 68 65 6e 20 61 64 76 61 6e 63 65 64 20 62 | then advanced b| 00001770 79 20 74 68 65 20 6c 65 6e 67 74 68 20 6f 66 20 |y the length of | 00001780 74 68 65 20 73 74 72 69 6e 67 2e 0a 65 67 3a 0a |the string..eg:.| 00001790 56 65 72 69 66 79 53 74 72 69 6e 67 3a 3c 31 32 |VerifyString:<12| 000017a0 37 3e 66 6f 6f 62 61 72 3c 33 32 3e 3c 30 3e 0a |7>foobar<32><0>.| 000017b0 0a 52 65 70 6c 61 63 65 46 69 6c 65 3a 3c 66 69 |.ReplaceFile:<fi| 000017c0 6c 65 20 6e 61 6d 65 3e 0a 4f 6c 64 43 6f 6e 74 |le name>.OldCont| 000017d0 65 6e 74 73 3a 3c 66 69 6c 65 20 6e 61 6d 65 3e |ents:<file name>| 000017e0 20 3c 66 69 6c 65 20 74 79 70 65 3e 0a 4e 65 77 | <file type>.New| 000017f0 43 6f 6e 74 65 6e 74 73 3a 3c 66 69 6c 65 20 6e |Contents:<file n| 00001800 61 6d 65 3e 20 3c 66 69 6c 65 20 74 79 70 65 3e |ame> <file type>| 00001810 0a 54 68 69 73 20 63 61 75 73 65 73 20 74 68 65 |.This causes the| 00001820 20 66 69 6c 65 20 69 6e 20 74 68 65 20 61 70 70 | file in the app| 00001830 6c 69 63 61 74 69 6f 6e 20 64 69 72 65 63 74 6f |lication directo| 00001840 72 79 20 74 6f 20 62 65 20 72 65 70 6c 61 63 65 |ry to be replace| 00001850 64 20 77 69 74 68 20 61 0a 6e 65 77 20 76 65 72 |d with a.new ver| 00001860 73 69 6f 6e 20 6f 66 20 74 68 65 20 66 69 6c 65 |sion of the file| 00001870 20 73 75 70 70 6c 69 65 64 20 77 69 74 68 69 6e | supplied within| 00001880 20 74 68 65 20 70 61 74 63 68 65 73 20 64 69 72 | the patches dir| 00001890 65 63 74 6f 72 79 2e 20 54 68 65 20 6f 6c 64 0a |ectory. The old.| 000018a0 76 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 66 |version of the f| 000018b0 69 6c 65 20 69 73 20 61 6c 73 6f 20 73 75 70 70 |ile is also supp| 000018c0 6c 69 65 64 20 69 6e 20 74 68 65 20 70 61 74 63 |lied in the patc| 000018d0 68 65 73 20 64 69 72 65 63 74 6f 72 79 20 74 6f |hes directory to| 000018e0 20 61 6c 6c 6f 77 0a 70 61 74 63 68 20 72 65 6d | allow.patch rem| 000018f0 6f 76 61 6c 2e 20 4e 6f 20 63 68 65 63 6b 69 6e |oval. No checkin| 00001900 67 20 6f 66 20 74 68 65 20 66 69 6c 65 20 63 6f |g of the file co| 00001910 6e 74 65 6e 74 73 20 69 73 20 70 65 72 66 6f 72 |ntents is perfor| 00001920 6d 65 64 2c 20 73 6f 20 79 6f 75 0a 73 68 6f 75 |med, so you.shou| 00001930 6c 64 20 65 6e 73 75 72 65 20 74 68 65 72 65 20 |ld ensure there | 00001940 69 73 20 65 6e 6f 75 67 68 20 76 65 72 69 66 79 |is enough verify| 00001950 20 6f 72 20 63 68 61 6e 67 65 20 64 61 74 61 20 | or change data | 00001960 66 6f 72 20 6f 74 68 65 72 20 66 69 6c 65 73 20 |for other files | 00001970 69 6e 0a 74 68 65 20 61 70 70 6c 69 63 61 74 69 |in.the applicati| 00001980 6f 6e 20 74 6f 20 61 6c 6c 6f 77 20 21 50 61 74 |on to allow !Pat| 00001990 63 68 20 74 6f 20 62 65 20 63 65 72 74 61 69 6e |ch to be certain| 000019a0 20 69 74 20 69 73 20 64 65 61 6c 69 6e 67 20 77 | it is dealing w| 000019b0 69 74 68 20 74 68 65 0a 63 6f 72 72 65 63 74 20 |ith the.correct | 000019c0 64 69 72 65 63 74 6f 72 79 20 65 67 2e 20 76 65 |directory eg. ve| 000019d0 72 69 66 79 20 73 6f 6d 65 20 77 6f 72 64 73 20 |rify some words | 000019e0 69 6e 20 74 68 65 20 21 52 75 6e 49 6d 61 67 65 |in the !RunImage| 000019f0 2e 20 59 6f 75 20 6d 61 79 20 75 73 65 0a 76 65 |. You may use.ve| 00001a00 72 69 66 79 20 64 61 74 61 20 66 6f 72 20 74 68 |rify data for th| 00001a10 65 20 66 69 6c 65 20 74 6f 20 62 65 20 72 65 70 |e file to be rep| 00001a20 6c 61 63 65 64 2c 20 73 6f 20 66 6f 72 20 65 78 |laced, so for ex| 00001a30 61 6d 70 6c 65 20 79 6f 75 20 63 6f 75 6c 64 20 |ample you could | 00001a40 76 65 72 69 66 79 0a 74 68 65 20 63 6f 6d 6d 65 |verify.the comme| 00001a50 6e 74 20 73 74 72 69 6e 67 20 61 74 20 74 68 65 |nt string at the| 00001a60 20 73 74 61 72 74 20 6f 66 20 61 20 21 52 75 6e | start of a !Run| 00001a70 20 66 69 6c 65 20 73 69 6e 63 65 20 74 68 61 74 | file since that| 00001a80 20 69 73 20 75 6e 6c 69 6b 65 6c 79 20 74 6f 0a | is unlikely to.| 00001a90 68 61 76 65 20 62 65 65 6e 20 65 64 69 74 65 64 |have been edited| 00001aa0 20 62 79 20 74 68 65 20 75 73 65 72 2e 20 49 66 | by the user. If| 00001ab0 20 79 6f 75 20 64 6f 20 74 68 69 73 2c 20 74 68 | you do this, th| 00001ac0 65 20 64 61 74 61 20 76 65 72 69 66 69 65 64 20 |e data verified | 00001ad0 6d 75 73 74 20 62 65 0a 70 72 65 73 65 6e 74 20 |must be.present | 00001ae0 61 6e 64 20 63 6f 72 72 65 63 74 20 69 6e 20 62 |and correct in b| 00001af0 6f 74 68 20 74 68 65 20 4f 6c 64 43 6f 6e 74 65 |oth the OldConte| 00001b00 6e 74 73 20 66 69 6c 65 20 61 6e 64 20 74 68 65 |nts file and the| 00001b10 20 4e 65 77 43 6f 6e 74 65 6e 74 73 20 66 69 6c | NewContents fil| 00001b20 65 2e 0a 65 67 3a 0a 52 65 70 6c 61 63 65 46 69 |e..eg:.ReplaceFi| 00001b30 6c 65 3a 21 50 43 45 6d 2e 21 42 6f 6f 74 0a 4f |le:!PCEm.!Boot.O| 00001b40 6c 64 43 6f 6e 74 65 6e 74 73 3a 50 61 74 63 68 |ldContents:Patch| 00001b50 3a 46 69 6c 65 73 2e 41 63 6f 72 6e 2e 50 43 45 |:Files.Acorn.PCE| 00001b60 6d 2e 4f 6c 64 2e 21 42 6f 6f 74 20 26 46 45 42 |m.Old.!Boot &FEB| 00001b70 0a 4e 65 77 43 6f 6e 74 65 6e 74 73 3a 50 61 74 |.NewContents:Pat| 00001b80 63 68 3a 46 69 6c 65 73 2e 41 63 6f 72 6e 2e 50 |ch:Files.Acorn.P| 00001b90 43 45 6d 2e 4e 65 77 2e 21 42 6f 6f 74 20 26 46 |CEm.New.!Boot &F| 00001ba0 45 42 0a 0a 43 72 65 61 74 65 46 69 6c 65 3a 3c |EB..CreateFile:<| 00001bb0 66 69 6c 65 20 6e 61 6d 65 3e 0a 4e 65 77 43 6f |file name>.NewCo| 00001bc0 6e 74 65 6e 74 73 3a 3c 66 69 6c 65 20 6e 61 6d |ntents:<file nam| 00001bd0 65 3e 20 3c 66 69 6c 65 20 74 79 70 65 3e 0a 54 |e> <file type>.T| 00001be0 68 69 73 20 63 61 75 73 65 73 20 74 68 65 20 66 |his causes the f| 00001bf0 69 6c 65 20 69 6e 20 74 68 65 20 61 70 70 6c 69 |ile in the appli| 00001c00 63 61 74 69 6f 6e 20 64 69 72 65 63 74 6f 72 79 |cation directory| 00001c10 20 74 6f 20 62 65 20 63 72 65 61 74 65 64 2c 20 | to be created, | 00001c20 69 74 73 0a 63 6f 6e 74 65 6e 74 73 20 62 65 69 |its.contents bei| 00001c30 6e 67 20 74 61 6b 65 6e 20 66 72 6f 6d 20 74 68 |ng taken from th| 00001c40 65 20 66 69 6c 65 20 73 70 65 63 69 66 69 65 64 |e file specified| 00001c50 20 69 6e 20 74 68 65 20 70 61 74 63 68 65 73 20 | in the patches | 00001c60 64 69 72 65 63 74 6f 72 79 2e 0a 65 67 3a 0a 43 |directory..eg:.C| 00001c70 72 65 61 74 65 46 69 6c 65 3a 21 50 43 45 6d 2e |reateFile:!PCEm.| 00001c80 21 53 70 72 69 74 65 73 32 32 0a 4e 65 77 43 6f |!Sprites22.NewCo| 00001c90 6e 74 65 6e 74 73 3a 50 61 74 63 68 3a 46 69 6c |ntents:Patch:Fil| 00001ca0 65 73 2e 41 63 6f 72 6e 2e 50 43 45 6d 2e 4e 65 |es.Acorn.PCEm.Ne| 00001cb0 77 2e 21 53 70 72 69 74 65 73 32 32 20 26 46 46 |w.!Sprites22 &FF| 00001cc0 39 0a 43 72 65 61 74 65 46 69 6c 65 3a 21 50 43 |9.CreateFile:!PC| 00001cd0 45 6d 2e 21 53 70 72 69 74 65 73 32 33 0a 4e 65 |Em.!Sprites23.Ne| 00001ce0 77 43 6f 6e 74 65 6e 74 73 3a 50 61 74 63 68 3a |wContents:Patch:| 00001cf0 46 69 6c 65 73 2e 41 63 6f 72 6e 2e 50 43 45 6d |Files.Acorn.PCEm| 00001d00 2e 4e 65 77 2e 21 53 70 72 69 74 65 73 32 33 20 |.New.!Sprites23 | 00001d10 26 46 46 39 0a 0a 44 65 6c 65 74 65 46 69 6c 65 |&FF9..DeleteFile| 00001d20 3a 3c 66 69 6c 65 20 6e 61 6d 65 3e 0a 4f 6c 64 |:<file name>.Old| 00001d30 43 6f 6e 74 65 6e 74 73 3a 3c 66 69 6c 65 20 6e |Contents:<file n| 00001d40 61 6d 65 3e 20 3c 66 69 6c 65 20 74 79 70 65 3e |ame> <file type>| 00001d50 0a 54 68 69 73 20 63 61 75 73 65 73 20 74 68 65 |.This causes the| 00001d60 20 66 69 6c 65 20 69 6e 20 74 68 65 20 61 70 70 | file in the app| 00001d70 6c 69 63 61 74 69 6f 6e 20 64 69 72 65 63 74 6f |lication directo| 00001d80 72 79 20 74 6f 20 62 65 20 64 65 6c 65 74 65 64 |ry to be deleted| 00001d90 2e 20 49 74 73 0a 63 6f 6e 74 65 6e 74 73 20 61 |. Its.contents a| 00001da0 72 65 20 70 72 6f 76 69 64 65 64 20 74 6f 20 61 |re provided to a| 00001db0 6c 6c 6f 77 20 70 61 74 63 68 20 72 65 6d 6f 76 |llow patch remov| 00001dc0 61 6c 2e 0a 65 67 3a 0a 44 65 6c 65 74 65 46 69 |al..eg:.DeleteFi| 00001dd0 6c 65 3a 21 50 43 45 6d 2e 21 42 6f 6f 74 0a 4f |le:!PCEm.!Boot.O| 00001de0 6c 64 43 6f 6e 74 65 6e 74 73 3a 50 61 74 63 68 |ldContents:Patch| 00001df0 3a 46 69 6c 65 73 2e 41 63 6f 72 6e 2e 50 43 45 |:Files.Acorn.PCE| 00001e00 6d 2e 4f 6c 64 2e 21 42 6f 6f 74 20 26 46 45 42 |m.Old.!Boot &FEB| 00001e10 0a 0a 54 72 61 6e 73 66 6f 72 6d 73 20 66 69 6c |..Transforms fil| 00001e20 65 20 66 6f 72 6d 61 74 2e 0a 2d 2d 2d 2d 2d 2d |e format..------| 00001e30 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00001e40 2d 0a 54 68 65 20 74 72 61 6e 73 66 6f 72 6d 73 |-.The transforms| 00001e50 20 66 69 6c 65 73 20 61 72 65 20 70 72 6f 63 65 | files are proce| 00001e60 73 73 65 64 20 75 73 69 6e 67 20 4d 65 73 73 61 |ssed using Messa| 00001e70 67 65 54 72 61 6e 73 2e 20 54 68 65 20 74 6f 6b |geTrans. The tok| 00001e80 65 6e 73 20 6c 6f 6f 6b 65 64 20 75 70 0a 66 6f |ens looked up.fo| 00001e90 72 20 61 20 67 69 76 65 6e 20 74 72 61 6e 73 66 |r a given transf| 00001ea0 6f 72 6d 20 61 72 65 20 3c 74 72 61 6e 73 66 6f |orm are <transfo| 00001eb0 72 6d 3e 5f 50 72 65 70 61 72 65 20 61 6e 64 20 |rm>_Prepare and | 00001ec0 3c 74 72 61 6e 73 66 6f 72 6d 3e 5f 46 69 6e 69 |<transform>_Fini| 00001ed0 73 68 20 74 6f 20 67 65 74 0a 74 68 65 20 61 63 |sh to get.the ac| 00001ee0 74 75 61 6c 20 2a 63 6f 6d 6d 61 6e 64 73 2c 20 |tual *commands, | 00001ef0 61 6e 64 20 3c 74 72 61 6e 73 66 6f 72 6d 3e 5f |and <transform>_| 00001f00 50 72 65 70 61 72 65 53 6c 6f 74 20 61 6e 64 20 |PrepareSlot and | 00001f10 3c 74 72 61 6e 73 66 6f 72 6d 3e 5f 46 69 6e 69 |<transform>_Fini| 00001f20 73 68 53 6c 6f 74 0a 74 6f 20 67 65 74 20 74 68 |shSlot.to get th| 00001f30 65 20 57 69 6d 70 20 73 6c 6f 74 20 73 69 7a 65 |e Wimp slot size| 00001f40 20 28 69 6e 20 4b 29 20 74 68 61 74 20 65 61 63 | (in K) that eac| 00001f50 68 20 63 6f 6d 6d 61 6e 64 20 67 65 74 73 20 74 |h command gets t| 00001f60 6f 20 73 74 61 72 74 20 77 69 74 68 2e 20 54 68 |o start with. Th| 00001f70 65 0a 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 |e.documentation | 00001f80 66 6f 72 20 74 68 65 20 74 72 61 6e 73 66 6f 72 |for the transfor| 00001f90 6d 73 20 69 73 20 68 65 72 65 20 72 61 74 68 65 |ms is here rathe| 00001fa0 72 20 74 68 61 6e 20 69 6e 20 74 68 65 20 54 72 |r than in the Tr| 00001fb0 61 6e 73 66 6f 72 6d 73 20 66 69 6c 65 0a 61 73 |ansforms file.as| 00001fc0 20 4d 65 73 73 61 67 65 54 72 61 6e 73 20 72 65 | MessageTrans re| 00001fd0 61 64 73 20 74 68 65 20 65 6e 74 69 72 65 20 6f |ads the entire o| 00001fe0 66 20 74 68 65 20 54 72 61 6e 73 66 6f 72 6d 73 |f the Transforms| 00001ff0 20 66 69 6c 65 20 69 6e 74 6f 20 6d 65 6d 6f 72 | file into memor| 00002000 79 2c 0a 63 6f 6d 6d 65 6e 74 73 20 61 6e 64 20 |y,.comments and | 00002010 61 6c 6c 2e 0a 0a 46 6f 72 20 3c 74 72 61 6e 73 |all...For <trans| 00002020 66 6f 72 6d 3e 5f 50 72 65 70 61 72 65 2c 20 25 |form>_Prepare, %| 00002030 30 20 69 73 20 74 68 65 20 69 6e 69 74 69 61 6c |0 is the initial| 00002040 20 66 69 6c 65 20 61 6e 64 20 25 31 20 69 73 20 | file and %1 is | 00002050 74 68 65 20 66 69 6c 65 20 74 68 61 74 0a 77 69 |the file that.wi| 00002060 6c 6c 20 61 63 74 75 61 6c 6c 79 20 62 65 20 70 |ll actually be p| 00002070 61 74 63 68 65 64 2e 0a 0a 46 6f 72 20 3c 74 72 |atched...For <tr| 00002080 61 6e 73 66 6f 72 6d 3e 5f 46 69 6e 69 73 68 2c |ansform>_Finish,| 00002090 20 25 30 20 69 73 20 74 68 65 20 70 61 74 63 68 | %0 is the patch| 000020a0 65 64 20 66 69 6c 65 20 61 6e 64 20 25 31 20 69 |ed file and %1 i| 000020b0 73 20 74 68 65 20 66 69 6e 61 6c 20 66 69 6c 65 |s the final file| 000020c0 2e 0a 0a 49 6e 20 62 6f 74 68 20 63 61 73 65 73 |...In both cases| 000020d0 2c 20 25 32 20 69 73 20 61 20 66 69 6c 65 6e 61 |, %2 is a filena| 000020e0 6d 65 20 74 68 61 74 20 70 72 69 6e 74 65 64 20 |me that printed | 000020f0 6f 75 74 70 75 74 20 66 72 6f 6d 20 74 68 65 20 |output from the | 00002100 74 72 61 6e 73 66 6f 72 6d 69 6e 67 0a 70 72 6f |transforming.pro| 00002110 67 72 61 6d 20 73 68 6f 75 6c 64 20 62 65 20 72 |gram should be r| 00002120 65 64 69 72 65 63 74 65 64 20 74 6f 2e 20 46 6f |edirected to. Fo| 00002130 72 20 61 20 70 72 6f 67 72 61 6d 20 74 68 61 74 |r a program that| 00002140 20 64 6f 65 73 20 6e 6f 74 20 70 72 69 6e 74 20 | does not print | 00002150 61 6e 79 74 68 69 6e 67 0a 28 65 67 2e 20 55 6e |anything.(eg. Un| 00002160 53 71 75 65 65 7a 65 29 20 69 74 20 6e 65 65 64 |Squeeze) it need| 00002170 20 6e 6f 74 20 62 65 20 73 70 65 63 69 66 69 65 | not be specifie| 00002180 64 2e 20 41 66 74 65 72 20 74 68 65 20 74 72 61 |d. After the tra| 00002190 6e 73 66 6f 72 6d 61 74 69 6f 6e 0a 70 72 6f 67 |nsformation.prog| 000021a0 72 61 6d 20 68 61 73 20 62 65 65 6e 20 72 75 6e |ram has been run| 000021b0 2c 20 69 66 20 74 68 65 20 65 72 72 6f 72 20 66 |, if the error f| 000021c0 69 6c 65 20 65 78 69 73 74 73 20 61 6e 64 20 69 |ile exists and i| 000021d0 73 20 6f 66 20 6e 6f 6e 20 7a 65 72 6f 20 73 69 |s of non zero si| 000021e0 7a 65 20 69 74 73 0a 63 6f 6e 74 65 6e 74 73 20 |ze its.contents | 000021f0 77 69 6c 6c 20 62 65 20 64 69 73 70 6c 61 79 65 |will be displaye| 00002200 64 20 69 6e 20 61 6e 20 65 72 72 6f 72 20 62 6f |d in an error bo| 00002210 78 2e 20 21 50 61 74 63 68 20 77 69 6c 6c 20 74 |x. !Patch will t| 00002220 68 65 6e 20 61 74 74 65 6d 70 74 20 74 6f 0a 63 |hen attempt to.c| 00002230 6f 6e 74 69 6e 75 65 20 69 65 2e 20 69 74 20 69 |ontinue ie. it i| 00002240 73 20 6e 6f 74 20 61 73 73 75 6d 65 64 20 74 68 |s not assumed th| 00002250 61 74 20 74 68 65 20 70 72 65 73 65 6e 63 65 20 |at the presence | 00002260 6f 66 20 6f 75 74 70 75 74 20 6d 65 61 6e 73 20 |of output means | 00002270 61 6e 20 65 72 72 6f 72 0a 6f 63 63 75 72 65 64 |an error.occured| 00002280 2e 20 49 6e 20 66 61 63 74 20 69 6e 20 74 68 65 |. In fact in the| 00002290 20 63 61 73 65 20 6f 66 20 73 71 75 65 65 7a 65 | case of squeeze| 000022a0 2c 20 69 66 20 74 68 65 72 65 20 69 73 20 61 6e |, if there is an| 000022b0 79 20 6f 75 74 70 75 74 20 74 68 65 72 65 0a 77 |y output there.w| 000022c0 61 73 20 61 6e 20 65 72 72 6f 72 2c 20 61 6e 64 |as an error, and| 000022d0 20 21 50 61 74 63 68 20 77 69 6c 6c 20 67 65 74 | !Patch will get| 000022e0 20 61 20 22 46 69 6c 65 20 6e 6f 74 20 66 6f 75 | a "File not fou| 000022f0 6e 64 22 20 65 72 72 6f 72 20 77 68 65 6e 20 69 |nd" error when i| 00002300 74 20 61 74 74 65 6d 70 74 73 0a 74 6f 20 63 6f |t attempts.to co| 00002310 6e 74 69 6e 75 65 2e 20 28 4e 6f 74 65 20 74 68 |ntinue. (Note th| 00002320 61 74 20 75 73 65 20 6f 66 20 25 32 20 69 6e 20 |at use of %2 in | 00002330 74 68 69 73 20 77 61 79 20 69 73 20 6e 6f 74 20 |this way is not | 00002340 79 65 74 20 69 6d 70 6c 65 6d 65 6e 74 65 64 2e |yet implemented.| 00002350 29 0a 0a 41 66 74 65 72 20 53 57 49 20 4d 65 73 |)..After SWI Mes| 00002360 73 61 67 65 54 72 61 6e 73 5f 47 53 4c 6f 6f 6b |sageTrans_GSLook| 00002370 75 70 20 68 61 73 20 62 65 65 6e 20 63 61 6c 6c |up has been call| 00002380 65 64 2c 20 74 68 65 20 72 65 73 75 6c 74 73 20 |ed, the results | 00002390 73 68 6f 75 6c 64 20 62 65 0a 61 20 76 61 6c 69 |should be.a vali| 000023a0 64 20 2a 63 6f 6d 6d 61 6e 64 20 77 68 69 63 68 |d *command which| 000023b0 20 77 69 6c 6c 20 70 65 72 66 6f 72 6d 20 74 68 | will perform th| 000023c0 65 20 6a 6f 62 2c 20 77 68 69 63 68 20 69 73 20 |e job, which is | 000023d0 70 61 73 73 65 64 20 74 6f 20 53 57 49 0a 57 69 |passed to SWI.Wi| 000023e0 6d 70 5f 53 74 61 72 74 54 61 73 6b 2e 20 54 68 |mp_StartTask. Th| 000023f0 69 73 20 6d 61 79 20 6f 66 20 63 6f 75 72 73 65 |is may of course| 00002400 20 62 65 20 61 6e 20 4f 62 65 79 20 66 69 6c 65 | be an Obey file| 00002410 2e 20 41 70 70 6c 69 63 61 74 69 6f 6e 20 73 70 |. Application sp| 00002420 61 63 65 0a 6d 61 79 20 62 65 20 75 73 65 64 20 |ace.may be used | 00002430 68 6f 77 65 76 65 72 20 79 6f 75 20 6c 69 6b 65 |however you like| 00002440 2c 20 61 73 20 74 68 65 20 2a 63 6f 6d 6d 61 6e |, as the *comman| 00002450 64 20 69 73 20 72 75 6e 6e 69 6e 67 20 61 73 20 |d is running as | 00002460 61 20 6e 65 77 20 77 69 6d 70 0a 74 61 73 6b 20 |a new wimp.task | 00002470 77 69 74 68 20 69 74 73 20 6f 77 6e 20 61 70 70 |with its own app| 00002480 6c 69 63 61 74 69 6f 6e 20 73 70 61 63 65 2e 0a |lication space..| 00002490 0a 54 68 65 20 50 72 65 70 61 72 65 20 74 72 61 |.The Prepare tra| 000024a0 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 69 73 20 65 |nsformation is e| 000024b0 78 65 72 63 69 73 65 64 20 61 20 6c 6f 74 2e 20 |xercised a lot. | 000024c0 4e 6f 74 20 6f 6e 6c 79 20 69 73 20 69 74 20 75 |Not only is it u| 000024d0 73 65 64 20 77 68 69 6c 65 0a 70 65 72 66 6f 72 |sed while.perfor| 000024e0 6d 69 6e 67 20 74 68 65 20 61 63 74 75 61 6c 20 |ming the actual | 000024f0 70 61 74 63 68 69 6e 67 20 62 75 74 20 69 74 20 |patching but it | 00002500 69 73 20 61 6c 73 6f 20 75 73 65 64 20 77 68 69 |is also used whi| 00002510 6c 65 20 73 63 61 6e 6e 69 6e 67 0a 64 69 72 65 |le scanning.dire| 00002520 63 74 6f 72 69 65 73 20 61 6e 64 20 61 66 74 65 |ctories and afte| 00002530 72 20 70 61 74 63 68 69 6e 67 20 68 61 73 20 62 |r patching has b| 00002540 65 65 6e 20 70 65 72 66 6f 72 6d 65 64 20 74 6f |een performed to| 00002550 20 77 6f 72 6b 20 6f 75 74 20 77 68 65 74 68 65 | work out whethe| 00002560 72 0a 74 68 65 20 70 61 74 63 68 65 73 20 66 6f |r.the patches fo| 00002570 72 20 61 20 66 69 6c 65 20 63 61 6e 20 62 65 20 |r a file can be | 00002580 61 70 70 6c 69 65 64 2c 20 72 65 6d 6f 76 65 64 |applied, removed| 00002590 2c 20 6f 72 20 6e 65 69 74 68 65 72 2e 20 54 68 |, or neither. Th| 000025a0 65 72 65 66 6f 72 65 0a 74 68 65 20 70 72 65 70 |erefore.the prep| 000025b0 61 72 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 |are transformati| 000025c0 6f 6e 20 73 68 6f 75 6c 64 20 69 64 65 61 6c 6c |on should ideall| 000025d0 79 20 62 65 20 66 61 73 74 2c 20 73 6d 61 6c 6c |y be fast, small| 000025e0 20 61 6e 64 20 6d 65 6d 6f 72 79 0a 72 65 73 69 | and memory.resi| 000025f0 64 65 6e 74 20 65 67 2e 20 55 6e 53 71 75 65 65 |dent eg. UnSquee| 00002600 7a 65 20 69 73 20 70 65 72 66 6f 72 6d 65 64 20 |ze is performed | 00002610 62 79 20 61 20 73 6d 61 6c 6c 20 6d 6f 64 75 6c |by a small modul| 00002620 65 20 6c 6f 61 64 65 64 20 62 79 20 21 50 61 74 |e loaded by !Pat| 00002630 63 68 2e 21 52 75 6e 2e 0a 54 68 65 20 62 65 6e |ch.!Run..The ben| 00002640 65 66 69 74 20 6f 66 20 62 65 69 6e 67 20 6d 65 |efit of being me| 00002650 6d 6f 72 79 20 72 65 73 69 64 65 6e 74 20 69 73 |mory resident is| 00002660 20 74 68 61 74 20 79 6f 75 20 68 61 76 65 20 74 | that you have t| 00002670 6f 20 73 77 61 70 20 66 6c 6f 70 70 79 20 64 69 |o swap floppy di| 00002680 73 6b 73 0a 6d 75 63 68 20 6c 65 73 73 20 6f 66 |sks.much less of| 00002690 74 65 6e 2e 20 54 68 65 20 62 65 6e 65 66 69 74 |ten. The benefit| 000026a0 20 6f 66 20 62 65 69 6e 67 20 73 6d 61 6c 6c 20 | of being small | 000026b0 69 73 20 74 68 61 74 20 79 6f 75 20 63 61 6e 20 |is that you can | 000026c0 61 66 66 6f 72 64 20 74 6f 20 62 65 0a 6d 65 6d |afford to be.mem| 000026d0 6f 72 79 20 72 65 73 69 64 65 6e 74 2e 20 53 71 |ory resident. Sq| 000026e0 75 65 65 7a 65 20 74 61 6b 65 73 20 61 20 6c 6f |ueeze takes a lo| 000026f0 74 20 6f 66 20 6d 65 6d 6f 72 79 20 74 6f 20 72 |t of memory to r| 00002700 75 6e 2c 20 73 6f 20 79 6f 75 20 73 68 6f 75 6c |un, so you shoul| 00002710 64 20 6e 6f 74 0a 72 6d 6c 6f 61 64 20 68 75 67 |d not.rmload hug| 00002720 65 20 6d 6f 64 75 6c 65 73 20 6a 75 73 74 20 73 |e modules just s| 00002730 6f 20 79 6f 75 20 63 61 6e 20 68 61 76 65 20 6d |o you can have m| 00002740 65 6d 6f 72 79 20 72 65 73 69 64 65 6e 74 20 70 |emory resident p| 00002750 72 65 70 61 72 65 20 74 72 61 6e 73 66 6f 72 6d |repare transform| 00002760 73 0a 61 73 20 74 68 69 73 20 6d 61 79 20 74 68 |s.as this may th| 00002770 65 6e 20 6d 65 61 6e 20 74 68 65 72 65 20 69 73 |en mean there is| 00002780 20 69 6e 73 75 66 66 69 63 69 65 6e 74 20 6d 65 | insufficient me| 00002790 6d 6f 72 79 20 66 6f 72 20 53 71 75 65 65 7a 65 |mory for Squeeze| 000027a0 20 74 6f 20 72 75 6e 0a 77 68 65 6e 20 61 20 70 | to run.when a p| 000027b0 61 72 74 69 63 75 6c 61 72 6c 79 20 6c 61 72 67 |articularly larg| 000027c0 65 20 66 69 6c 65 20 69 73 20 70 61 74 63 68 65 |e file is patche| 000027d0 64 20 65 67 2e 20 21 44 54 50 2e 21 52 75 6e 49 |d eg. !DTP.!RunI| 000027e0 6d 61 67 65 2e 0a 0a 27 43 6f 70 79 27 20 69 73 |mage...'Copy' is| 000027f0 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 22 74 | the standard "t| 00002800 72 61 6e 73 66 6f 72 6d 22 20 75 73 65 64 20 66 |ransform" used f| 00002810 6f 72 20 66 69 6c 65 73 20 77 68 69 63 68 20 6e |or files which n| 00002820 65 65 64 20 6e 6f 0a 74 72 61 6e 73 66 6f 72 6d |eed no.transform| 00002830 69 6e 67 2e 20 54 68 69 73 20 69 73 20 62 65 63 |ing. This is bec| 00002840 61 75 73 65 20 77 65 20 70 61 74 63 68 20 69 6e |ause we patch in| 00002850 20 3c 57 69 6d 70 24 53 63 72 61 70 3e 20 61 6e | <Wimp$Scrap> an| 00002860 64 20 74 68 65 20 74 72 61 6e 73 66 6f 72 6d 0a |d the transform.| 00002870 70 65 72 66 6f 72 6d 73 20 74 68 65 20 63 6f 70 |performs the cop| 00002880 79 69 6e 67 20 6f 70 65 72 61 74 69 6f 6e 73 2e |ying operations.| 00002890 0a 0a 27 53 71 75 65 65 7a 65 27 20 69 73 20 74 |..'Squeeze' is t| 000028a0 68 65 20 74 72 61 6e 73 66 6f 72 6d 20 75 73 65 |he transform use| 000028b0 64 20 66 6f 72 20 70 72 6f 67 72 61 6d 73 20 77 |d for programs w| 000028c0 68 69 63 68 20 68 61 76 65 20 62 65 65 6e 20 72 |hich have been r| 000028d0 75 6e 20 74 68 72 6f 75 67 68 0a 74 68 65 20 73 |un through.the s| 000028e0 71 75 65 65 7a 65 20 70 72 6f 67 72 61 6d 20 73 |queeze program s| 000028f0 75 70 70 6c 69 65 64 20 77 69 74 68 20 74 68 65 |upplied with the| 00002900 20 41 63 6f 72 6e 20 43 20 61 6e 64 20 41 73 73 | Acorn C and Ass| 00002910 65 6d 62 6c 65 72 20 70 61 63 6b 61 67 65 73 2e |embler packages.| 00002920 0a 0a 65 67 3a 0a 43 6f 70 79 5f 50 72 65 70 61 |..eg:.Copy_Prepa| 00002930 72 65 53 6c 6f 74 2f 43 6f 70 79 5f 46 69 6e 69 |reSlot/Copy_Fini| 00002940 73 68 53 6c 6f 74 3a 38 0a 43 6f 70 79 5f 50 72 |shSlot:8.Copy_Pr| 00002950 65 70 61 72 65 2f 43 6f 70 79 5f 46 69 6e 69 73 |epare/Copy_Finis| 00002960 68 3a 43 6f 70 79 20 25 30 20 25 31 20 7e 41 20 |h:Copy %0 %1 ~A | 00002970 7e 43 20 7e 44 20 46 20 7e 4c 20 7e 4e 20 7e 50 |~C ~D F ~L ~N ~P| 00002980 20 51 20 7e 52 20 53 20 7e 54 20 7e 56 0a 0a 53 | Q ~R S ~T ~V..S| 00002990 71 75 65 65 7a 65 5f 50 72 65 70 61 72 65 53 6c |queeze_PrepareSl| 000029a0 6f 74 3a 30 0a 53 71 75 65 65 7a 65 5f 50 72 65 |ot:0.Squeeze_Pre| 000029b0 70 61 72 65 3a 55 6e 53 71 75 65 65 7a 65 20 25 |pare:UnSqueeze %| 000029c0 30 20 25 31 0a 53 71 75 65 65 7a 65 5f 46 69 6e |0 %1.Squeeze_Fin| 000029d0 69 73 68 53 6c 6f 74 3a 33 32 0a 53 71 75 65 65 |ishSlot:32.Squee| 000029e0 7a 65 5f 46 69 6e 69 73 68 3a 52 75 6e 20 50 61 |ze_Finish:Run Pa| 000029f0 74 63 68 3a 4c 69 62 72 61 72 79 2e 73 71 75 65 |tch:Library.sque| 00002a00 65 7a 65 20 25 30 20 25 31 0a |eze %0 %1.| 00002a0a