SplitScript reference / SMS
SMS
state provider
state SMS
Attaches to a supported Sega Master System or Game Gear emulator.
The provider exposes original 16-bit console addresses through the read-only sms value of type SMSEmulator. It owns discovery for Fusion, BlastEm, Mednafen, and supported RetroArch cores. Declare guest addresses directly instead of recreating emulator-specific DeepPointer mappings.
Examples
Read Master System work RAM
state SMS {
lives: u8 at 0xc010
}
Value type
| Member | Description | Available through |
|---|---|---|
| SMSEmulator | Retains a discovered Sega Master System or Game Gear memory mapping. |
Mapping lifecycle
The provider validates its private memory mapping before each state poll. If that mapping disappears while the host process remains open, the current logical attachment ends: attachment-scoped state and pending continuations are cleared, and onDetach runs if onAttach had completed. Discovery then continues cooperatively against the same host process. A replacement mapping starts a new attachment, runs onAttach again, and establishes a fresh old / current baseline.