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.
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

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

Post by 93143 »

iNCEPTIONAL wrote: Fri Jul 15, 2022 2:34 pmIt totally made sense to me: Forcing blanking at some point vertically down the screen, ala, Forced VBlank.
No, that doesn't make sense, because it's not confined to V-position. You can force blank at any point, and turn it off at any point. I've tested turning it on and off for part of a scanline. It's got nothing to do with VBlank, and the emulator author shouldn't have called it that (unless this is somehow a totally different thing being called this for some reason).

Forced VBlank might be a decent term for a programming practice, namely the one that uses forced blank to extend VBlank, although it isn't common. But it's not a good name for the hardware feature itself.
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 »

iNCEPTIONAL wrote: Fri Jul 15, 2022 2:34 pm It totally made sense to me: Forcing blanking at some point vertically down the screen, ala, Forced VBlank.
But in that case the blanking is done both horizontally and vertically when you enable fblank since the entire screen is blanked.

Vertical blanking normally refers to the period when the electron gun is being all done drawing all lines of a frame and is moving back up to the top-left corner again while blanking (not drawing), so that it can start drawing the next frame. So a quick break for the electrons, and the time when the CPU (you) can tell the PPU what changes to the graphics you want to happen the next frame.

Horizontal blanking is the period each time the electron gun has finished drawing a single line and moves back to the left side while blanking, so that it can draw the next line below the last one. This is an extremely short break for the electrons which is why only very small graphic updates can be done at hblank (this is what we call raster effects because we time it between the rasterlines/scanlines).

Forced blanking on the SNES is basically just telling the PPU to always draw black until disabling fblank again, but the PPU also accepts graphics updates like with the other two types of blanking periods which is why it can be used to extend the vblank period by sacrificing a number of lines worth of graphics at top or bottom (before or after vblank).
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 »

Well, the reason "fblank" makes more sense to me is this other thing to consider (I forgot who told me this): is that there is no software way to tell the PPU, "forget what master clock cycle you're on; start generating the PAL/NTSC vertical sync signal now."
iNCEPTIONAL

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

Post by iNCEPTIONAL »

93143 wrote: Fri Jul 15, 2022 3:43 pm
iNCEPTIONAL wrote: Fri Jul 15, 2022 2:34 pmIt totally made sense to me: Forcing blanking at some point vertically down the screen, ala, Forced VBlank.
No, that doesn't make sense, because it's not confined to V-position. You can force blank at any point, and turn it off at any point. I've tested turning it on and off for part of a scanline. It's got nothing to do with VBlank, and the emulator author shouldn't have called it that (unless this is somehow a totally different thing being called this for some reason).

Forced VBlank might be a decent term for a programming practice, namely the one that uses forced blank to extend VBlank, although it isn't common. But it's not a good name for the hardware feature itself.
Well, I'm just saying that in terms of what I thought I was describing, forcing some blank/black lines at some points down the screen vertically, the name made total sense to me. Doesn't mean it's technically correct in the slightest, of course.
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 »

iNCEPTIONAL wrote: Fri Jul 15, 2022 3:51 pm Well, I'm just saying that in terms of what I thought I was describing, forcing some blank/black lines at some points down the screen vertically, the name made total sense to me. Doesn't mean it's technically correct in the slightest, of course.
I do want to clarify that I wasn't admonishing you for using the "wrong" name, just that I personally was confused. I think it's okay to have multiple ways of describing things. Now "forcing some blank/black lines at some points down the screen vertically" is a lot more precise and makes more sense to me than "forced vertical blanking," because it sounded like you can start the sync whenever, something I wanted to know how to do if it was supported. That's why I thought we should stay away from it. From what I've been reading about CRTs lately it sounds like there are pretty strict requirements on what vertical blanking is and how long it lasts, so there is not much you can change without going outside the standards. See 10:30 here:

https://youtu.be/nNQiR5NPHuc

I was also trying to figure out if there is a way for a game to detect what kind of TV the snes is plugged into at the time (there isn't) and that mattered because if you can force a sync whenever you want then you can decide whether you want to run at 60Hz or 50Hz.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

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

Post by TmEE »

Sync timing and periods are critical for all display devices, there isn't much playroom with them.
Post Reply