Dolphin, the GameCube and Wii emulator - Forums

Full Version: game slowdown
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Ok I have a kind of annoying problem here in Super Mario Galaxy.
First of all, is this the right place to post this?
Second, here's the problem: you guys already know that you need "Skip EFB access from CPU" unticked to properly shoot the starbits in Mario Galaxy, and it works, but when I disable it my game slows down a bit, in the HUB I'm having 40-50 fps but in the rest of the game it's often 60 fps (and cpu override doesn't work in this game apparently), but this is an hardware problem and we can't do very much. The real problem is that when I untick that and I look at that sort of sun in the horizon (shown in picture) the game slow down A LOT, at the point of being unplayable, around 20-30 fps, even in the HUB. But... why? This doesn't happen when I have that option ticked. Do you know a patch for this?
If you are using directx, it might be worth it to try opengl and vulkan here. I think directx is the slowest backend when it comes to cpu efb access.
You´re trying to run a VERY demanding game with a weak CPU.

Make sure you´re using High Performance mode on Windows, and that you´re not overheating. Also, make sure you´re running in native resolution.
(06-21-2017, 07:22 AM)DJBarry004 Wrote: [ -> ]You´re trying to run a VERY demanding game with a weak CPU.

Make sure you´re using High Performance mode on Windows, and that you´re not overheating. Also, make sure you´re running in native resolution.

I'm running it on the lowest, native resolution, scaled efb copies off, everything, but nothing changes.
High performance mode? What is it?
(06-21-2017, 08:46 AM)TechnoZamb19 Wrote: [ -> ]I'm running it on the lowest, native resolution, scaled efb copies off, everything, but nothing changes.
High performance mode? What is it?

It's a "power plan" you select in control panel. By default windows tries to optimise for power use, especially on laptops, which can interact poorly with some apps that require lots of CPU power.

I wouldn't recommend using it on a laptop on battery though.
The reason staring at the sun causes lag is because it's expensive the features the game uses to make it.

The same feature (EFB Access to CPU) is used to scan the framebuffer for objects, so it can tell when you're hovering over starbits or where you're pointing to shoot them.

There's nothing you can do about the lag while keeping the game playable.
(06-21-2017, 12:17 PM)JMC47 Wrote: [ -> ]The reason staring at the sun causes lag is because it's expensive the features the game uses to make it.

The same feature (EFB Access to CPU) is used to scan the framebuffer for objects, so it can tell when you're hovering over starbits or where you're pointing to shoot them.

There's nothing you can do about the lag while keeping the game playable.

But still, why does the game slows down when I look at the sun? What's the correlation with the EFB access to CPU? I don't know much about these kind of stuff. Do you? I'd have a lot of questions to ask, like what's the Bounding box, what's the XFB, and what's even the EFB, and a lot more. I'd really like to talk to a developer of this emulator or at least someone who knows these stuff.
JMC literally just explained why this happens when you look at the Sun. The sun effect is an effect that causes the emulated CPU to need direct access to EFB. EFB means Emulated Frame Buffer.


Also, JMC is a Dolphin developer
To put it in very simple terms.

If we block the emulated CPU's ability to read the emulated GPUs memory, we can emulate the game much faster. This is an extremely expensive thing to emulate. I haven't studied the game too closely, but a lot of games render effects based on what you're seeing, so the CPU will take the framebuffer (hence needing access to the embedded framebuffer, or EFB,) and do some effect to it. It's likely something along those lines to do the lenses flare that it's doing with the sun. Reading and writing to the EFB from CPU is expensive for us, as we don't have shared memory between the CPU and GPU, and the GameCube/Wii do.

Disabling EFB Access to CPU removes the slowdown by killing the game's ability to do that effect. That sounds great right? Unfortunately, it also checks the framebuffer for other things, like pull stars, where you're shooting, etc. EFB Peeks and Pokes to see where you're aiming or if you're hovering over stuff are necessary for the game to work, but we can't possibly differentiate between that and the technique they used to render the sun.

In essence, you can't disable the sun effect (and thus slowdown) without breaking the game. The solution is to have a faster computer capable of making up for the difficulty in emulating these effects with raw power.
(06-27-2017, 08:22 PM)JMC47 Wrote: [ -> ]To put it in very simple terms.

If we block the emulated CPU's ability to read the emulated GPUs memory, we can emulate the game much faster.  This is an extremely expensive thing to emulate.  I haven't studied the game too closely, but a lot of games render effects based on what you're seeing, so the CPU will take the framebuffer (hence needing access to the embedded framebuffer, or EFB,) and do some effect to it.  It's likely something along those lines to do the lenses flare that it's doing with the sun.  Reading and writing to the EFB from CPU is expensive for us, as we don't have shared memory between the CPU and GPU, and the GameCube/Wii do.

Disabling EFB Access to CPU removes the slowdown by killing the game's ability to do that effect.  That sounds great right?  Unfortunately, it also checks the framebuffer for other things, like pull stars, where you're shooting, etc.  EFB Peeks and Pokes to see where you're aiming or if you're hovering over stuff are necessary for the game to work, but we can't possibly differentiate between that and the technique they used to render the sun.

In essence, you can't disable the sun effect (and thus slowdown) without breaking the game.  The solution is to have a faster computer capable of making up for the difficulty in emulating these effects with raw power.

Thanks for the reply!
Would it be possible to disable the lenses flare with the sun through a mod or a patch or some other stuff?
BTW sorry for the late reply!
Pages: 1 2