Device name: wireless device Device type: 0x02 (communication) Device subtype: 0x01 (serial port) Device vendor ID: 0x00000000 (unknown) +-----------------------+ | BEHAVIOR: | +-----------------------+ -The registers in this document(CMD, A, B, etc.) refer to the memory-mapped IO as according to these specs: https://github.com/trillek-team/trillek-computer. -The device has 2 RAM buffers of 8 kilobits(1 kilobyte) each, one for reading and one for writing. These are exposed to the CPU on addresses that are user-defined, but must not be less than 0x120000(see commands below). -The device has 2 internal buffers which mirror the read and write buffers but are not visible to the user. These are used to store data that is coming in/out too fast for the device to read/write on memory. -The CMD register will always be cleared after the command has been received in order to avoid command mix-ups. -The device receives/transmits to and from its internal buffers on an independent clock, but copies to/from its exposed buffers on the CPU clock. -The baud rate is set permanently at 8000 baud. CMD register | Behavior ----------------+----------------------------------------- 0x0000 | No effect. 0x0001 | Sets the pinging value to the value of the A register. The device will send a ping message | at 8 kHz once every second with the value of the A register. If A == 0, pings are disabled. 0x0002 | Sets the ping interrupt message to the value in the A register. The transmitter will trigger an | interrupt of this message whenever a complete ping of 8 kHz is received. The B register will be | set to the value of the ping. An A-value of zero disables ping interrupts. 0x0003 | If A == 0, disable/stop read/receive operations. Else, enable/continue read/receive operations. 0x0004 | If A == 0, disable/stop write/transmit operations. Else, enable/continue write/transmit operations. 0x0005 | If A == 0, disable/stop all operations. Else, enable/continue all operations. 0x0006 | Dump the internal read buffer to the exposed read buffer. 0x0007 | Dump the exposed write buffer to the internal write buffer. 0x0008 | Transmit the contents of the internal write buffer A times. 0x0009 | If A == 0, disable automatic read dumping. Else, enable automatic read dumping. Automatic read | dumping will write to exposed read buffer as quickly as possible rather than waiting for the | dump command to be entered. 0x000a | Sets the operating frequency to A * B. Maximum 4.294967296 GHz, minimum 9 kHz. Edits the bit per baud | value accordingly. 0x000b | Sets the read location to A+(B << 16) and the write location to A+0x400+(B << 16) iff A+(B << 16) > | 0x11ffff. *note for technical accuracy: To distinguish between a completed and uncompleted ping, a ping must be preceded by 001 and followed by 100, and have a size of exactly 16 bits. The device will add/filter this when sending/receiving pings. *note to implementors: Frequency is only a value to distinguish between different ranges of communication. You need not necessarily simulate something actually transmitting at 4.3 GHz, just keep signals of unique frequency distinct. +-------------------------------+ | SUGGESTED OPERATION: | +-------------------------------+ Usually broadcasting over some public frequency will be very noisy, unreliable, and unsecured, so a much better method is shown here: 1) Ship A moves within range of Ship B. Both ships are sending out ping signals. 2) The two ships use A's ping value times B's ping value to make a unique frequency to communicate on. Both ships change their pings. 4) Ship B and A communicate in this way. To connect to multiple other ships, Ship A will have to do some more complicated networking: 1) repeat steps 1 and 2 above per each ship 2) For each ship it is connected to, Ship A must change to the appropriate frequency and start pinging with that ship's ID(perhaps gotten by XORing their two original pings together). The ships will be instructed by Ship A that it is maintaining multiple connections, and so they will not attempt to transmit over their individual private networks unless A is pinging with their ID. In this way Ship A might become a hub for perhaps 5 other ships, all of them transmitting to or from it. This might be useful for coordinating a small fleet or having a small chat with your friends. That's all the networking techniques that I have been able to think up that would work purely on the hardware(pings & frequencies) level. Keep in mind that if one were to move up the ladder and use higher-level connections, your communication will be much cleaner than if you were to cobble together a bunch of low-level connections.