pub enum PowerOnRam {
Zeroed,
Seeded(u64),
Filled(u8),
}Expand description
v2.1.7 P5 — power-on 2 KiB CPU work-RAM contents.
Real NES hardware powers up with unreliable RAM (nesdev “CPU power up state”); a few titles read uninitialized RAM before writing it (Final Fantasy’s RNG seed, River City Ransom, Cybernoid). This selects what pattern the work RAM (and the open-bus latch) is filled with at power-on.
Default-off / deterministic. Default (Self::Zeroed) is the
established all-zero fill CI, the regression oracle, and save-state tests
use; the other variants are opt-in and still fully deterministic (no
wall-clock / OS RNG), so the same config + ROM + input ⇒ bit-identical
contract holds.
Variants§
Zeroed
Default. Work RAM + open bus power up all-zero (current behavior).
Seeded(u64)
Deterministic xorshift64 randomization keyed on the seed (the existing
developer mode; see Nes::from_rom_with_power_on_seed). Surfaces
software that depends on a particular post-power-on RAM pattern.
Filled(u8)
Fill every work-RAM byte (and the open-bus latch) with a single uniform
byte — a documented known pattern (e.g. 0xFF, the all-ones some
consoles come up with). Deterministic.
Trait Implementations§
Source§impl Clone for PowerOnRam
impl Clone for PowerOnRam
Source§fn clone(&self) -> PowerOnRam
fn clone(&self) -> PowerOnRam
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more