SplitScript reference / SMSEmulator / read
SMSEmulator.read
Method
SMSEmulator.read<T>(address: u32) -> T! where T: MemoryReadable
Reads a typed value from emulated Master System work RAM.
Valid reads lie entirely within 0xc000..=0xdfff. The expected MemoryReadable type determines the little-endian byte layout.
Parameters
address: The original Master System work RAM 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 lives: u8 = sms.read(0xc010) else 0