Black borders to left and right of SNES game footage

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.
iNCEPTIONAL

Black borders to left and right of SNES game footage

Post by iNCEPTIONAL »

https://www.youtube.com/watch?v=m8MMabEAL00

Someone mentioned something to me the other day about being able to do something like this on SNES games for some reason, I think it was to do with scrolling and allowing the system to only use a single screen-width image for backgrounds when scrolling and actually update the image as it scrolls within the screen area, with the borders being their to cover it up at the edges as the updating tiles would be visible otherwise, which normally isn't how this is done on SNES as far as I'm aware. You know how you see the glitching tiles to the right of the screen in Super Mario Bros. 3, I think the borders seen in the SNES game above, if they're actually there in the game, are to hide that glitch occurring here too, presuming they are using the screen scrolling update method I'm talking about here.

But, if that is what's happening here, why would anyone choose that method rather than just having the backgrounds be two screens wide to allow the tile updates to happen outside the screen and therefor allow the game to take up the full 256 pixels wide view area (the last thing the SNES needs is an even smaller horizontal view area)?
Last edited by iNCEPTIONAL on Sun Jul 03, 2022 8:23 am, edited 1 time in total.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: Black borders to left and right of SNES game footage

Post by TmEE »

Those are border inside the video signal itself, one video line is ~64µs long and only ~52µs of it is not blanked, and a console outputs active image only in part of that 52µs and most TVs do not show all of that 52µs either (overscan etc.). The MD has this sort of border too (as do pretty much all other game consoles) but for whatever reason it is not present in that partcular video.
iNCEPTIONAL

Re: Black borders to left and right of SNES game footage

Post by iNCEPTIONAL »

TmEE wrote: Sun Jul 03, 2022 8:21 am Those are border inside the video signal itself, one video line is ~64µs long and only ~52µs of it is not blanked, and a console outputs active image only in part of that 52µs and most TVs do not show all of that 52µs either (overscan etc.). The MD has this sort of border too (as do pretty much all other game consoles) but for whatever reason it is not present in that partcular video.
Ah, okay, cool. Thanks.
turboxray
Posts: 348
Joined: Thu Oct 31, 2019 12:56 am

Re: Black borders to left and right of SNES game footage

Post by turboxray »

iNCEPTIONAL wrote: Sun Jul 03, 2022 8:13 am https://www.youtube.com/watch?v=m8MMabEAL00

Someone mentioned something to me the other day about being able to do something like this on SNES games for some reason, I think it was to do with scrolling and allowing the system to only use a single screen-width image for backgrounds when scrolling and actually update the image as it scrolls within the screen area, with the borders being their to cover it up at the edges as the updating tiles would be visible otherwise, which normally isn't how this is done on SNES as far as I'm aware. You know how you see the glitching tiles to the right of the screen in Super Mario Bros. 3, I think the borders seen in the SNES game above, if they're actually there in the game, are to hide that glitch occurring here too, presuming they are using the screen scrolling update method I'm talking about here.

But, if that is what's happening here, why would anyone choose that method rather than just having the backgrounds be two screens wide to allow the tile updates to happen outside the screen and therefor allow the game to take up the full 256 pixels wide view area (the last thing the SNES needs is an even smaller horizontal view area)?
Yes, that game clipped the active display down to 240px wide. It saves a little bit of vram if you can use 32x32 map instead of a 64x32 map. And same if the 2nd farther BG also needs more than 32x32 map area, but only use a smaller 32x32 map size. That's the main reason I can see to use it (there are a few other edge case uses that involve mode 7). The clipping not very noticeable, if at all, on consumer CRTs.
iNCEPTIONAL

Re: Black borders to left and right of SNES game footage

Post by iNCEPTIONAL »

turboxray wrote: Sun Jul 03, 2022 8:42 am
iNCEPTIONAL wrote: Sun Jul 03, 2022 8:13 am https://www.youtube.com/watch?v=m8MMabEAL00

Someone mentioned something to me the other day about being able to do something like this on SNES games for some reason, I think it was to do with scrolling and allowing the system to only use a single screen-width image for backgrounds when scrolling and actually update the image as it scrolls within the screen area, with the borders being their to cover it up at the edges as the updating tiles would be visible otherwise, which normally isn't how this is done on SNES as far as I'm aware. You know how you see the glitching tiles to the right of the screen in Super Mario Bros. 3, I think the borders seen in the SNES game above, if they're actually there in the game, are to hide that glitch occurring here too, presuming they are using the screen scrolling update method I'm talking about here.

But, if that is what's happening here, why would anyone choose that method rather than just having the backgrounds be two screens wide to allow the tile updates to happen outside the screen and therefor allow the game to take up the full 256 pixels wide view area (the last thing the SNES needs is an even smaller horizontal view area)?
Yes, that game clipped the active display down to 240px wide. It saves a little bit of vram if you can use 32x32 map instead of a 64x32 map. And same if the 2nd farther BG also needs more than 32x32 map area, but only use a smaller 32x32 map size. That's the main reason I can see to use it (there are a few other edge case uses that involve mode 7). The clipping not very noticeable, if at all, on consumer CRTs.
Oh, okay, so it is doing that. I wonder if this clipping was truly necessary here on SNES.
turboxray
Posts: 348
Joined: Thu Oct 31, 2019 12:56 am

Re: Black borders to left and right of SNES game footage

Post by turboxray »

iNCEPTIONAL wrote: Sun Jul 03, 2022 9:11 am
turboxray wrote: Sun Jul 03, 2022 8:42 am Yes, that game clipped the active display down to 240px wide. It saves a little bit of vram if you can use 32x32 map instead of a 64x32 map. And same if the 2nd farther BG also needs more than 32x32 map area, but only use a smaller 32x32 map size. That's the main reason I can see to use it (there are a few other edge case uses that involve mode 7). The clipping not very noticeable, if at all, on consumer CRTs.
Oh, okay, so it is doing that. I wonder if this clipping was truly necessary here on SNES.
I don't think it was necessary at all. I mean at first glance, yeah vram is pretty much used up. But then looking at BG2 and BG3, they're both are set to 64x64. BG1 is the one set to 32x32. They could have easily set BG2 and BG3 to 64x32, and used that recovered space for BG1 to be 64x32 as well (and still have 4k of vram left over/free).
iNCEPTIONAL

Re: Black borders to left and right of SNES game footage

Post by iNCEPTIONAL »

turboxray wrote: Sun Jul 03, 2022 11:01 am
iNCEPTIONAL wrote: Sun Jul 03, 2022 9:11 am
turboxray wrote: Sun Jul 03, 2022 8:42 am Yes, that game clipped the active display down to 240px wide. It saves a little bit of vram if you can use 32x32 map instead of a 64x32 map. And same if the 2nd farther BG also needs more than 32x32 map area, but only use a smaller 32x32 map size. That's the main reason I can see to use it (there are a few other edge case uses that involve mode 7). The clipping not very noticeable, if at all, on consumer CRTs.
Oh, okay, so it is doing that. I wonder if this clipping was truly necessary here on SNES.
I don't think it was necessary at all. I mean at first glance, yeah vram is pretty much used up. But then looking at BG2 and BG3, they're both are set to 64x64. BG1 is the one set to 32x32. They could have easily set BG2 and BG3 to 64x32, and used that recovered space for BG1 to be 64x32 as well (and still have 4k of vram left over/free).
Can all four backgrounds not be 64x64 in SNES games so long as the tilesets aren't being maxed-out?

If not, this is another limitation of SNES I've just learned about--luckily it's not going to matter in my own shmup.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Black borders to left and right of SNES game footage

Post by rainwarrior »

Final Fantasy III (VI) does this too. It's trading a window for VRAM.

On NES and SMS there was hardware to hide 8 pixels on the side of the screen for a similar reason, and some games took advantage of it.

Yes, on SNES all backgrounds can be 64x64 if you want, except for mode 7. It's just part of the memory budget to account for. 16x16 tile mode can also be used to double the dimensions without taking up more memory (but the disadvantage of large tiles).
iNCEPTIONAL

Re: Black borders to left and right of SNES game footage

Post by iNCEPTIONAL »

rainwarrior wrote: Sun Jul 03, 2022 12:11 pm Final Fantasy III (VI) does this too. It's trading a window for VRAM.

On NES and SMS there was hardware to hide 8 pixels on the side of the screen for a similar reason, and some games took advantage of it.

Yes, on SNES all backgrounds can be 64x64 if you want, except for mode 7. It's just part of the memory budget to account for. 16x16 tile mode can also be used to double the dimensions without taking up more memory (but the disadvantage of large tiles).
Ah, good.
turboxray
Posts: 348
Joined: Thu Oct 31, 2019 12:56 am

Re: Black borders to left and right of SNES game footage

Post by turboxray »

iNCEPTIONAL wrote: Sun Jul 03, 2022 11:22 am Can all four backgrounds not be 64x64 in SNES games, so long as the tilesets aren't being maxed-out?

If not, this is another limitation of SNES I've just learned about--luckily it's not going to matter in my own shmup.
I'm not sure I understand the question, in relation to tilesets being maxed-out. Did you mean could be 64x64 if you're not maxing out tile space? Sure. Just wanted to reiterate; each tile entry in a map doesn't need to be unique. I would say that it's kinda rare for every tile reference in the map to be unique. As in, if you have a map that is 64x32, you're not required to have 2048 tiles in vram for that map. But say you wanted tilemap layers that references ALL unique tiles. You could setup a 64x32 map, but have it drawn in to display 33x32 unique tiles.. so that you stream in the edge of the tilemap and you always streaming in a new column of tiles (you never have more than 33 columns of unique tiles for that layer). I don't know if your question was related to that?? Or if that even helps.

But the point I was trying to make, is that having a 64x64 map size is kind of a waste (in this game, but also in general). It's usually done when the programmer doesn't want to bother updating the other map layers (basically set it and forget it). I mean it does simplify code.

You can quickly calculate how much a map takes up in vram: X num tiles * Y num tiles * 2 (this is for standard maps, not mode 7). 64x64*2 = 8k. A 64x32 is 4k. Etc. So 3 layers at 64x64 is 24k of vram, and 3 layers at 64x32 is 12k of vram.

There other more complicated optimizations that save vram and use even less map space, but the implementation is more complicated and requires hDMA. The game doesn't need anything like that from what I can see.

The down size of using a smaller 64x32 means you potentially need to update rows, but that's not typically a big deal. But I guess if you have room for it, and not maxing out vram, then it's also not a big deal to use 64x64 maps. It's really only a 'waste of space' if that space is somehow impeding something else in game design related to vram usage.
iNCEPTIONAL

Re: Black borders to left and right of SNES game footage

Post by iNCEPTIONAL »

turboxray wrote: Sun Jul 03, 2022 12:19 pm
iNCEPTIONAL wrote: Sun Jul 03, 2022 11:22 am Can all four backgrounds not be 64x64 in SNES games, so long as the tilesets aren't being maxed-out?

If not, this is another limitation of SNES I've just learned about--luckily it's not going to matter in my own shmup.
I'm not sure I understand the question, in relation to tilesets being maxed-out. Did you mean could be 64x64 if you're not maxing out tile space? Sure. Just wanted to reiterate; each tile entry in a map doesn't need to be unique. I would say that it's kinda rare for every tile reference in the map to be unique. As in, if you have a map that is 64x32, you're not required to have 2048 tiles in vram for that map. But say you wanted tilemap layers that references ALL unique tiles. You could setup a 64x32 map, but have it drawn in to display 33x32 unique tiles.. so that you stream in the edge of the tilemap and you always streaming in a new column of tiles (you never have more than 33 columns of unique tiles for that layer). I don't know if your question was related to that?? Or if that even helps.

But the point I was trying to make, is that having a 64x64 map size is kind of a waste (in this game, but also in general). It's usually done when the programmer doesn't want to bother updating the other map layers (basically set it and forget it). I mean it does simplify code.

You can quickly calculate how much a map takes up in vram: X num tiles * Y num tiles * 2 (this is for standard maps, not mode 7). 64x64*2 = 8k. A 64x32 is 4k. Etc. So 3 layers at 64x64 is 24k of vram, and 3 layers at 64x32 is 12k of vram.

There other more complicated optimizations that save vram and use even less map space, but the implementation is more complicated and requires hDMA. The game doesn't need anything like that from what I can see.

The down size of using a smaller 64x32 means you potentially need to update rows, but that's not typically a big deal. But I guess if you have room for it, and not maxing out vram, then it's also not a big deal to use 64x64 maps. It's really only a 'waste of space' if that space is somehow impeding something else in game design related to vram usage.
I just wanted to make sure that there wasn't some inherent issue with having four 64x64 backgrounds that I had to worry about. But it seems there isn't, so all is good.
none
Posts: 117
Joined: Thu Sep 03, 2020 1:09 am

Re: Black borders to left and right of SNES game footage

Post by none »

It's curious that the game has the border on both sides of the screen...
iNCEPTIONAL

Re: Black borders to left and right of SNES game footage

Post by iNCEPTIONAL »

none wrote: Mon Jul 04, 2022 3:32 am It's curious that the game has the border on both sides of the screen...
Maybe just for a bit of visual balance. I can understand OCD like that.
none
Posts: 117
Joined: Thu Sep 03, 2020 1:09 am

Re: Black borders to left and right of SNES game footage

Post by none »

iNCEPTIONAL wrote: Mon Jul 04, 2022 4:05 am
none wrote: Mon Jul 04, 2022 3:32 am It's curious that the game has the border on both sides of the screen...
Maybe just for a bit of visual balance. I can understand OCD like that.
sure but they could have gotten away with 4px on each side if that was the intention.
turboxray
Posts: 348
Joined: Thu Oct 31, 2019 12:56 am

Re: Black borders to left and right of SNES game footage

Post by turboxray »

none wrote: Mon Jul 04, 2022 3:32 am It's curious that the game has the border on both sides of the screen...
It updates two columns at a time on the main map (16px) as the game scrolls.
Post Reply