nesdev.com
http://forums.nesdev.com/

SMB1 Coin Counter Sprite
http://forums.nesdev.com/viewtopic.php?f=21&t=15465
Page 1 of 1

Author:  RyanTNT [ Sun Jan 29, 2017 5:26 pm ]
Post subject:  SMB1 Coin Counter Sprite

You know that little coin at the scoreboard which represents all the coins you collected?
I tried messing around with it, but sometimes the bottom pixels got all messed up and sometimes mario doesn't appear on screen, making the game unplayable.
Whats up with that coin?

Author:  rainwarrior [ Sun Jan 29, 2017 6:00 pm ]
Post subject:  Re: SMB1 Coin Counter Sprite

That coin is part background, part sprite. The sprite is also sprite 0, the overlap of which with the background is what is used to time the scrolling split at the bottom of the status bar.

So... be careful when messing around with it. You'll need to account for both the background portion, and the sprite portion, and you need to make sure some of the sprite still overlaps the background to make sure the scrolling split takes place.

Author:  tokumaru [ Sun Jan 29, 2017 7:37 pm ]
Post subject:  Re: SMB1 Coin Counter Sprite

SMB1 uses the sprite 0 hit flag (a flag that gets set when a non-transparent pixel in sprite 0 overlaps - or underlaps, depending on the sprite's drawing priority - a non-transparent background pixel) to detect when the status bar is about to finish rendering, so it can change the scroll for the gameplay area of the screen. If you mess up the alignment between the sprite and the background, the hit will not happen and the program won't be able to properly prepare for the gameplay portion of the screen.

Author:  zeroone [ Tue Jan 31, 2017 8:55 am ]
Post subject:  Re: SMB1 Coin Counter Sprite

viewtopic.php?f=21&t=15217

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/