Snes9x with xBRZ scaler support

This is for people involved in the developement of Snes9x, or SNES emulators in general.
BUG REPORTS BELONG IN TECH SUPPORT/BUG TRACKING!
Zenju
Snes9x White Belt
Posts: 16
Joined: Mon May 19, 2014 4:46 pm

Re: Snes9x with xBRZ scaler support

Post by Zenju »

boltzmann wrote:Zenju, thanks again for implementing this! You should do it for ScummVM as well :mrgreen:
Done :) https://sourceforge.net/projects/xbrz/files/ScummVM/
EternalFG
Snes9x White Belt
Posts: 3
Joined: Sun Jan 11, 2015 12:11 pm

Re: Snes9x with xBRZ scaler support

Post by EternalFG »

Zenju wrote:
boltzmann wrote:Zenju, thanks again for implementing this! You should do it for ScummVM as well :mrgreen:
Done :) https://sourceforge.net/projects/xbrz/files/ScummVM/
Thanks for your work Zenju. Could you update the snes9x build you have on your builds page with xBRZ 1.4?
GregHouse
Snes9x White Belt
Posts: 1
Joined: Wed Nov 25, 2015 10:08 pm

Re: Snes9x with xBRZ scaler support

Post by GregHouse »

Hello guys.

I downloaded the file "Snes9x_1.53 + xBRZ_1.2_Win32.zip".

The emulator only works if you are in a short path (for example, the root of the partition). It does not work in long paths. The Snes9x in the "normal" version works.

Is possible to make this version xBRZ work on long paths or create a shader xBRZ to use in the normal Snes9x?

Thank you.
Terelyn
Snes9x White Belt
Posts: 2
Joined: Tue Mar 01, 2016 11:54 pm

Re: Snes9x with xBRZ scaler support

Post by Terelyn »

Will xBRZ 1.4 be implemented in the 64bit build of Snes9x?
Terelyn
Snes9x White Belt
Posts: 2
Joined: Tue Mar 01, 2016 11:54 pm

Re: Snes9x with xBRZ scaler support

Post by Terelyn »

Khronikos
Snes9x White Belt
Posts: 11
Joined: Mon Apr 06, 2015 4:20 am

Re: Snes9x with xBRZ scaler support

Post by Khronikos »

Thanks for the new version!
pahakokki
Snes9x White Belt
Posts: 2
Joined: Wed Apr 20, 2016 2:16 pm

Re: Snes9x with xBRZ scaler support

Post by pahakokki »

I modified some of the values in the retroarch shader blinky.cg mainly to have a more normal color scheme. This genius shader narrows the outlines and adds details within pixels, making everything look as if it was drawin in HD. It even has a slight animation to it, making things less static. It looks especially jaw dropping in Zelda with high xBRZ setting. Only problem is the image is still too dark so I need help from someone who can code, or possibly a solution for running multiple shaders (hint for snes9x). Here is a picture of the problem/current status (left) and how it should look ideally (right). The right side has been manually adjusted just to show you the possibilities.

Image

Code: Select all

struct input
{
   float2 video_size;
   float2 texture_size;
   float2 output_size;
   float frame_count;
   float frame_direction;
   float frame_rotation;
};

struct vert_out
{
   float2 tex_direct;
   float2 tex_0;
   float2 tex_60;
   float2 tex_120;
   float2 tex_180;
   float2 tex_240;
   float2 tex_300;
};

void main_vertex
(
   float4 position : POSITION,
   out float4 oPosition : POSITION,
   uniform float4x4 modelViewProj,
   float2 tex : TEXCOORD0,
   uniform input IN,
   out vert_out verts: TEXCOORD1
)
{
   oPosition = mul(modelViewProj, position);
   float2 one = 1.1 / IN.texture_size;
   float angle = IN.frame_count = IN.frame_count / 60.0;
   float scale = 0.9 + 0.3 * sin(1.0 * angle);
   float2x2 rotate = scale * float2x2(
         cos(angle),   sin(angle),
         sin(angle),   cos(angle)
   );

   verts.tex_direct = tex;
   verts.tex_0 = tex + one * mul(rotate, float2(1.0, 0.0));
   verts.tex_60 = tex + one * mul(rotate, float2(0.5, 0.7));
   verts.tex_120 = tex + one * mul(rotate, float2(-0.5, 0.7));
   verts.tex_180 = tex + one * mul(rotate, float2(-1.0, 0.0));
   verts.tex_240 = tex + one * mul(rotate, float2(-0.5, -0.7));
   verts.tex_300 = tex + one * mul(rotate, float2(0.5, -0.7));
}

float4 main_fragment (in vert_out verts : TEXCOORD1, uniform sampler2D s0 : TEXUNIT0) : COLOR
{
   float4 tex_mid = tex2D(s0, verts.tex_direct);
   float4 tex0 = tex2D(s0, verts.tex_0);
   float4 tex60 = tex2D(s0, verts.tex_60);
   float4 tex120 = tex2D(s0, verts.tex_120);
   float4 tex180 = tex2D(s0, verts.tex_180);
   float4 tex240 = tex2D(s0, verts.tex_240);
   float4 tex300 = tex2D(s0, verts.tex_300);

   float4 minimum = min(min(min(tex0, tex60), min(tex120, tex180)), min(tex240, tex300));
   float4 maximum = max(max(max(tex0, tex60), max(tex120, tex180)), max(tex240, tex300));
   float4 diff = 1.0 - exp(-(maximum - minimum));
   return lerp(tex_mid, diff, 0.6);
}
Ragnar
Snes9x White Belt
Posts: 1
Joined: Tue Apr 26, 2016 3:55 pm

Re: Snes9x with xBRZ scaler support

Post by Ragnar »

Registered just to say thank you for this, and especially for including the link to the VC runtime. You'd think that I'd have them already what with every Steam install also including DirectX and VC++, but I guess not the 64bit version.

Thanks again.
Khronikos
Snes9x White Belt
Posts: 11
Joined: Mon Apr 06, 2015 4:20 am

Re: Snes9x with xBRZ scaler support

Post by Khronikos »

Yeah, thanks so much guys. Just doing some more A Link to the Past and it is amazing.
Khronikos
Snes9x White Belt
Posts: 11
Joined: Mon Apr 06, 2015 4:20 am

Re: Snes9x with xBRZ scaler support

Post by Khronikos »

For those that were not keeping up 1.54 of SNES9x was actually released with myriad improvements and native 6xBRZ.
Zenju
Snes9x White Belt
Posts: 16
Joined: Mon May 19, 2014 4:46 pm

Re: Snes9x with xBRZ scaler support

Post by Zenju »

Khronikos wrote:For those that were not keeping up 1.54 of SNES9x was actually released with myriad improvements and native 6xBRZ.
Wow, I missed this! :D

It seems Snes9x is lacking some way to subscribe to release updates, e.g. via an RSS feed.

PS: Would it be possible to use an application icon that looks "less ugly"? :) It's a small issue, but lot's of users having Snes9x in a quick-start bar would appreciate. E.g. just use this one:
http://www.iconarchive.com/show/gaming- ... -icon.html
or this
http://www.iconarchive.com/show/gaming- ... -icon.html
Khronikos
Snes9x White Belt
Posts: 11
Joined: Mon Apr 06, 2015 4:20 am

Re: Snes9x with xBRZ scaler support

Post by Khronikos »

Zenju, I am sure they might be open to something. Maybe post in the 1.54 thread. I know they did plan to update again at some point. Maybe they could get a different icon for the taskbar too.
Noel_RPG
Snes9x White Belt
Posts: 21
Joined: Sat Oct 15, 2016 9:36 pm

Re: Snes9x with xBRZ scaler support

Post by Noel_RPG »

well wasn't there gonna be an snes9x 1.55 release?
it was mentioned in Github in early May 2017 but hasn't come out yet.
Khronikos
Snes9x White Belt
Posts: 11
Joined: Mon Apr 06, 2015 4:20 am

Re: Snes9x with xBRZ scaler support

Post by Khronikos »

I switched over to Retroarch version and ported my saves.

I don't use xBRZ at all anymore. ScaleFX absolutely is the best thing I have seen among the new shaders. While xBRZ is good, ScaleFX is on another level. All the jagged edges are gone from basically everything. Absolutely amazing.
Post Reply