Hi All
I Have a Rom file OS6128.ROM That has a checksum of 4C40 and it should be 4C00.
Where do I patch the file to restore the checksum ?.
Thanks Ray
Regular expansion ROMs (NOT the lower/OS or BASIC ROM!!!) do this:
Addresses from &C000 up to &FFFE are added, and the result is put in one byte.
This means as soon as the checksum is bigger than 255 then you just subtract 256, so the result is always something between 0 and 255
Finally the Checksum is written to the ROM address &FFFF
BASIC example
w=0
for a=&4000 to &7FFE
w=w+peek(a)
if w>255 then w=w-256
next
poke &7FFF,w
end
This works for a ROM at address &4000
@GUNHED (http://www.cpcwiki.eu/forum/index.php?action=profile;u=2029)
Thanks. Ray
Always a pleasure! :) Looks like a productive weekend is coming up. :) :)
Hi Gunhed - EtAll
I have worked out a patch to the RedBox Modified OS6128 with 32 roms.
The checksum after the mods ended up being &4140 instead of &4100 I have made a patch to the file and burned a rom.
I have done a checksum of various system roms and they all look like this & xx00 h so when saw the xx40 that alerted me. (I need to be alert)
Put it in my trusty CPC464 and it BOOTS -- Yeahhhh -- the previous version would NOT Boot (&4140).
I will continue on tomorrow and find a better place to alter the checksum in some of the Link Names Solavox AWA etc That won't get used
Ray