mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00
Merge pull request #6791 from aldelaro5/wii-epoch-fix
Wii: Fix the Wii epoch and make the IPL.CB 0 by default
This commit is contained in:
@ -237,9 +237,7 @@ void CEXIIPL::SetCS(int _iCS)
|
|||||||
|
|
||||||
void CEXIIPL::UpdateRTC()
|
void CEXIIPL::UpdateRTC()
|
||||||
{
|
{
|
||||||
u32 epoch =
|
u32 rtc = Common::swap32(GetEmulatedTime(GC_EPOCH));
|
||||||
(SConfig::GetInstance().bWii || SConfig::GetInstance().m_is_mios) ? WII_EPOCH : GC_EPOCH;
|
|
||||||
u32 rtc = Common::swap32(GetEmulatedTime(epoch));
|
|
||||||
std::memcpy(m_RTC, &rtc, sizeof(u32));
|
std::memcpy(m_RTC, &rtc, sizeof(u32));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,9 +24,6 @@ public:
|
|||||||
|
|
||||||
static constexpr u32 UNIX_EPOCH = 0; // 1970-01-01 00:00:00
|
static constexpr u32 UNIX_EPOCH = 0; // 1970-01-01 00:00:00
|
||||||
static constexpr u32 GC_EPOCH = 0x386D4380; // 2000-01-01 00:00:00
|
static constexpr u32 GC_EPOCH = 0x386D4380; // 2000-01-01 00:00:00
|
||||||
static constexpr u32 WII_EPOCH = 0x477E5826; // 2008-01-04 16:00:38
|
|
||||||
// The Wii epoch is suspiciously random, and the Wii was even
|
|
||||||
// released before it, but apparently it works anyway?
|
|
||||||
|
|
||||||
static u32 GetEmulatedTime(u32 epoch);
|
static u32 GetEmulatedTime(u32 epoch);
|
||||||
static u64 NetPlay_GetEmulatedTime();
|
static u64 NetPlay_GetEmulatedTime();
|
||||||
|
@ -286,7 +286,7 @@ void SysConf::InsertDefaultEntries()
|
|||||||
ipl_pc[2] = 0x14;
|
ipl_pc[2] = 0x14;
|
||||||
AddEntry({Entry::Type::SmallArray, "IPL.PC", std::move(ipl_pc)});
|
AddEntry({Entry::Type::SmallArray, "IPL.PC", std::move(ipl_pc)});
|
||||||
|
|
||||||
AddEntry({Entry::Type::Long, "IPL.CB", {0x0f, 0x11, 0x14, 0xa6}});
|
AddEntry({Entry::Type::Long, "IPL.CB", {0x00, 0x00, 0x00, 0x00}});
|
||||||
AddEntry({Entry::Type::Byte, "IPL.AR", {1}});
|
AddEntry({Entry::Type::Byte, "IPL.AR", {1}});
|
||||||
AddEntry({Entry::Type::Byte, "IPL.SSV", {1}});
|
AddEntry({Entry::Type::Byte, "IPL.SSV", {1}});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user