AriX wrote:Is it possible that the two values you don't know represent time zone and daylight savings time? I ask that because they seem to be two parameters that are displayed by the settings screen of the EPG Jr.
I know they definitely aren't timezone or DST, as the clock bytes are stored in the atari memory at $0428 to $0430 when they are recieved, and the timezone is stored in $041D. I also think would make sense to send the timezone in an addressed command (so each box has an individual timezone) and the clock in a unaddressed command (so all clocks are set at once with only one command).
I also know a routine at $BA0E, which is starting to look like it's something to do with storing schedule information quits immediately if the 9th byte of the clock is not zero. I'm not sure what that's all about!
There's another routine at $BB54, that I have no clue yet what it does, that uses the timezone value if the 8th byte of the clock is zero.
The code also has a routine that when the clock is updated via the K command, it copies the values, applying the timezone to another clock located at $0434 to $043C - which is the one that is displayed at the top. I'll check again if I can see the DST being applied.
The timezone, and possbily the DST is sent with the F command, which is similar to the K command, but with $15 values instead of $09. However only the first $14 make it into memory. These are:-
1: number of half hour blocks away to start at (default 0) sent as ASCII letter, where "A" ($41) = 0 hours
2: number of half hour blocks away to end at (default 6) send as ASCII letter
3: transmitted scroll speed, sent as ASCII number, where "4" $34 = 4 (scroll speed is actually the number of times the main code loops before it updates the display)
4: maximum advert number 10's digit. Defaults to 0. sent as ASCII number ($30 = 0)
5: maximum advert number 1's digit. Defaults to 6. sent as ASCII number ($36 = 6)
6: appears unused
7: appears unused
8: possible lo byte of a memory address to reset something to, should it get to zero
9: possible hi byte of the above
A: timezone, could quite possibly be offset from GMT, with default -6. sent as ascii number ($36 = 6) not entirely sure yet
B: something to do with timezone, value of $59 (ascii Y) could be DST, but the code that processes this is not clear to me.
C:appears unused
D: keyboard active (ascii Y ($59) or ascii N ($4E))
E:appears unused
F:appears unused
10:appears unused
11:appears unused
12:appears unused
13:appears unused
14:appears unused
15: appears unused, and not stored in memory either
the code for the command is F ($46) and the initial checksum is $B9 if you want to have a play with your K script to do this as well.
in case it's not clear, the first and second bytes select how many half hour blocks are shown, the EPG defaults to 6 (so on boot it shows you programs at 12:00, 12:30, 1:00, 1:30, 2:00, 2:30, 3:00). It's nice to change this down by setting the second byte to, say 3, but I can't see the value in the first one!!
AriX wrote:By the way, the CGI scripts actually aren't working and default to Altirra no matter what. The if ($emumode == "altirra") is literally returning true even though print $emumode returns atari800. I don't understand.
oops my bad, should be ($emumode eq "altirra") cos it's a string not a number. I made this mistake a number of times in the code and thought I'd sorted them all.