Page 2 of 2

Re: test of command "C"

Posted: Thu May 19, 2011 6:08 pm
by tin
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...

for example 3rd time running...

Code: Select all

U[aa]AGA24005[00][8b]U[aa]C[8b][8b][8b]
[12][01]BBC1NW[11]1[01]BBC 1
[12][01]BBC2NW[11]2[01]BBC 2
[12][01]ITVGRN[11]3[01]ITV 1
[12][01]CH4___[11]4[01]Ch 4
[12][01]FIVE__[11]5[01]Five
[12][01]ITV2__[11]6[01]ITV 2
[12][01]BBC3__[11]7[01]BBC 3
[12][01]BBC4__[11]9[01]BBC 4
[12][01]ITV3__[11]10[01]ITV 3
[12][01]PICKTV[11]11[01]PickTV
[12][01]YEST__[11]12[01]Yestrd
[12][01]CH4P1_[11]13[01]Ch4 +1
[12][01]MORE4_[11]14[01]More 4
[12][01]FILM4_[11]15[01]Film 4
[12][01]4MUSIC[11]18[01]4Music
[12][01]DAVE__[11]19[01]Dave
[12][01]VIVA__[11]20[01]Viva
[12][01]ITV4__[11]24[01]ITV 4
[12][01]DAJAVU[11]25[01]DaJaVu
[12][01]E4____[11]28[01]E4
[12][01]E4P1__[11]29[01]E4 +1
[12][01]FIVEST[11]30[01]Five*
[12][01]FIVEUS[11]31[01]FiveUS
[12][01]ITV2P1[11]33[01]ITV2+1
[12][01]QUEST_[11]38[01]Quest
[12][01]PICKP1[11]44[01]Pick+1
[12][01]CHALNG[11]46[01]Chall
[12][01]CBBC__[11]70[01]CBBC
[12][01]CBEEBI[11]71[01]Cbeebi
[12][01]CITV__[11]72[01]CITV
[12][01]BBCNEW[11]80[01]BBCnew
[12][01]BBCPAR[11]81[01]BBCpar
[12][01]SKYNEW[11]82[01]SkyNew
[12][01]RUSSIA[11]85[01]RT
[12][01]ALJAZ_[11]89[01]Jazera
[12][01]BBCI__[11]301[01]BBC RB[00]:U[aa][bb][bb][00][ff]
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!

Re: test of command "C"

Posted: Thu May 19, 2011 6:16 pm
by AriX
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.

Re: test of command "C"

Posted: Thu May 19, 2011 6:36 pm
by tin
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

Re: test of command "C"

Posted: Thu May 19, 2011 7:24 pm
by AriX
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?)

Re: test of command "C"

Posted: Fri May 20, 2011 3:13 am
by tin
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! :-)