Nintendo NES-001 User Guide - Page 34

Appendix B, NES I/O Registers - nes controller

Page 34 highlights

Appendix B NES I/O Registers The following information is based on [7]: Address Access Level Description $2000 Write PPU Control Register 1: $2001 Write • Bits 0-1 - Name table address, changes between the four name tables at $2000 (0), $2400 (1), $2800 (2) and $2C00 (3). • Bit 2 - Specifies amount to increment address by, either 1 if this is 0 or 32 if this is 1. • Bit 3 - Identifies which pattern table sprites are stored in, either $0000 (0) or $1000 (1). • Bit 4 - Identifies which pattern table the background is stored in, either $0000 (0) or $1000 (1). • Bit 5 - Specifies the size of sprites in pixels, 8x8 if this is 0, otherwise 8x16. • Bit 6 - Changes PPU between master and slave modes. This is not used by the NES. • Bit 7 - Indicates whether a NMI should occur upon V-Blank. PPU Control Register 2: $2002 Read • Bit 0 - Indicates whether the system is in colour (0) or monochrome mode (1), • Bit 1 - Specifies whether to clip the background, that is whether to hide the background in the left 8 pixels on screen (0) or to show them (1). • Bit 2 - Specifies whether to clip the sprites, that is whether to hide sprites in the left 8 pixels on screen (0) or to show them (1). • Bit 3 - If this is 0, the background should not be displayed. • Bit 4 - If this is 0, sprites should not be displayed. • Bits 5-7 - Indicates background colour in monochrome mode or colour intensity in colour mode. PPU Status Register: $2003 Write • Bit 4 - If set, indicates that writes to VRAM should be ignored. • Bit 5 - Scanline sprite count, if set, indicates more than 8 sprites on the current scanline. • Bit 6 - Sprite 0 hit flag, set when a non-transparent pixel of sprite 0 overlaps a non-transparent background pixel. • Bit 7 - Indicates whether V-Blank is occurring. SPR-RAM Address Register: $2004 Write Holds the address in SPR-RAM to access on the next write to $2004. SPR-RAM I/O Register: $2005 Write Writes a byte to SPR-RAM at the address indicated by $2003. VRAM Address Register 1. 34

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47

34
Appendix B
NES I/O Registers
The following information is based on [7]:
Address
Access Level
Description
$2000
Write
PPU Control Register 1:
Bits 0-1 - Name table address, changes between the four
name tables at $2000 (0), $2400 (1), $2800 (2) and $2C00
(3).
Bit 2 - Specifies amount to increment address by, either 1 if
this is 0 or 32 if this is 1.
Bit 3 - Identifies which pattern table sprites are stored in,
either $0000 (0) or $1000 (1).
Bit 4 - Identifies which pattern table the background is
stored in, either $0000 (0) or $1000 (1).
Bit 5 - Specifies the size of sprites in pixels, 8x8 if this is 0,
otherwise 8x16.
Bit 6 - Changes PPU between master and slave modes.
This is not used by the NES.
Bit 7 - Indicates whether a NMI should occur upon V-Blank.
$2001
Write
PPU Control Register 2:
Bit 0 - Indicates whether the system is in colour (0) or
monochrome mode (1),
Bit 1 - Specifies whether to clip the background, that is
whether to hide the background in the left 8 pixels on
screen (0) or to show them (1).
Bit 2 - Specifies whether to clip the sprites, that is whether
to hide sprites in the left 8 pixels on screen (0) or to show
them (1).
Bit 3 - If this is 0, the background should not be displayed.
Bit 4 - If this is 0, sprites should not be displayed.
Bits 5-7 - Indicates background colour in monochrome
mode or colour intensity in colour mode.
$2002
Read
PPU Status Register:
Bit 4 - If set, indicates that writes to VRAM should be
ignored.
Bit 5 - Scanline sprite count, if set, indicates more than 8
sprites on the current scanline.
Bit 6 - Sprite 0 hit flag, set when a non-transparent pixel of
sprite 0 overlaps a non-transparent background pixel.
Bit 7 - Indicates whether V-Blank is occurring.
$2003
Write
SPR-RAM Address Register:
Holds the address in SPR-RAM to access on the next write to
$2004.
$2004
Write
SPR-RAM I/O Register:
Writes a byte to SPR-RAM at the address indicated by $2003.
$2005
Write
VRAM Address Register 1.