Feature request: Vsync without 100% CPU usage (Windows)

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

Post Reply
Dwedit
Rookie
Posts: 12
Joined: Thu Apr 28, 2005 6:37 pm

Feature request: Vsync without 100% CPU usage (Windows)

Post by Dwedit »

Is it possible to have ZSNES able to wait for VSYNC without using 100% CPU usage?
I read something on codeproject that said that the WaitForVerticalBlank directx call is basically a spinlock idle loop, and for better performance, use a 2ms multimedia timer along with GetScanLine to wait for vblank.

Why would it matter? 100% CPU usage == hot laptop.
"We are merely sprites that dance at the beck and call of our button pressing overlord."
xamenus
Veteran
Posts: 907
Joined: Fri Jul 30, 2004 12:26 am

Post by xamenus »

It's interesting that you brought this up, as I have wondered about this for a long time as well. With Nestopia, I'm able to use filters, zero frameskip, vsync etc. without taking up 100% CPU, even though it is supposed to be a slower emulator than ZSNES.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

It's not really the speed of the emulator, but what it does with the remaining time not used for emulation.

For example, "1964" uses about half the CPU time on my laptop, so the fan stays at its speed. With "Project64" the CPU load is always 100%, so the fan goes wild.

I've noticed that SNES9x doesn't use all of its time, too.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Post Reply