News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

NC100/200 Fast Text Routines

Started by uminded, 22:07, 02 January 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

uminded

I am trying to understand how to draw a 5x7 font on my NC200's screen in a custom application I am writing. I can boot from disk and use the systems text routines but I plan on clobbering the system memory map so I want to write my own.


Any helpful threads, posts, code snippets that I can use to learn from? Below is the NC100/200 screen mapping:




Top left hand corner of the screen.
A 1 bit set means the pixel is set to black.
The first byte controls the first 8 dots with bit 7 controlling the bit on the left.
The next 59 bytes complete the first raster line of 480 dots.
The bytes which define the second raster line start at byte 64.
To make the hardware simpler so bytes 60, 61, 62 and 63 are wasted.

byte00   byte01   byte02      byte60   byte61     byte63
76543210 76543210 76543210 .. 76543210 76543210.. 76543210 



The issue is if I use a small font (5x7) it does not align to any boundaries and I have no idea how to handle this. 3 (5 bit wide) characters can fit into 2 bytes but how do you track the running offset? Most importantly how to do this in a fast way when loading a whole page string with auto line wrapping...

pelrun

IIRC the NC screen is vertically oriented, so the bits run down the screen, not to the right.

uminded


QuoteTop left hand corner of the screen.
[/size]Bit 7 controlling the bit on the left.[/size]The next 59 bytes complete the first raster line of 480 dots.



From the documentation it sounds like its left to right one screen width at a time.

Powered by SMFPacks Menu Editor Mod