DOL/ELF loaders: enable HID4.SBE in Wii mode

When booting "cooked" executables, BATs should already be set up and
enabled. They should only really be disabled when booting NAND contents
in real mode.
This commit is contained in:
Hector Martin committed 2016-12-01 06:36:53 +09:00
1 parent a6742d9cf7
commit 2b906e3fc4
2 files changed
+4

No files matched your search

+2
View File
@@ -381,6 +381,8 @@ bool CBoot::BootUp()
PowerPC::ppcState.spr[SPR_DBAT4L] = 0x10000002;
PowerPC::ppcState.spr[SPR_DBAT5U] = 0xd0001fff;
PowerPC::ppcState.spr[SPR_DBAT5L] = 0x1000002a;
if (dolLoader.IsWii())
HID4.SBE = 1;
PowerPC::DBATUpdated();
PowerPC::IBATUpdated();
+2
View File
@@ -85,6 +85,8 @@ bool CBoot::Boot_ELF(const std::string& filename)
PowerPC::ppcState.spr[SPR_DBAT4L] = 0x10000002;
PowerPC::ppcState.spr[SPR_DBAT5U] = 0xd0001fff;
PowerPC::ppcState.spr[SPR_DBAT5L] = 0x1000002a;
if (IsElfWii(filename))
HID4.SBE = 1;
PowerPC::DBATUpdated();
PowerPC::IBATUpdated();