Closed GoogleCodeExporter closed 9 years ago
Turn bilinear filtering OFF in the Video Settings.
Original comment by ekeeke31@gmail.com
on 13 Jan 2010 at 8:02
Sorry. I forgot to mention that bilinear filter was already turned off. It was
my
mistake: I'm not really using the default options, since I turned off the
bilinear
filter. So, the problem still occurs even with the bilinear filter turned off.
Original comment by thiagoalvesdealmeida@gmail.com
on 13 Jan 2010 at 1:10
Then there is not much I can do, it's due to the default Video Hardware output
filtering when upscaling. It cannot be disable and is automatically applied
when the
rendered image width is narrower than video output width. And if I don't upscale
horizontally, the aspect ratio would be wrong.
Let me explain the difference :
When borders are turned OFF, the image width is 320 pixels and therefore can be
simply doubled to 640 pixels when rendering (no filtering is required when the
scaling ratio is x1, x2, etc) then the Wii Video Hardware take care of the
remaining
upscaling to take pixel aspect ratio differences in account (I mesured that 320
'genesis' pixels approx. match 654 'Wii' pixels). The upscaling from 640 to 654
pixels requires some pixel interpolation but is not really noticable.
When borders are ON, the image is wider (352 pixels) so I cannot upscale this
to 640
pixels during rendering without filtering it. Since the bilinear filter applied
during rendering is much more noticeable than the video output filtering, I use
the
later one, the result is that the 352 pixels wide image is upscaled to
approximately
720 pixels by the Wii video output. SInce the scaling ratio is much more
important
than before, the filtering is also much more noticeable.
Now, VC does not emulate the horizontal borders AND does not reproduce the exact
original aspect ratio, it simply doubles the horizontal resolution, which makes
the
screen a little bit narrower that it should be.
Personnaly, I didn't see much differences when running the emulator in original
mode
with borders against a real mega drive, on the same screen and the same
connection
type (RGB).
Original comment by ekeeke31@gmail.com
on 13 Jan 2010 at 2:02
Let me try to understand:
I know that Genesis games use 320x224 (or 256x224 with a few games), but with
the
added horizontal border produced by the hardware itself the final resolution
will be
320x240 (in order to match a NTSC standard). I'm sorry, but I still didn't
understood
why the horizontal resolution is different with borders turned on or off, since
it
will only affect the vertical resolution.
Anyway, I think the borders itself are not really important (mainly because
they will
always be hidden by SDTV overscan), but the resolution is.
So, is it a fact that Wii hardware is not capable of true 320x240? In that
case, VC
is using 640x240 upscaled in order to replicate 320x240?
Original comment by thiagoalvesdealmeida@gmail.com
on 13 Jan 2010 at 5:13
Because there are horizontal borders as well.
There is no such things as "true" 320x240 or not, you need to understand how
analog
video works first:
Vertical resolution is fixed by the number of visible lines: it's 243
(non-interlaced) for the Genesis (of which only 224 are 'active' i.e where you
can
display your stuff, the rest being vertical borders). The Wii can either output
240
(in non-interlaced mode) or 480 'active' lines (i.e lines you can control). I
use
this to reproduce colored borders.
Horizontal resolution is fixed by the hardware pixel clock and the line
duration: in
most genesis games, there are 420 dots per lines, of which 348 are visibles ,
and
only 320 'active' (the rest being horizontal borders). The Wii can output up to
720
active pixels (i.e pixels you can modify). Again, I used this to reproduce
colored
borders (horizontal).
Now, the pixel clock also determines the aspect of pixels on your TV screen:
since
line duration is fixed by Video standards , the less pixels you have per line
(i.e
the slower pixel clock you have), the more stretched they are displayed on TV
screen.
Since the Wii and Genesis hardware does not have the same pixel clock, I had to
adjust the horizontal width and scaling so it matches what I got on my TV with
a real
Genesis. After some experimentation, I found out that 352 native pixels
upscaled to
720 was the best match.
Original comment by ekeeke31@gmail.com
on 13 Jan 2010 at 5:45
Note that when I speak about "visible" pixels or lines, this is how it is
defined by
video standard: in reality, it depends on what your TV allows you to see. Most
generally, you don't or only partially see the borders because they are hidden
under
TV edges or your TV just don't display every lines.
Original comment by ekeeke31@gmail.com
on 13 Jan 2010 at 5:51
I didn't know there was borders on the horizontal resolution (never saw these).
OK. Wii use a higher pixel clock than Genesis (which means a slightly narrower
image), but I think the difference in horizontal size is minimal enough to not
worry
about or notice.
So, with all due respect, I don't think that trying to get a 100% aspect ratio
like a
real Genesis is the best approach, since matching the correct resolution will
have a
much bigger impact on the quality of the picture. IMO, trying to avoid any
interpolation, like VC, is better. Maybe you have a different opinion - and
that's
understandable. I only saying what my eyes tell me. Perhaps an option to
accommodate
both is the best way to go.
Original comment by thiagoalvesdealmeida@gmail.com
on 14 Jan 2010 at 1:58
Well, it's not only for the aspect ratio, it's the only way to get horizontal
borders
visible.
Since the internal buffer for rendering is limited to 640 pixels widely, if I
want to
render horizontal borders as well as active pixels (352 pixels in total), I
have no
other solution than using the video hardware scaling ability:
.if I simply double the width when rendering (i.e stretch to 704 pixels),
borders
will be outside the rendering window and not visible.
.if I stretch to 640 pixels during rendering then to 704 pixels using video
hardware
scaling, it will either be much more blurry (because of bilinear filtering
applied by
the rendering hardware) or produces scroll screen tearing (when bilinear
filtering is
disabled, because of the odd scaling ratio).
Now, if you set the aspect to FIT SCREEN, you can adjust the horizontal scaling
and
(maybe) get ride of video hardware filtering by reducing the default xscale
value
until you get an exact 2x scale ratio.
A solution might be to render the screen in 2 or 3 passes, first the active
window
(320 pixels) then the border regions, I don't know if it's feasible though.
Anyway, as i said, i dont think the difference in blurryness is so much visible
(compared to when bilinear filtering is ON for example) so it does not have high
priority, I leave this as an open issue though for further reference.
Original comment by ekeeke31@gmail.com
on 14 Jan 2010 at 7:51
Original comment by ekeeke31@gmail.com
on 14 Jan 2010 at 7:53
For now, you can also disable the borders and get the exact same result as VC.
Original comment by ekeeke31@gmail.com
on 14 Jan 2010 at 7:58
I tried the Win32 version of your emulator. Are you talking about these big
horizontal borders on the picture?
http://img109.imageshack.us/i/genesisplus.jpg/
It's hard for me to believe they really should be there, mainly because your
version
of genesis plus is the only emulator that adds horizontal borders (not even Kega
Fusion, more accurate than any other emulator, have borders on the horizontal
resolution).
As you said, when these borders are on the image is wider (352x240).
Consequently it
will mess with Genesis intended aspect ratio (4:3 = 1,3333) and need a heavier
filtering to be corrected. So, I think these horizontal borders are not needed
(and
why do you think they should be visible is beyond me).
Anyway, just disabling the borders will get you a picture without
interpolation. So,
it's a problem easy to avoid. Unfortunately I can't say the same about SMS, NES
and
SNES emulators.
Original comment by thiagoalvesdealmeida@gmail.com
on 15 Jan 2010 at 4:10
Believe me, they ARE here (a good example is Sonic 2 or Street Racer, on real
hardware off course): most emulators does not emulate this because it's
generally not
"very" visible on TV screen anyway and because there is no point in emulating
this on
a computer screen or in a window (genplus-sdl version is a just a way for me to
test
the emulation core more quickly, it's not meant to be nice to look at and
definitively does not output accurate aspect ratio )
Anyway, I emulate them for the sake of accuracy and because I like when the
emulator
output looks exactly like my old Mega Drive, running side by side on the TV
screen.
And no, it does not mess Genesis intended aspect ratio because 4:3 is NOT
intended to
be 320x240 (remember genesis pixels are NOT square), it's more something like
320x224
(see how your TV, which screen is indeed 4:3, fill the screen with 320x224
pixels
--60hz TV off course, PAL is a little different) with the exact 4:3 being
348x243 as
already explained above. So, in contrary, emulating borders and scaling this
way let
me output a more accurate aspect ratio.
Now, I agree with you that the differences might not be worth the filtering
downsides, that's why if you don't like this, you have the possibility to scale
the
screen exactly as you want or/and disable border emulation. You can perfectly
setup a
320x240 image with black borders like any other emulators do if you want.
I leave this issue as open because I think it is maybe possible to do this with
no
filtering at all, by rendering the screen in more than one pass. This is
however not
a big priority for the moment but could be interesting to try.
Original comment by ekeeke31@gmail.com
on 16 Jan 2010 at 12:11
Original comment by ekeeke31@gmail.com
on 25 May 2010 at 6:50
I added separated borders option so you can turn OFF horizontal borders (making
the screen output as raw as possible) while having vertical colored borders.
Original comment by ekeeke31@gmail.com
on 15 Jun 2010 at 6:54
Thanks. That's exactly what I had in mind in the first place. I think this
should be the default option (since it looks better), but that's up to you.
Original comment by thiagoalvesdealmeida@gmail.com
on 16 Jun 2010 at 10:18
Original comment by ekeeke31@gmail.com
on 25 Sep 2010 at 5:13
Original comment by ekeeke31@gmail.com
on 4 Dec 2010 at 5:26
Original comment by ekeeke31@gmail.com
on 4 Dec 2010 at 5:27
Initial idea (copying larger display to xfb in multiple passes) is impossible
because of hw limitation, disabling horizontal borders is the best option you
have
Original comment by ekeeke31@gmail.com
on 9 Mar 2011 at 6:46
Original issue reported on code.google.com by
thiagoalvesdealmeida@gmail.com
on 13 Jan 2010 at 3:20