Skip to content

Home > Software > Operating Systems > BIOS/BDOS > CONIO


The CONIO terminal emulator

Although the Durango-X computer is intended to use ad hoc software in standalone cartridges, without the need for any underlying OS, the availability of a console-type I/O is always welcome, allowing easy text display and keyboard interaction.

Firmware Requeriments

As a firmware module, CONIO (CONsole Input/Output) needs some basic support to operate:

  • The CONIO code itself.
  • An 8x8 bitmap font (usually included, but can be switched)
  • A keyboard driver (one for the standard 5x8 matrix keyboard is supplied but, if not detected, paralell input at $DF9A is supported.
  • A minimal interrupt handler which, besides any application-specific needs, should increment the ticks counter and call the keyboard scanning routine.
  • Basic initialisation for all of the above.

You can check an example of the software package installation for CONIO support on the standalone version of EhBASIC from address $E000 on the binary file (label name: reset).

Supported features

CONIO supports both HIRES and colour modes, displaying 32 x 32 or 16 x 16 characters respectively. All four screen areas are supoported and, in case of the first area ($0000-$1FFF) where zeropage & stack reside, it's automatically limited to the bottom half of the screen to protect the important system variables.

Being a bitmap-only display, alternative fonts are supported; just change a pointer to a 2 KiB font definition of your choice (256 chars of 8x8 pixels).

Note

These features have no support from the CONIO interface, and will need to manually set some memory addresses and/or hardware registers.

Character set

CONIO makes use of a slightly custom variant of ISO/IEC 8859-1 for convenience and localisation reasons. C1 control codes, undefined on the standard, are used by:

  • The Sinclair ZX Spectrum semi-graphic characters (128-143, $80-$8F)
  • Selected Greek for Maths based on $E0-$EF of code page 437 (144-159, $90-$9F) but including check mark, approximation and non-strict inequalities.

Other differences:

  • Non-Breaking space (160, $A0) is replaced by a hollow square/rectangle (code 128/$80 Spectrum graphic might be used as a substitute)
  • Currency symbol (164, $A4) is replaced by the Euro sign from ISO 8859-15.
  • Soft hyphen (173, $AD) is replaced by the (seldom found on single-byte encodings!) slashed equal.
  • Cedilla (184, $B8) is replaced by lowercase omega. This encoding is already used on some HD44780-based LCD text displays.
  • Superscript 1 (185, $B9) is replaced by uppercase delta.
  • Fractions (188-190, $BC-$BE) are replaced by the bullet character, the lowercase oe ligature and the eng character.

Codes 191 ($BF) and beyond are the same as ISO 8859-1 -- and also like Windows-1252, for that matter.

extended-ASCII character table

mOS $x0 $x1 $x2 $x3 $x4 $x5 $x6 $x7 $x8 $x9 $xA $xB $xC $xD $xE $xF
$8x
$9x α Γ π Σ σ τ ϴ Ω δ
$Ax ¡ ¢ £ ¥ ¦ § ¨ © ª « ¬ ® ¯
$Bx ° ± ² ³ ´ µ · ω Δ º » œ ŋ ¿
$Cx À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï
$Dx Đ Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß
$Ex à á â ã ä å æ ç è é ê ë ì í î ï
$Fx ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ

C0 Control characters

Usually single-byte sequences for efficiency. Most of bash key shortcuts are implemented here, while a few other are just traditional ASCII. A notable difference is the use of plain CR as newline, unlike the common UNIX (LF) and DOS/Windows (CR plus LF) alternatives.

Some other changes are the cursor up/down (made from VT and LF), the CR-without-LF (used as HOML, line home) and the XON/XOFF, which make little sense on a glass tty but are used instead to enable/disable the cursor.

Colour commands, on the other hand, are generated in a similar way to the ZX Spectrum although with different codes (18 for INK, 20 for PAPER).

Note

When required, the normally hidden glyph is obtained by preceeding the code with a DLE (16/$10).

Ctl-key Dec Hex ASCII name glyph & description effect
- 0 $00 NUL SWTC ▣ square with block (1)
A 1 $01 SOH CRTN ↞ double arrow left carriage return (without line feed)
B 2 $02 STX LEFT ⇦ arrow left cursor left (no backspace)
C 3 $03 ETX TERM ⏻ ball switch send TERM signal(7)/BREAK key (6)
D 4 $04 EOT ENDT ⇲ arrow to SE corner (7)
E 5 $05 ENQ ENDL ↠ double arrow right move cursor to end of line (7)
F 6 $06 ACK RGHT ⇨ arrow right cursor right (no space)
G 7 $07 BEL BELL 🔔 bell acoustic alert
H 8 $08 BS BKSP ⌫ left sign with x backspace, clear previous character
I 9 $09 HT HTAB ⇥ right arrow with bar advance to next tab, printing spaces
J 10 $0A LF DOWN ⇩ arrow down cursor down (no CR)
K 11 $0B VT UPCU ⇧ arrow up cursor up one line
L 12 $0C FF CLRS 𑿄 paper sheet clear screen (2)
M 13 $0D CR NEWL ⏎ angled arrow newline, ZX Spectrum-like
N 14 $0E SO EON ⇒ imply emphasis (inverse) on
O 15 $0F SI EOFF ⇐ reverse imply emphasis (inverse) off
P 16 $10 DLE DLE ♥ heart suit show glyph for next char, do not interpret it (3)
Q 17 $11 DC1 XON ★ star cursor on
R 18 $12 DC2 INK ✏ pencil set foreground colour (3)(4)
S 19 $13 DC3 XOFF ♦ diamond suit cursor off
T 20 $14 DC4 PAPR ♣ club suit set background colour (3)(4)
U 21 $15 NAK HOME ⇱ arrow to NW corner reset cursor without clearing screen
V 22 $16 SYN PGDN ↡ double arrow down page down (7)
W 23 $17 ETB ATYX ♠ spade suit set cursor position (5)
X 24 $18 CAN BKTB ⇤ left arrow with bar backwards tabulation (7)
Y 25 $19 EM PGUP ↟ double arrow up page up (7)
Z 26 $1A SUB STOP ⛔ no entry send STOP signal (7)
- 27 $1B ESC ESC ⬉ NW arrow/mouse cursor escape (7)
- 28 $1C FS PLOT ◢ wedge pointing SE (7)
- 29 $1D GS DRAW ◣ wedge pointing SW (7)
- 30 $1E RS INCG ▒ light pattern (7)
- 31 $1F US TXTM ▓ mid pattern (7)
- 127 $7F DEL DEL ⌧ square with x delete (7)

Notes:

1.If sent to CONIO, will issue an input.

2.If sent to CONIO, will reset the standard device.

3.Takes a second character to complete.

4.Currently only low nibble used as BgRG or B1 G0 R1 G1 -- official values are 32...47, thus always printable.

5.Takes another TWO chars, ASCII 32 and up, stating row & column (home is 0,0 or ASCII 32,32).

6.Read value from keyboard.

7.Not yet implemented.