memory module implements the TI-84 Plus CE memory subsystem, including Flash ROM, RAM, VRAM, and the 24-bit address space mapping.
Memory Map
The eZ80 processor provides a 24-bit address space (16MB addressable):| Address Range | Size | Type | Description |
|---|---|---|---|
| 0x000000 - 0x3FFFFF | 4MB | Flash (ROM) | OS and user programs |
| 0x400000 - 0xCFFFFF | 8.875MB | Unmapped | Returns pseudo-random values |
| 0xD00000 - 0xD3FFFF | 256KB | RAM | User RAM |
| 0xD40000 - 0xD657FF | ~150KB | VRAM | Video memory (part of RAM) |
| 0xD65800 - 0xDFFFFF | ~2.3MB | Unmapped | Beyond RAM boundary |
| 0xE00000 - 0xFFFFFF | 2MB | Memory-mapped I/O | Peripheral registers |
Address Constants
Thememory::addr module provides constants for memory regions:
Available Constants
Flash Memory
TheFlash struct manages 4MB of NOR flash memory:
Loading ROM
Reading Flash
Writing Flash
Flash writes require unlock sequences (AMD/Fujitsu command set):Flash Command Modes
The flash controller supports minimal command emulation:- Sector Erase: Erases 8KB (below 0x10000) or 64KB sectors
- Byte Program: Programs individual bytes (can only clear bits)
- Status Poll: Returns 0x80 when erase/program complete
Flash Methods
RAM Memory
TheRam struct manages 256KB of user RAM plus ~150KB of VRAM:
Reading/Writing RAM
VRAM Access
VRAM is a contiguous region within RAM starting at 0xD40000:VRAM Layout
VRAM stores the 320×240 display as RGB565 pixels:The LCD controller may use palette mode (1/2/4/8 bpp) instead of direct RGB565. See LCD Controller for details.
RAM Methods
Lazy Allocation
BothFlash and Ram use lazy allocation:
Address Wrapping
RAM addresses wrap at the boundary:State Persistence
BothFlash and Ram support state snapshots:
Error Handling
Flash operations can fail:Memory Protection
The TI-84 Plus CE implements memory protection via control ports:- Privileged boundary (0xE001D-0xE001F): Defines privileged code range
- Protected range (0xE0020-0xE0025): Defines protected memory range
- Stack limit (0xE003A-0xE003C): Prevents stack overflow
Usage Example
Complete example showing memory subsystem usage:Next Steps
CPU Module
Learn how the CPU accesses memory
Peripherals
Explore memory-mapped peripherals
Bus Module
Understand memory routing and timing
Testing
Test memory subsystem functionality