Difference between revisions of "Sprite RAM Bug"

From GbdevWiki
Jump to: navigation, search
Line 7: Line 7:
  
 
Only sprites 1 & 2 ($FE00 & $FE04) are not affected by these instructions.
 
Only sprites 1 & 2 ($FE00 & $FE04) are not affected by these instructions.
 +
 +
Game Boy Color and Advance are not affected by this bug.

Revision as of 20:27, 9 May 2017

The copy of Pan Docs hosted on this wiki is considered deprecated.

Pan Docs is now officially hosted on gbdev.io as a living document. Please go to https://gbdev.io/pandocs/ to read Pan Docs or to https://github.com/gbdev/pandocs to contribute.

Click here to go to this section of Pan Docs in the new location: https://gbdev.io/pandocs/#spriterambug

There is a flaw in the GameBoy hardware that causes trash to be written to OAM RAM if the following commands are used while their 16-bit content is in the range of $FE00 to $FEFF:

 inc rr        dec rr          ;rr = bc,de, or hl
 ldi a,(hl)    ldd a,(hl)
 ldi (hl),a    ldd (hl),a

Only sprites 1 & 2 ($FE00 & $FE04) are not affected by these instructions.

Game Boy Color and Advance are not affected by this bug.