Commodore 64 Memory Map

Commodore 64 Memory Map

The following table shows the memory map for the Commodore 64.

Docs Address Normal Use Alternate Use All RAM mode ROM Cartridge
Page 00 0000 6510 IO DDR
0001 6510 IO Port
0002 Free for application use
0003 Kernal & BASIC Zero Page
00FB User Zero Page
00FF BASIC Temp Area
0100 Processor Stack
Page 02 0200 BASIC editor input buffer
0259 Kernal file tables
0277 Kernal Workspace
02A7 Free for application use
Page 03 0300 BASIC workspace
0314 Kernal Vector table
0334 Application Vector table
033C Cassette I/O Buffer
03FC Free for application use
0400 Default screen 1K Free if screen is mapped elsewhere
0800 38K Application memory 30K Application memory
8000 Cart ROM Low
A000 BASIC ROM 8K RAM Cart ROM High
C000 4K RAM
Page D0 D000 VIC-II Registers Character ROM 4K RAM As other columns
D400 SID Registers
Page D8 D800 Color RAM
Page DC DC00 CIA 1
Page DD DD00 CIA 2
DE00 Expansion I/O
DF00
Kernal E000 KERNAL ROM 8K RAM Cart ROM High
F000

Notes

  • The alternate use for a section of the memory map is selected by bits 0…2 of the 6510 I/O port.
    Note bits 0 & 1 must have at least 1 bit set. Both clear triggers All RAM mode.
  • All RAM Mode is selected with bits 0&1 of the 6510 I/O port set to 0.
    This mode exposes ram in the I/O area. It's not as useful due to it hiding the device I/O area.
  • Memory in pages 00…7F is always RAM
  • A cartridge can provide rom in 3 8K locations, although only 2 8K banks can be made visible to the processor at any time.
  • The default location of the screen & sprites is in pages 04…07. This can be reused if the screen is remapped in the VIC-II chip to an alternate location in memory.
  • Writing to memory when a ROM is paged in will still write to the RAM. Only reading will get data from the ROM.

    This is useful with BitMap screen mode as you can map the screen beneath the KERNAL rom as the VIC-II chip always sees RAM.