I'm still catching up with some posts I should have made a few weeks ago...
A few days before the most recent Oxford Raspberry Jam, I had a parcel arrive in the post from China: A nice 1.8" colour TFT screen. 128 x 160 @ 18bpp.
I ordered it to use whilst developing my XMega based Terminal emulator.
The screen uses the same display controller as Adafruit's 1.8" TFT screen, so I based my initialisation code on their arduino code - a great way of getting up and running quickly. The only changes I made was to use 'C' (rather than C++) and drop down to use the 12bpp communication mode.
Bingo. Colour Terminal.
The whole screen is redrawn from scratch each time, based on what the terminal's character cell array contains. Each cell holds the following information:
o The character to display
o The attributes (bold, inversed etc.)
o The foreground and background colour
Each row of pixels in the display is then generated, pixel-by-pixel, by looking at which character should be shown, which colours should be used, and refering to flash-based font data.
The output's really quite striking:
That's the tail of coloured 'ls' output, and some 'large text' generated by the alarmingly named utility 'toilet'.
However, to really test the parser's behaviour (and to nicely demonstrate the abilities of the terminal), I found some ANSI art files on the internet... This is a montage of four of them:
I've found that most ANSI art expects 80 columns. The screen is showing the left-hand 32 columns. 80x26 cells is pushing the 8kb of memory that I have to play with.