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

character data the ROM is switched in. It becomes an image in the 16K bank of memory that the VIC-II chip is looking at. Otherwise, the area is occupied by the I/O control registers, and the character ROM is only available to the VIC-II chip.

However, you may need to get to the character ROM if you are going to use programmable characters and want to copy some of the character ROM for some of your character definitions. In this case you must switch out the I/O register, switch in the character ROM, and do your copying. When you're finished, you must switch the 1/0 registers back in again. During the copying process (when I/O is switched out) no interrupts can be allowed to take place. This is because the I/O registers are needed to service the interrupts. If you forget and perform an interrupt, really strange things happen. The keyboard should not be read during the copying process. To turn off the keyboard and other normal interrupts that occur with your Commodore 64, the following POKE should be used:


After you are finished getting characters from the character ROM, and are ready to continue with your program, you must turn the keyboard scan back on by the following POKE:

   POKE 56334,PEEK(56334)OR1      (TURNS INTERRUPTS ON)
The following POKE will switch out 1/0 and switch the CHARACTER ROM in:
   POKE 1,PEEK(1)AND251
The character ROM is now in the locations from 53248-57343 ($D000-$DFFF). To switch I/O back into $D000 for normal operation use the following POKE:
   POKE 1,PEEK(1)OR 4

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