Commodore 64 Uživatelský manuál Strana 9

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 83
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 8
STANDARD CHARACTER MODE
Standard character mode is the mode the Commodore 64 is in when
you first turn it on. It is the mode you will generally program in.
Characters can be taken from ROM or from RAM, but normally they
are taken from ROM. When you want special graphics characters for a
program, all you have to do is define the new character shapes in RAM,
and tell the VIC-II chip to get its character information from there in-
stead of the character ROM. This is covered in more detail in the next
section.
In order to display characters on the screen in color, the VIC-II chip
accesses the screen memory to determine the character code for that
location on the screen. At the same time, it accesses the color memory
to determine what color you want for the character displayed. The
character code is translated by the VIC-II into the starting address of the
8-byte block holding your character pattern. The 8-byte block is located
in character memory.
The translation isn't too complicated, but a number of items are com-
bined to generate the desired address. First the character code you use
to POKE screen memory is multiplied by 8. Next add the start of char-
acter memory (see CHARACTERMEMORYsection). Then the Bank Select
Bits are taken into account by adding in the base address (see VIDEO
BANK SELECTIONsection). Below is a simple formula to illustrate what
happens:
CHARACTER ADDRESS
= SCREEN CODE*8+(CHARACTER
S ET* 2048) + (BAN K* 16384)
CHARACTER DEFINITIONS
Each character is formed in an 8 by 8 grid of dots, where each dot
may be either on or off. The Commodore 64 character images are
stored in the Character Generator ROM chip. The characters are stored
as a set of 8 bytes for each character, with each byte representing the
dot pattern of a row in the character, and each bit representing a dot.
A zero bit means that dot is off, and a one bit means the dot is on.
The character memory in ROM begins at location 53248 (when the I/O
is switched off). The first 8 bytes from location 53248 ($DOOO)to 53255
($D007) contain the pattern for the @ sign, which has a character code
value of zero in the screen memory. The next 8 bytes, from location
PROGRAMMINGGRAPHICS 107
Zobrazit stránku 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 82 83

Komentáře k této Příručce

Žádné komentáře