Random Slowdowns?

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Random Slowdowns?

Post by Axiem »

First, my computer specs:

Operating System: Windows XP
Dell Inspiron 5150
CPU: P4 2.8GHz with threading (or something like that to make it look like I have dual-core)
Memory: 1GB (2 x 512MB in 2 slots)
Internal Hard Drive: 90GB
Optical: Sony CDRW/DVD CRX830E
Graphics: XGI Volari-XP5 (I think?)
Sound: Onboard
Ethernet: Onboard
Wireless: Dell Wireless WLAN 1350 (handles g)
USB: 2 ports
Firewire: 1 port
S-Video out: yes
Monitor Out: yes

Here's the issue. When I run ZSNES (on any game; I've tried several), it slows down to about 4/5 the normal speed (by my estimation). Speeding it up seems to work just fine. It's just when I try running at normal speed that it's slower than it should be.

I've tried different resolutions and even not doing it on my monitor and instead on my laptop's LCD, and that has absolutely no effect. Turning sound off has no effect. Triple buffering lasted the longest in "normal" mode before returning to slowdown.

I then turned on VSync, and the slowdown was only about 9/10s sometimes, other times it was fine. However, in looking at my CPU utilization graph, the CPU that ZSNES is running on is at 100%, and when it is, ZSNES will run smoothly and at the correct speed. However, suddenly and with no cause at all, it will suddenly drop to about 15%, and ZSNES will slow down (in other words, somehow ZSNES is losing control over the processor). If in ZSNES, I enter the menu, and then leave, it suddenly returns to 100% of that processor.

In short, I'm tremendously confused. I seem to recall reading somewhere in the past that doing emulation on a dual-processor machine has issues, but I can't find anything about it in the help, on here, or on Google.

I'm fairly certain it's not the hardware, either. This machine was able to run WoW fine (with, admittedly, most of the graphics set to their lowest values), and Warcraft III worked fine even with lots of graphics things on.

I tried SNES9x, and the same problem plagued it.

In short, I have no idea what to do to make it work. Can anyone help me, please?
Clements
Randomness
Posts: 1172
Joined: Wed Jul 28, 2004 4:01 pm
Location: UK
Contact:

Post by Clements »

I have a dual-core processor and experienced the exact same thing you described in ZSNES, bsnes and Snes9x - until I fixed it by opening Task Manager and setting the affinity to 1 of my CPUs. Everything then worked perfectly.
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Post by Axiem »

I've tried that, and it doesn't really work. It makes it nice for a while, but every so often (at a fairly regular interval, too), it suddenly slows down for a few seconds and then returns to normal.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Clements wrote:I have a dual-core processor and experienced the exact same thing you described in ZSNES, bsnes and Snes9x - until I fixed it by opening Task Manager and setting the affinity to 1 of my CPUs. Everything then worked perfectly.
For clarity.. Hyperthreading != Dual Core. There are many things that apply to Dual Cores.. but don't apply to Hyperthreading.

The only possible problem that I can think of is the auto-downclocking that many of the later P4s do (due to heat issues) when the CPU is not on full load. I'm not sure whether that can be disabled though...
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Post by Axiem »

Deathlike2 wrote:The only possible problem that I can think of is the auto-downclocking that many of the later P4s do (due to heat issues) when the CPU is not on full load. I'm not sure whether that can be disabled though...
I wouldn't think ZSNES to require that much CPU time, actually. In the past, on other machines, I've never had any problems at all.

Then again, this is the first time I've really tried doing it with a laptop. But I'm still surprised that regardless of which CPU it's on, it uses 100% of the CPU time.

And apparently one of my CPUs is at 2.8 GHz, the other is at 1.59 GHz. If I'm reading things correctly.
Clements
Randomness
Posts: 1172
Joined: Wed Jul 28, 2004 4:01 pm
Location: UK
Contact:

Post by Clements »

Plug the laptop in and disable Power Management.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Clements wrote:Plug the laptop in and disable Power Management.
Ah. I missed the word laptop in my initial read. That's probably it.
Axiem wrote:And apparently one of my CPUs is at 2.8 GHz, the other is at 1.59 GHz. If I'm reading things correctly.
Mm.. no you are not reading it correctly. On a laptop, it will tell you the speed (the first number).. and the currently running speed (the second number). This is due in part because the laptop never normally needs to run at top speed because you want to conserve the battery as much as possible. However, when the laptop is plugged into AC power, generally it is assumed you want to run at full speed (unless configured otherwise).
Last edited by Deathlike2 on Wed May 03, 2006 10:18 pm, edited 1 time in total.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Post by Axiem »

Clements wrote:Plug the laptop in and disable Power Management.
Okay, I'm stupid. Where is the setting for this, again?
Clements
Randomness
Posts: 1172
Joined: Wed Jul 28, 2004 4:01 pm
Location: UK
Contact:

Post by Clements »

Control Panel > Power Options

Change the Power Scheme to 'Always on'.
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Post by Axiem »

Clements wrote:Control Panel > Power Options

Change the Power Scheme to 'Always on'.
Whoa. And here I thought that only affected the times before it shut things down on you too.

Very sweet. It appears to work like a charm. Thank you very muchly.

(As a minor note, and as I don't really know how else to suggest it, something like this might want to be put in the FAQ: that with laptops, you might have to change your power scheme)

But again, thanks muchly
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Post by Axiem »

Okay, I spoke too soon. That doesn't seem to have solved the problem at all. I'm still getting random slowdowns from time to time. Though it seems to have lessened.
Clements
Randomness
Posts: 1172
Joined: Wed Jul 28, 2004 4:01 pm
Location: UK
Contact:

Post by Clements »

There are general things you can do, like make sure you have the latest drivers for each and every component in your system. Since you are unsure what your graphics card is, chances are up-to-date drivers may not be installed. Make sure you are also using the latest chipset and sound drivers. Use a tool such as Everest to find out what stuff you have in there.

Either raise the Priority in Task Manager or enable High Priority through the Options in ZSNES. Make sure you have no other applications open when running ZSNES that could potentially steal CPU cycles. Disable unnecessary services as well. Monitor the CPU temperature with Everest. Make sure the CPU is not throttling in any way.

Enable Auto frameskip and Triple Buffering instead of Frameskip 0 and vsync. Disable vsync in your graphics drivers or set it to Application Controlled. If you are a graphics filter, switch to another or disable it. Run native resolution of the LCD.
Dmog
Lurker
Posts: 192
Joined: Tue Aug 31, 2004 6:03 pm

Post by Dmog »

Axiem wrote:Okay, I spoke too soon. That doesn't seem to have solved the problem at all. I'm still getting random slowdowns from time to time. Though it seems to have lessened.
Are you certain it's not just the games themselves that slowdowns in certain places?
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Post by Axiem »

Turning off vsync solves the problem tremendously. No slowdowns at all--however, I do occasionally see glitches that likely come from there being no vsync. As well, turning off vsync greatly lessens the CPU load.

For some reason, the option for triple buffering has disappeared. I'll play around to see if I can find it again.

I'm fairly well convinced that it was something with the CPU being used too much, so it slowed down whatever was using the CPU (ZSNES). I'm absolutely certain it wasn't the game: games don't typically run themselves at 4/5ths speed, nor do they typically slow down on a regular basis that shows up on a CPU graph. Super Mario Brothers 3 doesn't have slowdown problems when ported to the SNES. Especially not any that would slow the music down. :P

I'm more just surprised that power options actually mean something.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Axiem wrote:Turning off vsync solves the problem tremendously. No slowdowns at all--however, I do occasionally see glitches that likely come from there being no vsync. As well, turning off vsync greatly lessens the CPU load.

For some reason, the option for triple buffering has disappeared. I'll play around to see if I can find it again.

I'm fairly well convinced that it was something with the CPU being used too much, so it slowed down whatever was using the CPU (ZSNES). I'm absolutely certain it wasn't the game: games don't typically run themselves at 4/5ths speed, nor do they typically slow down on a regular basis that shows up on a CPU graph. Super Mario Brothers 3 doesn't have slowdown problems when ported to the SNES. Especially not any that would slow the music down. :P

I'm more just surprised that power options actually mean something.
Triple buffering is only available while in a fullscreen mode. Triple buffering helps in many cases. Windowed modes can be much slower than Fullscreen modes if your video drivers suck.

There is no Super Mario Brothers 3 for the SNES... except in Super Mario All Stars...
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Post by Axiem »

Deathlike2 wrote: Triple buffering is only available while in a fullscreen mode. Triple buffering helps in many cases. Windowed modes can be much slower than Fullscreen modes if your video drivers suck.

There is no Super Mario Brothers 3 for the SNES... except in Super Mario All Stars...
Because I dual-monitor, most fullscreen modes tend to have problems. So I don't play with it that often.

And I was indeed referring to Super Mario All-Stars.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Axiem wrote:
Deathlike2 wrote: Triple buffering is only available while in a fullscreen mode. Triple buffering helps in many cases. Windowed modes can be much slower than Fullscreen modes if your video drivers suck.

There is no Super Mario Brothers 3 for the SNES... except in Super Mario All Stars...
Because I dual-monitor, most fullscreen modes tend to have problems. So I don't play with it that often.

And I was indeed referring to Super Mario All-Stars.
The only other thing I can think off the top of my head is that you want to use the primary monitor due to performance reasons.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Axiem
New Member
Posts: 9
Joined: Wed May 03, 2006 9:10 pm

Post by Axiem »

Deathlike2 wrote:The only other thing I can think off the top of my head is that you want to use the primary monitor due to performance reasons.
Tried that, and it didn't have an effect at the time. What I'll probably do when I find the time to play through a game for real is reduce to one monitor and fullscreen then. Or pipe it to a TV.
Post Reply