ff3:ff3us:doc:snes:register

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
ff3:ff3us:doc:snes:register [2019/08/08 02:39]
madsiur [Address Bus B Registers]
ff3:ff3us:doc:snes:register [2019/08/08 02:57]
madsiur [PPU1 Status and Version Number]
Line 825: Line 825:
  
 These values are latched by reading $2137 when bit 7 of $4201 is set, or by clearing-and-setting bit 7 of $4201 either by writing $4201 or by pin 6 of Controller Port 2 (the latch occurs on the 1->0 transition). Note that the value read is only 9 bits: bits 1-7 of the high byte are PPU2 Open Bus. Each register keeps seperate track of whether to return the low or high byte. The high/low selector is reset to 'low' when $213F is read (the selector is NOT reset when the counter is latched). H Counter values range from 0 to 339, with 22-277 being visible on the screen. V Counter values range from 0 to 261 in NTSC mode (262 is possible every other frame when interlace is active) and 0 to 311 in PAL mode (312 in interlace?), with 1-224 (or 1-239(?) if overscan is enabled) visible on the screen. These values are latched by reading $2137 when bit 7 of $4201 is set, or by clearing-and-setting bit 7 of $4201 either by writing $4201 or by pin 6 of Controller Port 2 (the latch occurs on the 1->0 transition). Note that the value read is only 9 bits: bits 1-7 of the high byte are PPU2 Open Bus. Each register keeps seperate track of whether to return the low or high byte. The high/low selector is reset to 'low' when $213F is read (the selector is NOT reset when the counter is latched). H Counter values range from 0 to 339, with 22-277 being visible on the screen. V Counter values range from 0 to 261 in NTSC mode (262 is possible every other frame when interlace is active) and 0 to 311 in PAL mode (312 in interlace?), with 1-224 (or 1-239(?) if overscan is enabled) visible on the screen.
 +
 +[[register#Address Bus B Registers|Back to top]]
 +
 +===== PPU1 Status and Version Number =====
 +<code>
 +$213E r b++++ STAT77 - PPU1 Status and Version Number
 +        trmuvvvv
 +        t    = OBJ Time overflow  (0=Okay, 1=More than 8x34 OBJ pixels per scanline)
 +        r    = OBJ Range overflow (0=Okay, 1=More than 32 OBJs per scanline)
 +        m    = Master/Slave Mode (PPU1.Pin25) (0=Normal=Master)
 +        u    = unused
 +        vvvv = PPU1 5C77 Version Number (only version 1 exists)
 +</code>
 +
 +Bit t: If more than 34 sprite-tiles (e.g. a 16x16 sprite has 2 sprite-tiles) were encountered on a single line, this flag will be set. The flag is reset at the end of V-Blank but not during forced blank.
 +
 +Bit r: If more than 32 sprites were encountered on a single line, this flag will be set. The flag is reset at the end of V-Blank but not during forced blank. 
 +
 +Note that the above two flags are set whether or not OBJ are actually enabled at the time (see $212C), at the following times: bit 6 when V=OBJ.YLOC/H=OAM.INDEX*2, bit 7 when V=OBJ.YLOC+1/H=0.
  
 [[register#Address Bus B Registers|Back to top]] [[register#Address Bus B Registers|Back to top]]
  • ff3/ff3us/doc/snes/register.txt
  • Last modified: 5 years ago
  • by madsiur