RDRAM

Rambus DRAM (or RDRAM) is a type of synchronous dynamic random-access memory (SDRAM) designed by Rambus. The N64 motherboard came with either one or two chips, totaling 4 MB (4,194,304 bytes) of general purpose storage which can be accessed by the CPU. The optional Expansion Pak could increase this by an additional 4 MB and is required for some games to run.

Each byte of RAM actually has an extra bit, which is accessible from the RCP, but not accessible to the CPU. In other words, the N64 has 9-bit bytes, but the CPU only uses 8 bits per byte. The 9th bit is used by the RCP to store things like anti-aliasing coverage in the color buffer. On systems other than the Nintendo 64, the 9th bit would likely be used for parity checks.

= Interface Pinouts = TODO

= Known RDRAM Console Chip Configurations =

= Known RDRAM Expansion Pak Configurations = There are 3rd party Expansion Paks that have 2 chips which are both 2.25Megabytes each. Please provide images and makers here.

= Initialization Sequence = This Initialization sequence is based on the 6102 CIC boot code

File:Cncrntug.pdf

= Expansion Pak Detection = The typical way to detect how much memory is installed is to probe it.

LibUltra provides a function called osGetMemSize which does this. The function writes different values at addresses in the uncached KSEG1 direct map, starting at 0xa0300000, and then reads the values back. It tries successively higher addresses, jumping by 1 MB each time through the loop. It returns the amount of RAM which it successfully wrote and read back, rounded up to a number of megabytes.

// C-like pseudocode... u32 osGetMemSize(void) { // Base address of RAM in kseg1. uintptr_t base_addr = 0xa0000000; uintptr_t megabyte = 1024 * 1024; // Address where we will probe. uintptr_t cur_addr = kseg1 + 3 * megabyte; while (true) { write to addr; read from addr; if (value read != value written) { break; }        cur_addr += megabyte; }    return cur_addr - base_addr; }

During boot, IPL3 will also write the amount of RAM available, in bytes, to a 32-bit value at address 0x80000318 (or 0x800003f0, for CIC 6105). On retail hardware, this should always have the value 0x400000 (no expansion pak) or 0x800000 (expansion pak). When using LibUltra, this variable can be accessed with the name osMemSize, which is defined like this:

extern u32 osMemSize;

LibDragon provides the the amount of memory installed with the get_memory_size function.

= Drawbacks and Limitations =

Opinions follow.

RDRAM has excellent data transfer speed for the era (bytes per second) but due to the protocol used and serial interface, memory transactions were somewhat slower (how much time it took from starting a read/write operation to finishing it). In practice, you may find that the available memory bandwidth is a limiting factor for the performance of your game.

See: How fast was Rambus compared to regular EDO RAM?