MITTENTITEL

 

 

CRC code. Click image to download.

As I said before numbers preceeded by a $ are hexadecimal numbers and google or wikipedia will tell you more about those than you ever wanted to know.

Semantic level - terminal

As we already know, the terminal send data packets consisting of 9 data words with 8 bits each.

So each datpacket consits of 9 bytes. Of these 3 bytes have a fixed meaning.

The first byte ist always $55 and marks the start of a data packet.

The second byte specifies the kind of information provide, something like a command byte.

The following sich byte hold the information, data bytes so to say.

The last byte is a checksum over all bytes of the packet but the checksum.

SCX uses a variant of the standard 8-bit CRC with modified starting values. For controllers the algorithm using a table is best. The table is build normally, but the starting value is $31, The checksum is calculated over all bytes of the packet, but the checksum. After the CRC algorithm has been applied the result has to be xored with $BB.

There are many different data packets teh single most important being the ...

Controllerpacket: $55 $FF R0 R1 R2 R3 R4 R5 PS
sent approx. every 102 ms and whenever a change is registered. (See CONTROLLER Internas)

The data packet tells the car what speed to set and whether the lane change switch is pressed. The packet sends information for 6 controllers regardless of how many are really connected.


Idpacket: $55 $CC RG $FE $FF $FF $FF $FF PS
Send twice when a lane change button is pressed in program mode (after pressing the program key on the terminal)

The data packet initiates the setting of the id.


Busclearancepacket: $55 $AA CNT NN $F0 $F0 $F0 $F0 PS
When a car passes the reed switch of the pit stop or start track this packet will be sent twice 1,7 ms apart. The CNT value changes everytime the packet is sent.

After 100 ms the packets are sent again regardless whether a car answered by sending its id or not.

These packets tell the cars to stop motors and prepare for id transmission, if the car has registered a track magnet. More details of a crossing of the finishline can be found HERE.

Finishlinepacket: $55 $EE R0 R1 R2 R3 R4 R5 PS
Whe at leas one car had sent its id, this packet will be sent twice to inform everybody.

The packets identify the cars which crossed the finish line.


Rankingpacket: $55 $D3 P0 P1 P2 P3 P4 P5 PS
After a crossing of the finish line and than every 300 ms.

This packet informs about the cars current ranking.

Laptimepacket: $55 $D4 FN RU1 RU0 VS Z1 Z0 PS
After a crossing of the finish line and than every 300 ms.

This packet has the number of crossings of the finish line and the time for the last lap. Only packets for the last car(s) that passed the finish line are transmitted.


Lapcounterpacket: $55 $D5 RI RU2 RU1 RU0 $FF $FF PS
When you press the start key long enpugh this packet will be sent twice.

It informs about the startnumber of laps to run and the direction of lap counting.

Qualifyingpacket: $55 $DB RU2 RU1 RU0 FZ $FF $FF PS
Marks a qualifing.

Resetpacket: $55 $D0 §FF CNT NN $AA $AA $AA PS
When you press the start key long enpugh this packet will be sent twice.

This packet tells the devices that the start key has been pressed anf that lapcount, times and ranking have been reset.

Startpacket: $55 $DD $00 $AA $AA $AA $AA $AA PS
When you press the start key long enpugh this packet will be sent twice after the second resetpacket has been sent.

Das Packet marks the start of race.


Endpacket: $55 $DC $FF $FF $FF $FF $FF $FF PS
Whwn the las cars crosses the finish line or the race is aborted, this packet will be sent twice.

Fuelpaket: $55 $D6 S0S1 S2S3 S4S5 $14 $50 $AA PS
Approx. every 500ms (sehr unregelmässig) the current fuel levels are sent.


Displaypacket: $55 $DE WE $FF $FF $FF $FF $FF PS
Send to devices to tell them to refresh their display. No details include just refresh.

The pit stop terminal generated the when you select rES.

On the first press of the select key no packet will be sent.
On the second press of the select key one packet with WE equal to 0 will be sent.
On the next press of the select key one packet with WE equal to 0 and one packet with WE equal to 1 will be sent.
On the next press of the select key one packet with WE equal to 1 and one packet with WE equal to 0 will be sent.
After that the last two procedures are alternatively repeated.

When you leave rES mode the procedure atrts at the beginning next time you enter rES mode.


Brakepacker: $55 $D7 RG BR $83 $93 $DB $FF PS
Will be only sent to cars on the pit stop track. is used to set the brake level.

Semantic level: Datapackets - cars

Not only terminals send data over the tracks, the cars do so as well. But their baudrate is lower and the data packets are only 4 bytes long.

Carpacket: $55 FZ XX PS
Das car sends a data packet on request of the terminal after crossing the finish line or entering the pit stop lane.