Hiding sprites and OAM decay

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Hiding sprites and OAM decay

Post by tokumaru »

Good idea!
User avatar
Bregalad
Posts: 8055
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Hiding sprites and OAM decay

Post by Bregalad »

rainwarrior wrote: Super Mario 3, Wizards and Warriors, Guardian Legend, and Crystalis all hide sprites for the HUD. I think it's very common for bottom HUDs, anyway.
All those games have the status bar at the bottom, what I meant was for status bar at the top, where it is really uncommon to have it hide sprites.
For the record, I'm using CHR-ROM and it's not going to be backswitched... this is supposed to be a tiny game aiming high... (1-bit BNROM-register to enable 64k of PRG)
I added the gradient because CHR-ROM can't be compressed anyway... for monochrome fonts it's pretty easy by leaving out the second 8 bytes for every tile if you're using CHR-RAM.
Yeah, if you're using a single 8k CHR-ROM bank, the technique I mentionned is out of the question, and you don't want to abuse 8-sprites-per-scanline limitation, so disabling sprites via $2001 is the last viable option. You can still however disable them for 8 or 16 scanlines only, and disable the others (that are completely hidden below the HUD) by software only, so that you can trigger your sprite #0 hit 8 (or 16) lines before the scoll split. You then disable sprites, waint 8 or 16 lines, update the scroll and enable sprites again. You then have no risk of seeing the OAM decay I think.
Post Reply