[Coco] : GIME text modes and font data
jdaggett at gate.net
jdaggett at gate.net
Mon Sep 3 15:33:32 EDT 2012
On 3 Sep 2012 at 9:54, William Astle wrote:
> On 12-09-03 05:01 AM, brian palmer wrote:
> > Gidday William.
> >
> > By using your own Rom version. Is it possible that H.count(Fe18) and H.Pbuf(Fe19) are not being corrupted or ignored. As these 2 are used for total amount of Char's to be printed and stored? These 2 I always assumed would be used for all text modes and fonts. But I could be wrong tho :(
>
> FE18 and FE19 have nothing to do with the *hardware* text modes. They
> only apply to using the HPRINT command in basic. The hardware text modes
> are what I'm interested in here.
>
>
William
Hardware text modes are configured in the GIME chip with registers at FF98 and FF99.
There is also a bit in the INIT0 register, FF90, that enables and disables the COCO1/2
comapatibility mode.
Bit 7 of the Video Mode register, FF98, sets the GIME chip in text or graphics mode. This
works in conjuction with the COCO bit, bit 7, of the INIT0 register, FF90. The GIME is flexible
in assigning lines per row and characters per row. Not all are supported in the Basic Routines
whether in ROM or moved to RAM.
The two main modes for text in the COCO3 mode is 8 lines per character row and 9 lines per
character row. 8 rows per character row is standard. This allows a 5x 7 character to be used.
In actuallity it really is 6x8 with the trailling column and trailling row as spaces between the
next character and row spacing. In 9 rows per character mode the text is 6x9. A standrad 5x7
character with a column space and an extra row to allow for underline if the attributes byte is
used. The attributes are used when the COCO bit in the INIT0 register is cleared. When set,
the GIME chip is programmed to act as if it were a COCO1/2 mode. The other lines per
character row are there to memic the COCO1 bit paterns for the various semigraphics
modes that are supported. In graphics mode, the GIME is in 1 line per character row. There
you are just setting the pixel on or off and at what color. There are other nuances that happen
when the GIME is programmed to other than what the Basic Software supports. The user has
to be warned that what happens may or may not be usable.
With 8 lines per character row the GIME is often set to 192 rows per field. This yields 24
character lines. Setting the lines per field to 225, maximum, and 8 lines per character row will
yield just over 28 character rows. This is really pushing the video bandwidth of NTSC big
time. 8 lines per character row and 200 lines per field will yield 25 character rows. With 9
lines per character row and 192 lines per field, the best you can do is 21 character rows. At
200 lines per field that will be 22 character rows. With 225 lines per field, is 25 character
rows. If you set the GIME for 12 lines per character row and say 192 lines per field you would
get 16 character rows. In COCO1 compatible mode this will still yield a 5x7 character with a
pixel space between rows and characters. You will also have the usual border that is
consistant with the COCO1/2.
In graphics mode the internal character ROM I beleive is bypassed and the characters are
stored in memory. I am not totally certain of that though. I need to check the source code to
be sure of that.
I hope this is what you wanted to know.
james
More information about the Coco
mailing list