-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document devices and add a command to the keyboard
- Loading branch information
Showing
7 changed files
with
159 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Devices | ||
YETI-16 has a few devices that you can control with the IO instructions (`IN`, `OUT`, `CHK`, `ACTV`) | ||
|
||
## Common protocol | ||
Devices operate by the program sending opcodes and operands through `OUT` | ||
|
||
All devices have 1 opcode in common, which is 81 (or 0x51, or 'Q') | ||
|
||
This opcode returns 51, and then a null terminated string containing the device's name | ||
|
||
## Devices | ||
### 0x00 - YETI-16 Debug Device | ||
This device is for basic debug/testing, it can print to the console | ||
|
||
#### Opcodes | ||
- `P`/80/0x50 - Prints the operand to the console | ||
|
||
### 0x01 - YETI-16 Keyboard | ||
This device receives keyboard events and sends them to the console | ||
|
||
It sends keyboard events through input in this format: | ||
- Event type ('D' for key down) | ||
- Key (ASCII) | ||
|
||
You can also send commands to it to see what commands are currently pressed, in this format | ||
- ASCII character `S` | ||
- ASCII key you want to check | ||
and then it returns data in this format | ||
- ASCII character `S` | ||
- 0xFFFF if the key is pressed, 0 if it isn't | ||
|
||
### 0x02 YETI-16 Graphics Controller | ||
This is a device for loading default palettes and fonts | ||
|
||
The default palette can be loaded by sending the ASCII character `P` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters