From ed667a2dd6b005da647e7233af5cdc0fbfd1b432 Mon Sep 17 00:00:00 2001 From: Simon Fortier Date: Sat, 30 Dec 2017 21:27:25 -0500 Subject: [PATCH] Updated Hardware: Com Port (markdown) --- Hardware:-Com-Port.md | 15 --------------- Hardware:-Universal-Com-Port.md | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 15 deletions(-) delete mode 100644 Hardware:-Com-Port.md create mode 100644 Hardware:-Universal-Com-Port.md diff --git a/Hardware:-Com-Port.md b/Hardware:-Com-Port.md deleted file mode 100644 index 2846567..0000000 --- a/Hardware:-Com-Port.md +++ /dev/null @@ -1,15 +0,0 @@ -NOTE: This is based off of a quick reading of the source code. YMMV - mlaga97 - -### Specifications -Manufacturer: Apachicorp -Version: ???? -Default address: `0x000D` -Hardware ID: `0x000D` - -### Interrupt Behavior -| Value of A | Action | Energy cost | Result | -| --- | --- | --- | --- | -| `0` | `SELF_CLEAR` | `0 kJ` | Clear the console output | -| `1` | `POLL` | `4 kJ` | Read all messages in the console buffer to memory at X, sets B to the number of messages | -| `2` | `FRONT_PORT_OUT` | `20 kJ` | Copies 8 words starting from the address in X to the object directly in front of the cubot | -| `3` | `SELF_OUT` | `1 kJ` | Copies 8 words starting from the address in X to the console output | \ No newline at end of file diff --git a/Hardware:-Universal-Com-Port.md b/Hardware:-Universal-Com-Port.md new file mode 100644 index 0000000..1ed19f2 --- /dev/null +++ b/Hardware:-Universal-Com-Port.md @@ -0,0 +1,18 @@ +The Universal Communication Port, or Com Port for short enables communication between machines and structures. This device is coupled to an internal message buffer, which can contain up to 40 words. The internal buffer is emptied into the console screen at the end of every tick. + +### Specifications +Manufacturer: Apachicorp +Version: 1.1b +Default address: `0x000D` +Hardware ID: `0x000D` + + +### Interrupt Behavior +| Value of A | Action | Energy cost | Result | +| --- | --- | --- | --- | +| `0` | `SELF_CLEAR` | `0 kJ` | Clears the console screen and the internal message buffer. | +| `1` | `POLL` | `4 kJ` | Copy all internal buffer messages to memory at X, sets B to the number of messages copied | +| `2` | `FRONT_PORT_OUT` | `20 kJ` | Copies 8 words starting from the address in X to the object directly in front of the cubot if this object has a Universal Com Port as well. The B register is set if the operation succeeded, it is reset otherwise | +| `3` | `SELF_OUT` | `1 kJ` | Copies 8 words starting from the address in X to the internal message buffer. The B register is set if the operation succeeded, it is reset otherwise | + +Note that a Cubot can send a message to another Cubot's internal buffer, which will be emptied into his console screen. Currently, the [Radio Tower](https://github.com/simon987/Much-Assembly-Required/wiki/Radio-Tower) is the only other object with a Com Port. \ No newline at end of file