Add info about the SimpleCON device
Closed this issue · 1 comments
yes it's actually very "simple" interface to output short text to a windows textbox from sinclair basic.
the problem with the documentation is that it's using old html that doesn't supported by latest versions of windows anymore (packed mht files). So I do have plans to update the original documentation but the tools are very archaic and not fun to use. I always provide a readme with the updates and examples for new functionalities.
But simpleCON is documented. You are using the old version. The 1.78+ versions have an extra help
button that explains functionality on simpleCon window. I think nobody sees that big button. I just write the info into log window in the next version.
Also there are 3 different examples in the release. Check basinC/examples/basinc/tests, In addition to that, snippets window has a simpleCON v2 snippet.
you will see conOut and simpleCON v2 examples, sadly simpleconv2 bas file got corrupted somehow (it was the same as snippets anyway), I'll provide a new file for the next release. the usage is pretty straightforward. Please read the readme file for more information.
In short, simpleCON is for you to be able to move text outside of the emulation environment OR move text into emulation from a windows text box.
For users of old version, I'll just copy the information that basinC already has since 2020:
- there are two ports:
Console Index Port: 1259 ($04EB)
Data Read/Write port: 1515 ($05EB) - You set the index with 1259: eg.
OUT 1259,10
- you set the data with other port out:
OUT 1515, 65
(send "A" character) note, this will increase Index by 1 automatically. - You can also read input from the same text box, use
LET x=IN 1515
instead, it will read the data at the index of index port. - Text line in simpleCON window never clears itself. You have to clear the text with a series of "32"s if you want.
- if you set index port to 0, it signals the device to line feed. in SimpleCON window, the textbox context will be copied into log.
- if Index is set to 255 and you write something with port 1515, the next index will be 1. Linefeed won't happen.
- in BasinC, writing to a port forces simpleCON window to open. Sometimes this causes problems if simplecon is constantly updating. This behaviour might change in the future.
simpleCON is designed as a very simple hardware device with 256 bytes of memory. first byte used as index register. so you may set 255 character long text data. That's why Index cannot be set at 0. OUT 1259,0
always moves Index to 1. Memory location 0 is for storing index data, so index moves to 1 automatically to protect it's content.
Port locations are selected carefully not to conflict popular devices. It's port locations are noted in the spectrum hardware index. So you can design an arduino device to show your output in a led panel or something, I'll leave this to hardware experts.