pub enum ConsoleModel {
Nes,
Famicom,
}Expand description
v2.9.8 — which console wires the PPU’s /RESET line.
The 2C02 is the same chip in every NTSC console; what differs is the board
around it. The NESdev “PPU power up state” page (§Famicom, and its closing
note on front- and top-loaders) documents two wirings:
- NES (front-loader, NES-001) — the CPU and PPU are reset together. At
power-on and on every press of Reset the PPU spends about 29,658 CPU
cycles (NTSC) in its warm-up state, ignoring writes to
$2000,$2001,$2005and$2006, and Reset clears PPUCTRL, PPUMASK, the scroll/address latch and the read buffer. - Famicom — the PPU’s
/RESETis tied to 5 V and only the CPU’s rides a 0.47 µF capacitor. At power-on the PPU therefore starts initialising roughly one frame before the CPU leaves reset, which is longer than the warm-up window, so the CPU’s first instructions can already write the masked registers. The Reset button reaches only the CPU: the PPU keeps running and keeps its register state.
What this models, and what it does not:
- Power-on under
Self::Famicomcloses the warm-up window before the first instruction (rustynes_ppu::Ppu::end_warmup).NESdevgives the lead as “approximately one frame … the exact timing has not been measured, and may vary”, so the PPU’s frame position is left where the NES model puts it rather than advanced by a guessed amount. - A warm reset under
Self::Famicomleaves the PPU untouched. The APU, DMA unit and cartridge reset exactly as underSelf::Nes. - The NES-101 top-loader shares the Famicom’s reset wiring, but
NESdevdoes not document its power-on lead, so it is not offered as a separate model.
Off by default. Self::Nes is the model every release before v2.9.8
emulated, so the default build is byte-identical. The selection is a
host/config knob, never derived from the ROM: NES 2.0 has no console type
that distinguishes a Famicom from an NES, and the project does not guess a
console from a per-game list. It is not part of the save-state (the warm-up
counter it acts on already is), and like the other hardware knobs on Nes
it is re-applied by the host after a load or power-cycle.
Variants§
Nes
Default. Front-loading NES: the CPU and PPU share the reset line.
Famicom
Famicom: the PPU is never held in reset, so it leaves its warm-up before the CPU starts and ignores the Reset button.
Trait Implementations§
Source§impl Clone for ConsoleModel
impl Clone for ConsoleModel
Source§fn clone(&self) -> ConsoleModel
fn clone(&self) -> ConsoleModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more