The remaining 39 bytes in the packet have different meanings depending on the type of packet.
Bytes received As ASCII After de-hamming
15 15 15 EA EA EA 5E 5F ...jjj^_ 0 0 0 F F F 3 -
F6 85 06 13 97 32 38 37 v....287 - - - - - - - -
54 E5 73 F4 20 C2 C2 43 Test.BBC - - - - - - - -
31 20 43 45 45 46 C1 58 1.CEEFAX - - - - - - - -
20 20 20 20 20 20 20 20 ........ - - - - - - - -
15
0
0
identifies this as a TSDP.
15 15 EA EA EA 5E
0 0 F F F 3
5F F6
5F F6
is allocated to BBC1.
85
81
and BST is coded 85
,
as in this example.
06 13 97
06 13 97
-
this represents the date 1996-07-22.
32 38 37
32 38 37
or
21:27:26 UTC, 22:27:26 BST.
54 E5 73 F4
Test
Test
" on BBC1 and BBC2,
"PROG
" on HTV, and the hammed sequence
4100
on C4).
20 C2 C2 43 31 20 43 45 45 46 C1 58 20 20 20 20 20 20 20 20
BBC1 CEEFAX
The first 6 and last 20 bytes of the packet after the packet type code seem to be the same as those in the TSDP and encode the index page link and the television channel or teletext magazine name. The 13 bytes in between carry the PDC information. All 13 bytes are hammed to protect against reception errors and decode to 13 4-bit nibbles. We shall dissect a PDC packet to see how this information is formatted. You might like to take a moment to review a decoding of some recent packets to get an idea what this information looks like first.
For our example, let us look at the packet transmitted by Channel 4 from 12:31 to 12:55 BST on 26 July 1996.
Bytes received As ASCII After de-hamming
49 15 15 EA EA EA 5E 15 I..jjj^. 2 0 0 F F F 3 0
49 64 A1 49 2F 5E FD B6 Id!I/^}6 2 4 C 2 7 3 E D
D0 D0 15 15 43 68 61 6E PP..Chan 8 8 0 0 - - - -
6E E5 EC 20 34 20 54 E5 nel 4 Te - - - - - - - -
EC E5 76 E9 73 E9 EF 6E levision - - - - - - - -
The first byte, 49
, de-hams to
2
and identifies this as a PDC packet.
We won't examine the next 6 bytes or the last 20 bytes further
since they are not related to PDC.
See above for a description of these bytes.
The 13 hammed bytes in between are the ones that matter to PDC.
In this example they de-ham to the following sequence:
0 2 4 C 2 7 3 E D 8 8 0 0If we write them in binary, then reverse the bits in each nibble we get:
0 2 4 C 2 7 3 E D 8 8 0 0 hex 0000 0010 0100 1100 0010 0111 0011 1110 1101 1000 1000 0000 0000 binary 0000 0100 0010 0011 0100 1110 1100 0111 1011 0001 0001 0000 0000 reversedNow with different grouping, we can see some useful information revealed:
#1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 00 0 0 01 0 0 0010 00 11010 0111 01100 011110 1100 010001 00000000 0 0 0 1 0 0 2 0 26 7 12 30 12 17 0 LCI UF PRF PCS MI - CNI0 CNI2 day month hour minute CNI1 CNI3 PTY
I have numbered the bit groups #1..#15 and given them some more helpful names underneath. The capital-letter names are in the EBU (now ETSI) specification.
0
on Channel 4.
On BBC2, which does use streams, this value
often changes between 0
and
1
or 2
when a new programme begins.
0
.
1
for a few seconds whenever a new programme
is about to begin.
The programme has not yet started while PRF is set.
Once it has started, PRF returns to 0
.
BBC2 use PRF, but I haven't seen it on Channel 4 yet.
00
=undefined
01
=mono
10
=stereo
11
=dual sound
01
for mono.
Broadcasters don't seem to have a clue about this;
I have seen 00
from Channel 4,
10
from BBC2 and 11
from Channel 5!
0
,
the programme will start 30 seconds after the PRF
flag was first set.
In this mode, there should be exactly 30 packets sent with
PRF set to 1
.
If MI is 1
,
there is no guarantee that the programme will begin
at a specific time; there could be any number of packets
with PRF set to 1
before the programme begins.
BBC2 always use MI=0
and set PRF in advance.
Unfortunately, because my decoder misses a lot of packets,
I don't always get to see any packets with the PRF flag set
so I can't check that there are always 30.
2C
is the code for the UK;
11
is allocated to Channel 4.
26 7 12 30
or 26th. July, 12:30 BST in this case.
Certain impossible values (such as month=15) have special meaning:
00/15 28:63
Continuation
00/15 29:63
Interruption (INT)
00/15 30:63
Recording Inhibit/Terminate (RI/T)
00/15 31:63
Timer control (TC)
31/15 31:63
No PIL; use PTY
81
for Brookside, 82
for Brookside
Omnibus and 83
for the 7pm News.
Apart from that, this field is not used by Channel 4 or
BBC2 and is always zero.
Please let me know if you have any ideas or information that might help explain the remaining unknowns. Thanks to everyone who has already sent me their speculations and useful tidbits of information. In particular, I would like to thank Jim Main for his very detailed descriptions of the PDC packet format.