Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
MOS Technology VIC-II
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Memory mapping=== The VIC-II has a 14-bit address bus and can use any of the four 16k segments of the C64's memory space for video data. To manage this, two additional address bits are contributed by port bits of CIA. {{mono|$0000}}-{{mono|$3FFF}} is the power-on default. The second segment ({{mono|$4000}}β{{mono|$7FFF}}) is typically the best choice for programming from BASIC as it is the only segment that is completely free RAM with no ROMs or I/O registers mapped into it. The fourth segment ({{mono|$C000}}β{{mono|$FFFF}}) is also a good choice provided that machine language is used, as the kernel ROMs must be disabled to gain read access by the CPU, and it avoids having discontiguous program code and data that would result from using {{mono|$4000}}-{{mono|$7FFF}}. Note that graphics data may be freely stored underneath the BASIC ROM at {{mono|$A000}}-{{mono|$BFFF}}, the kernel ROM at {{mono|$E000}}-{{mono|$FFFF}} or I/O registers and color RAM at {{mono|$D000}}β{{mono|$DFFF}}, since the VIC-II only sees RAM, regardless of how the CPU memory mapping is adjusted; character ROM is visible only in the first and third segment, thus if segment two or four is used, the programmer must supply his own character data. The screen RAM, bitmap page, sprites, and character sets must all occupy the same segment window (provided the CIA bits aren't changed via scanline interrupt). The last six bytes of system memory ({{mono|$FFFA}}-{{mono|$FFFF}}) contain the IRQ, NMI, and reset vectors so if the top of memory is used to store a character set or sprite data, and the KERNAL ROM is switched out revealing the RAM underneath to the CPU, it will be necessary to sacrifice one character or sprite to avoid overwriting the vectors.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)