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.
Aha I made a tiny error in the code that works out the char for the jdate. It added the char onto the string each time, so the jdate got longer and longer each iteration...
My checksum code would make the checksum correct even if the command format is wrong, and PG tends to just discard chars it was not expecting anyway (witness the testfiles with all the extra 0x0a 0x0d going on in them)
The code (in Atari anyway) AFAIR only checked the sent channel command had the same checksum as the last one, so I guess the checksum would be different and it would think the channel list was new, and clear out the listings!
tin wrote:The code (in Atari anyway) AFAIR only checked the sent channel command had the same checksum as the last one, so I guess the checksum would be different and it would think the channel list was new, and clear out the listings!
Glad you figured it out
Kinda surprised that the software accepted the commands despite the extra date though.
Most of the atari code is written to ignore extra chars between what it received ok and what it expects next, therefore I think rubbish between the jday and the first [12] is just ignored ( although the checksum is calculated) I guess it's a good way if making the protocol extensible qigong breaking old clients? Like I say the test files are full of extra 0x0d and 0x0a's that PG obviously ignores
tin wrote:Most of the atari code is written to ignore extra chars between what it received ok and what it expects next, therefore I think rubbish between the jday and the first [12] is just ignored ( although the checksum is calculated) I guess it's a good way if making the protocol extensible qigong breaking old clients? Like I say the test files are full of extra 0x0d and 0x0a's that PG obviously ignores
Right, but those are mostly outside of the commands themselves (or so I thought?)
AriX wrote:
Right, but those are mostly outside of the commands themselves (or so I thought?)
Ahh yeah thats a good point! Well from what I know about the atari code I can see how it would just ignore it, while parsing the C command it's got the data it expected (jday) and is now waiting until the next byte is [12] To start copying the channel data to the right place in memory. I guess they copies the way it does that in the Amiga code, but give what you said I suppose it is quite surprising!