Kekoa Proudfoot explains the download process:
I assume you know the basic packet protocol. If not, it was described by Dave Baum.
See http://graphics.stanford.edu/~kekoa/rcx/s-record.txt for a description of the format that somebody else wrote up.
After this, you should have an image with a starting address and an ending address.
If you like, search from the ending address backward until you find the first non-zero byte, and make that the new ending address. This is not entirely legal, because maybe that data was supposed to be set to zero, but it speeds downloading, and it works with the supplied Firm0309.lgo.
Add up the bytes between the starting and ending address. You checksum should be an unsigned short. A short has 16 bits.
In hex, the data in the message should be:
65 01 03 05 07 0b
You need to supply the header, complement, and checksum bytes.
In hex, the data in the message should be:
75 00 80 cc dd 00
cc is the least significant byte of the image checksum
dd is the most significant byte of the image checksum
Break up the image into 200 byte chunks.
Loop over the chunks. Compute the checksum for the current chunk by adding up the bytes of the current chunk. This checksum should be a byte, not a short.
For each chunk, send a message with the following data (in hex):
xx aa bb cc dd databytes eexx is the message opcode
In hex, the data in the message should be:
a5 4c 45 47 4f ae
That's it.
Sending messages is non-trivial. First you have to configure the serial port. Then, when you send a message by writing data to the serial port, you have to wait for a proper reply to make sure the rcx received it. If you do not receive a proper reply, send the exact same message again until you do hear a proper reply.
There's more information on messages and the serial protocol.
With all of this in mind, the download trace should make sense.
A few things to note about the trace:
Hope this helps,
-Kekoa