Merge pull request #10257 from Pokechu22/no-bs2-rtc-flags

BS2Emu: Stop clearing the RTC flags
This commit is contained in:
JosJuice 2021-12-03 22:39:38 +01:00 committed by GitHub
commit 85e5070215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -461,8 +461,13 @@ bool CBoot::EmulatedBS2_Wii(const DiscIO::VolumeDisc& volume,
state->discstate = 0x01;
});
// The system menu clears the RTC flags
ExpansionInterface::g_rtc_flags.m_hex = 0;
// The system menu clears the RTC flags.
// However, the system menu also updates the disc cache when this happens; see
// https://wiibrew.org/wiki/MX23L4005#DI and
// https://wiibrew.org/wiki//title/00000001/00000002/data/cache.dat for details. If we clear the
// RTC flags, then the system menu thinks the disc cache is up to date, and will show the wrong
// disc in the disc channel (and reboot the first time the disc is opened)
// ExpansionInterface::g_rtc_flags.m_hex = 0;
// While reading a disc, the system menu reads the first partition table
// (0x20 bytes from 0x00040020) and stores a pointer to the data partition entry.