[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

on the keyboard. One of the features of the Commodore 64 is the ability to use patterns located in RAM memory. These RAM patterns are created by you, and that means that you can have an almost infinite set of symbols for games, business applications, etc.

A normal character set contains 256 characters in which each character is defined by 8 bytes of data. Since each character takes up 8 bytes this means that a full character set is 256*8=2K bytes of memory. Since the VIC-II chip looks at 16K of memory at a time, there are 8 possible locations for a complete character set. Naturally, you are free to use less than a full character set. However, it must still start at one of the 8 possible starting locations.

The location of character memory is controlled by 3 bits of the VIC-II control register located at 53272 ($D018 in HEX notation). Bits 3,2, and 1 control where the characters' set is located in 2K blocks. Bit 0 is ig- nored. Remember that this is the same register that determines where screen memory is located so avoid disturbing the screen memory bits. To change the location of character memory, the following BASIC statement can be used:

   POKE 53272,(PEEK(53272)AND240)OR A

Where A is one of the following values:
VALUE of ABITSLOCATION OF CHARACTER MEMORY*
DECIMALHEX
0 XXXX000X 0 $0000-$07FF
2 XXXX001X 2048 $0800-$0FFF
4 XXXX010X 4096 $1000-$17FF ROM IMAGE in BANK 0 & 2 (default)
6 XXXX011X 6144 $1800-$1FFF ROM IMAGE in BANK 0 & 2
8 XXXX100X 8192 $2000-$27FF
10 XXXX101X 10240 $2800-$2FFF
12 XXXX110X 12288 $3000-$37FF
14 XXXX111X 14336 $3800-$3FFF
*Remember to add in the BANK address.


[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated May 12, 2002.