diff options
Diffstat (limited to 'src/DSi.cpp')
-rw-r--r-- | src/DSi.cpp | 64 |
1 files changed, 3 insertions, 61 deletions
diff --git a/src/DSi.cpp b/src/DSi.cpp index 5dd8ac9..64bc6d2 100644 --- a/src/DSi.cpp +++ b/src/DSi.cpp @@ -548,12 +548,12 @@ void SetupDirectBoot() DSi_NAND::DeInit(); } - u8 nwifiver = SPI_Firmware::GetNWifiVersion(); - ARM9Write8(0x020005E0, nwifiver); + SPI_Firmware::WifiBoard nwifiver = SPI_Firmware::GetFirmware()->Header().WifiBoard; + ARM9Write8(0x020005E0, static_cast<u8>(nwifiver)); // TODO: these should be taken from the wifi firmware in NAND // but, hey, this works too. - if (nwifiver == 1) + if (nwifiver == SPI_Firmware::WifiBoard::W015) { ARM9Write16(0x020005E2, 0xB57E); ARM9Write32(0x020005E4, 0x00500400); @@ -726,64 +726,6 @@ void SoftReset() GPU::DispStat[1] |= (1<<6); } -bool LoadBIOS() -{ - Platform::FileHandle* f; - u32 i; - - memset(ARM9iBIOS, 0, 0x10000); - memset(ARM7iBIOS, 0, 0x10000); - - f = Platform::OpenLocalFile(Platform::GetConfigString(Platform::DSi_BIOS9Path), FileMode::Read); - if (!f) - { - Log(LogLevel::Warn, "ARM9i BIOS not found\n"); - - for (i = 0; i < 16; i++) - ((u32*)ARM9iBIOS)[i] = 0xE7FFDEFF; - } - else - { - FileRewind(f); - FileRead(ARM9iBIOS, 0x10000, 1, f); - - Log(LogLevel::Info, "ARM9i BIOS loaded\n"); - Platform::CloseFile(f); - } - - f = Platform::OpenLocalFile(Platform::GetConfigString(Platform::DSi_BIOS7Path), FileMode::Read); - if (!f) - { - Log(LogLevel::Warn, "ARM7i BIOS not found\n"); - - for (i = 0; i < 16; i++) - ((u32*)ARM7iBIOS)[i] = 0xE7FFDEFF; - } - else - { - // TODO: check if the first 32 bytes are crapoed - - FileRewind(f); - FileRead(ARM7iBIOS, 0x10000, 1, f); - - Log(LogLevel::Info, "ARM7i BIOS loaded\n"); - CloseFile(f); - } - - if (!Platform::GetConfigBool(Platform::DSi_FullBIOSBoot)) - { - // herp - *(u32*)&ARM9iBIOS[0] = 0xEAFFFFFE; - *(u32*)&ARM7iBIOS[0] = 0xEAFFFFFE; - - // TODO!!!! - // hax the upper 32K out of the goddamn DSi - // done that :) -pcy - } - - return true; -} - bool LoadNAND() { Log(LogLevel::Info, "Loading DSi NAND\n"); |