mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
Boot: Remove volume parameter from SetupWiiMemory
This commit is contained in:
@ -332,7 +332,7 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
|
|||||||
HID4.SBE = 1;
|
HID4.SBE = 1;
|
||||||
// Because there is no TMD to get the requested system (IOS) version from,
|
// Because there is no TMD to get the requested system (IOS) version from,
|
||||||
// we default to IOS58, which is the version used by the Homebrew Channel.
|
// we default to IOS58, which is the version used by the Homebrew Channel.
|
||||||
SetupWiiMemory(nullptr, 0x000000010000003a);
|
SetupWiiMemory(0x000000010000003a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -108,7 +108,7 @@ private:
|
|||||||
static bool Load_BS2(const std::string& boot_rom_filename);
|
static bool Load_BS2(const std::string& boot_rom_filename);
|
||||||
|
|
||||||
static void SetupGCMemory();
|
static void SetupGCMemory();
|
||||||
static bool SetupWiiMemory(const DiscIO::Volume* volume, u64 ios_title_id);
|
static bool SetupWiiMemory(u64 ios_title_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
class BootExecutableReader
|
class BootExecutableReader
|
||||||
|
@ -216,7 +216,7 @@ bool CBoot::EmulatedBS2_GC(const DiscIO::Volume* volume)
|
|||||||
return RunApploader(/*is_wii*/ false, *volume);
|
return RunApploader(/*is_wii*/ false, *volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CBoot::SetupWiiMemory(const DiscIO::Volume* volume, u64 ios_title_id)
|
bool CBoot::SetupWiiMemory(u64 ios_title_id)
|
||||||
{
|
{
|
||||||
static const std::map<DiscIO::Region, const RegionSetting> region_settings = {
|
static const std::map<DiscIO::Region, const RegionSetting> region_settings = {
|
||||||
{DiscIO::Region::NTSC_J, {"JPN", "NTSC", "JP", "LJ"}},
|
{DiscIO::Region::NTSC_J, {"JPN", "NTSC", "JP", "LJ"}},
|
||||||
@ -282,10 +282,6 @@ bool CBoot::SetupWiiMemory(const DiscIO::Volume* volume, u64 ios_title_id)
|
|||||||
0x80000060 Copyright code
|
0x80000060 Copyright code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// When booting a WAD or the system menu, there will probably not be a disc inserted
|
|
||||||
if (volume)
|
|
||||||
DVDRead(*volume, 0x00000000, 0x00000000, 0x20, DiscIO::PARTITION_NONE); // Game Code
|
|
||||||
|
|
||||||
Memory::Write_U32(0x0D15EA5E, 0x00000020); // Another magic word
|
Memory::Write_U32(0x0D15EA5E, 0x00000020); // Another magic word
|
||||||
Memory::Write_U32(0x00000001, 0x00000024); // Unknown
|
Memory::Write_U32(0x00000001, 0x00000024); // Unknown
|
||||||
Memory::Write_U32(Memory::REALRAM_SIZE, 0x00000028); // MEM1 size 24MB
|
Memory::Write_U32(Memory::REALRAM_SIZE, 0x00000028); // MEM1 size 24MB
|
||||||
@ -345,9 +341,11 @@ bool CBoot::EmulatedBS2_Wii(const DiscIO::Volume* volume)
|
|||||||
if (!tmd.IsValid())
|
if (!tmd.IsValid())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!SetupWiiMemory(volume, tmd.GetIOSId()))
|
if (!SetupWiiMemory(tmd.GetIOSId()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
DVDRead(*volume, 0x00000000, 0x00000000, 0x20, DiscIO::PARTITION_NONE); // Game Code
|
||||||
|
|
||||||
// This is some kind of consistency check that is compared to the 0x00
|
// This is some kind of consistency check that is compared to the 0x00
|
||||||
// values as the game boots. This location keeps the 4 byte ID for as long
|
// values as the game boots. This location keeps the 4 byte ID for as long
|
||||||
// as the game is running. The 6 byte ID at 0x00 is overwritten sometime
|
// as the game is running. The 6 byte ID at 0x00 is overwritten sometime
|
||||||
|
@ -94,7 +94,7 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
|
|||||||
IOS::HLE::CreateVirtualFATFilesystem();
|
IOS::HLE::CreateVirtualFATFilesystem();
|
||||||
// setup Wii memory
|
// setup Wii memory
|
||||||
|
|
||||||
if (!SetupWiiMemory(nullptr, ContentLoader.GetTMD().GetIOSId()))
|
if (!SetupWiiMemory(ContentLoader.GetTMD().GetIOSId()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
IOS::HLE::Device::ES::LoadWAD(_pFilename);
|
IOS::HLE::Device::ES::LoadWAD(_pFilename);
|
||||||
|
Reference in New Issue
Block a user