Applying a code patch
Thread Starter
Supreme Member
iTrader: (2)
Joined: Jan 2002
Posts: 9,962
Likes: 5
From: Moorestown, NJ
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Applying a code patch
Ive gotten some requests to show how to apply a code patch. Much of RBobs patch method demo applys here as well. The computer we will be using as an example is the '7427 and $0D mask.
The first step to applying a patch is to first assemble the patch you will be using into an .S19 file. The patch here will be for applying cool fan control to a $0D. The best assembler for the 68HC11 by far is the ASM11.EXE dos based assembler from MGTEK. Copy the .ASM file with the code and the ASM11 assembler to a directory easily accessable in a DOS command window within windows. The following commands are for Win XP, but still should work under Vista as it still has the legacy DOS shell (in theory).
Go to your start bar and open the run dialog box and type "cmd". This will bring up the DOS shell. Navigate to the directory that contains the patch and the assembler. If you type in 'ASM11', with nothing else, you will get a list of the available options. One very important one is "-l". This gives you a listing showing all the addresses of the tables that are added by the patch. You will need these when you update your XDF to include the additional info added by the patch. To assemble the patch, type: "ASM11 [patch name].asm -l". This will assemble the patch into an .S19 file and generate a list with the relavent information.
Ive attached a screenshot of this below. In this case, the patch name is CFC.asm, or cool fan control.
The first step to applying a patch is to first assemble the patch you will be using into an .S19 file. The patch here will be for applying cool fan control to a $0D. The best assembler for the 68HC11 by far is the ASM11.EXE dos based assembler from MGTEK. Copy the .ASM file with the code and the ASM11 assembler to a directory easily accessable in a DOS command window within windows. The following commands are for Win XP, but still should work under Vista as it still has the legacy DOS shell (in theory).
Go to your start bar and open the run dialog box and type "cmd". This will bring up the DOS shell. Navigate to the directory that contains the patch and the assembler. If you type in 'ASM11', with nothing else, you will get a list of the available options. One very important one is "-l". This gives you a listing showing all the addresses of the tables that are added by the patch. You will need these when you update your XDF to include the additional info added by the patch. To assemble the patch, type: "ASM11 [patch name].asm -l". This will assemble the patch into an .S19 file and generate a list with the relavent information.
Ive attached a screenshot of this below. In this case, the patch name is CFC.asm, or cool fan control.
Last edited by dimented24x7; Oct 13, 2009 at 03:00 AM.
Thread Starter
Supreme Member
iTrader: (2)
Joined: Jan 2002
Posts: 9,962
Likes: 5
From: Moorestown, NJ
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Re: Applying a code patch
You will see that the assembler will return the number of errors and warnings. There should be zero errors and warnings if the patch is written correctly.
The next step is to apply the patch. Select a BIN that the patch will be applied to. In this case, it will be BINPAT.ASM, which is a stock $0D binary. Copy that bin into the same folder that you used before and again open the DOS shell if you closed it. The program that will apply the patch is "s19_pat.exe", which was shown in the patch method demo.
To apply the patch, type "s19_pat [nameofpatch].s19 0x[offset in hex] [nameofbin].bin" This will apply the patch to the binary. In this case, the offset should be 0 when applying the cool fan patch as the patch already has the proper address offsets included within it. Once you do this, the bin is now patched. The last step is to open the bin in tunerpro, and SAVE the bin. The reason you must do this is to update the checksum. The patched bin has additional data that differs from the source, but the checksum is not updated in the patching process. If you run it right away, you will get a flashing SES.
A screenshot showing the s_19 patch command is shown below:
The next step is to apply the patch. Select a BIN that the patch will be applied to. In this case, it will be BINPAT.ASM, which is a stock $0D binary. Copy that bin into the same folder that you used before and again open the DOS shell if you closed it. The program that will apply the patch is "s19_pat.exe", which was shown in the patch method demo.
To apply the patch, type "s19_pat [nameofpatch].s19 0x[offset in hex] [nameofbin].bin" This will apply the patch to the binary. In this case, the offset should be 0 when applying the cool fan patch as the patch already has the proper address offsets included within it. Once you do this, the bin is now patched. The last step is to open the bin in tunerpro, and SAVE the bin. The reason you must do this is to update the checksum. The patched bin has additional data that differs from the source, but the checksum is not updated in the patching process. If you run it right away, you will get a flashing SES.
A screenshot showing the s_19 patch command is shown below:
Last edited by dimented24x7; Oct 13, 2009 at 02:58 AM.
Thread Starter
Supreme Member
iTrader: (2)
Joined: Jan 2002
Posts: 9,962
Likes: 5
From: Moorestown, NJ
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Re: Applying a code patch
Lastly, here are the files that I mentioned. The Zip includes the CFC assembly of the cool fan patch, the ASM11.EXE, and the s19_pat.exe. Open the ZIP with firefox (IE does not work).
The cool fan patch for the $0D is functional. ONLY apply this to a $0D binary. This will not work for the $0E or any other derivatives of the masks that run on the TBI PCMs. See the list file from the ASM that was generated for the addresses of the new tables that control the fan that you will need to add into your XDF that you are using (if you need help, just reply and I can walk you through that part as well). The fan is operated via the CCP output. This output should be able to drive most smaller 30A and below relays. But, if your using a big relay to drive dual fans or a large high current fan, its best to use a smaller driving relay ahead of the main relay to avoid overloading the CCP output.
The cool fan patch for the $0D is functional. ONLY apply this to a $0D binary. This will not work for the $0E or any other derivatives of the masks that run on the TBI PCMs. See the list file from the ASM that was generated for the addresses of the new tables that control the fan that you will need to add into your XDF that you are using (if you need help, just reply and I can walk you through that part as well). The fan is operated via the CCP output. This output should be able to drive most smaller 30A and below relays. But, if your using a big relay to drive dual fans or a large high current fan, its best to use a smaller driving relay ahead of the main relay to avoid overloading the CCP output.
Thread
Thread Starter
Forum
Replies
Last Post
Dragonsys
Engine/Drivetrain/Suspension Parts for Sale
2
Sep 25, 2015 03:51 PM







