C64 FUTURE WIKI
Home     Boards     Schematics     Datasheets     Manuals     Signals     Test-Hardware     Programming     Public Domain     Story     Online-Tools
Programming

The RAM memory of the C64 is 64K bytes. The most important chip in the C64 is the Video-Chip VIC-II. This controls the CPU, the complete screen, displays the characters, the sprites and the bitmap graphics. The 64K byte RAM and the 4K byte character ROM is the source of what the VIC-II will display on the screen. It fetches the sprite and bitmap data from the RAM, and in the case of changed character sets stored in RAM, also the characters from RAM. This happens completely automatically. But how does this automatic process work? By telling the VIC-II which memory area it should use for the characters, sprites and bitmap graphics.

The VIC-II can use 16K of this 64K RAM of the C64. This 16K is called the BANK. There are 4 of them, because 16K divided by 64K are 4 banks. Which 16K RAM bank the VIC-II is currently using is controlled by the CIA 2 with its PORT A and the bits 0 and 1.

To simplify the control and programming, I have created a visual memory configurator with which you can define the desired memory allocation with a few mouse clicks. Then immediately the necessary code is copied into the textarea down below:







Background-Process

One of the most important possibilities of the C64 is to execute program code at a certain time by interrupting the main program (this is called interrupt) and jumping to the background program via a previously defined jump address, and then return to the main program.

Here an example:




The so-called "raster line interrupt" is used most frequently. This interrupts the the main program is interrupted when a certain raster line is reached and you want to important changes, such as changing the frame color, are to be made. change:

Here is an example:



This way you can also create a split screen with a bitmap at the top and characters/text at the bottom.






Imprint/Impressum      Privacy/Datenschutz