Page 1 of 1

screen driver (text)

Posted: Wed Mar 06, 2013 2:32 pm
by simon

I think about rewriting the complete text screen driver. Right now, P2 mode is used which has some flaws I like to describe.
P2 is one of the two tile modes of the VDP. It has a resolution of 512x212 pixel which gives 64x26.5 tiles (characters). The colors of the tiles are defined in the pattern generator table and not in the pattern name table. Thus it is not that easy to change character attributes like color, bold, underline, ...

When I wrote the VT100 emulation I came to the point where I want to implement text attributes. As it is not easily possible to change single tile colors I thought about using a bitmap mode with the help of the blitter. The idea is to preserve three(?) standard fonts (normal, bold and italic) and blit each character to its destination. Logical operations could change the color of the character while blitting.
B4 could be a nice mode as it's resolution is 768x240 (768x480 interlaced) giving a text screen with 96x30 (96x60) chars.


Re: screen driver (text)

Posted: Tue Mar 12, 2013 5:00 pm
by simon
Yesterday I did some tests for the new text mode. Well, the VDP's B4 mode is possible for 80chars but I doubt the quality will be good. There is much moiré on the screen. :shock:
Well ok, I don't care much about the finally used VDP mode but try to get it functional. If you ever need a bitmap font you can use a (Linux) console font easily. When I started this project I used google to find a bitmap of a nice character set and used gimp to get it into the correct format. Yesterday I used a psf(u) console font. It was quite easy to convert it for Kiwi:

    1. Get the PSFTools
    2. Convert the $font.psf(u) to an XBM bitmap with psf2xbm (maybe you have to edit the psf2xbm sources to meet your needed format. I had to alter a few settings because I wanted a bitmap width of 1024px instead of 256px.)
    3. Open the generated XBM with Gimp and convert it to indexed mode (chose your wanted palette and be careful not to remove unused colors).
    4. Save the XBM as BMP.

Good luck! :)