Aspect Ratio Problem

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
retronnn
Posts: 2
Joined: Mon Feb 07, 2022 5:45 am

Aspect Ratio Problem

Post by retronnn »

Why is some of my games aspect ratio looks like this in snes9x ?? does it have anything to do with the game or can i change it ? pls help
Attachments
Screenshot (257).png
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Aspect Ratio Problem

Post by tepples »

The 60 Hz Super NES outputs a picture with a nominally 4:3 display aspect ratio* image. When displayed on a 16:9 display, this image will normally have pillarboxes on the left and right.

Some Super NES games, including several by Capcom, use deliberate letterboxing in order to animate more of the screen at once. Are you familiar with the concept of a vertical blanking interval (vblank)?


* Actually 64:49, the product of 8:7 pixel aspect ratio (from 5.37 MHz dot clock) and 8:7 pixel count (256x224).
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: Aspect Ratio Problem

Post by 93143 »

That game looks like it also trims 18 pixels off the top of the screen, presumably for DMA bandwidth reasons. That's why the visible area isn't 4:3.
retronnn
Posts: 2
Joined: Mon Feb 07, 2022 5:45 am

Re: Aspect Ratio Problem

Post by retronnn »

tepples wrote: Mon Feb 07, 2022 1:09 pm The 60 Hz Super NES outputs a picture with a nominally 4:3 display aspect ratio* image. When displayed on a 16:9 display, this image will normally have pillarboxes on the left and right.

Some Super NES games, including several by Capcom, use deliberate letterboxing in order to animate more of the screen at once. Are you familiar with the concept of a vertical blanking interval (vblank)?


* Actually 64:49, the product of 8:7 pixel aspect ratio (from 5.37 MHz dot clock) and 8:7 pixel count (256x224).
i'm okay with having pillarboxes on the left and right my problem is that empty space at the top of the game also no i am not familiar with what you just said sorry
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: Aspect Ratio Problem

Post by 93143 »

That's not empty space. It's black scanlines rendered by the emulated SNES.

Consoles like the SNES can only update their VRAM when the video chip isn't using it. Since the background and sprite capabilities of the machine are typically designed to use pretty much the entire available VRAM bandwidth during active display, this means that there's only a short period in between active frames, called "vertical blanking", or VBlank (about 1/7 of the total frame time on an NTSC SNES)*, during which new data can be sent to VRAM by the CPU.

If this isn't enough, you can turn on "forced blanking". This causes the video chip to render black pixels and not bother reading any of the graphics memories (VRAM, OAM, CGRAM), leaving those memories open for access by the CPU and its DMA unit even outside of VBlank. Some games that do this (like Star Fox, Doom, etc.) try to trim a roughly equal amount off the top and bottom of the frame, by having 'VBlank' start early and end late. Some others don't bother making it look nice and just extend VBlank on the back end. This game is apparently in the latter category. Super Mario Kart additionally uses forced blank in the middle of the screen to adjust the sprite definitions in OAM between the split screens.


* Technically, vertical blanking is a term from raster-scan television, and refers to the part of the scan cycle where the electron beam defocuses and moves back to the top to draw the next field. I believe this is nominally about 1/12 of a frame for NTSC. However, the bezel on a properly adjusted NTSC TV cuts off about 16 scanlines of a 240p progressive-scan signal, so by default the SNES doesn't bother drawing those (they're output to the TV as black) and offers an expanded "VBlank" on the rendering end to allow more data through to VRAM.

This is different from what you're seeing, which is additional lines being blanked, resulting in a screen less than 224 lines high, in order to transfer even more data. The emulator knows about the difference between regular 240p and SNES 224p and will fill your monitor top-to-bottom with 224 lines when the overscan bit is unset (which it should always be in an NTSC game), but further trimming cannot be automatically corrected for without per-game hacks.
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: Aspect Ratio Problem

Post by Nikku4211 »

93143 wrote: Mon Feb 07, 2022 9:56 pm * Technically, vertical blanking is a term from raster-scan television, and refers to the part of the scan cycle where the electron beam defocuses and moves back to the top to draw the next field. I believe this is nominally about 1/12 of a frame for NTSC. However, the bezel on a properly adjusted NTSC TV cuts off about 16 scanlines of a 240p progressive-scan signal, so by default the SNES doesn't bother drawing those (they're output to the TV as black) and offers an expanded "VBlank" on the rendering end to allow more data through to VRAM.
I thought the reason why 239p on SNES (and 240p on NES) is taller than usual was because of the around ~60.1 hz refresh rate, not simply because the signal is 240p.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: Aspect Ratio Problem

Post by 93143 »

I don't think that has a lot to do with it; the frame time difference is less than 0.7 scanlines. Also, the NTSC standard is 262.5 scanlines interlaced, including vertical retrace, and the SNES is also 262.5 with interlace, or 262 in progressive mode. Just the use of progressive scan explains most of the difference, and scanline length presumably takes care of the rest.

It's not just the NES and SNES video signals that have active scanlines behind the bezel. All NTSC signals do. This is why many computers and suchlike didn't bother rendering all 240 lines; in fact many went much further than the SNES, to 200 or 192 lines or even lower. A 184-line display would be letterboxed, but at least you could read the whole thing.
User avatar
Nikku4211
Posts: 569
Joined: Sun Dec 15, 2019 1:28 pm
Location: Florida
Contact:

Re: Aspect Ratio Problem

Post by Nikku4211 »

93143 wrote: Fri Feb 11, 2022 1:54 am I don't think that has a lot to do with it; the frame time difference is less than 0.7 scanlines. Also, the NTSC standard is 262.5 scanlines interlaced, including vertical retrace, and the SNES is also 262.5 with interlace, or 262 in progressive mode. Just the use of progressive scan explains most of the difference, and scanline length presumably takes care of the rest.
Yeah, I wasn't saying it had more scanlines, I was just saying the distance between each scanline might be taller than normal.
93143 wrote: Fri Feb 11, 2022 1:54 am It's not just the NES and SNES video signals that have active scanlines behind the bezel. All NTSC signals do. This is why many computers and suchlike didn't bother rendering all 240 lines; in fact many went much further than the SNES, to 200 or 192 lines or even lower. A 184-line display would be letterboxed, but at least you could read the whole thing.
I am already aware of this. Some TVs show more than others do, which is why safe areas exist.
I have an ASD, so empathy is not natural for me. If I hurt you, I apologise.
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: Aspect Ratio Problem

Post by 93143 »

Nikku4211 wrote: Sat Feb 12, 2022 9:14 am Yeah, I wasn't saying it had more scanlines, I was just saying the distance between each scanline might be taller than normal.
I figured you were saying it had fewer scanlines to cover the same vertical scan height. But it doesn't, so I don't see why the scanline pitch should be any bigger. If anything, the faster scanlines might be expected to reduce scanline pitch slightly - I'm not sure exactly how the synchronization works.
Some TVs show more than others do, which is why safe areas exist.
Yes, and the standard apparently includes a fairly large margin for error. Judging by the SNES signal, given the nominal PAR of 8:7, you get approximately a 4:3 picture when just 219 lines are showing, and that's if the full 256-pixel scanline is bounded exactly by the bezel with no horizontal overscan.

Where's tepples? He usually knows a fair bit about video signals...
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Aspect Ratio Problem

Post by lidnariq »

Fixed-frequency monitors (like CRT TVs) have no reason to include any auto-sizing feature - why would they need one?

As a result, the vertical spacing per scanline (actually usually "per millisecond"), and the horizontal spacing per microsecond will be configured at build time, possibly as a resistor size or maybe just a number stored in EEPROM and configurable in the service menu.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Aspect Ratio Problem

Post by tepples »

Where's tepples?
On Discord, trying to figure out how to juggle work with being in so many servers.
Post Reply