Reply 200 of 223, by analog_programmer
- Rank
- Oldbie
Chkcpu wrote on 2025-03-31, 14:17:Hi analog_programmer, […]
Hi analog_programmer,
Looking at the steps you used to get the patched “original.tmp” back into the BIOS BIN file, I see how this would have worked as well. Two remarks though about your procedure:
1) Using CBROM to strip down the BIOS BIN-file to contain only the bootblock and the compressed “original.tmp” module including its header, and nothing behind, is a nice alternative method for copying the compressed patched “original.tmp” over the old one in the BIN-file. No worries about shifting the compressed modules behind original.tmp to make room, and calculating how many bytes this shift must be.
Of course, just as you describe in steps 2 and 7, you have to extract and save each module before you release it from the BIN, and put them back one by one afterwards.
A nice side-effect is that each time you use CBROM to store one of the previously released modules back in the BIN-file, the checksum bytes of the BIN are recalculated. So using MODBIN to edit the sign-on message and update the BIN to get the checksums correct, as I do as the last step, isn’t necessary in your procedure.
But checking the BIN with MODBIN as a last step is always a good idea of course!Note that this “strip down” procedure is only necessary on 128KB compressed BIOSes. Although CBROM lists all modules as being stored behind original.tmp on both 128KB and 256KB BIOS BIN-files, this is actually so on 128KB BIOSes only.
On the 256KB BIOS, original.tmp is located separately at file-offset 20000h with nothing directly behind it. All the other modules are located at offsets 0-1FFFFh and are not in the way when overwriting the compressed original.tmp module by the patched version.2) You don’t describe editing the header of the patched original.tmp module after compression. It is very well possible that CBROM takes care of that when putting the previously released modules back into the BIN. I never tested this and edit the header of the compressed patched original.tmp before I put it back into the BIN-file, just to be sure. 😉
Happy patching!
Jan
Hi,
I'm not 100% sure about these steps, I'm just trying to recreate by memories and the notes in my thread what I've done when patched those alien BIOSes to work on my mislabeled BX-6AV2. To clarify what is the working algorithm I have to try these steps or some similar variants.
I'm sure I was not bothered to change any header for the manually compressed patched module "original.tmp" when pasting it into the "stripped" BIOS dump file. I just found the same matching starting bytes in the "stripped" BIOS file which still contained the original compressed "original.tmp" module as in the beginning of the new compressed "original.tmp" module and pasted over from the first matching byte in the "stripped" BIOS while looking at the "end area" for some leftovers from the original compressed "original.tmp" module (I think there were some which I changed to "FF" HEX-values). The BIOS for BX-6AV2 board is 256 kB in size. I decided that CBROM.EXE will take care of correct placing for all the additional modules when putting them back into the "stripped" BIOS with patched and compressed "original.tmp" in their original order and CBROM get this job done correctly. From your explanation now I see that this BIOS "stripping" procedure was unnecessary in my particular case with these 256 kB BIOS experiments.
CBROM.EXE recalculates and writes new BIOS checksum when changes some modules, but I don't know if it verifies the BIOS checksum when opens a BIOS dump file.
The word Idiot refers to a person with many ideas, especially stupid and harmful ideas.
This world goes south since everything's run by financiers and economists.
This isn't voice chat, yet some people overusing online communications talk and hear voices.