avatar_Audronic

Where do I patch a Rom to adjust the Checksum ? (Sorted OK)

Started by Audronic, 09:53, 12 July 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Audronic

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
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

GUNHED

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







http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Audronic

Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

GUNHED

Always a pleasure!  :)  Looks like a productive weekend is coming up.  :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Audronic

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



Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

Powered by SMFPacks Menu Editor Mod