Reference: Memory Map

Memory Map

An important concept here is "Memory Mapped Hardware" all of the peripherals are configured and accessed by setting and getting values from Memory locations. On other platforms there may be dedicated assembly instructions or a completely separate memory space for hardware.

The following diagram is based on a Memory Map document located on github.com

The maximum 32-bit address space would normally be 4 Gigabytes. The N64 uses a very fragmented version of this that really reflects less than 75 megabytes of used space. Most memory addresses are mapped to multiple areas some of which support caching behaviors.

  • 64 MB Cartridge (Max Cartridge size released at retail)
  • Save Game Data (1 or more of the following)
    • 1 MB FLASH
    • ?? SRAM
    • 4 kB or 16 kB EEPROM
    • Misc size Controller Pak
  • 8 MB RAM
  • Cache or Special Purpose Memory
    • 4 kB Translation Look-aside Buffer
    • 4 kB DMEM
    • 4 kB IMEM
    • 4 kB TMEM
    • 2 kb PIF ROM + RAM
  • < 1kB Register Memory

Combining all of these RAM locations with all of the different caching and mirroring options is pretty confusing.

Until we cover the builtin caching features let's just approach it like this.

  • 0x0000 0000 - 0x1FFF FFFF is Physical Memory Location (Rarely used)
  • 0x8000 0000 - 0x9FFF FFFF is Cached
  • 0xA000 0000 - 0xBFFF FFFF Non - Cached
  1. Our code Executes through the 0x8000 0000 cached range
  2. Assigning Hardware Configuration registers will be done through 0xA000 0000
  3. Frame Buffer(s) are also in the 0xA000 0000 range

This may change but it will be explained if/when it does.