Is there a reason for the uneven forced blanking?

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

Is there a reason for the uneven forced blanking?

Post by iNCEPTIONAL »

Is there a reason why the forced blanking isn't the same size at the top and bottom here (16 pixels for both rather than 24 at top and 8 at bottom):
SFII_a.png
SFII_a.png (28.46 KiB) Viewed 1126 times
Just curious because my OCD doesn't like it and I just want to make sure it's more a deliberate choice by whomever than some way forced blanking has to work.

I mean, it could have just been done like this, right:
SFII.png
SFII.png (28.46 KiB) Viewed 1128 times
Also, can forced blanking be set to any size, or is it locked to the height of tiles or something, like in 8 pixel increments?
Last edited by iNCEPTIONAL on Tue Jun 28, 2022 10:14 am, edited 1 time in total.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Is there a reason for the uneven forced v-blank?

Post by jeffythedragonslayer »

I am not sure what you mean by "forced vblank," Retro game mechanics has talked about how forced blanking can be lined up to occur during horizontal blanking, although the timing can be difficult to get right.

In general no, forced blanking does not have to work like that - Super Mario Kart does fblank in the middle of the screen. I have never heard of a limitation on when you can set or clear fblank, but you may like section on glitches and hardware bugs here:

https://undisbeliever.net/snesdev/regis ... idisp.html

I discuss some terminology with undisbeliever here:

https://github.com/undisbeliever/snesde ... 1140666777
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Is there a reason for the uneven forced v-blank?

Post by lidnariq »

On real TVs and not emulators, there's no reason to think that the SNES's video output was aligned vertically with the glass.

In fact, we know that it wasn't. Late-model CRT TVs regularly showed more of the bottom than the top. Those 192 scanlines visible are probably actually the center ones on the TVs the developers were using.
iNCEPTIONAL

Re: Is there a reason for the uneven forced v-blank?

Post by iNCEPTIONAL »

jeffythedragonslayer wrote: Tue Jun 28, 2022 9:09 am I am not sure what you mean by "forced vblank," Retro game mechanics has talked about how forced blanking can be lined up to occur during horizontal blanking, although the timing can be difficult to get right.
My mistake, I meant forced blanking (F-Blank) as described in the Retro Game Mechanic Explained video (and I'm just talking about turning the beam off for [multiple] full scanlines rather than some trick to F-Blank mid-scanline or something). Hope that makes sense.

I corrected this in the original post.
Last edited by iNCEPTIONAL on Tue Jun 28, 2022 11:56 am, edited 4 times in total.
iNCEPTIONAL

Re: Is there a reason for the uneven forced v-blank?

Post by iNCEPTIONAL »

lidnariq wrote: Tue Jun 28, 2022 9:54 am On real TVs and not emulators, there's no reason to think that the SNES's video output was aligned vertically with the glass.

In fact, we know that it wasn't. Late-model CRT TVs regularly showed more of the bottom than the top. Those 192 scanlines visible are probably actually the center ones on the TVs the developers were using.
Pretty sure it wasn't THAT far off between the top and bottom alignment of the picture. Certainly, I always tried to make sure my TV picture was setup to touch the edges as neatly as possible and be as centred and even as possible (adjusted in the TV settings), so if some random game had bars that weren't equal by quite some ways, when most didn't even have black bars at all, it probably would have appeared uneven just as above (give or take any minor cut-off). I don't recall ever noticing any obvious misalignment on my Toshiba or Sony Trinitron Wega CRTs at the time. :-o
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Is there a reason for the uneven forced blanking?

Post by rainwarrior »

iNCEPTIONAL wrote: Tue Jun 28, 2022 3:11 amIs there a reason why the forced blanking isn't the same size at the top and bottom here (16 pixels for both rather than 24 at top and 8 at bottom):
I think there's a few good reasons.

1. They wanted the score to be visible, and the closer to the top it was, the more likely it would be cut off by the TV bezel. So, given that they already had to put the score line as low on the screen as that, blanking at the top is only removing "optional" background area that would be far away from the player's naub focus anyway.

2. It's also simpler to add more blanking at the top of the screen, at the end of vblank, than it is to add more at the bottom, where you'd need to set up a separate timer for it. It's also simpler to have only one added forced blank instead of two separate ones.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Is there a reason for the uneven forced blanking?

Post by jeffythedragonslayer »

rainwarrior wrote: Tue Jun 28, 2022 11:57 am 2. It's also simpler to add more blanking at the top of the screen, at the end of vblank, than it is to add more at the bottom, where you'd need to set up a separate timer for it. It's also simpler to have only one added forced blank instead of two separate ones.
Why would there need to be an extra timer to put more fblank at the bottom but not at the top?
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Is there a reason for the uneven forced blanking?

Post by rainwarrior »

The normal blanking period starts with the NMI, which is the built-in synch with the video signal provided by the system.

To start a forced blank early, you have to prepare a different timer separately, most likely using the IRQ.

HDMA can handle starting the force blank, but you still need to wake up the CPU and tell it that it needs to start doing its uploads. The NMI already does this for the normal start of blanking, but if you want to start earlier you need to create a new way.

(This isn't hugely more complicated, but I think it's a bit more than trivial.)
iNCEPTIONAL

Re: Is there a reason for the uneven forced blanking?

Post by iNCEPTIONAL »

rainwarrior wrote: Tue Jun 28, 2022 11:57 am
iNCEPTIONAL wrote: Tue Jun 28, 2022 3:11 amIs there a reason why the forced blanking isn't the same size at the top and bottom here (16 pixels for both rather than 24 at top and 8 at bottom):
I think there's a few good reasons.

1. They wanted the score to be visible, and the closer to the top it was, the more likely it would be cut off by the TV bezel. So, given that they already had to put the score line as low on the screen as that, blanking at the top is only removing "optional" background area that would be far away from the player's naub focus anyway.

2. It's also simpler to add more blanking at the top of the screen, at the end of vblank, than it is to add more at the bottom, where you'd need to set up a separate timer for it. It's also simpler to have only one added forced blank instead of two separate ones.
But, given it seems they did indeed F-Blank both at the top and the bottom of the screen in this case anyway--unless I'm seeing things wrong--couldn't they then, in this case at least, just do it for eight pixels longer at the bottom and 8 pixels less at the top, so it's not visually unbalanced?

I guess the score position thing, but there's many games with no F-Blanking at all that also have scores at/near the top/bottom of the screen and they manage just fine in terms of not accidently having the top/bottom of the screen cut it off, usually. So that would seem like a bit of strange reason for it to me.

It's not a huge issue in the grand schemes but it really does just play on my OCD.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Is there a reason for the uneven forced blanking?

Post by rainwarrior »

iNCEPTIONAL wrote: Tue Jun 28, 2022 12:20 pm...couldn't they...
They could. I'm just trying to offer a few reasons why they might not want to.
iNCEPTIONAL wrote: Tue Jun 28, 2022 12:20 pmI guess the score position thing, but most games with no F-Blanking also have scores, often near the top of the screen too, and they manage just fine in terms of not accidently having the top of the screen cut it off, usually.
In this case, they've started the score 24 lines below the top of the picture. 16 lines would definitely get a little cut off on some TVs. 24 is probably safe for the large majority of TVs.

So the proposal is either to move the whole picture up a little (decreasing cutoff safety margin) or adding extra background above the score and taking away some background from below the play area. Both of those I think have some small drawbacks. Like I do think extra background is better spent at the player's feet where they're doing the fighting than up above the score.

IMO the health bar and everything itself already make it an asymmetrical picture. The extra blank at the top never really registered that strongly to me on an NTSC CRT... PAL with its additional blank would make it a little more apparent though, and now HDTVs or emulators give us a much more straight and rigid frame to compare against.
iNCEPTIONAL

Re: Is there a reason for the uneven forced blanking?

Post by iNCEPTIONAL »

rainwarrior wrote: Tue Jun 28, 2022 12:48 pm
iNCEPTIONAL wrote: Tue Jun 28, 2022 12:20 pm...couldn't they...
They could. I'm just trying to offer a few reasons why they might not want to.
iNCEPTIONAL wrote: Tue Jun 28, 2022 12:20 pmI guess the score position thing, but most games with no F-Blanking also have scores, often near the top of the screen too, and they manage just fine in terms of not accidently having the top of the screen cut it off, usually.
In this case, they've started the score 24 lines below the top of the picture. 16 lines would definitely get a little cut off on some TVs. 24 is probably safe for the large majority of TVs.

So the proposal is either to move the whole picture up a little (decreasing cutoff safety margin) or adding extra background above the score and taking away some background from below the play area. Both of those I think have some small drawbacks. Like I do think extra background is better spent at the player's feet where they're doing the fighting than up above the score.

IMO the health bar and everything itself already make it an asymmetrical picture. The extra blank at the top never really registered that strongly to me on an NTSC CRT... PAL with its additional blank would make it a little more apparent though, and now HDTVs or emulators give us a much more straight and rigid frame to compare against.
Funnily, I never once noticed it on my PAL SNES and whatever CRT I was using back in the day (either a 25" Toshiba model with Dolby Pro Logic surround sound or, more recently, a 32" Sony Trinitron Wega). It wasn't until recent times that I actually realised there was this huge border at the top and a small one at the bottom, mostly from watching YouTube videos and then on my SNES Classic Mini played on a 50" 4K Philips TV. :-o
Last edited by iNCEPTIONAL on Tue Jun 28, 2022 4:33 pm, edited 1 time in total.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Is there a reason for the uneven forced blanking?

Post by Pokun »

I think Rainwarrior makes a good point with HDTVs or emulators giving us a much more straight and rigid frame to compare against. Those screenshots makes it very obvious that the picture is asymmetrical, but on a CRT you never raise an eyebrow that the picture is a little closer to one edge or the other as it's very common for the geometry not to be perfect. If you look carefully you might notice and start wondering about it, but when playing Street Fighter II you quickly forget about such things.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Is there a reason for the uneven forced blanking?

Post by jeffythedragonslayer »

I found a variable called ForcedVblank in the Mesen-S source at PpuTypes.h:131

Code: Select all

struct PpuState
{
	uint16_t Cycle;
	uint16_t Scanline;
	uint16_t HClock;
	uint32_t FrameCount;

	bool ForcedVblank;
I still prefer fblank though, personally.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Is there a reason for the uneven forced blanking?

Post by Pokun »

Heh it must be a typo, "forced vertical blanking" makes no sense. Fblank is a neat abbreviation though and goes well with vblank and hblank.
iNCEPTIONAL

Re: Is there a reason for the uneven forced blanking?

Post by iNCEPTIONAL »

jeffythedragonslayer wrote: Fri Jul 15, 2022 1:47 pm I found a variable called ForcedVblank in the Mesen-S source at PpuTypes.h:131

Code: Select all

struct PpuState
{
	uint16_t Cycle;
	uint16_t Scanline;
	uint16_t HClock;
	uint32_t FrameCount;

	bool ForcedVblank;
I still prefer fblank though, personally.
Typical. I got corrected for saying it wrong, but the dude who wrote an entire SNES emulator, which means they go into basically genius territory and certainly in the SNES programming scene in my book, used basically the same name. LOL

It totally made sense to me: Forcing blanking at some point vertically down the screen, ala, Forced VBlank.

But, anyhoo. I shall go with whatever I was told was the correct term. I can't even remember. Haha
Post Reply