Dolphin, the GameCube and Wii emulator - Forums

Full Version: To the Screen with Hybrid XFB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
[Image: hybridxfbheadermini.jpg]



A new article has been published on the Dolphin blog - To the Screen with Hybrid XFB

Feel free to discuss the article on this thread.


And we thought Ubershaders was a monster, WHEW! This is our biggest article yet! If you want to know lots about how Dolphin works, you'll love this one!

-
Loved the article. Great work as always. However I do have one lingering question that is driving me nuts. The article never explains exactly how Dolphin gets around the native resolution limit with direct XFB modification. You describe the hash setup and swap, but how did you guys work the magic to make the emulated XFB region arbitrary resolution? Or does the resolution become native only when the hash fails and the “real” XFB in emulated memory is used?
I think this is one of the most interesting articles I've read in a long time (since Ubershaders?). I've only started following Dolphin really closely in the past few months/weeks, so when I saw the mention of "a big feature that wasn't going to be done on time," in the last progress report, I got really interested and started digging in the pull requests to try to satisfy my curiosity. It's really awesome to finally get the details, and I love how you explain each bit, from the original consoles and the old emulation, all the way through how Hybrid XFB works and what all it fixes! Last I saw, there was still some discussion of frame-dumping being slow, will that affect normal emulation speed at all?
Nintonito Wrote:The article never explains exactly how Dolphin gets around the native resolution limit with direct XFB modification.

Well, if you mean CPU modifications to the XFB region, well, any time the CPU has modified the frame it will be 1x native. They take place in main memory (where we can only have 1x native copies), and Dolphin detects the change and switches to them.

Nintonito Wrote:Or does the resolution become native only when the hash fails and the “real” XFB in emulated memory is used?

Yep!
When the CPU does perform modifications, does that mean the entire frame gets replaced with the native resolution image? Or do only the modified sections get bumped back to native?
The entire frame. That's why Mario Strikers loading screen in Store XFB to Texture Only is almost all magenta from a partial CPU modification. See the Partial XFB section for details!

Things like Brawl classic mode are reading the old frame data, so it's not actually a CPU modification. That's why only part of the screen is magenta - its the part of the frame that it places the old frame data it read into.
(11-19-2017, 04:37 PM)addestroyer Wrote: [ -> ]Last I saw, there was still some discussion of frame-dumping being slow, will that affect normal emulation speed at all?

No, only frame dumping.
WOOOOOOT! It is finally here! Dolphin did it! Onwards to infinity!

Great article through. I am looking forward to the next big feature. That is, if there are any big features left to add... I mean, we already have Vulkan, Ubershaders and now even Hybrid XFB. What could be possibly left to add from here on.
Why exactly is frame dumping slower now, and is it being worked on? That's kind of important.

EDIT: Also hooray for this finally being released, whoops.
(11-19-2017, 07:26 PM)Kurausukun Wrote: [ -> ]Why exactly is frame dumping slower now, and is it being worked on? That's kind of important.

https://github.com/dolphin-emu/dolphin/pull/6193

We just didn't want to delay the hybrid XFB pull request longer...
Pages: 1 2 3 4 5 6 7 8