simple question about Hi Res Output Image Processing

If you're having problems with Snes9x, or think you've found a bug, this is the place to be.
Post Reply
mrnglow
Snes9x White Belt
Posts: 7
Joined: Sat Apr 13, 2013 11:37 am

simple question about Hi Res Output Image Processing

Post by mrnglow »

Hi. I'm new comer.

First I need to make apologize for my bad English since I don't live in the English-speaking world and lack of my knowledge. Please excuse me with mercy.

I use
OS Microsoft Windows7 64bit
CPU Intel i5-2500 3.30GHz(I love SandyBridge :))
GPU NIVIDA GTX560ti GDDR5 1G
RAM 8GB
Snes9X v1.53 64bit.

I think my system is pretty decent.:)

Well.. Here's problem. Some Hi Res Output Image Processing makes Snes9X extremely slow.

with OpenGL

Blargg's NTSC [Composite] 28-30fps
Blargg's NTSC [S-Video] 28-30fps
Blargg's NTSC [RGB] 28-30fps
hq4x 28-30fps

with Direct3D

hq4x 50-60fps(not stable, also make sound crackling)

I'm not just want answer like that 'OK, if you want to use Blargg's NTSC? Direct3D seems to be fast. Use it' or 'There's a hq4x cg shader. you can use that'

I want to know WHY. The reasons and principles. That is what I want to know.

Why do those settings make my system that intensive?(I mean, I think it is not that heavy work)
What hardware should be upgraded to get better performance?(=Which hardware is related to this problem. CPU or GPU)
Why is OpenGL that slower than Direct3D?
Am I the only one have this problem?
Might this happen like because NVIDIA GPU supports OpenGL badly?
Just because Snes9X v1.53 doesn't support OpenGL perfect?(like OpenGL support is just experimental yet..)
What is the reason?

I'm very curios about this.
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: simple question about Hi Res Output Image Processing

Post by OV2 »

The OpenGL slowdown is a bug in 1.53. You can use the most recent testbuild from here: http://www.s9x-w32.de/dl/testbuilds/, or you can set OpenGL:DisablePBOs to TRUE in snes9x.conf

HQ4X is a very cpu intensive algorithm, but it should not be a problem on your system. Which games do you have problems with?
mrnglow
Snes9x White Belt
Posts: 7
Joined: Sat Apr 13, 2013 11:37 am

Re: simple question about Hi Res Output Image Processing

Post by mrnglow »

Well, most of SNES game that has Hi-Res image. I think Seiken Densetsu 3 is the most of them.
Anyway, if hq4x is a very CPU intensive algorithm, it means CPU performance is the one that is related. Then more powerful CPU,(not GPU)can solve this. Am I right?
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: simple question about Hi Res Output Image Processing

Post by OV2 »

Yes, all of the image filters run on the cpu.
mrnglow
Snes9x White Belt
Posts: 7
Joined: Sat Apr 13, 2013 11:37 am

Re: simple question about Hi Res Output Image Processing

Post by mrnglow »

Can you explain me why this bug happen and the meaning of OpenGL:DisablePBOs?(why set this to true solve this problem)
Just simply, like just basic concept.
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: simple question about Hi Res Output Image Processing

Post by OV2 »

S9x uses a PBO (pixel buffer object, basically memory on the GPU) to generate the graphics filter output directly on the graphics card. That PBO was marked as write only in 1.53. However some of the filters also need to read the image data again in a second step, this caused the slowdown. In the testbuild the memory is marked as read/write.
If you set OpenGL:DisablePBOs no PBO is used. This results in an extra step that copies the finished image to the gfx card.
mrnglow
Snes9x White Belt
Posts: 7
Joined: Sat Apr 13, 2013 11:37 am

Re: simple question about Hi Res Output Image Processing

Post by mrnglow »

Hmm.. acutally I tried all of the solution that you suggest me, nothing is effective.

Three testbuilds are slowdown too,(OpenGL+Blargg's NTSC Seiken Densetsu 3) and set OpenGL:DisablePBOs = TRUE is also not working.(I copied it in snes9x.conf under the [Display\win])
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: simple question about Hi Res Output Image Processing

Post by OV2 »

That's... strange. Can you post your snes9x.conf somewhere (pastebin)?
mrnglow
Snes9x White Belt
Posts: 7
Joined: Sat Apr 13, 2013 11:37 am

Re: simple question about Hi Res Output Image Processing

Post by mrnglow »

OK, well, please correct my step. I'm really very new this kind of stuff.

1.I open snes9x.conf with notepad(maybe it should wordpad?)
2.I write 'OpenGL:DisablePBOs = TRUE' literally under [Display\win] as just I said,(also I tried OpenGL:DisablePBO = TRUE)
3.save notepad.
4.reopen with notepad
5.It is gone. there no OpenGL:DisablePBOs = TRUE that I wrote it. It wasn't saved.

PS : Just a funny episode.

When I tried to join this forum, as you probably know, there's a question that 'What is Snes9X?'

my answers were

'Snes9X is a SNES emulator'
'It is a SNES emulator'
'Snes9X ia a emulator for SNES'
'Snes9X is a emulator that can play SNES games'
'Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES) emulator.'

As you know, naturally, all the answers were valid.:)
..When I figure the answer at last... my heart was... just...T.T
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: simple question about Hi Res Output Image Processing

Post by OV2 »

Sorry about that - the option is only available in the testbuilds. There should already be a line OpenGL:DisablePBOs in the .conf file.
mrnglow
Snes9x White Belt
Posts: 7
Joined: Sat Apr 13, 2013 11:37 am

Re: simple question about Hi Res Output Image Processing

Post by mrnglow »

Aha. The answer was testbuilds 'or' OpenGL:DisablePBOs and I thought OpenGL:DisablePBOs is a solution for stable build.

If I understand this bug properly, I guess this bug happen since the Blargg's NTSC filter is a multipass filter. Am I right? Well, it doesn't really matter.

Anyway, now I can get 60fps when I use Blargg's NTSC filter with OpenGL. I really appreciate for your supporting.

However, hq4x is not still stable 60fps in both OpenGL and Direct3D. Might be just my system performance is not good enough.
I hope my next system(I hope it will be Haswell or Broadwell.) get better performance.


Hmm.. Well, this is not just another question, actually is a another topic. I know that Blargg writes SNES sound emulation(SPC-700 APU and DSP) as well as his NTSC filters.
I've heard that it is super-accurate. Is Blargg's sound emulation LLE?, and if it is, is that the reason it is super-accurate?
Post Reply