How do sprite priority settings work on the GBC ?
Among sprites themselves, sprite #0 has highest priority, sprite #1 has next highest priority, etc.(i.e. Sprite #0 will always appear over sprite #1.) Bit 7 of the sprite attribute flags determines that a sprite will appear above the background & window if it is 0 and below them both (visible only through colo(u)r 0 of background & window) if it is 1. When bit 7 of bank 1 of tile attribute memory ($9800-$9fff) is set to 1 it will force the background and/or window to have priority over the sprite attribute flags and to appear over sprites no matter what the setting of the sprite attribute flags. If bit 0 of register LCDC ($ff40) is 0 then sprites will always appear above the background & window regardless of the settings of sprite attribute flags & tile attribute memory.