JinxDojo / snes9x-gx

Automatically exported from code.google.com/p/snes9x-gx
0 stars 0 forks source link

Strange resolution problem #584

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Play a game which scrolls a large screen at a steady speed matching the 
frame rate, such as Final Fantasy 2 US.  This should be in unfiltered mode.  
Try to scroll vertically (this is not a problem with horizontal scrolling).

What is the expected output? What do you see instead?

Expected result: smooth scrolling.  What I see: scrolling with a shimmering 
horizontal line.  You might need an HDTV to see this but it's distracting.

Does this issue occur on SNES9x for Windows 1.52? If so, please report the
issue on the Snes9x forum.

No.

What version are you using? On GameCube or Wii?

Wii

Are you using the official build (from the downloads page or auto-update)?

Yes, 4.2.4

Please provide any additional information below.

The cause of this is obvious.  If the vertical resolution of the Wii is not 
exactly a multiple of the vertical resolution of the SNES, then a pixel on the 
SNES is mapped into varying numbers of pixels on the Wii.  In some positions it 
is mapped into 2 pixels and in other positions it is mapped into 3 pixels.  
(The numbers 2 and 3 are just an example since I haven't counted pixels.)

When you scroll the screen, it looks like it has a shimmering line at the point 
where the pixels change size from 2 to 3 and back.

The vertical resolution that Snes9xgx is using on the Wii seems *very* close to 
an exact multiple of the SNES resolution, but there is something slightly wrong 
about how it's doing it.  I can try changing the zoom to fix it, in which case 
I find that a value of zoom that should completely fix the problem would be 
between 98% and 99% (but I can't input non-integer zoom values so this doesn't 
help).

Original issue reported on code.google.com by arrom...@mar09.rahul.net on 30 Aug 2010 at 4:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
SNES vertical resolution = 224p
Wii vertical resolution (progressive) = 480p

480 is not an exact multiple of 224. If you want to exactly double the SNES 
resolution you will get 448; that will give you a 1:2 pixel correspondence, 
however, it will leave black borders both above and below the image sacrificing 
the full screen.

Also, a correspondence of 448:480 is of ~93.333% which it not a rational number 
so it can not be archieved through zooming the image.

These limitations are known by developers, that is why they create filters, 
hence the reason you only notice this is in unfiltered mode. Using unfiltered 
mode leaves all these limitations visible.

I don't believe there is not much that can be done, besides using a filter. I 
understand that current GX filter makes the image a little blurry, and hq2x 
experimental filters look great but make the games slow, so maybe when/if hq2x 
filters ever get improved you will finally be able to get crisp images without 
noticing these artifacts.

As a side note... the SNES games were designed to be played on CRT TV's. If you 
do so using original mode, none of these glitches occur. The challenge is how 
to make games designed for old CRT TV's look perfect in modern HD TV's.

Original comment by axe...@gmail.com on 30 Aug 2010 at 3:08

GoogleCodeExporter commented 9 years ago
I was under the impression that the Wii can render at several resolutions 
including 640x448 (which then gets scaled to 640x480), but I suppose you'd know.

At any rate, 98% and 99% look to me like they are very close to perfect 
scrolling.
if I zoom to 98% and pay careful attention to the pixel size, I see that in 
some places a SNES pixel is mapped into fewer Wii pixels than usual.  If I zoom 
to 99%, I see that at some places a SNES pixel is mapped to more Wii pixels 
than usual.  (100% functions like 99%, but the extra pixel happens in more 
places.)  This suggests to me that the best value is between 98 and 99.  I 
understand that the math shows that I would need to have 93.333%, but that 
doesn't match what I'm seeing.

Perhaps I chose a SNES game that renders at 256x239 instead of 256x224, and it 
tries to scale the 239 to 480 instead of to 478?  (The math doesn't quite work 
out there either, though.)

Original comment by arrom...@mar09.rahul.net on 30 Aug 2010 at 7:29

GoogleCodeExporter commented 9 years ago
I've already fussed around with this enough, I'm not doing any more.

Original comment by dborth@gmail.com on 30 Aug 2010 at 7:36

GoogleCodeExporter commented 9 years ago
I hate to add another comment on a closed issue, but...  I just tested older 
versions.  It seems to be a newly introduced issue--this problem did *not* 
exist in versions up to and including 4.1.9.  It first appeared in version 
4.2.0.

In fact, not only does 4.1.9 not have the problem, but I can artificially 
create the problem on 4.1.9 by manually setting the vertical zoom to 99%.

Could you please look into this?

Original comment by arrom...@mar09.rahul.net on 30 Aug 2010 at 11:25

GoogleCodeExporter commented 9 years ago
you're seeing the SNES height (224) projected onto a height of 228. So 224/228 
= 0.9824.

I've made some changes for the next release that will fix this for you.

Original comment by dborth@gmail.com on 31 Aug 2010 at 6:20

GoogleCodeExporter commented 9 years ago
Thanks!

Original comment by arrom...@mar09.rahul.net on 31 Aug 2010 at 6:31