SplitScript reference / PS1Emulator / read

PS1Emulator.read

Method

PS1Emulator.read<T>(address: u32) -> T! where T: MemoryReadable

Reads a typed value from emulated PlayStation memory.

Valid reads lie entirely within 0x80000000..=0x817fffff. The expected MemoryReadable type determines the byte layout.

Parameters

  • address: The original PlayStation 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 = ps1.read(0x80012346) else 0