SplitScript reference / PS2Emulator / read
PS2Emulator.read
Method
PS2Emulator.read<T>(address: u32) -> T! where T: MemoryReadable
Reads a typed value from emulated PlayStation 2 memory.
The provider's catalogued readable guest-memory range applies to the complete value. The expected MemoryReadable type determines its byte layout.
Parameters
address: The original PlayStation 2 memory address.
Effects: reads process memory, requires an attached process
Runtime behavior: available while a process is attached, except in onDetach; synchronous
Examples
Read an emulated value
let health: u16 = ps2.read(0x00123456) else 0
Readable guest memory
0x00100000..<0x02000000(exclusive upper bound)
A read must fit entirely inside one range. Literal addresses are checked during compilation; computed addresses remain fallible and are checked at runtime.