Live data from Hacker News

Zelda Screen Transitions Are Undefined Behaviour

gridbugs.org

1–10 of 101 posts

Re: Zelda Screen Transitions Are Undefined Behaviour

#2
There are a few games that do diagonal scrolling. In general it's very difficult to do well on the NES, and you will likely have to live with some amount of glitching--unless you have extra name table RAM on the cartridge, which is fairly rare.

See http://bootgod.dyndns.org:7777/ for a database of the hardware inside each cartridge.

Re: Zelda Screen Transitions Are Undefined Behaviour

#3
Thanks for posting this... as a non-programmer, I really enjoy reading how the games I grew up with worked. If you enjoyed reading this, there's a great Youtube channel called Retro Game Mechanics Explained:

https://www.youtube.com/channel/UCwRqWnW5ZkVaP_lZF7caZ-g/vid...

Re: Zelda Screen Transitions Are Undefined Behaviour

#4
This is a great description of a commonly-used technique for splitting the screen in NES games that scroll smoothly. It may or may not have been intended, but this is a common technique for games that have a "status bar". Super Mario Bros 3 is another obvious example, but even Super Mario Bros uses it long before then for its top status bar. I first read about it in the excellent "I Am Error" book by Nathan Altice, but googling around for "nes sprite zero split" turns up plenty of other articles, too.

Re: Zelda Screen Transitions Are Undefined Behaviour

#5
post #2

There are a few games that do diagonal scrolling. In general it's very difficult to do well on the NES, and you will likely have to live with some amount of glitching--unless you have extra name table RAM on the cartridge, which is fairly rare. See http://bootgod.dyndns.org:7777/ for a database of the hardware inside each cartridge.

There are a few games that do diagonal scrolling.

Paperboy comes to mind. It's smooth and looks good without any noticable glitching, and without using custom chips, too. Not sure how they did it.

Re: Zelda Screen Transitions Are Undefined Behaviour

#6
post #4

This is a great description of a commonly-used technique for splitting the screen in NES games that scroll smoothly. It may or may not have been intended, but this is a common technique for games that have a "status bar". Super Mario Bros 3 is another obvious example, but even Super Mario Bros uses it long before then for its top status bar. I first read about it in the excellent "I Am Error" book by Nathan Altice, b…

Nitpicking, but SMB3 uses the MMC3 chip which "adds an IRQ timer to allow split screen scrolling without the sacrifice of sprite 0" (Wikipedia) so it does not use this technique.

SMB1 actually also does not use the sprite zero split technique because it never scrolls vertically. Its status bar is just a bunch of fixed background tiles.

Re: Zelda Screen Transitions Are Undefined Behaviour

#8
post #5
post #2

There are a few games that do diagonal scrolling. In general it's very difficult to do well on the NES, and you will likely have to live with some amount of glitching--unless you have extra name table RAM on the cartridge, which is fairly rare. See http://bootgod.dyndns.org:7777/ for a database of the hardware inside each cartridge.

There are a few games that do diagonal scrolling. Paperboy comes to mind. It's smooth and looks good without any noticable glitching, and without using custom chips, too. Not sure how they did it.

Paperboy draws a bunch of black sprites along the left side of the screen to cover up the glitches. Depending on the game this can be acceptable, but you only have a budget of 8 sprites per scanline and 64 total sprites, and this technique can eat up a lot of that budget.

Edit: as sibling comment noted, Paperboy does have custom logic on the cartridge, a 74HC161 4-bit counter. I think this is just used to switch between CHR banks.

Re: Zelda Screen Transitions Are Undefined Behaviour

#9
post #6
post #4

This is a great description of a commonly-used technique for splitting the screen in NES games that scroll smoothly. It may or may not have been intended, but this is a common technique for games that have a "status bar". Super Mario Bros 3 is another obvious example, but even Super Mario Bros uses it long before then for its top status bar. I first read about it in the excellent "I Am Error" book by Nathan Altice, b…

Nitpicking, but SMB3 uses the MMC3 chip which "adds an IRQ timer to allow split screen scrolling without the sacrifice of sprite 0" (Wikipedia) so it does not use this technique. SMB1 actually also does not use the sprite zero split technique because it never scrolls vertically. Its status bar is just a bunch of fixed background tiles.

Ah, didn't know that about the MMC3!

Regarding SMB1, I'm quite sure it uses the sprite 0 thing to keep the status bar stationary while the level scrolls smoothly beneath it by setting the scroll register only after when the status bar is done drawing. See more thorough description here: https://retrocomputing.stackexchange.com/questions/1898/how-...

Re: Zelda Screen Transitions Are Undefined Behaviour

#10
This reminds me a lot of Mode X which, although a funky 320x240 mode with square pixels built in to standard VGA, only became popular after Michael Abrash popularized it in Dr Dobbs. And then there was the utterly gorgeous mode Q - 256x256 with 256 colors. No muls or shifts - high byte is Y and low byte is X.
Post reply on HN