Why two windows?

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
tepples
Posts: 21751
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Why two windows?

Post by tepples » Fri Apr 05, 2019 11:31 am

Asking on behalf of ant in gbdev Discord:

"Anyone have any insight into why the GBA Super NES S-PPU supports 2 windows? Was there a particular problem that Nintendo encountered that could be solved with exactly two windows? Why not more windows? Why not just one?"

Ant had asked the same question about the Game Boy Advance and I said the window count was probably inherited from the Super NES.

User avatar
dougeff
Posts: 2614
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Why two windows?

Post by dougeff » Fri Apr 05, 2019 11:50 am

How many do you need?
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
Drew Sebastino
Formerly Espozo
Posts: 3503
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Why two windows?

Post by Drew Sebastino » Fri Apr 05, 2019 3:17 pm

Are windows generally an SNES specific thing? I don't know of any other hardware that has them (I'm obviously not including the GBA); same with mosaic. Windowing could have been a lot more useful if there were more of them; they would have been great for a far silhouette background layer. Some games still make clever use of them though. DKC3 using large black windows behind high priority BG1 tiles in the tree levels is pretty clever.

Image

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

Re: Why two windows?

Post by tokumaru » Fri Apr 05, 2019 3:55 pm

1 for each player? I don't know...

93143
Posts: 1109
Joined: Fri Jul 04, 2014 9:31 pm

Re: Why two windows?

Post by 93143 » Fri Apr 05, 2019 4:05 pm

One is too restrictive. You wouldn't be able to draw a simple five-pointed star, or most of the numbers in Super Mario Kart. Or use two separate window effects on the same set of scanlines.

With more than two, the logic to deal with overlapping windows gets complicated. Also it takes more registers and die space, and is kinda starting to get away from the core concept of a tile-based graphics system...

Shonumi
Posts: 315
Joined: Sun Jan 26, 2014 9:31 am

Re: Why two windows?

Post by Shonumi » Fri Apr 05, 2019 7:48 pm

I'm going to go with 93143 and say that just one window may have been too limiting. It's fine for many, if not most cases, but giving access to two windows just about covers every other usage. One nice thing about two windows is that you can use them on two separate sections of the screen without resorting to Hblank tricks that change the window definition mid-screen.

I don't remember a bunch of GBA games using the two main windows at the same time, however. I know Sonic Advance (1st one) uses it to simulate two independent spotlight beams at the start of Zone 2 Act 1. I dunno about the SNES, but technically the GBA has 2.5 windows. I say that because OBJs can act as individual windows (3rd gen Pokemon uses this a lot to blend BGs with battle sprites for status affecting attacks, like Tail Whip or Growl). Super rare to see all of the windows used at once though.

Nicole
Posts: 218
Joined: Sun Mar 27, 2016 7:56 pm

Re: Why two windows?

Post by Nicole » Fri Apr 05, 2019 9:30 pm

Shonumi wrote:One nice thing about two windows is that you can use them on two separate sections of the screen without resorting to Hblank tricks that change the window definition mid-screen.
Well... on SNES, unlike GBA, there are no Y-coordinates for windows, so without any H-blank changes they always go from the very top to the very bottom of the screen. In other words, you'd pretty much always use those "tricks" on SNES regardless, even for a simple rectangular window.

Shonumi
Posts: 315
Joined: Sun Jan 26, 2014 9:31 am

Re: Why two windows?

Post by Shonumi » Fri Apr 05, 2019 9:54 pm

Nicole wrote:Well... on SNES, unlike GBA, there are no Y-coordinates for windows, so without any H-blank changes they always go from the very top to the very bottom of the screen. In other words, you'd pretty much always use those "tricks" on SNES regardless, even for a simple rectangular window.
Interesting, never knew that. Without mid-screen changes, I wonder what kind of top-to-bottom effects you could come up when using both windows simultaneously.

Oziphantom
Posts: 774
Joined: Tue Feb 07, 2017 2:03 am

Re: Why two windows?

Post by Oziphantom » Fri Apr 05, 2019 11:15 pm

Its basically a scissor, so most Fixed Pipeline GPUs have support for a single scissor. As they can do N passes they only need 1.

User avatar
Bregalad
Posts: 7766
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Why two windows?

Post by Bregalad » Sat Apr 06, 2019 5:19 am

Shonumi wrote: Interesting, never knew that. Without mid-screen changes, I wonder what kind of top-to-bottom effects you could come up when using both windows simultaneously.
Any effect that spawn in two vertical columns in the entire screen... Looks at Drew Sebastino's example above for instance.

tepples
Posts: 21751
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Why two windows?

Post by tepples » Sat Apr 06, 2019 6:58 am

Perhaps the Super NES window doesn't need top and bottom variables because its HDMA is more versatile than that of the GBA.

Shonumi
Posts: 315
Joined: Sun Jan 26, 2014 9:31 am

Re: Why two windows?

Post by Shonumi » Sat Apr 06, 2019 7:43 am

Bregalad wrote: Any effect that spawn in two vertical columns in the entire screen... Looks at Drew Sebastino's example above for instance.
Any more specific examples besides DKC3? I only ask because I know the GBA can wrap its windows, so on that system you could get away with just a single window. Just idle curiosity if any games on the SNES that use two top-to-bottom windows would need the same on the GBA.

Pokun
Posts: 1271
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Why two windows?

Post by Pokun » Sun Apr 07, 2019 6:54 am

I always wondered why Nintendo called them windows, using the same term that they use for the Game Boy's second BG layer, which made sense as it can be used as an actual dialogue box window layer instead of just masking BG tiles like the SNES windows do. I guess window makes sense on SNES as well since they clip out holes like windows in the BG, but it had me confused when I first read about it.

Post Reply