SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 07, 2012 10:46PM | Registered: 12 years ago Posts: 7 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 08, 2012 02:58AM | Registered: 15 years ago Posts: 276 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 08, 2012 03:56AM | Registered: 12 years ago Posts: 7 |
Quote
[u
For emulator developers[/u]
There are two ways to emulate the pixel aspect ratio of the NES: scale before padding and pad before scaling. The NES PPU hardware performs the padding first, adding 24 pixels of border to form a 280x240 pixel picture that can be resized to 320x240, 640x480, or 960x720 square pixels, or to 352x240 or 704x480 if your SDTV output circuit produces non-square pixels at 13.5 MHz. But as a slight optimization, you can scale first (256 * 8/7 = 292) and then pad: stretch the 256x240 pixels to 292x240, 584x480, 876x720, or 1168x960 square pixels or 320x240 or 640x480 non-square pixels. Then you can emulate the overscan by drawing a TV bezel on top of the edges of the emulated picture.]
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 08, 2012 10:43AM | Registered: 15 years ago Posts: 276 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 08, 2012 03:29PM | Registered: 12 years ago Posts: 7 |
Quote
ekeeke
Yes it does.
Quote
ekeeke
There are different way to upscale horizontally and apply filtering on Wii, some being less visible than heavy bilinear filtering.
Quote
ekeeke
I think that snes9xgx uses gx bilinear filtering only, which can explain the differences you might see if you use "filtered" mode.
Quote
ekeeke
Solution is to simply "double" the original width with gx (no filtering needed) then let video hardware do the upscalint+filtering,
Quote
ekeeke
which is what VC probably does.
Quote
ekeeke
Anyway, it is not a problem of wrong aspect ratio . . . .
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 08, 2012 07:09PM | Moderator Registered: 16 years ago Posts: 441 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 08, 2012 07:33PM | Registered: 15 years ago Posts: 276 |
else // unfiltered and filtered mode { xscale = 320; if(vheight == 224 || vheight == 448) yscale = 224; else yscale = 239; }
else // unfiltered and filtered mode { xscale = (GCSettings.render == 2) ? 256 : 320; if(vheight == 224 || vheight == 448) yscale = 224; else yscale = 239; }
else { rmode = FindVideoMode(); Settings.SoundInputRate = 31953; UpdatePlaybackRate(); }
else { rmode = FindVideoMode(); if (GCSettings.render == 2) { memcpy(&TV_Custom, rmode, sizeof(TV_Custom)); rmode = &TV_Custom; rmode->fbWidth = 512; } Settings.SoundInputRate = 31953; UpdatePlaybackRate(); }
GX_SetCopyFilter (rmode->aa, rmode->sample_pattern, (GCSettings.render == 1) ? GX_TRUE : GX_FALSE, rmode->vfilter); // deflicker ON only for filtered mode
GX_SetCopyFilter(rmode->aa, rmode->sample_pattern, (rmode->xfbMode == VI_XFBMODE_SF) ? GX_FALSE : GX_TRUE, rmode->vfilter);
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 08, 2012 11:02PM | Registered: 12 years ago Posts: 7 |
Quote
ekeeke
Don't worry, I think I pretty much know what I am talking about and I know snes9xgx video code pretty well, hence why I'm confident of what I am saying ;-)
Quote
ekeeke
As I said, filtering is a need when you upscale pixels by a non-integer ratio (which is the case here since 256 "SNES" pixels more or less match 640 "Wii" pixels). If you don't do that, you get scaling artefacts like those wider pixels you are seeing. And yes, it is unavoidable (just think how you could make 2 distinct pixels into 5 without issues), which is why I'm saying that VC does apply filtering.
Quote
ekeeke
In each cases, there is upscaling happening (and yes, even in 240p mode).
Quote
ekeeke
Now, I'm not saying this could not be improved: the idea would be to always apply 3) by default unless user wants to enable bilinear filtering, which is pretty much what I am doing in Genesis Plus GX...
Quote
ekeeke
This is untested so I cannot guarantee there is no side-effects, but you got the idea.
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 09, 2012 08:44PM | Registered: 15 years ago Posts: 276 |
Quote
philexile
Is there a way to find out exactly what Virtual Console is doing (and copy it)?
Quote
I'm curious, why are there no artifacts in 240p mode then?
Quote
I haven't tried Genesis Plus GX yet. I'll have to give it ago, but I don't think it will have the same issue since its native resolution is 320x240.
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 10, 2012 03:50AM | Moderator Registered: 16 years ago Posts: 441 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 10, 2012 07:28PM | Registered: 12 years ago Posts: 7 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 11, 2012 03:22PM | Registered: 12 years ago Posts: 7 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 11, 2012 05:23PM | Registered: 13 years ago Posts: 14 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 14, 2012 11:29AM | Registered: 15 years ago Posts: 276 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) January 14, 2012 03:44PM | Registered: 12 years ago Posts: 7 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) March 05, 2012 06:02AM | Registered: 15 years ago Posts: 7 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) March 05, 2012 07:01PM | Registered: 12 years ago Posts: 1 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) March 06, 2012 11:47PM | Registered: 13 years ago Posts: 18 |
Re: SNES9x GX - Aspect Ratio Incorrect (Screen Comparison) March 07, 2012 07:57AM | Registered: 15 years ago Posts: 7 |