5x7 dot matrix screen
Posted: Sat Jan 06, 2024 7:36 pm
Last update, 16th July 24: Added instructions on operation, find "DOCUMENTATION.md" on github
Try It Now!
#R47 DOT MATRIX V9
https://github.com/edriveX16/DOTMATRIX
See comments in last post.
;======= vv initial first posting from Jan. 2024 vv =======
Hello + Happy New Year!
;
Ever thought your 80 column screen with 8x8 pix characters is to much?
This program will reduce your screen to 20x10 characters at nice 5x7 dots only
Make your screen look like a HD44780 LCDisplay or like a schedule table seen in public transportation.
Since I preordered last October I'm trying to learn programming the X16/65C02.
So here is my very first program I've ever put online.
The only thing that it does is to let you write some characters on the screen.
While you can choose from some color settings and 4 dot styles.
Each character is 48x32 pix.
The program makes no use of any external or internal font and doesn't load any assets either, which keeps the PRG size small (<5K).
Instead it creates a tileset of just seven 8x8pix basic tiles by some code.
These tiles are then put together in a Layer0 map to create something that looks kind of similar to characters, while making intensive use of vertical&horizontal flipping.
To achieve the dotmatrix effect a mask is applied in Layer1, letting you only see the dot part of the hard to read blocky writing in Layer0.
Characters are stored in pattern tables - telling the computer which of the basic tiles to use and how to flip them.
There are 2 pattern tables. One for the upper left corner and one for the middle left of each character consisting of 4 tile assignments. A third table assigns 6 of these patterns to a character (also using flipping of now complete patterns).
Cursors are done as sprites.
At the moment only an ASCII subset of 96 characters is supported.
Keys:
All keys with chr$ values from $20 to $7F will put something on the screen.
Cursor (arrow) keys will move the cursor.
'Home/Pos1', 'End', 'Return/Enter', 'Backspc', 'Del' will do at least something similar like one expects.
No control characters like <lF>, <cr> or white spacing are supported.
F1 shows the avaliable functions keys.
Things to be aware of:
When starting it tries to load the file "DOTTEXT.TXT".
In case it fails, it will then save an empty "DOTTEXT.TXT".
Which can be overwritten with the user text by hitting F2.
Text is fixed to 200 characters.
Filename and device (#8) are hardcoded.
So far the only way to load a previously saved text is to restart the program.
Since PETSCII characters aren't supported (yet), it sets the X16 to ISO mode.
Program runs in 640x480 @8bpp mode, while not affecting the color palette.
It assumes that the default palette is present in VERA.
Best way to test is to put some characters on the screen and toggle through the 8 presets by hitting F4.
When using F6 or F7 it is likely to get something inverted, hard to read.
Try F6 and F7 subsequently or F4 to take you back to a preset.
Issues:
Sometimes the cursor and some F-keys aren't reacting immediately.
(need to learn more on the CBM style input things or maybe a x16emu host system issue)
Would love to hear if this is running elsewhere - if at all?
Especially if and how the keyboard responds.
Please consider this as an early 'test/proof of concept/programming exercise' version.
Program is written in assembly using cc65 (V2.19) and x16emu (R46) (on an OpenSuse system).
here some screenshots:
Try It Now!
#R47 DOT MATRIX V9
https://github.com/edriveX16/DOTMATRIX
See comments in last post.
;======= vv initial first posting from Jan. 2024 vv =======
Hello + Happy New Year!
;
Ever thought your 80 column screen with 8x8 pix characters is to much?
This program will reduce your screen to 20x10 characters at nice 5x7 dots only
Make your screen look like a HD44780 LCDisplay or like a schedule table seen in public transportation.
Since I preordered last October I'm trying to learn programming the X16/65C02.
So here is my very first program I've ever put online.
The only thing that it does is to let you write some characters on the screen.
While you can choose from some color settings and 4 dot styles.
Each character is 48x32 pix.
The program makes no use of any external or internal font and doesn't load any assets either, which keeps the PRG size small (<5K).
Instead it creates a tileset of just seven 8x8pix basic tiles by some code.
These tiles are then put together in a Layer0 map to create something that looks kind of similar to characters, while making intensive use of vertical&horizontal flipping.
To achieve the dotmatrix effect a mask is applied in Layer1, letting you only see the dot part of the hard to read blocky writing in Layer0.
Characters are stored in pattern tables - telling the computer which of the basic tiles to use and how to flip them.
There are 2 pattern tables. One for the upper left corner and one for the middle left of each character consisting of 4 tile assignments. A third table assigns 6 of these patterns to a character (also using flipping of now complete patterns).
Cursors are done as sprites.
At the moment only an ASCII subset of 96 characters is supported.
Keys:
All keys with chr$ values from $20 to $7F will put something on the screen.
Cursor (arrow) keys will move the cursor.
'Home/Pos1', 'End', 'Return/Enter', 'Backspc', 'Del' will do at least something similar like one expects.
No control characters like <lF>, <cr> or white spacing are supported.
F1 shows the avaliable functions keys.
Things to be aware of:
When starting it tries to load the file "DOTTEXT.TXT".
In case it fails, it will then save an empty "DOTTEXT.TXT".
Which can be overwritten with the user text by hitting F2.
Text is fixed to 200 characters.
Filename and device (#8) are hardcoded.
So far the only way to load a previously saved text is to restart the program.
Since PETSCII characters aren't supported (yet), it sets the X16 to ISO mode.
Program runs in 640x480 @8bpp mode, while not affecting the color palette.
It assumes that the default palette is present in VERA.
Best way to test is to put some characters on the screen and toggle through the 8 presets by hitting F4.
When using F6 or F7 it is likely to get something inverted, hard to read.
Try F6 and F7 subsequently or F4 to take you back to a preset.
Issues:
Sometimes the cursor and some F-keys aren't reacting immediately.
(need to learn more on the CBM style input things or maybe a x16emu host system issue)
Would love to hear if this is running elsewhere - if at all?
Especially if and how the keyboard responds.
Please consider this as an early 'test/proof of concept/programming exercise' version.
Program is written in assembly using cc65 (V2.19) and x16emu (R46) (on an OpenSuse system).
here some screenshots: