c64rom icon indicating copy to clipboard operation
c64rom copied to clipboard

Bugs in the checksum script

Open SukkoPera opened this issue 1 year ago • 0 comments

I think I found two bugs in the checksum script:

  1. The check at line 49: if checksum < desired_checksum:

    should be:

    if checksum <= desired_checksum:

    The checksum for the TED BASIC 5 ROM matches exactly its load address, so basically checksum == desired_checksum, and with this change the byte in the file will be set to 0x00 (which is the value it has in the stock ROM), otherwise it is incorrectly set to 0xFF.

  2. Running the script on a file that already has the correct checksum will change it. I think the checksum byte should always be considered as 0xFF during the calculation, regardless of its actual value.

SukkoPera avatar Feb 27 '25 14:02 SukkoPera