ZSNESW (Windows) fullscreen vertical refresh rate bug

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

c0d3h4x0r
Rookie
Posts: 16
Joined: Mon Dec 29, 2008 9:26 am
Location: Sammamish, WA, USA

Post by c0d3h4x0r »

Squall_Leonhart wrote:btw, i never said it automatically switches to 60Hz, learn to read.
Actually, that's EXACTLY what you said:
Squall_Leonhart wrote:When the menu is open it runs at 85FPS, when a Game is open it dials back to 60 or 50Fps respective of the rom region
c0d3h4x0r
Rookie
Posts: 16
Joined: Mon Dec 29, 2008 9:26 am
Location: Sammamish, WA, USA

Post by c0d3h4x0r »

Squall_Leonhart wrote:Stuttering can be caused elsewhere..... for example if the internal FPS(snes gfx core) doesn't match the External(video output) and the emulator has to use Frame skipping
Um, that's exactly what I've been saying the problem is. ZSNES does NOT automatically switch to 60Hz fullscreen when playing an NTSC ROM. It just uses whatever the monitor refresh rate was set to for your Windows desktop. Odds are that's a slightly higher refresh rate than 60 Hz, such as 70Hz, 75Hz, or 85Hz. The mismatch between the game's 30fps and the display's refresh rate means it's impossible for ZSNES to deliver a smooth frame rate, because some subset of frames must be skipped.

This is why ZSNES should automatically switch the display to 60Hz when an NTSC ROM is loaded. I shouldn't have to know about and understand all this vertical refresh rate and framerate stuff and launch ZSNES with a specific command line switch just to play a game in fullscreen smoothly. The default case should be that it switches to 60Hz for NTSC ROMs, and then if some power user wants to override that for some reason, they can using the command-line parameter.
Squall_Leonhart
Trooper
Posts: 369
Joined: Tue Jun 10, 2008 6:19 am
Location: Australia
Contact:

Post by Squall_Leonhart »

c0d3h4x0r wrote:
Squall_Leonhart wrote:btw, i never said it automatically switches to 60Hz, learn to read.
Actually, that's EXACTLY what you said:
Squall_Leonhart wrote:When the menu is open it runs at 85FPS, when a Game is open it dials back to 60 or 50Fps respective of the rom region

LEARN TO READ here, i bolded the difference for you.

...People, we are dealin with a moron here.

Nothing to see here, move along, Taking screenshots for /B/ lolz is permitted.
[img]http://img.photobucket.com/albums/v253/squall_leonhart69r/Final_Fantasy_8/squall_sig1.gif[/img]
[url=http://vba-m.com/]VBA-M Forum[/url], [url=http://www.ngohq.com]NGOHQ[/url]
c0d3h4x0r
Rookie
Posts: 16
Joined: Mon Dec 29, 2008 9:26 am
Location: Sammamish, WA, USA

Post by c0d3h4x0r »

Squall_Leonhart wrote:
c0d3h4x0r wrote:
Squall_Leonhart wrote:btw, i never said it automatically switches to 60Hz, learn to read.
Actually, that's EXACTLY what you said:
Squall_Leonhart wrote:When the menu is open it runs at 85FPS, when a Game is open it dials back to 60 or 50Fps respective of the rom region

LEARN TO READ here, i bolded the difference for you.

...People, we are dealin with a moron here.

Nothing to see here, move along, Taking screenshots for /B/ lolz is permitted.
Hz and Fps mean the same thing. You're being very immature.
Squall_Leonhart
Trooper
Posts: 369
Joined: Tue Jun 10, 2008 6:19 am
Location: Australia
Contact:

Post by Squall_Leonhart »

ROTFLMAO!!!!!!!!!!!!!!!!!!

Someone ban please!!! this guy is lowing the IQ of the internet.
[img]http://img.photobucket.com/albums/v253/squall_leonhart69r/Final_Fantasy_8/squall_sig1.gif[/img]
[url=http://vba-m.com/]VBA-M Forum[/url], [url=http://www.ngohq.com]NGOHQ[/url]
c0d3h4x0r
Rookie
Posts: 16
Joined: Mon Dec 29, 2008 9:26 am
Location: Sammamish, WA, USA

Post by c0d3h4x0r »

Squall_Leonhart wrote:this guy is lowing the IQ of the internet.
Do I really even need to say anything more?
Squall_Leonhart
Trooper
Posts: 369
Joined: Tue Jun 10, 2008 6:19 am
Location: Australia
Contact:

Post by Squall_Leonhart »

Refresh rate = How many times the screen updates on a vertical and horizontal basis every second, the common reference is to Vertical Hz, ranging from 60 - upwards of 240hz.

FPS - How many Frames are drawn by the video card and displayed on screen.

If FPS > Hz then tearing may occur. FPS = Hz or FPS < Hz is better.
If FPS < Hz and Vsync is enabled FPS may be halved. TripleBuffering prepares a third frame in local memory to increase the Frame generation and prevent this slowdown.

FPS = / = Hz
[img]http://img.photobucket.com/albums/v253/squall_leonhart69r/Final_Fantasy_8/squall_sig1.gif[/img]
[url=http://vba-m.com/]VBA-M Forum[/url], [url=http://www.ngohq.com]NGOHQ[/url]
odditude
Official tech support dood
Posts: 2122
Joined: Wed Jan 25, 2006 7:57 am

Post by odditude »

jesus christ, you two are acting like preschoolers. do i need to turn this car around and go home?

squall, reread your last few posts - you're becoming the pot calling the kettle black. also, if your refresh rate isn't an integral multiple of your frame rate, there will be duplicated frames - you're just not noticing it for whatever reason, be it your eyes or monitor's response.

c0d3h4x0r, yes, it would be nice if the option was in the gui, but it's not. deal with it until the next version comes out; i have a feeling nach/grin/dl2 wouldn't object to it being on the plate for a gui addition.
Why yes, my shift key *IS* broken.
c0d3h4x0r
Rookie
Posts: 16
Joined: Mon Dec 29, 2008 9:26 am
Location: Sammamish, WA, USA

Post by c0d3h4x0r »

odditude wrote:c0d3h4x0r, yes, it would be nice if the option was in the gui, but it's not. deal with it until the next version comes out; i have a feeling nach/grin/dl2 wouldn't object to it being on the plate for a gui addition.
Thank you. It would have saved a lot of hassle if the first reply to my original post had simply said as much.
Squall_Leonhart
Trooper
Posts: 369
Joined: Tue Jun 10, 2008 6:19 am
Location: Australia
Contact:

Post by Squall_Leonhart »

odditude wrote:jesus christ, you two are acting like preschoolers. do i need to turn this car around and go home?

squall, reread your last few posts - you're becoming the pot calling the kettle black. also, if your refresh rate isn't an integral multiple of your frame rate, there will be duplicated frames - you're just not noticing it for whatever reason, be it your eyes or monitor's response.

c0d3h4x0r, yes, it would be nice if the option was in the gui, but it's not. deal with it until the next version comes out
read the entire thread, and stfu.

As for Duplicated frames, who cares as long as the gameplay is smooth, i don't see them, so i don't care about them.
i have a feeling nach/grin/dl2 wouldn't object to it being on the plate for a gui addition.
Stop feeling, you'll turn the devs gay or something.

btw, your duplicate frames thing is only valid under certain conditions, and probably doesn't even occur for most using Zsnes.
Triple buffering attempts to provide a speed improvement over double buffering. In real life applications, this often involves trying to abstract the graphics drawing operations from being synchronized with the monitor's refresh rate. Typically this involves frames being drawn at a rate lower than or higher than the monitor's frame rate (a variable frame rate) without the usual effects this would cause (namely flickering, shearing and tearing).

Due to the software algorithm not having to poll the graphics hardware for monitor refresh events, the algorithm is free to run as fast as possible. This is not the only method of triple buffering available, but is the most prevalent on the PC architecture where the speed of the target machine is highly variable.

Another method of triple buffering involves synchronizing with the monitor frame rate, and simply using the third buffer as a method of providing breathing room for changing demands in the amount of graphics drawn. This is the use of a buffer in the true sense whereby the buffer acts as a reservoir. Such a method requires a higher minimum specification of the target hardware but provides a consistent (vs. variable) frame rate. This is the case when using triple buffering in DirectX, where a chain of 3 buffers are rendered and always displayed.
[img]http://img.photobucket.com/albums/v253/squall_leonhart69r/Final_Fantasy_8/squall_sig1.gif[/img]
[url=http://vba-m.com/]VBA-M Forum[/url], [url=http://www.ngohq.com]NGOHQ[/url]
WolfWings
Hazed
Posts: 52
Joined: Wed Nov 02, 2005 1:31 pm

Post by WolfWings »

creaothceann wrote:LCDs/TFTs will have a hard time with PAL games, unless they can go down to 50 Hz.
Actually, it's worse/better than that. A lot of bleeding-edge high-res laptops (including mine, 1920x1200 ThinkPad T61p) actually have the EDID on the LCD screen report back as low as a 40 Hz native video mode. A lot of digitally-driven LCD screens no longer have any limitations at all on vertical refresh rate as long as:
  • The pixel-clock stays at the DVI limit of 330Mhz or lower.
  • The horizontal sync pulses stay at least 0.2 picoseconds long.
  • The vertical sync pulses stay at least 50 pico seconds long.
They start to suffer from bad blurring at higher refresh rates, but going ultra-low? No longer an issue.
[img]http://wolfwings.us/sigs/WolfWings.jpg[/img]
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

And just because no one has clarified this yet: tearing occurs when a new frame is presented while the monitor is drawing and the new frame is visibly different from the old one in the region that the electron beam (or the equivalent electronics in the case of LCD) is scanning. This can happen at any frame rate, but if multiple frames are presented during each scan it'll obviously be a lot more visible.

Next, VSync is an annoying problem because while monitors are supposedly capable (according to MSDN documentation) of sending a VBlank IRQ, for some reason these are not handled in any meaningful way and generally the only way to find out when a VBlank occurs is to use polling. On a single core system this means using 100% CPU and potentially spending valuable time waiting around. Using sleep or wait functions is somewhat problematic as user mode timing resolution is usually 10ms. You can lower this to 1ms (at least on Windows - probably on other OSes) although you still have to be careful - VBlank only takes maybe 0.5ms so it's easy to miss.
h4tred

Post by h4tred »

the same laptop when dual-booted into a Windows 7 build
Why the fuck are you using a non public and leaked Windows build? There goes your testing validity out the window when people can't reproduce your issue. :?

Also, post your qualifications as to whether your a "c0d3h4x0r".
Seriously, if you don't have experience in x86 assembly language or another assembly language WITH experience in RCE, you really shouldn't be labeling yourself as such. So, if you don't mind, post qualifications, or fuck off and die, since you would be a disgrace to all those who do RCE on a active basis. Thank you.

--your resident arrogant troll.
Squall_Leonhart
Trooper
Posts: 369
Joined: Tue Jun 10, 2008 6:19 am
Location: Australia
Contact:

Post by Squall_Leonhart »

living up to your namesake eh h4tred?
[img]http://img.photobucket.com/albums/v253/squall_leonhart69r/Final_Fantasy_8/squall_sig1.gif[/img]
[url=http://vba-m.com/]VBA-M Forum[/url], [url=http://www.ngohq.com]NGOHQ[/url]
Squall_Leonhart
Trooper
Posts: 369
Joined: Tue Jun 10, 2008 6:19 am
Location: Australia
Contact:

Post by Squall_Leonhart »

Verdauga Greeneyes wrote:And just because no one has clarified this yet: tearing occurs when a new frame is presented while the monitor is drawing and the new frame is visibly different from the old one in the region that the electron beam (or the equivalent electronics in the case of LCD) is scanning. This can happen at any frame rate, but if multiple frames are presented during each scan it'll obviously be a lot more visible.

Next, VSync is an annoying problem because while monitors are supposedly capable (according to MSDN documentation) of sending a VBlank IRQ, for some reason these are not handled in any meaningful way and generally the only way to find out when a VBlank occurs is to use polling. On a single core system this means using 100% CPU and potentially spending valuable time waiting around. Using sleep or wait functions is somewhat problematic as user mode timing resolution is usually 10ms. You can lower this to 1ms (at least on Windows - probably on other OSes) although you still have to be careful - VBlank only takes maybe 0.5ms so it's easy to miss.
And that just reminded me of a known bug that occurs on Windows Vista, so probably occurs on 7 as well.

VBlanking appears to have an on/off bug where it works sometimes, but not others, and you can google that as confirmation if you want, but its an issue that SP1 was meant to fix, but didn't.
[img]http://img.photobucket.com/albums/v253/squall_leonhart69r/Final_Fantasy_8/squall_sig1.gif[/img]
[url=http://vba-m.com/]VBA-M Forum[/url], [url=http://www.ngohq.com]NGOHQ[/url]
snkcube
Hero of Time
Posts: 2646
Joined: Fri Jul 30, 2004 2:49 am
Location: In front of the monitor
Contact:

Post by snkcube »

Maybe SP2 will fix the problem?
Try out CCleaner and other free software at Piriform
Image
c0d3h4x0r
Rookie
Posts: 16
Joined: Mon Dec 29, 2008 9:26 am
Location: Sammamish, WA, USA

Post by c0d3h4x0r »

h4tred wrote:
the same laptop when dual-booted into a Windows 7 build
Why the fuck are you using a non public and leaked Windows build?
It's not leaked. I'm a Microsoft developer on the Win7 team, so I have access to daily development builds.
Squall_Leonhart
Trooper
Posts: 369
Joined: Tue Jun 10, 2008 6:19 am
Location: Australia
Contact:

Post by Squall_Leonhart »

Microsoft developers don't come out and say they are microsoft developers on public forums.

They are smart enough to know that they'd get their arses flamed.

Anyway, just tested zsnes on Vista vs XP, and the vblanking issue does indeed happen.

did the same with snes9x and was confirmed on DDraw, however d3d worked.
[img]http://img.photobucket.com/albums/v253/squall_leonhart69r/Final_Fantasy_8/squall_sig1.gif[/img]
[url=http://vba-m.com/]VBA-M Forum[/url], [url=http://www.ngohq.com]NGOHQ[/url]
Post Reply