SNES layer priorities

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
SNES layer priorities
by on (#216550)
A friend & I were thinking about creating our own SNES-style (action?) role-playing game, running natively on PC though.

Since I have some knowledge about the SNES, I decided to (sort of) recreate the SNES PPU and maybe add some improvements that make things easier for myself and/or eventually the developer of the actual game. It works reasonably well, although it's using plain old Win32 GDI for graphics output. But there's one thing that confuses me: for modes 0 and 1, why did Nintendo decide to show BG priority tiles 1 of BGs 1 and 2 or 3 and 4 first, and only then the priority 0 tiles?

Code:
-3AB2ab1CD0cd  Mode0
C3AB2ab1--0c-  Mode1 + 2105.3
-3AB2ab1C-0c-  Mode1 - 2105.3
-----------------------------
-3A2B1a0b----  Mode2
-3A2B1a0b----  Mode3
-3A2B1a0b----  Mode4
-3A2B1a0b----  Mode5
-3A2-1a0-----  Mode6
(A..D = BGs with priority 1; a..d = priority 0; 3..0 = sprites)

This doesn't seem to be done to increase the number of independent layers; there can be no sprites between the two layer pairs, and scrolling them by different amounts would probably look bad. (?) It's a shame the SNES had only 3 layers for its most commonly used Mode1; one more, and scenes like these (2 completely independent playfield layers) would've been possible.

I've looked at late SNES games, and they use the tile priority bits in very complicated ways... So, am I just overlooking something here or would this feature be something that should just be scrapped and done with a few more layers?
Re: SNES layer priorities
by on (#216559)
I think there are 2 reasons why it was designed that way:

1) Using BG layers as really big sprites.
2) Doing HDMA parallax scrolling is easier if the background layers can switch around by themselves.
Re: SNES layer priorities
by on (#216565)
What psychopathicteen said. Here's a neat little example for how it can be useful: https://www.youtube.com/watch?v=uavyYWK0tyE#t=4m25s Each character, as well as the opposite character's shadow, shares a BG layer.
Re: SNES layer priorities
by on (#216567)
Espozo wrote:
What psychopathicteen said. Here's a neat little example for how it can be useful: https://www.youtube.com/watch?v=uavyYWK0tyE#t=4m25s Each character, as well as the opposite character's shadow, shares a BG layer.


That's so sutle I didn't even notice it.
Re: SNES layer priorities
by on (#216576)
Mmh, I see.
Re: SNES layer priorities
by on (#216584)
I think the Sega Genesis was like this with background priorities, so it might've been a common thing with arcade machines.
Re: SNES layer priorities
by on (#216627)
Think of the main uses for BG3: low-color-depth distant parallax layers, or status bars. These are at the bottom or top of the layer stack respectively.