Checksums

Discuss the reverse engineering and emulation (as opposed to simulation) of any sort of Prevue hardware, including Atari-based and Amiga-based EPG channels and the Amiga-based Prevue/TV Guide channels.
Post Reply
tin
Posts: 568
Joined: Sat May 08, 2010 9:54 pm

Checksums

Post by tin »

Might have just figured, checksum values are always the binary inverse of the command letter char code. Maybe.....
AriX
Site Admin
Posts: 828
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: Checksums

Post by AriX »

tin wrote:Might have just figured, checksum values are always the binary inverse of the command letter char code. Maybe.....
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
Posts: 568
Joined: Sat May 08, 2010 9:54 pm

Re: Checksums

Post by tin »

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.
AriX
Site Admin
Posts: 828
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: Checksums

Post by AriX »

tin 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.
I feel really stupid right now lol... Leave it to me to spontaneously forget how ASCII works :p
Interesting findings though.
Post Reply