Dolphin, the GameCube and Wii emulator - Forums

Full Version: Rogue Squadron's cutscenes get stretched, but are NOT malfunctioning
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm posting this here because the GitHub strangely doesn't have an issues tab (just like DuckStation, same reason?) so forgive me if I posted it in the wrong forum category.

It's been known for a while now that the Rogue Squadron games have an interesting issue with their cutscenes - whenever one starts, the game goes widescreen, and whenever it ends, it goes back to the aspect ratio you set it to. Reports say this is because the game switches back to interlaced mode.

https://imgur.com/a/smlpgjp

However, a silly little mistake on my part led me to the answer of what's going on: they're not breaking, rather it uses EFB Copies for cutscenes! I know this because 5.0-20849, which fixed the "Force 24-bit Color" option not affecting EFB Copies actually fixed discoloration during Rogue Squadron II's cutscenes, such as the intro cutscene for the night approach of Imperial Academy Heist - rainbow effects could be seen for years' worth of emulator releases, but stopped when that update released.

It turns out that the black aspect ratio bars on the bottom and top of the screen that appear during cutscenes aren't actually "real", and are the result of how the game renders cutscenes. What I presume is happening is that the game is resizing the EFB Copy-display to a certain width and height, but assumes the aspect ratio is always 4:3, meaning it fills a 16:9 screen. You can see this for yourself if you run the game in a 4:3 window:

https://imgur.com/a/gifv50w

My proposed solution to this would be to make EFB Copies respect the emulator's Aspect Ratio setting, meaning the game would only see a 4:3 part of the game window, and cutscenes wouldn't appear to break.
Dolphin is working this way by design. Allow me to explain.

The game may be using EFB copies for these cutscenes, but that's not important – the key element is how the game sets up the VI (video interface) registers. When most games want to show a letterboxed widescreen cutscene on a 4:3 TV, they create an XFB copy that has black bars at the top and bottom and cutscene content in the middle, and asks VI to display that whole XFB. Rogue Squadron II and III, on the other hand, create an XFB copy that contains just the cutscene content, and tell VI to display that XFB copy on just a part of the TV. This makes VI effectively "generate" black bars.

(I believe the reason why these two games do this is because they use an anti-aliased frame buffer format for cutscenes, which makes it impossible to make a single frame buffer that's large enough to fill the TV, due to the limited size of EFB RAM. It is possible to get around this limit by using two frame buffers, but this is more complicated to implement and lowers performance, which is probably why they chose to use one frame buffer that only fills part of the TV.)

So why does Dolphin crop out the black bars generated by VI? The thing is, most games configure VI in a way that causes VI to generate black bars, but with the black bars being much smaller than the ones in Rogue Squadron II and III's cutscenes. We know users are bothered by seeing tiny black bars above and below the game when there's also big black bars to the left of the game, so we've set up Dolphin to automatically crop out these little black bars and make the image as big on your screen as it can be. Now, in the Rogue Squadron games it turns out that this Dolphin code is cropping huge black bars instead of tiny black bars, but the code doesn't know any difference between those two. In some sense, this behavior might be considered "wrong" since it doesn't really look anything like on a real console, but in another sense it lets you view these cutscenes with more clarity.

Currently Dolphin doesn't have any option to disable this cropping of black bars generated by VI. But who knows, maybe something will be added in the future to make Dolphin show the active area of a typical TV without any extra cropping? Just keep in mind that this would likely add either cropping or black bars (depending on whether you want to show overscan) to the gameplay of most games – that's why we haven't implemented it yet.
I figured there was more to it. I'm surprised this feature being disabled isn't the default, you'd think 4:3 actually means the game is only able to see a 4:3 part of the emulator window.
The game has no ability to "see" what the size or aspect ratio of the emulator window is. The game outputs a certain image with certain VI parameters, and Dolphin uses the VI parameters and the window size to determine how to crop the image.
Rogue Squadron games really are the "It doesn't do it like any other games do it" of the GameCube library, huh? Makes me wonder if these games will remain realhw-only.