CRTC

The CRTC is based on the Motorola 6845 with 2k bytes of screen memory and 2k bytes of character generator memory. The character generator memory is also RAM, which means that the fonts are programmable.

The 6845 allows for up to 32 rows per character, but the 6809 Microsystem hardware only uses four row address bits so that each character can have a maximum of 16 rows. The System Software programs the 6845 to only display 11 lines per character, with the cursor using the last two lines.

The character RAM is hard-coded at address $B000, and is write-only. This means that if there is other RAM at $B000, it will mirror the character RAM, being written to at the same time as the character RAM and responding to reads, which the character RAM can't do. Alternatively the character RAM can be write-protected, in which case the standard RAM at $B000 can be used.

CharacterAddress
00B000-X00F
01B010-X01F
...
FFBFF0-XFFF

The text RAM can be mapped anywhere in system memory. Like the character RAM it is write-only, and if there is system RAM mapped at the same memory that becomes a mirror of the text RAM.

Of course the problem with having your character map in RAM is that you still need ROM somewhere to store the map so that you can program the character map at startup. The System Software stores a compressed character map of only the most essential characters -- from $21 ($20 is a space, i.e. all zeros, and by first clearing the RAM all characters not explicitly programmed are spaces) to $7E. It then also creates an "emphasized" version of each character by doubling each pixel and storing that as character $A1 to $FE -- I'm not sure that this is of much value. Somewhere along the way it also keeps track of descending characters and loads them a few scan lines lower down in memory. Quite an impressive bit of code.

For the record (this is not in the source listing):

$F732: 84 10 42 00 D9 32 01 00 80 52 5F 7D A5 88 2F 8E
       3E 32 27 22 22 67 51 8A A8 C9 32 44 00 00 00 11
 	   21 04 41 82 20 84 88 00 A4 BA 4A 00 20 E4 13 02
	   00 00 C0 10 01 00 F8 00 00 00 00 00 C6 00 88 88
	   08 C0 C5 5C 67 74 C4 10 42 88 73 11 32 11 FE 87
	   88 C1 E8 10 53 E9 23 F4 C3 83 30 3A 26 C2 8B D1
	   7D 88 88 10 C2 C5 E8 62 74 2E 46 0F 11 01 C0 18
	   60 8C 31 C0 10 01 20 22 82 20 08 C0 07 1F 80 20
	   08 22 22 B8 08 11 01 C4 C5 5E 7B F0 2E C6 1F 63
	   7C 31 BE 18 9F 8B 21 84 E8 5E 8C 31 C6 F7 43 78
	   21 FC 1F C2 0B 21 B8 18 42 8E 2E C6 F8 63 8C 8E
	   10 42 88 83 10 C2 18 5D 4C 65 94 14 43 08 21 84
	   1F 77 AD 31 C6 38 6B 8E 31 BA 18 63 8C EE C5 F8
	   42 08 2E C6 58 93 7D 31 BE 92 A2 8B C1 C1 E8 3E
	   21 84 10 12 63 8C 31 BA 18 63 54 8A C4 18 6B DD
	   31 46 45 54 8C 31 46 45 08 F9 10 11 11 3E 27 84
	   10 C2 41 10 04 41 70 08 21 84 1C A2 22 00 00 00
	   00 00 F8 40 10 04 00 00 00 38 E8 A3 0F A1 CD 18
	   1D 00 3E 84 E0 21 B4 39 46 07 80 8B 2F 78 26 C5
	   11 42 B8 18 A3 87 2F 84 36 63 8C 02 08 21 04 83
	   10 42 18 5D 08 31 95 15 09 21 84 10 02 C0 AA B5
	   56 00 DA 8C 31 02 E0 62 8C EE C5 18 5F 08 2E C6
	   E8 21 04 A0 CD 10 02 00 3E 38 F8 84 78 42 08 06
	   40 8C 31 3A 00 62 8C 8A 00 50 6B AD 0A 80 A8 88
	   8A 31 C6 E8 E1 03 E0 23 22 3E 22 44 10 82 08 21
	   80 10 22 08 41 84 88 51 31 00 00 00 00 30 3C 3F
	   3C 30 


[Image] Hit Count
hits since 2020-09-20.

Back to Wouter's 6809 Page (This page last modified 2020-09-25)