Zsnes Priority

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
Kriegan
Rookie
Posts: 10
Joined: Sat Jan 22, 2005 10:01 pm

Zsnes Priority

Post by Kriegan »

I've been keeping up with the betas up to the current release. But since 1.40 was released, It seemed like there was a performance hit. I thought it might change in 1.41, it didn't. It still hasn't in 1.42.

I use XP pro. A nifty feature of pro, is when you hit ctrl-alt-del and brings up the task manager, you can pick and choose the CPU priority of whatever program you wish. So I got to looking one day, I saw that Zsnes was set on the lowest priority by default. When I moved it to "normal", the lag dissapeared, which is what I expected. I don't know much about programing, but is there a setting within Zsnes that tells the OS what priority the program should have? It's a simple task for me to fix this, but regular XP users don't have a choice.
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

Well, you can set ZSNES to run in High Priority mode from the Options dialog, but I wouldn't recommend this.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
Kriegan
Rookie
Posts: 10
Joined: Sat Jan 22, 2005 10:01 pm

Post by Kriegan »

I know that, but it doesn't make sense for it not to run at regular priority.
Kriegan
Rookie
Posts: 10
Joined: Sat Jan 22, 2005 10:01 pm

Post by Kriegan »

Ok, I did more testing. Even when I set Zsnes 1.42's priority to normal, or above normal.... it FORCES itself back down to Low. What's that all about? I discovered this after playing for a few minutes. Everything would be smooth and after I saved or loaded from a savestate, it would return to low priority. I tested it quite a few times. Same results. I think this is a serious bug. Someone on a newer system wouldn't even be phased, but people on a 1ghz, or less, could. 0.o
ThunderClaw
I know where you live.
Posts: 148
Joined: Thu Aug 19, 2004 4:51 am

Post by ThunderClaw »

800 Mhz P3, GeForce 4 Ti4200, WinXP Pro, 256MB RAM.

I cannot duplicate your bug report. ZSNES starts at Normal priority and stays there. Putting it down to Low makes it stay at Low.
FireKnight:I'm pretty sure a 1KG 24k gold brick costs less than that.

phonymike: well the same amount of raw metals used in a car costs a fraction of the price of a new car idiot. I'm gonna take away your posting privileges and replace them with my balls on your chin.

I smell spray paint.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

If you have other cpu-eating processes, ZSNES might be pushed down as it's not very cpu intensive when running a rom, unless you're using hq4x.
皆黙って俺について来い!!

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
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

To reproduce the "bug", just load up ZSNES (just the GUI, it doesn't matter if a ROM is loaded)... the priority set is Low. When a ROM is loaded (and you are not in the GUI), this changes to Normal.

This is what I think the original poster is somewhat confused about (although, I'm not sure the low priority is intended when only the GUI is loaded).

I don't know what OS the poster is using, this is reproducable in Win2k in any case.

I'm not sure what this "lag" is... if it's GUI lag, this might explain it, but if the emulation is laggy, that would be a different story.
adventure_of_link
Locksmith of Hyrule
Posts: 3634
Joined: Sun Aug 08, 2004 7:49 am
Location: 255.255.255.255
Contact:

Post by adventure_of_link »

Deathlike2 wrote:I don't know what OS the poster is using, this is reproducable in Win2k in any case.
Kriegan wrote:I use XP pro.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
stale
Rookie
Posts: 29
Joined: Sat Aug 07, 2004 4:57 pm
Location: mankato mn
Contact:

Post by stale »

it seems to me that something (either zsnes or windows) senses if zsnes is in focus, and it lowers its priority if it is not. I can catch it in either state on my pc, if I'm really sneaky.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

lol, I apparently didn't read thoroughly :P
it seems to me that something (either zsnes or windows) senses if zsnes is in focus, and it lowers its priority if it is not.
It's ZSNES, not Windows... ZSNES changes it's priorities depending what state it is in. Windows does not factor into it...
Kagerato
Lurker
Posts: 153
Joined: Mon Aug 09, 2004 1:40 am
Contact:

Post by Kagerato »

I wouldn't say that with such certainty. The NT kernel makes numerous adjustments, rearrangements, and the like without your consent. It also tends to have insufficient tweaking options (the few that are available are set/disabled in the registry).

If the kernel pages (swaps) without your consent [which it does constantly], delegates which processes get your CPU time, and decides which application deserves the most physical memory (and which get hardly any), it's not very difficult to believe it could change process priorities dynamically as well.

I could be wrong; perhaps ZSNES does explicitly set its priority level now. If so, perhaps that was implemented to reduce CPU usage (remember the 95-100% CPU usage 'bug' with the GUI's infinite loop?).
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

perhaps ZSNES does explicitly set its priority level now.
It does work in a sense... it changes the priority when you are running the ROM (normal, high if set in ZSNES's options and low when it is in the GUI)
If so, perhaps that was implemented to reduce CPU usage (remember the 95-100% CPU usage 'bug' with the GUI's infinite loop?).
That bug is still there (I believe it is, because it does show 100% CPU usage when the ZSNES GUI is on)... I only find it strange (unless the devs say otherwise) that the GUI is running at a low priority...
Esturk
Lurker
Posts: 114
Joined: Wed Jul 28, 2004 7:07 pm
Location: Edmonton, Alberta, Canada

Post by Esturk »

Well I get 100% CPU usage while in the GUI. But when playing a game like Earthbound, it goes down to around ~30%.
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

Well old versions of ZSNES used to set priority to low while in the GUI and then back to normal when in a game but this code was changed long ago so I don't see what could be changing the priority on ZSNES to low. This one is a mystery to me.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Well old versions of ZSNES used to set priority to low while in the GUI and then back to normal when in a game but this code was changed long ago so I don't see what could be changing the priority on ZSNES to low. This one is a mystery to me.
Well, this hasn't changed though... at least in the Windows version.
Post Reply