Dolphin, the GameCube and Wii emulator - Forums

Full Version: Dolphin Emulator Manual - Questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So I'm trying to write a user manual for Dolphin 3.5, since it'd be a good exercise in technical documentation (plus I like writing, a lot) and it might benefit the community. Of course it's strictly unofficial atm. It's going to offer some technical insight into the inner workings of Dolphin, but not so much as to overwhelm the average reader. A document like this needs to be accurate, however, to be useful. There are parts of the emulator that I'm a bit sketchy on, so if any devs or knowledgeable users have any info about the following questions/topics, I'd appreciate your input. Don't worry about getting too detailed either; be as verbose as you want.

1) - JITIL Recompiler - From what I understand, this stands for Just-In-Time-Intermediate-Language, correct? This takes native GC/Wii code for the PPC-based CPU, recompiles it into another intermediate language (doing some optimizations?) before finally recompiling this into x86 or x64 assembly, correct? What exactly is this intermediate language?

2) - Enable Screen Saver - If you click on the Config button and go to the Wii tab, there's an option to Enable Screen Saver. What I have written so far reads : "When checked, allows the computer's screen saver to activate while running Dolphin." I'm largely curious as to if that's true. It just seems like a strange option to have, especially in the Wii section.

3) - DVD Root & Apploader - If you click on the Config button and go to the Paths tabs, you can specify paths for the DVD Root and Apploader. I just want to clarify what the DVD Root and the Apploader are. If you extract the files from an ISO, you get a directory structure that mirrors what's on the DVD you dumped, so Dolphin lets you specify the "root" directory of the game, effectively allowing you to boot games using these extracted files, correct? I have no idea what the apploader is. Useful for Homebrew on Dolphin or something?

4) - Scaled EFB Copy - On a technical level, what exactly is the Embedded Frame Buffer and why does scaling a copy of it improve graphical quality?

5) - Ignore Format Changes - Does what it says on the tin, i.e. ignores format changes to the EFB. I'm a bit curious as to how often format changes happen (and why); also, for confirmation, this option is always enabled on OpenGL, but it can be disabled on DX9 and DX11, correct?

6) - XFB - What exactly is the External Frame Buffer, and what are the technical differences between Real and Virtual?

7) - Show Drives & Purge Cache - Misc. curiosity, under the View menu in the toolbar, what does the Show Drives option actually do? Purge Cache, I assume deletes the code cache, shader cache, both, or something else?

8) - Texture Cache Accuracy - On a technical level, what is the texture cache, and how do you make it more/less accurate?

There'll be more as I progress with the manual, but thanks to anyone willing to respond.
(01-22-2013, 04:06 AM)Shonumi Wrote: [ -> ]2) - Enable Screen Saver - If you click on the Config button and go to the Wii tab, there's an option to Enable Screen Saver. What I have written so far reads : "When checked, allows the computer's screen saver to activate while running Dolphin." I'm largely curious as to if that's true. It just seems like a strange option to have, especially in the Wii section.
lol, afaik that has to do with the wii screen saver XD, but then again that's just what I always assumed Angel
(01-22-2013, 04:17 AM)ExtremeDude2 Wrote: [ -> ]lol, afaik that has to do with the wii screen saver XD, but then again that's just what I always assumed Angel

The Wii has a screen saver? News to me Big Grin

EDIT: I don't play my Wii and leave it sitting there for long periods of time, so I've never seen the Wii screen saver in real life. You don't need to have a NAND dump or anything to do this on Dolphin, right? It should work with any Wii game?
(01-22-2013, 04:06 AM)Shonumi Wrote: [ -> ]6) - XFB - What exactly is the External Frame Buffer, and what are the technical differences between Real and Virtual?
I still have this from my notes:
Quote:<neobrain> NaturalVi: XFBs are just some chunks of RAM which are usually sth like 640x576 in size (for both PAL and NTSC and whatever else)
<neobrain> usually games only use one or two of them, they're used for moving stuff to the screen then: Game renders stuff to the EFB, copies it to the XFB, moves it to screen
<neobrain> when copying from EFB to XFB vertical stretching (plus filtering) can be applied. When moving stuff from XFB to screen, horizontal stretching is applied.
<shuffle2> VI technically supports other things too. gamma and horizontal stretching, plus other stuff
<neobrain> shuffle2: yeah, just that we want to keep it simple for NaturalVi for now xD
<shuffle2> lol
<neobrain> fwiw, the EFB uses other pixel formats than XFBs...the EFB uses RGB formats, whereas the XFB is YUV (or whatever it's called)
<neobrain> and XFBs obviously can directly be modified via the CPU additionally.. if one feels like doing that

<neobrain> now to Dolphin's implementation:
<neobrain> "virtual XFB" uses VRAM textures to emulate the XFB stuff as far as possible (doing a limited amount of the fancy stuff shuffle2 already mentioned, too), i.e. rather than displaying the EFB directly to the screen, it's first copied to another texture which then is displayed to the screen
<neobrain> (there can be multiple XFBs/textures involved in that process, but whatever..)
<neobrain> in contrast, when using real XFBs the EFB gets encoded to YUV(whatever) to the RAM (similiarly to "EFB to RAM") and when the VI is requested to display the XFBs' contents to the screen we decode it again to a texture which is then displayed

<n00b421> BTW what games do need xfb's?
<n00b421> never used this option....
<shuffle2> mostly homebrew because they sometimes write directly to xfb
<shuffle2> sometimes other games use it for effects or to display two halves of an AA'd image

(01-22-2013, 04:06 AM)Shonumi Wrote: [ -> ]8) - Texture Cache Accuracy - On a technical level, what is the texture cache, and how do you make it more/less accurate?

Some information about Texture Cache can be found at http://forums.dolphin-emu.org/Thread-safe-texture-cache-is-not-in-newer-revs?pid=164693#pid164693 .

(01-22-2013, 04:06 AM)Shonumi Wrote: [ -> ]4) - Scaled EFB Copy - On a technical level, what exactly is the Embedded Frame Buffer and why does scaling a copy of it improve graphical quality?
Some useful information about that might be in this post: http://forums.dolphin-emu.org/Thread-gc-the-legend-of-zelda-twilight-princess?pid=172392#pid172392

Once you've read those I'll gladly reply to any further questions :p
Quote:
Quote:lol, afaik that has to do with the wii screen saver XD, but then again that's just what I always assumed


The Wii has a screen saver? News to me

EDIT: I don't play my Wii and leave it sitting there for long periods of time, so I've never seen the Wii screen saver in real life. You don't need to have a NAND dump or anything to do this on Dolphin, right? It should work with any Wii game?


afaik it just dims the screen
(01-22-2013, 04:06 AM)Shonumi Wrote: [ -> ]5) - Ignore Format Changes - Does what it says on the tin, i.e. ignores format changes to the EFB. I'm a bit curious as to how often format changes happen (and why); also, for confirmation, this option is always enabled on OpenGL, but it can be disabled on DX9 and DX11, correct?
The point of the emulation of format change emulation is that when the EFB format is being changed, the GC GPU doesn't perform any sort of automatic color conversion but just leaves the data as is. Thus, when changing from e.g. RGB565 to RGB888 the pixel data is just being reinterpreted for the new format.
I originally implemented this feature because it fixed an issue in Super Mario Sunshine. Turned out that the issue could be fixed differently (and easier) a few hundred revs later, but whatever. It still seems to have some sort of use because it fixes some issue in Skyward Sword.
I don't think any game particularly needs format change emulation, but it works around some limitations of what we can emulate in hw backends at all.

The option is always enabled on OpenGL because there's no support for format change emulation there.
Hey, thanks neobrain, fascinating reads so far; you're an excellent source as ever. I'll let you know when I'm finished.

Thanks too ED2, I feel quite stupid, seeing how obvious the Wii Screen Saver is :p
Fyi, I just found another forum post about format change emulation: http://forums.dolphin-emu.org/Thread-emulate-format-changes?pid=137687#pid137687
(01-22-2013, 04:06 AM)Shonumi Wrote: [ -> ]3) - DVD Root & Apploader - If you click on the Config button and go to the Paths tabs, you can specify paths for the DVD Root and Apploader. I just want to clarify what the DVD Root and the Apploader are. If you extract the files from an ISO, you get a directory structure that mirrors what's on the DVD you dumped, so Dolphin lets you specify the "root" directory of the game, effectively allowing you to boot games using these extracted files, correct? I have no idea what the apploader is. Useful for Homebrew on Dolphin or something?

My own experience in this point: when you right click the disc under Game Properties => Filesystem tab and choose extract all, you'll be prompted to choose a folder where the extracted content will be put plus a boot.dol and an apploader.img.

To load the game using the files from the directory you've just extracted, you need to set DVD Root as this folder and point apploader.img location in Dolphin settings. Then, booting the extracted boot.dol file will run the extracted copy of the game, as if you booted an ISO. So, this is my assumptions (maybe wrong, some dev please confirm this):
  • Apploader.img should be something like a boot sector from a hard drive: it probably contain information about the "game type" (wii or GC), partition files and some other parameter needed by boot.dol
  • boot.dol is the "app" that load the game files and make it run (something like the bootmgr, ntldr or grub loader from the various OSes)
With this process I was able to boot GC extracted games, never tried Wii games as they can have a lot of partitions (i.e. ISO dump of SSBB -- around 10-20 partitions) and the loading process maybe different. Furthermore, I found also that any setting specified in the game's INI is completely bypassed when you boot the same game from extracted files...


(01-22-2013, 04:06 AM)Shonumi Wrote: [ -> ]7) - Show Drives & Purge Cache - Misc. curiosity, under the View menu in the toolbar, what does the Show Drives option actually do? Purge Cache, I assume deletes the code cache, shader cache, both, or something else?

Purge cache will delete the content of the folder User\Cache, this folder is used to make a local cache of banner images and to avoid the need of extracting banner image from the ISOs every time you open Dolphin or refresh the list.

I may be wrong here, but if I remember correctly, "Show Drives" will check if a game backup disc is inserted in the computer's DVD drive and then add an entry in Game list corresponding to that game if there is a valid backup disc inserted in the DVD drive...
Pages: 1 2