SNES layer priorities

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

SNES layer priorities

Post by creaothceann »

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: Select all

-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?
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: SNES layer priorities

Post by psycopathicteen »

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.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: SNES layer priorities

Post by Drew Sebastino »

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.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: SNES layer priorities

Post by psycopathicteen »

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.
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: SNES layer priorities

Post by creaothceann »

Mmh, I see.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: SNES layer priorities

Post by psycopathicteen »

I think the Sega Genesis was like this with background priorities, so it might've been a common thing with arcade machines.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: SNES layer priorities

Post by tepples »

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.
Post Reply