Zsnes uses 50 % of CPU for nothing

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

Player1
Hazed
Posts: 74
Joined: Sun Oct 03, 2004 10:03 pm
Contact:

Zsnes uses 50 % of CPU for nothing

Post by Player1 »

My problem is, if i start Snes9x and minimize it to task bar it uses 50 % of my CPU, but no game is loadet and I don't know what Zsnes does. Even if I play a game it needs less CPU as to just minimize Zsnes. Is this problem known? (I use the latest Zsnes version of course, havn't tested other versions)

My system specs:
Intel P 4 3,4 Ghz
1024 Mb DDR2 Ram
ATI 9800 XT (I think)
250 GB HDD
Windows XP with all Service Packs and updates

Can anyone confirm this or is it just me?
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Which version exactly?

What does Snes9x have to do with us?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

... You think that when you minimize a program to the taskbar it doesn't use any CPU to do its stuff ?

Nice little metaphor: You're in front of your best friend. You turn around. Do you think your friend stopped breathing just because you can't SEE him breathing ?

Ok, the nice is over now. HAND.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
kaiser
New Member
Posts: 4
Joined: Tue Feb 01, 2005 10:50 pm

Post by kaiser »

He want to fuse SNES9x with ZSNES!
Player1
Hazed
Posts: 74
Joined: Sun Oct 03, 2004 10:03 pm
Contact:

Post by Player1 »

Sorry, my bad, I meant Zsnes of course, I use the last version that you can download from Zsnes.com, is there a newer one out?
snkcube
Hero of Time
Posts: 2646
Joined: Fri Jul 30, 2004 2:49 am
Location: In front of the monitor
Contact:

Post by snkcube »

Try using the WIP version (Work in progress)
Try out CCleaner and other free software at Piriform
Image
Player1
Hazed
Posts: 74
Joined: Sun Oct 03, 2004 10:03 pm
Contact:

Post by Player1 »

I thought since the new version is out, there are no more WIP releases? I will try as soon as I'm at home.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

You seem to think a lot of things.







Which happen to be wrong.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
michael flatley
Rookie
Posts: 42
Joined: Wed Aug 18, 2004 10:15 pm

Post by michael flatley »

grinvader wrote:... You think that when you minimize a program to the taskbar it doesn't use any CPU to do its stuff ?

Nice little metaphor: You're in front of your best friend. You turn around. Do you think your friend stopped breathing just because you can't SEE him breathing ?

Ok, the nice is over now. HAND.
Well, it is extremely easy to have a program run with almost no CPU usage while in the task bar. Did you not know this? Your metaphor has nothing to add because people do not at all correlate with program priorities. If a program is in the taskbar it should never require more than 2% of a CPU like his. That is, of course, if the program is doing nothing while minimized (which is the case with ZSNES). If you need to be schooled on something as basic as this maybe you shouldn't be so rude and condescending.
Gil_Hamilton
Buzzkill Gil
Posts: 4294
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

michael flatley wrote:
grinvader wrote:... You think that when you minimize a program to the taskbar it doesn't use any CPU to do its stuff ?

Nice little metaphor: You're in front of your best friend. You turn around. Do you think your friend stopped breathing just because you can't SEE him breathing ?

Ok, the nice is over now. HAND.
Well, it is extremely easy to have a program run with almost no CPU usage while in the task bar. Did you not know this? Your metaphor has nothing to add because people do not at all correlate with program priorities. If a program is in the taskbar it should never require more than 2% of a CPU like his. That is, of course, if the program is doing nothing while minimized (which is the case with ZSNES). If you need to be schooled on something as basic as this maybe you shouldn't be so rude and condescending.
ZSNES doesn't always idle while minimized.
Player1
Hazed
Posts: 74
Joined: Sun Oct 03, 2004 10:03 pm
Contact:

Post by Player1 »

grinvader wrote:You seem to think a lot of things.







Which happen to be wrong.
Yes, thats true, but its just trie and error. I hope everything you think is true.
michael flatley
Rookie
Posts: 42
Joined: Wed Aug 18, 2004 10:15 pm

Post by michael flatley »

ZSNES doesn't always idle while minimized.
That's the point, it should. Also, even if it does have to do some work while minimized 50% CPU usage is crazy. Please don't argue. A program capable of running on systems that can't even handle windows shouldn't be using 50% of a 3.4GHz Pentium while minimized. This is not a major issue but the fix is so easy.
Murdock
Rookie
Posts: 40
Joined: Mon Sep 13, 2004 4:22 am
Location: Midwest

Post by Murdock »

michael flatley wrote:Your metaphor has nothing to add because people do not at all correlate with program priorities.
http://dictionary.reference.com/search?q=metaphor wrote: n : a figure of speech in which an expression is used to refer to something that it does not literally denote in order to suggest a similarity
I didn't think it was a bad comparison. Bad metaphor? Yeah, but that just might be me.
[quote="Clements"]People who [i]dye[/i] their hair blonde are usually the dumb ones, since they often care more about their outward appearance than their personality or intellect.[/quote]
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I'm going to hazard a guess..

This may just have something to do with hyperthreading on P4s..

It doesn't occur on my Athlon64..

The P4 "thinks" its busy perhaps because one of the "cpus" will become idle... the "other" doesn't.

I don't think it has anything to do with ZSNES exactly.. but it's not doing any work.
Player1
Hazed
Posts: 74
Joined: Sun Oct 03, 2004 10:03 pm
Contact:

Post by Player1 »

I've downloadet the new VIP and it works again. Thanks Guys
Magus`
Cap'n Gin | Admin
Posts: 194
Joined: Tue Jul 27, 2004 10:59 pm
Location: Missouri

Post by Magus` »

This thread makes my kidneys hurt.
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

michael flatley wrote:crocks of shit
Don't you *ever* shut up?
Starman Ghost
Trooper
Posts: 535
Joined: Wed Jul 28, 2004 3:26 am

Post by Starman Ghost »

Flatley, before you go saying how easy it is to fix this bug, show us some programs you have coded that are bug free.

Edit: Or better yet, submit a code fix for this bug.
[code]<Guo_Si> Hey, you know what sucks?
<TheXPhial> vaccuums
<Guo_Si> Hey, you know what sucks in a metaphorical sense?
<TheXPhial> black holes
<Guo_Si> Hey, you know what just isn't cool?
<TheXPhial> lava?[/code]
Nightcrawler
Romhacking God
Posts: 922
Joined: Wed Jul 28, 2004 11:27 pm
Contact:

Post by Nightcrawler »

I was waiting for someone to say that.

I agree. Why the hell didn't YOU FIX IT, FLATBALLS??
If it's so easy to fix, then do us all a favor, and fix the damn thing!

Quit sitting there bitching like a 12 year old crying about the problems and how easy they are to fix. If you're so knoweldgable, then lend a helping hand. Download the ZSNES source and at the very least, tell someone else what file to go and what lines to change if you're too lazy to do it yourself.

This is my biggest problem with you. You wouldn't be nearly as annoying if you actually DID something rather than keep bitching about the same things and sit on your ass. You always claim to know how to fix something and how 'easy' something is yet YOU NEVER DO A DAMN THING! Why don't you deliver for once and quit being a useless waste of sperm.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Noxious Ninja
Dark Wind
Posts: 1271
Joined: Thu Jul 29, 2004 8:58 pm
Location: Texas
Contact:

Post by Noxious Ninja »

michael flatley wrote:
ZSNES doesn't always idle while minimized.
That's the point, it should. Also, even if it does have to do some work while minimized 50% CPU usage is crazy. Please don't argue. A program capable of running on systems that can't even handle windows shouldn't be using 50% of a 3.4GHz Pentium while minimized. This is not a major issue but the fix is so easy.
I'm going to break away from the mainstream here and say you're right, and somebody should pay attaention, but you shouldn't have included those last six words.
[u][url=http://bash.org/?577451]#577451[/url][/u]
Phil
Rookie
Posts: 21
Joined: Thu Aug 26, 2004 3:24 am

Post by Phil »

Wow, stay calm people. It's true that it is abnormal to use so much CPU when in task bar. I have a Athlon XP 2600 and Zsnes uses near 80% of CPU. But it doesn't seem to affect overall system performance so I don't care ;)
I have already seen worse than this.
Starman Ghost
Trooper
Posts: 535
Joined: Wed Jul 28, 2004 3:26 am

Post by Starman Ghost »

Phil wrote:Wow, stay calm people.
If you knew mr flatley you wouldn't be calm when talking to him.
[code]<Guo_Si> Hey, you know what sucks?
<TheXPhial> vaccuums
<Guo_Si> Hey, you know what sucks in a metaphorical sense?
<TheXPhial> black holes
<Guo_Si> Hey, you know what just isn't cool?
<TheXPhial> lava?[/code]
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

You know, I almost want flatley to fix it at this point. He comes close to sounding knowledgeable. And then for the thread to turn on its head would give it some entertainment value. Alas, wishing for something does not make it so.
michael flatley
Rookie
Posts: 42
Joined: Wed Aug 18, 2004 10:15 pm

Post by michael flatley »

This isn't a bug, it's a design issue. I'm not an asm programmer nor will I ever be. There's little need to program in assembly these days. Anyway, I'm not going to learn the ZSNES code just to fix this issue on my own. Isn't the solution self-evident? Halt emulation while minimized (same halt used for the gui) and have the programming thread sleep between loops checking for a maximize message from the windowing system. In DirectX this is a few lines of code, this is why I say the fix is easy. Note that DirectX is not required for this solution...

Also, if you are planning on emulating at 60fps and you are rendering frames much faster than this then have your programming thread sleep for a given number of milliseconds between frames. I've got a 2D engine that behaves in this manner and it comes fairly close to using only the CPU resources it needs (2-3%).
Clements
Randomness
Posts: 1172
Joined: Wed Jul 28, 2004 4:01 pm
Location: UK
Contact:

Post by Clements »

Wait... as of the latest WIP, this bug does not exist.

I'm playing WinAMP with ZSNES minimised and I'm using 4% CPU.

When in the GUI, I'm no longer using 100%, since WinAMP still plays happily, whereas before it stopped as ZSNES stole all the CPU cycles.
Post Reply