SplitScript reference / MemoryReader
MemoryReader
capability
capability MemoryReader
Reads typed values and bounded strings from an address space.
MemoryReader is the source-side counterpart to MemoryReadable. The reader chooses the address domain, byte order, address validation, and physical read implementation; the requested value chooses the decoded memory layout. Native Process values use address, while emulator providers use original guest addresses represented as u32.
Process-only facilities such as modules, mapped-range enumeration, and scanning are deliberately not part of this capability.
Examples
Read text through a generic memory provider
fn readName(reader, address) {
return reader.readUtf8(address, 32)
}
Implemented by
| Member | Description | Available through |
|---|---|---|
| GBAEmulator | Retains a discovered GBA emulator memory mapping. | |
| GCNEmulator | Retains a discovered Nintendo GameCube MEM1 mapping. | |
| GenesisEmulator | Retains a discovered Sega Genesis work-RAM mapping. | |
| PS1Emulator | Retains a discovered PlayStation emulator memory mapping. | |
| PS2Emulator | Retains a discovered PlayStation 2 emulator memory mapping. | |
| Process | Accesses the attached game process. | |
| SMSEmulator | Retains a discovered Sega Master System or Game Gear memory mapping. | |
| WiiEmulator | Retains discovered Nintendo Wii MEM1 and MEM2 mappings. |
Methods
| Member | Description | Available through |
|---|---|---|
| read | Reads one fixed-layout value from this address space. | |
| readUtf16Le | Reads a bounded NUL-terminated little-endian UTF-16 string. | |
| readUtf8 | Reads a bounded NUL-terminated UTF-8 string. |