Difference between revisions of "UVSG Satellite Data"

From Prevue Guide Wiki
Jump to navigation Jump to search
Line 18: Line 18:
 
===Command Modes===
 
===Command Modes===
  
Some of this is conjecture and named according to clues found in the reverse-engineered code - it's subject to change and mistakes! Some of the checksums were found from an Atari disassembly, and a few were found by running UVSG sample messages through [[UVSGXOR]].
+
Some of this is conjecture and named according to clues found in the reverse-engineered code - it's subject to change and mistakes! Some of the checksums were found from an Atari disassembly, and a few were found by running UVSG sample messages through [[UVSGXOR]]. Initial checksum values are actually calculated by XORing the mode byte with $FF.
  
 
{| border="1" cellspacing="0" cellpadding="2"
 
{| border="1" cellspacing="0" cellpadding="2"
Line 24: Line 24:
 
!scope="col"| Command
 
!scope="col"| Command
 
!scope="col"| Name
 
!scope="col"| Name
!scope="col"| Initial Checksum
 
 
!scope="col"| Description
 
!scope="col"| Description
 
!scope="col"| Notes
 
!scope="col"| Notes
Line 32: Line 31:
 
!scope="row"| A
 
!scope="row"| A
 
| Box On
 
| Box On
| $BE
 
 
| Addresses the machines by select code, informing them to listen for commands
 
| Addresses the machines by select code, informing them to listen for commands
 
|  
 
|  
Line 40: Line 38:
 
!scope="row"| C
 
!scope="row"| C
 
| Channel
 
| Channel
| $BC
 
 
| Contains the channel lineup
 
| Contains the channel lineup
 
| Divided by the receiving machine into a list of channel numbers, call letters, and sources.
 
| Divided by the receiving machine into a list of channel numbers, call letters, and sources.
Line 48: Line 45:
 
!scope="row"| D
 
!scope="row"| D
 
| ?
 
| ?
| $BB
 
 
| ?
 
| ?
 
| ?
 
| ?
Line 56: Line 52:
 
!scope="row"| E
 
!scope="row"| E
 
| ?
 
| ?
| $BA
 
 
| ?
 
| ?
 
| Atari L9118 (3 bytes - some kind of configuration bytes relating to CURDAY and NXTDAY?)
 
| Atari L9118 (3 bytes - some kind of configuration bytes relating to CURDAY and NXTDAY?)
Line 64: Line 59:
 
!scope="row"| F
 
!scope="row"| F
 
| Configuration
 
| Configuration
| $B9
 
 
| Gives the receiving machine information about its location, local time, settings, ads, and more.
 
| Gives the receiving machine information about its location, local time, settings, ads, and more.
 
| Same syntax on both Atari and Amiga, just a lot of unused values on Atari.
 
| Same syntax on both Atari and Amiga, just a lot of unused values on Atari.
Line 72: Line 66:
 
!scope="row"| f
 
!scope="row"| f
 
| Config.dat
 
| Config.dat
| ??
 
 
| Provides some settings, like GridMR, Sport, SBS, ClockCmd, and more that are written to config.dat.
 
| Provides some settings, like GridMR, Sport, SBS, ClockCmd, and more that are written to config.dat.
| Length specified in first byte of command. Checksum is strange?
+
| Length specified in first byte of command.
 
| No
 
| No
 
| Yes
 
| Yes
Line 80: Line 73:
 
!scope="row"| g
 
!scope="row"| g
 
| ?
 
| ?
| $98
 
 
| Defines future DST information
 
| Defines future DST information
 
|  
 
|  
Line 88: Line 80:
 
!scope="row"| H
 
!scope="row"| H
 
| Download
 
| Download
| $B7
 
 
| Can be used to write a file to disk, likely other Amiga maintenance tasks as well
 
| Can be used to write a file to disk, likely other Amiga maintenance tasks as well
 
| Exact same command is also available under 'h' and '='
 
| Exact same command is also available under 'h' and '='
Line 96: Line 87:
 
!scope="row"| I
 
!scope="row"| I
 
| ?
 
| ?
|
 
 
|  
 
|  
 
| Sets weather ID?
 
| Sets weather ID?
Line 104: Line 94:
 
!scope="row"| J
 
!scope="row"| J
 
| Order Information
 
| Order Information
| $B5
 
 
| For pay-per-view channels
 
| For pay-per-view channels
 
|  
 
|  
Line 112: Line 101:
 
!scope="row"| j
 
!scope="row"| j
 
| Order Information
 
| Order Information
| $95
 
 
| For pay-per-view channels
 
| For pay-per-view channels
 
| (likely newer format)
 
| (likely newer format)
Line 120: Line 108:
 
!scope="row"| K
 
!scope="row"| K
 
| Clock
 
| Clock
| $AB
 
 
| Sets the time centrally
 
| Sets the time centrally
 
| Requires ClockCmd to be 2 on Amiga
 
| Requires ClockCmd to be 2 on Amiga
Line 128: Line 115:
 
!scope="row"| L
 
!scope="row"| L
 
| Ad
 
| Ad
| $B3
 
 
| Centrally provides an ad or message
 
| Centrally provides an ad or message
 
| Seems to crash Prevue Grid if there is already ad in a slot, maybe bad syntax
 
| Seems to crash Prevue Grid if there is already ad in a slot, maybe bad syntax
Line 136: Line 122:
 
!scope="row"| M
 
!scope="row"| M
 
| ?
 
| ?
| $B2
 
 
| ?
 
| ?
 
| Atari L9152 (reads 2 bytes)
 
| Atari L9152 (reads 2 bytes)
Line 144: Line 129:
 
!scope="row"| N
 
!scope="row"| N
 
| ?
 
| ?
| $B1
 
 
| ?
 
| ?
 
| Atari L92A4
 
| Atari L92A4
Line 152: Line 136:
 
!scope="row"| O
 
!scope="row"| O
 
| ?
 
| ?
| $B0
 
 
| ?
 
| ?
 
| No checksum - send $00 $B0 immediately after - Atari L91BA (Amiga accepts as valid)
 
| No checksum - send $00 $B0 immediately after - Atari L91BA (Amiga accepts as valid)
Line 160: Line 143:
 
!scope="row"| P
 
!scope="row"| P
 
| Program
 
| Program
| $AF
 
 
| Program information
 
| Program information
 
|  
 
|  
Line 168: Line 150:
 
!scope="row"| p
 
!scope="row"| p
 
| Program
 
| Program
| $8F
 
 
| Program information
 
| Program information
 
| Possibly newer format, example in NEWP test file
 
| Possibly newer format, example in NEWP test file
Line 176: Line 157:
 
!scope="row"| Q
 
!scope="row"| Q
 
| ?
 
| ?
| $AE
 
 
| Not sure, probably has something to do with PPV channels
 
| Not sure, probably has something to do with PPV channels
 
|  
 
|  
Line 184: Line 164:
 
!scope="row"| R
 
!scope="row"| R
 
| Reset
 
| Reset
| $AD
+
| Reset computers with select code
| Reset computer
+
| If no select code is given, all computers are reset
| No checksum - send $00 $AD immediately after.
 
 
| Yes
 
| Yes
 
| Yes
 
| Yes
Line 192: Line 171:
 
!scope="row"| T
 
!scope="row"| T
 
| Title
 
| Title
| $AB
 
 
| Sets the guide title
 
| Sets the guide title
 
| Only applicable to EPG, but recognized by Prevue Grid as a valid command
 
| Only applicable to EPG, but recognized by Prevue Grid as a valid command
Line 200: Line 178:
 
!scope="row"| Z
 
!scope="row"| Z
 
| ?
 
| ?
| $A5
 
 
| ?
 
| ?
 
| Atari L9206 (12 configuration bytes read into 04E7 onwards)
 
| Atari L9206 (12 configuration bytes read into 04E7 onwards)
Line 207: Line 184:
 
|-
 
|-
 
!scope="row"| $03
 
!scope="row"| $03
| ?
 
 
| ?
 
| ?
 
| ?
 
| ?
Line 216: Line 192:
 
!scope="row"| $BB
 
!scope="row"| $BB
 
| Box Off
 
| Box Off
| $44
 
 
| Tells all listening boxes to stop listening
 
| Tells all listening boxes to stop listening
 
| No checksum - send $BB $00 $FF immediately after
 
| No checksum - send $BB $00 $FF immediately after

Revision as of 23:09, 9 March 2012

This was the format used by United Video Satellite Group to send data out at over a satellite feed, launched some time between 1981 and 1985. The baud rate was initially 2400, although the speed may have been increased to 9600 baud towards the end. Many different types of information were sent out through this feed, including time/date information, system settings, channel listings, and system updates. The format was broadcast until at least 2002 (to support Sneak Prevue and remaining installations of EPG Jr.), but may even have lasted until 2005.

Tin and AriX have successfully reverse engineered parts of this format, and it is possible to send our own messages to emulated or real EPG/Prevue machines over serial. Additionally, some test files received from an ex-UV employee have helped to further the reverse engineering effort.

DATA Format

Every box on message always starts with the header "55 AA", followed by a select code, a 00, and a checksum. A command is started with a "55 AA", then a byte indicating which mode of command is being sent out, then the data of the command, which is usually followed by checksum.

For example, here are two commands that will tell an EPG machine to listen, then change its title to "PREVUE GUIDE":

55 AA 41 2A 00 94 55 AA 54 50 52 45 56 55 45 20 47 55 49 44 45 00 D0

In this example, the select code being addressed is 2A, or the ASCII code for an asterisk (*). This means every machine that is connected to the satellite feed will act on this command. Then, a 00 to terminate the string, and a checksum (94). After the 55 AA, you see the mode byte (54, or T for Title), and then an ASCII string (PREVUE GUIDE). Lastly, there is another 00 to terminate the string, and D0, the checksum for the entire string.

Initial Checksum

Most commands have a checksum that is calculated on all the bytes of the data part of the command. This is sent over the serial port and compared to the correct value by the receiving machine. If the checksum does not match, the computer discards the whole command. The checksum is calculated by bitwise XOR of each byte of data within the command excluding the command letter itself. Each command has its own seed checksum which is loaded as the initial value of the checksum as soon as the initial command letter is received. This initial checksum is calculated by XORing the mode byte with $FF.

Command Modes

Some of this is conjecture and named according to clues found in the reverse-engineered code - it's subject to change and mistakes! Some of the checksums were found from an Atari disassembly, and a few were found by running UVSG sample messages through UVSGXOR. Initial checksum values are actually calculated by XORing the mode byte with $FF.

Command Name Description Notes Atari Amiga
A Box On Addresses the machines by select code, informing them to listen for commands Yes Yes
C Channel Contains the channel lineup Divided by the receiving machine into a list of channel numbers, call letters, and sources. Yes Yes
D ? ? ? No Yes
E ? ? Atari L9118 (3 bytes - some kind of configuration bytes relating to CURDAY and NXTDAY?) Yes Yes
F Configuration Gives the receiving machine information about its location, local time, settings, ads, and more. Same syntax on both Atari and Amiga, just a lot of unused values on Atari. Yes Yes
f Config.dat Provides some settings, like GridMR, Sport, SBS, ClockCmd, and more that are written to config.dat. Length specified in first byte of command. No Yes
g ? Defines future DST information No Yes
H Download Can be used to write a file to disk, likely other Amiga maintenance tasks as well Exact same command is also available under 'h' and '=' No Yes
I ? Sets weather ID? No Yes
J Order Information For pay-per-view channels No Yes
j Order Information For pay-per-view channels (likely newer format) No Yes
K Clock Sets the time centrally Requires ClockCmd to be 2 on Amiga Yes Yes
L Ad Centrally provides an ad or message Seems to crash Prevue Grid if there is already ad in a slot, maybe bad syntax Yes Yes
M ? ? Atari L9152 (reads 2 bytes) Yes Yes
N ? ? Atari L92A4 Yes No
O ? ? No checksum - send $00 $B0 immediately after - Atari L91BA (Amiga accepts as valid) Yes Yes
P Program Program information Yes Yes
p Program Program information Possibly newer format, example in NEWP test file No Yes
Q ? Not sure, probably has something to do with PPV channels No Yes
R Reset Reset computers with select code If no select code is given, all computers are reset Yes Yes
T Title Sets the guide title Only applicable to EPG, but recognized by Prevue Grid as a valid command Yes Yes
Z ? ? Atari L9206 (12 configuration bytes read into 04E7 onwards) Yes No
$03 ? ? Atari L949F (hexadecimal 03) Yes No
$BB Box Off Tells all listening boxes to stop listening No checksum - send $BB $00 $FF immediately after Yes Yes

Known Command Syntax

C Command Syntax

0x43 [Julian day, byte]
0x12 [flags, byte] [6-character source, string]
0x11 [Channel #, string]
0x01 [5- to 6-character channel name, string]
0x00 [checksum, byte]

NOTE: On EPG Jr. the channel name has a limit of 5 characters

C Commmand Flags

Flag name Hex value
None 0x01
HILITESRC 0x02
SUMBYSRC 0x04
VIDEO_TAG_DISABLE 0x08
CAF_PPVSRC 0x10
DITTO 0x20
ALTHILITESRC 0x40
STEREO 0x80

P Command Syntax

0x50 [Timeslot 1-48, hex] [Julian day, hex] [6-character source, string]
0x12 [flags, byte] [Program name, string]
0x00 [checksum, byte]

P Commmand Flags

Flag name Hex value
None 0x01
Movie 0x02
ALTHILITEPROG 0x04
TAGPROG 0x08
SPORTSPROG 0x10
DVIEW_USED 0x20
REPEATPROG 0x40
PREVDAYSDATA 0x80

CTRL Format

In 1988, with the introduction of Prevue Guide, a second, 110-baud feed called CTRL was added.

In the CTRL format, there is no initial 55 AA to start a command. Commands are begun right away with a mode byte, which is a number from 0 to 16 (instead of an ASCII value). Next, the body of the command is sent, followed by a $0D, and then the message checksum, which uses the same format as the DATA feed. The CTRL format has not yet been fully reverse engineered, but more information can be found here.

CTRL Commands

Command Control Name Length Description
$01 A ? Branches based on the first byte it receives - looks like it has "sub-commands"
$02 B ?
$03 C ? 0 bytes Different than the other commands - not parsed
$04 D Set Position 1 byte Sets CTRLEvent_Position to 1 if byte is 'L' or 0 if 'R', if neither, CTRLEvent_Position is toggled
$05 E Event 2 bytes First byte corresponds to right side, second corresponds to left - seems to set a "mode" for the overlay of each side
$07 G Resume Scroll 0 bytes Resumes listing scroll (analogous to pressing 's')
$0B K Clock Slightly different syntax than DATA, only works when ClockCmd is 1
$0C L ? Has something to do with what program is displayed in the overlay in E mode
$0D M End of Command
$0F O ? Blanks out screen - probably used to set some stuff
$10 P Stop Scroll 0 bytes Stops listing scroll (analogous to Control-S)
$11 Q ?
$14 T ? 1 byte? Sets some internal variable
$16 V ?

Mode A Sub-Commands

Byte ASCII Name Length Description
$31 1
$33 3
$34 4
$35 5
$36 6
$37 7
$44 D
$46 F
$57 W Weather 0 bytes Show weather info?