Skip to main content

power_on_for_movie

Function power_on_for_movie 

Source
pub fn power_on_for_movie(nes: &mut Nes)
Expand description

v2.9.0 — the state every StartPoint::PowerOn movie starts from.

A power cycle, then cartridge RAM zeroed: what a fresh load with no save file holds (every board allocates it zeroed).

§Why this is not just power_cycle

From v2.9.0 Nes::power_cycle KEEPS battery-backed RAM, as a console does. Before, it rebuilt the mapper with all cartridge RAM cleared, which made a Power Cycle erase the player’s .sav once the desktop began persisting saves (v2.7.3). A power-on movie still has to start from clean save RAM – the maintainer’s decision of 2026-09-26, TASVideos’ convention – or it would replay differently with and without a save. So hosts call this before MovieRecorder::power_on, and Movie::seek_to_start calls it on playback.

Only the emulator’s copy is cleared. The .sav file on disk is untouched, but a host that persists save RAM will write the cleared contents back if the movie session runs long enough to reach the game’s own save routine – the same as that routine running during the movie. FDS disk sides are not cartridge RAM and are not reset by this.

§The options survive the power cycle (v2.9.8)

Before v2.9.8 Nes::power_cycle rebuilt the PPU and dropped the PPU-held knobs (OAM decay, the overclock, the fast dot path) to their defaults, so a recording started with OAM decay off whatever the player had set, and nothing recorded that. The options are captured first and the live ones re-applied after the cycle, so the machine a movie starts on is the one its HardwareOptions describe, on the recording side and the playback side alike. Since v2.9.8 the cycle keeps every setting itself (the PPU and APU ones as well as the bus-held console model, die revisions, power-on fills, Four Score, Game Genie …), so the re-application is a guarantee rather than a repair: it holds whatever a future cycle might drop. The power-on fills are not re-applied: the cycle itself already filled RAM and palette RAM from the stored selection.