summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-08-01 15:28:06 +0200
committerJosJuice <josjuice@gmail.com>2017-08-01 16:05:20 +0200
commiteb6f0a7258fcc28f1fcd07f435fdf674b05079a2 (patch)
tree855973bbc151dcfa8b1c0f9f4398c3aac174c532 /Source
parent42d7dc2e08939d9b6944e0ef36ec37c970d884d5 (diff)
Boot: Remove volume parameter from SetupWiiMemory
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/Boot/Boot.cpp2
-rw-r--r--Source/Core/Core/Boot/Boot.h2
-rw-r--r--Source/Core/Core/Boot/Boot_BS2Emu.cpp10
-rw-r--r--Source/Core/Core/Boot/Boot_WiiWAD.cpp2
4 files changed, 7 insertions, 9 deletions
diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp
index 1b32f5854b..052f4eabe0 100644
--- a/Source/Core/Core/Boot/Boot.cpp
+++ b/Source/Core/Core/Boot/Boot.cpp
@@ -332,7 +332,7 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
HID4.SBE = 1;
// 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.
- SetupWiiMemory(nullptr, 0x000000010000003a);
+ SetupWiiMemory(0x000000010000003a);
}
else
{
diff --git a/Source/Core/Core/Boot/Boot.h b/Source/Core/Core/Boot/Boot.h
index 333f0e4fc5..041a27f294 100644
--- a/Source/Core/Core/Boot/Boot.h
+++ b/Source/Core/Core/Boot/Boot.h
@@ -108,7 +108,7 @@ private:
static bool Load_BS2(const std::string& boot_rom_filename);
static void SetupGCMemory();
- static bool SetupWiiMemory(const DiscIO::Volume* volume, u64 ios_title_id);
+ static bool SetupWiiMemory(u64 ios_title_id);
};
class BootExecutableReader
diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp
index 21503de918..b3e3fb3fa0 100644
--- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp
+++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp
@@ -216,7 +216,7 @@ bool CBoot::EmulatedBS2_GC(const DiscIO::Volume* 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 = {
{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
*/
- // 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(0x00000001, 0x00000024); // Unknown
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())
return false;
- if (!SetupWiiMemory(volume, tmd.GetIOSId()))
+ if (!SetupWiiMemory(tmd.GetIOSId()))
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
// 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
diff --git a/Source/Core/Core/Boot/Boot_WiiWAD.cpp b/Source/Core/Core/Boot/Boot_WiiWAD.cpp
index cb2f3e9c10..145ae48a1f 100644
--- a/Source/Core/Core/Boot/Boot_WiiWAD.cpp
+++ b/Source/Core/Core/Boot/Boot_WiiWAD.cpp
@@ -94,7 +94,7 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
IOS::HLE::CreateVirtualFATFilesystem();
// setup Wii memory
- if (!SetupWiiMemory(nullptr, ContentLoader.GetTMD().GetIOSId()))
+ if (!SetupWiiMemory(ContentLoader.GetTMD().GetIOSId()))
return false;
IOS::HLE::Device::ES::LoadWAD(_pFilename);