Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly set default video mode for PAL Wii games. #2520

Merged
merged 1 commit into from Jun 6, 2015

Conversation

AdmiralCurtiss
Copy link
Contributor

To explain this I'm going to have to talk a bit about a PAL Wii's video modes, so bear with me.

A PAL Wii can be set to three possible video modes: 50Hz (576i), 60Hz (480i), and EDTV/HDTV (480p) (which is still 60Hz, just progressive instead of interlaced). These can be found in Wii Settings -> Screen -> TV Type.

PAL Wii TV Types

On console, PAL Wii games properly respect these settings when they can. Here's a few examples.

PAL Wii TV Mode 576i 480i 480p Comment
Mario Party 8 576i50 576i50 576i50 Don't support 60Hz at all and will switch to 576i50 no matter what your Wii's settings are.
Kororinpa 576i50 480i60 480i60 Supports 60Hz just fine, but doesn't run in Progressive.
Xenoblade Chronicles 576i50 480i60 480p60 Runs fine in all modes.
Boom Street 576i50 480i60 480p60 Booting in 576i displays a message that it cannot run in 50Hz and that you should change to 480i/p in the Wii Settings
The Last Story 576i50 480i60 480p60 Same as above.
Super Smash Bros. Brawl 576i50 480i60 480p60 Booting in 576i without a save file displays a message that the game runs better in 60Hz and that you should, if possible, change to 480i/p.

The Last Story 50Hz Smash Bros Brawl 50Hz

On Dolphin these results don't look as clean, and are in fact rather inconsistent.

Dolphin 4.0-6554 PAL60 off, Progressive off PAL60 on, Progressive off PAL60 on, Progressive on
Mario Party 8 576/50 576/50 576/50
Kororinpa 576/50 576/50 480/60
Xenoblade Chronicles 576/50 576/50 576/50
Boom Street 576/50 576/50 480/60
The Last Story 576/50 480/60 480/60
Super Smash Bros. Brawl 576/50 576/50 576/50

(Since as far as I can tell it doesn't really matter in Dolphin if a game runs interlaced or progressive, I have omitted this information from the above table.)

So why doesn't Dolphin match what the actual console does? To explain that, let's look at what settings the video modes actually correspond to: The IPL.E60 and IPL.PGS settings in the Wii's SYSCONF file.

576i -> IPL.E60 = 0, IPL.PGS = 0
480i -> IPL.E60 = 1, IPL.PGS = 0
480p -> IPL.E60 = 1, IPL.PGS = 1

The combination IPL.E60 = 0, IPL.PGS = 1 is invalid and cannot be set on a PAL Wii.

In Dolphin, these two options are in completely different configuration windows. IPL.E60 can be toggled with Config -> Wii -> Use PAL60 Mode (EuRGB60), while IPL.PGS is toggled in Graphics -> Advanced -> Enable Progressive Scan. (It might be good to move one of them next to the other, but that's not the point here.)

The way Dolphin handles these settings is to just set them in the SYSCONF and expect games to properly handle them themselves, while always defaulting to 50Hz when booting a PAL game. Unfortunately, this doesn't work out in all cases. Some games expect the System Menu to set the correct video mode for them before the game boots, while others are a bit more proactive and set themselves correctly in some or all cases. By loading the System Menu first and booting a game through that, all games behave the same they would on console when it comes to video mode.

(Do note that all of this is accurate for Wii games only. PAL Gamecube games will always boot in 50Hz mode and then, if supported, may ask the user if they want to switch to 60Hz. Some require the user to hold B during game boot for the option to appear.)

This PR changes the initial Wii game boot settings to match what the System Menu would set, so that games run in the video mode they are expected to run in.

Fixes issue 6991, this forum thread, and this forum thread. Also properly fixes issue 2251, issue 3066, and issue 5089.

@@ -226,7 +226,11 @@ bool CBoot::BootUp()
NOTICE_LOG(BOOT, "Booting %s", _StartupPara.m_strFilename.c_str());

g_symbolDB.Clear();
VideoInterface::Preset(_StartupPara.bNTSC);

// PAL Wii uses NTSC framerate and linecount in 60Hz/480i and Progressive/480p modes

This comment was marked as off-topic.

This comment was marked as off-topic.

@skidau
Copy link
Contributor

skidau commented Jun 5, 2015

The explanation sounds fine to me; certain games rely on the system menu to set the video mode on boot. The code matches the explanation too.

@mimimi085181
Copy link
Contributor

So this switches the video mode to 480i for PAL Wii games, when either PAL60 or progressive video mode is selected, right? Shouldn't it set the video mode to 480p when progressive video mode is enabled? Or is progressive video mode selected seperately, and currently even set to 576p? If that's the case, then this pr would possibly fix some big progressive video mode problems with PAL Wii games, as a 576p video mode kinda exists, but can't be used on console.

VideoInterface::Preset(_StartupPara.bNTSC);

// PAL Wii uses NTSC framerate and linecount in 60Hz/480i and 60Hz/480p modes
const bool bPAL60 = _StartupPara.bWii && (SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.E60") || SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.PGS"));

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@mimimi085181
Copy link
Contributor

LGTM. The table for Dolphin might need to be changed(4 cases, pal60 and progressive each on/off), and a table for the situation after the pr could be added. But that's not something that should delay the merge.

Disclaimer: Although most of my games are pal, i don't think i have one of the affected games, so i did not test this myself.

skidau added a commit that referenced this pull request Jun 6, 2015
Properly set default video mode for PAL Wii games.
@skidau skidau merged commit 2f577e1 into dolphin-emu:master Jun 6, 2015
@AdmiralCurtiss AdmiralCurtiss deleted the wii-pal60 branch June 6, 2015 00:45
CarlKenner pushed a commit to CarlKenner/dolphin that referenced this pull request Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants