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.

Valid reads lie entirely within 0x00100000..=0x01ffffff. The expected MemoryReadable type determines the 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