On 01/12/12 21:11, Daniel . wrote:
So at last I just need to know now how I can merge the needed decompressed files back into a flashable ROM file.
No, this is the wrong way. You do not need to decompress the .wph file. The .wph file in this case is 1.5MB long with some extra data and code stuck on the end. So the first thing to do is to cut the excess after 1.5MB off the end of that file. This 1.5MB is the top 1.5MB of the 2MB flash image**. Read the first 0.5MB from the flash device* and prefix it to the 1.5MB image to create the 2MB image. You can then program that 2MB image to the flash device.
Andrew
* If the failed update has corrupted this first 0.5MB on the flash device then you have big trouble.
** If you want to confirm that, disassemble the last 16 bytes of the 1.5MB image, there should be a real mode far jump.