Checksums
Posted: Sun Dec 19, 2010 2:04 pm
Might have just figured, checksum values are always the binary inverse of the command letter char code. Maybe.....
Forums dedicated to the best electronic program guide of all time.
https://ariweinstein.com/prevue/
I don't quite understand... The binary value of C is 1100. The reverse of that is 0011, which is 3. The binary value can also be considered 00001100, but the reverse of that is of course $30. So I think I'm missing something here.tin wrote:Might have just figured, checksum values are always the binary inverse of the command letter char code. Maybe.....
I feel really stupid right now lol... Leave it to me to spontaneously forget how ASCII works :ptin wrote:The binary value of ASCII C (hex 43) is 01000011, and the inverse of that is 10111100 which is BC in hex.
L = 4C = 01001100. 10110011 = B3
P = 50 = 01010000. 10101111 = AF
etc etc..
Not sure what this means, as in Atari the start value for the checksum is still explicitly defined, but it was an interesting pattern I found this evening while trying to write some code that did the checksum calculations as well (I was mistakenly including the letter in the checksum calculation, and the first result was always 1111111)
However it does mean the initial checksum for mode K (clock) should be $B4. Which it isn't in Atari. Also I've tried it in the Amiga and it still doesn't work although I suspect that's because some of the data is failing some kind of validation check.