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 2016-11-23 04:17:31 +09:00
parent a6742d9cf7
commit 2b906e3fc4
2 changed files with 4 additions and 0 deletions

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();

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();