Git Product home page Git Product logo

Comments (23)

inactive123 avatar inactive123 commented on May 27, 2024

Mednafen is using an ancient version of bsnes - it's possible to make a 'libretro' core for that but I fail to see the point to be honest. That doesn't mean I am discouraging anyone from trying to do this themselves - but I don't see much of a need.

As for the image quality differences here - I don't really see why you would want us to 'take inspiration' from Mednafen - just use Cg/HLSL and/or GLSL shaders already and you can make your games look as good as you want - software filtering is a deadend and we don't aim to cater to that anytime soon since user-defined shaders do the job better in every way imaginable.

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

I don't care if a software or hardware solution is the way to go. If you can fix it with a shader, that's fine. However, there are no shaders as far as I know that handle this any better in RetroArch. The issue is there pretty much regardless of what you do with shaders/filters. That's why I suggested to take a look at what mednafen is doing, since it's currently the only thing that handles this well.

from retroarch.

inactive123 avatar inactive123 commented on May 27, 2024

There's 'nothing' to fix technically - the SNES didn't have a post-processing bilinear filter either and it was your CRT TV that masked away the 'unpleasant' look of low-resolution screens. What you see is pretty much what you get in those screens you posted.

I don't see what you would want us to do - 'better' bilinear filtering? It's a hardware feature from OpenGL/D3D that gets applied - there's nothing to 'tweak' there. Better scaling? I don't see in what way the scaling would be faulty that we're using in RetroArch.

Better software CPU 'filters'? As I said before - filters are a deadend and we don't aim to cater to it.

Also - I find it hard to believe you can't find a shader somewhere in common-shaders repo that doesn't come close to replicating the 'look' you're getting above - try the bicubic shaders and/or Lanczos.

And even if you can't find a standalone shader - there's always multipass in case one shader isn't enough.

from retroarch.

inactive123 avatar inactive123 commented on May 27, 2024

I'll leave it up to maister whether or not he feels this is important enough to look at.

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

Low-resolution screens? With most cores in RetroArch, the image looks better in the SNES/SFC's lowres mode than it does in hires mode.

What I want is better handling of different resolutions. With every core except bsnes-accuracy, lowres images are smooth, while hires images are not. With bsnes-accuracy, everything is ugly. Just take a look at the examples I provided to see the difference. In mednafen everything is smooth and there is no way to immediately tell whether the game is using hires or not. I just tried the bicubic normal shader and I get the exact same issue:

bicubic lowres: http://i.imgur.com/V4EgI.png
bicubic hires: http://i.imgur.com/AdVPh.png

from retroarch.

hizzlekizzle avatar hizzlekizzle commented on May 27, 2024

Hi sparklewind,
I believe what you're describing is a result of bsnes switching from a default of 256 pixel horizontal resolution that switched to 512 when requested to a constant 512 no matter what. As TwinAphex mentioned, CRT displays used to handle this horizontal blending for us but modern LCD monitors running at much higher resolutions produce a sharper (sometimes unpleasantly so) picture.

There are a couple of shaders you can try that will force a 256 horizontal resolution, including this XML shader:
http://gitorious.org/bsnes/xml-shaders/blobs/master/shaders/OpenGL/v1.1/SimpleTVBlur.OpenGL.shader

And this cgp shader (put the cgp file into the Cg shader blank and make sure the two Cg shaders are in the same directory):
http://www.mediafire.com/download.php?d06gkpuk2s0p9gb

Let us know if this helps :)

EDIT: for further reading on why this is done, you can read through the thread on byuu's forum where he first announced the change:
http://board.byuu.org/viewtopic.php?p=13770

from retroarch.

Themaister avatar Themaister commented on May 27, 2024

Yes, the "correct" way to do SNES hi-res is to blend it back to 256px width. This can be done with the shaders hizzlekizzle linked.

It is not done in bSNES as this is normally done by the NTSC/TV system, and should be emulated as such. Accuracy core always outputs to 512px. Not sure why exactly, but it might be how the real hardware works.

I guess Mednafen just does this in software, but it's not acceptable to force a slowdown for something that can be trivially done on the GPU.

from retroarch.

hizzlekizzle avatar hizzlekizzle commented on May 27, 2024

Mednafen is still using a bsnes version that included the horizontal pixel blending (v059, apparently). byuu removed this in v063.10 for the accuracy core and v078 for the compatibility core and instead recommended people use the NTSC cpu filter(s) to handle the blending.

This is also an option for RetroArch, btw, since it supports the old bsnes filter libraries. You can download those for Win64 here:
http://www.mediafire.com/download.php?62p83g46s95v44r

and Win32 here:
http://www.mediafire.com/download.php?356uu02o7oxw0u1

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

Thanks, I just tested the two shaders you suggested.

SimpleTVBlur looks consistent, but has quite a rough look, similar to what I got before with bsnes-accuracy (using bilinear):

hires: http://i.imgur.com/5LvzQ.png
lowres: http://i.imgur.com/kSpWz.png

snes-hires-blend looks pretty good for the most part and looks consistent:

http://i.imgur.com/bCX6u.png
http://i.imgur.com/HTC49.png

The only problem with snes-hires-blend is that the hires text pretty much gets destroyed in the process of forcing everything down to a 256 horizontal resolution. You can compare it with the text in mednafen: http://i.imgur.com/lFvDT.png

from retroarch.

inactive123 avatar inactive123 commented on May 27, 2024

I'll see if I can get mednafen-psx-libretro set up so we can also make a mednafen bsnes libretro core in case people want this ancient version of bsnes for this reason.

Anyways, this turned out to be down to a quirk in how bsnes (a modded 0.59 version to be exact) handles pixel blending for high-res (by SNES standards) modes, and not really anything to do with RetroArch, so I think we can close this issue now unless anybody objects. If Mednafen didn't use an ancient stone-age version of bsnes, it would reproduce exactly the same 'issue'. (not really an 'issue', byuu considers it more 'accurate' not to have it in the current-day versions since the pixel blending doesn't really have anything to do with SNES emulation. That' what you get when you prefer 'accuracy' above anything else).

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

Themaister: The real console doesn't use any kind of filtering afaik so it's probably impossible for a user to say what it does with the image, but I saw a picture of someone's CRT running a game in hires mode on byuu's board and the text did not look squashed there. I don't remember exactly what thread it was, but byuu was asking about the behaviour in hires mode in a particular game, and someone posted a picture.

I don't know a lot of technical details, I just see that mednafen has a smooth and consistent image and that the filtering doesn't break or get affected in any way by a change of resolution.

hizzlekizzle: I tested two of the bsnes filters in the package and so far the issue still seems to be there.

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

twinaphex: If your solution will really fix the issue then you can close this. Just note that squashing the image down to 256 destroys the hires text and I don't think that's what mednafen does (since the text looks fine in mednafen). Also, while I think mednafen's SNES core is pretty good, it will most likely be way too slow for any consoles. Not wanting to sound too picky here, but a solution that could work on all platforms would be ideal.

from retroarch.

inactive123 avatar inactive123 commented on May 27, 2024

There is no solution that could work on all platforms - it has to do with byuu no longer wanting to cater towards doing any of this kind of 'pixel blending' filtering in modern bsnes versions. And we don't want to bog down the RetroArch core with doing any kind of postprocessing filters to do this stuff either.

For that record, there is no 'issue' here - the only 'issue' is due to byuu no longer supporting this in recent bsnes versions. I believe SNES9x Win32 does this kind of per-pixel blending in the background - perhaps that could be pushed upstream to mainline SNES9x if it's really desired, but it's not something I'd want in SNES9x Next as it would lead to lesser performance and I already am hurting for performance on several systems.

Also - no version of bsnes will ever run acceptably on current-day consoles, and certainly not any ARM-based system anytime soon either - and I doubt we'll ever see that day either since byuu likes to keep shifting the goalposts day by day (I saw byuu commenting on his forum how it might be possible to have bsnes run acceptable on ARM systems and it's just hilarious - a Cortex A8 1.2Ghz running ANdroid 4.0 ICS gets you the performance of a Gamecube more or less - so good luck with that when the PS3 and 360 are way faster than that - it would help if instead of going by word-of-mouth 'performance figures', he would actually test this stuff himself so he wouldn't make erroneous hardware performance statements on a daily basis).

This Mednafen libretro build of the ancient bsnes core would be strictly for the one or two people that want to have this niche feature.

from retroarch.

Themaister avatar Themaister commented on May 27, 2024

If the blending isn't a simple bilinear downscale, it should be simple to make a shader that does it right, then it'd be nice on everything.

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

I had no idea that SNES9x Win32 can handle this the same way, but it indeed seems to be the case, at least here on 1.53. While looking around at the video settings I saw that this is enabled by checking the "Blend Hi-Res images" option. So I guess what I would like to see in RetroArch is a "Blend Hi-Res images" option that works the same way as in SNES9x Win32. Shaders seem to break here as well though, but at least bilinear filtering works fine.

from retroarch.

inactive123 avatar inactive123 commented on May 27, 2024

Even if we're going to do that, 'RetroArch' would be the wrong place to insert a feature like that - it should be handled by the SNES9x core instead. For that matter, this entire issue up to now has been a non-RetroArch related issue, but out of kindness I suppose we haven't closed it yet like so many other devs would have done at this point.

It's either you using a shader that mimics the per-pixel blending or SNES9x mainline wanting to have this be a feature that could be used for targets other than Win32 - but implementing this in RetroArch is far too core-specific and a definite no-no since it's just a plain bad idea from any perspective. I told you already in post #2/#4 that something like that would not be considered.

Last thing you could try - try to request byuu to re-include it again (good luck on him granting usability/enhancement requests by mere end-users though).

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

Well, thank you for the kindness, but the main reason why I opened the issue here was that I didn't want to spam you with 5 identical issues (There are at least 5 SNES cores for RetroArch).

And I told you that I don't know a lot of technical details, and that I don't personally care if the solution is software or hardware-based. As long as it works as intended I'm happy. Anyway, if you have already decided on what to do/not do, then you can close this.

from retroarch.

Themaister avatar Themaister commented on May 27, 2024

RetroArch has possibilities for CPU filters (Blargg's NTSC does what you want), and shaders (but apparently a correct one has to be written), closing this.

from retroarch.

inactive123 avatar inactive123 commented on May 27, 2024

Reopened due to popular request.

from retroarch.

hizzlekizzle avatar hizzlekizzle commented on May 27, 2024

@sparklewind
You're in luck! OV2 whipped up a Cg shader that I think should get you fixed up. It should appear in the libretro/common-shaders repo but I'm not seeing it there yet, so here's an alternate link:
http://www.mediafire.com/?z8k5199b705v2bd

Would you mind testing this with some hires text?

EDIT: here's the correct repo link, for future reference:
https://github.com/Themaister/Emulator-Shader-Pack/blob/master/Cg/TV/snes-hires-blend.cg

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

Nice, thanks. I will test it immediately.

from retroarch.

sparklewind avatar sparklewind commented on May 27, 2024

Really awesome. It works exactly like I want it to. Thanks a lot OV2 for making it and hizzekizzle for informing me.

lowres: http://i.imgur.com/kPWWY.png
hires: http://i.imgur.com/7E0oS.png

Another hires picture from Seiken Densetsu 3 sample: http://i.imgur.com/xHenp.png

from retroarch.

hizzlekizzle avatar hizzlekizzle commented on May 27, 2024

Awesome :D

I'm glad to hear it worked.

from retroarch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.