Skip to content

Bugs in the checksum script #8

Description

@SukkoPera

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions