c64rom
c64rom copied to clipboard
Bugs in the checksum script
I think I found two bugs in the checksum script:
-
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. -
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.