CPU power up state: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
m (Did you mean RAM?)
m (Make footnotes wikiformat (and in the same place), make headings headings)
Line 1: Line 1:
The following results are from a US (NTSC) NES, original front-loading design, RP2A03G CPU chip, NES-CPU-07 main board revision, manufactured in 1988. The memory values are probably slightly different for each individual NES console. Please note that you should NOT rely on the state of any registers after Power-UP and especially not the stack register and RAM ($0000-$07FF).
The following results are from a US (NTSC) NES, original front-loading design, RP2A03G CPU chip, NES-CPU-07 main board revision, manufactured in 1988. The memory values are probably slightly different for each individual NES console. Please note that you should NOT rely on the state of any registers after Power-UP and especially not the stack register and RAM ($0000-$07FF).


At power-up
==At power-up==
:P = $34 (IRQ disabled)*
:P = $34<ref>The [[Emulator tests|golden log of nestest]] differs from this in the [[CPU status flag behavior|irrelevant bits 5 and 4 of P]]</ref> (IRQ disabled)<ref>IRQ was first asserted about 1/60 second after power-up, by APU.</ref>
:A, X, Y = 0
:A, X, Y = 0
:S = $FD
:S = $FD
Line 14: Line 14:
:$4000-$400F = $00 (not sure about $4010-$4013)
:$4000-$400F = $00 (not sure about $4010-$4013)


*IRQ was first asserted about 1/60 second after power-up, by APU.
==After reset==
 
After reset
:A, X, Y were not affected
:A, X, Y were not affected
:S was decremented by 3 (but nothing was written to the stack)
:S was decremented by 3 (but nothing was written to the stack)
Line 24: Line 22:
:APU was silenced ($4015 = 0)
:APU was silenced ($4015 = 0)


=== Notes ===
== See also ==
* The [[Emulator tests|golden log of nestest]] differs from this in the [[CPU status flag behavior|irrelevant bits 5 and 4 of P]].
 
=== See also ===
*[[PPU_power_up_state|Power-up state of PPU]]
*[[PPU_power_up_state|Power-up state of PPU]]
== Notes ==

Revision as of 03:59, 12 June 2015

The following results are from a US (NTSC) NES, original front-loading design, RP2A03G CPU chip, NES-CPU-07 main board revision, manufactured in 1988. The memory values are probably slightly different for each individual NES console. Please note that you should NOT rely on the state of any registers after Power-UP and especially not the stack register and RAM ($0000-$07FF).

At power-up

P = $34[1] (IRQ disabled)[2]
A, X, Y = 0
S = $FD
All internal memory ($0000-$07FF) was consistently set to $ff except for a few bytes, which probably vary from console to console:
  • $0008=$F7
  • $0009=$EF
  • $000a=$DF
  • $000f=$BF
$4017 = $00 (frame irq enabled)
$4015 = $00 (all channels disabled)
$4000-$400F = $00 (not sure about $4010-$4013)

After reset

A, X, Y were not affected
S was decremented by 3 (but nothing was written to the stack)
The I (IRQ disable) flag was set to true (status ORed with $04)
The internal memory was unchanged
APU mode in $4017 was unchanged
APU was silenced ($4015 = 0)

See also

Notes

  1. The golden log of nestest differs from this in the irrelevant bits 5 and 4 of P
  2. IRQ was first asserted about 1/60 second after power-up, by APU.