Skip to main content

Module ram

Module ram 

Source
Expand description

Main RAM Simulation (24MB)

This module provides the main RAM implementation for the GameCube recompiler runtime. The GameCube has 24MB of main RAM, mapped to addresses 0x80000000-0x817FFFFF.

§Memory Optimizations

  • Removed redundant size field (can be derived from data.len())
  • All read/write functions use #[inline] for hot-path optimization
  • Explicit bounds checks with early returns for better branch prediction

§Address Translation

GameCube uses 24-bit addressing for RAM (addresses 0x00000000-0x00FFFFFF). The upper 8 bits are masked off to get the physical RAM offset.

Structs§

Ram
Main RAM implementation (24MB).