Remove useless ES wrappers from the main IOS file
This removes wrappers for ES_DIVerify and ES::LoadWAD. They are not really useful as we can simply call the ES function directly, and it is actually somewhat confusing because both functions are static and are not tied to a particular ES instance.
This commit is contained in:
parent
5a74343d06
commit
d97ae1054f
|
@ -21,6 +21,7 @@
|
||||||
#include "Core/HW/DVDInterface.h"
|
#include "Core/HW/DVDInterface.h"
|
||||||
#include "Core/HW/EXI/EXI_DeviceIPL.h"
|
#include "Core/HW/EXI/EXI_DeviceIPL.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
|
#include "Core/IOS/ES/ES.h"
|
||||||
#include "Core/IOS/ES/Formats.h"
|
#include "Core/IOS/ES/Formats.h"
|
||||||
#include "Core/IOS/IPC.h"
|
#include "Core/IOS/IPC.h"
|
||||||
#include "Core/PatchEngine.h"
|
#include "Core/PatchEngine.h"
|
||||||
|
@ -406,7 +407,7 @@ bool CBoot::EmulatedBS2_Wii()
|
||||||
DEBUG_LOG(BOOT, "Run iAppLoaderClose");
|
DEBUG_LOG(BOOT, "Run iAppLoaderClose");
|
||||||
RunFunction(iAppLoaderClose);
|
RunFunction(iAppLoaderClose);
|
||||||
|
|
||||||
IOS::HLE::ES_DIVerify(tmd, DVDInterface::GetVolume().GetTicket());
|
IOS::HLE::Device::ES::DIVerify(tmd, DVDInterface::GetVolume().GetTicket());
|
||||||
|
|
||||||
// return
|
// return
|
||||||
PC = PowerPC::ppcState.gpr[3];
|
PC = PowerPC::ppcState.gpr[3];
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "Common/NandPaths.h"
|
#include "Common/NandPaths.h"
|
||||||
|
|
||||||
#include "Core/Boot/Boot.h"
|
#include "Core/Boot/Boot.h"
|
||||||
|
#include "Core/IOS/ES/ES.h"
|
||||||
#include "Core/IOS/FS/FileIO.h"
|
#include "Core/IOS/FS/FileIO.h"
|
||||||
#include "Core/IOS/IPC.h"
|
#include "Core/IOS/IPC.h"
|
||||||
#include "Core/PatchEngine.h"
|
#include "Core/PatchEngine.h"
|
||||||
|
@ -87,7 +88,7 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
|
||||||
if (!SetupWiiMemory(ContentLoader.GetTMD().GetIOSId()))
|
if (!SetupWiiMemory(ContentLoader.GetTMD().GetIOSId()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
IOS::HLE::SetDefaultContentFile(_pFilename);
|
IOS::HLE::Device::ES::LoadWAD(_pFilename);
|
||||||
if (!IOS::HLE::BootstrapPPC(ContentLoader))
|
if (!IOS::HLE::BootstrapPPC(ContentLoader))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
#include "Core/HW/DVDInterface.h"
|
#include "Core/HW/DVDInterface.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
#include "Core/IOS/DI/DI.h"
|
#include "Core/IOS/DI/DI.h"
|
||||||
|
#include "Core/IOS/ES/ES.h"
|
||||||
#include "Core/IOS/ES/Formats.h"
|
#include "Core/IOS/ES/Formats.h"
|
||||||
#include "Core/IOS/IPC.h"
|
|
||||||
#include "DiscIO/Volume.h"
|
#include "DiscIO/Volume.h"
|
||||||
|
|
||||||
namespace IOS
|
namespace IOS
|
||||||
|
@ -106,10 +106,10 @@ IPCCommandResult DI::IOCtlV(const IOCtlVRequest& request)
|
||||||
INFO_LOG(IOS_DI, "DVDLowOpenPartition: partition_offset 0x%016" PRIx64, partition_offset);
|
INFO_LOG(IOS_DI, "DVDLowOpenPartition: partition_offset 0x%016" PRIx64, partition_offset);
|
||||||
|
|
||||||
// Read TMD to the buffer
|
// Read TMD to the buffer
|
||||||
const ES::TMDReader tmd = DVDInterface::GetVolume().GetTMD();
|
const IOS::ES::TMDReader tmd = DVDInterface::GetVolume().GetTMD();
|
||||||
const std::vector<u8> raw_tmd = tmd.GetRawTMD();
|
const std::vector<u8> raw_tmd = tmd.GetRawTMD();
|
||||||
Memory::CopyToEmu(request.io_vectors[0].address, raw_tmd.data(), raw_tmd.size());
|
Memory::CopyToEmu(request.io_vectors[0].address, raw_tmd.data(), raw_tmd.size());
|
||||||
ES_DIVerify(tmd, DVDInterface::GetVolume().GetTicket());
|
ES::DIVerify(tmd, DVDInterface::GetVolume().GetTicket());
|
||||||
|
|
||||||
return_value = 1;
|
return_value = 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1491,6 +1491,8 @@ const DiscIO::CNANDContentLoader& ES::AccessContentDevice(u64 title_id)
|
||||||
return DiscIO::CNANDContentManager::Access().GetNANDLoader(title_id, Common::FROM_SESSION_ROOT);
|
return DiscIO::CNANDContentManager::Access().GetNANDLoader(title_id, Common::FROM_SESSION_ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is technically an ioctlv in IOS's ES, but it is an internal API which cannot be
|
||||||
|
// used from the PowerPC (for unpatched IOSes anyway).
|
||||||
s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& ticket)
|
s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& ticket)
|
||||||
{
|
{
|
||||||
s_title_context.Clear();
|
s_title_context.Clear();
|
||||||
|
|
|
@ -737,18 +737,6 @@ bool BootstrapPPC(const DiscIO::CNANDContentLoader& content_loader)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDefaultContentFile(const std::string& file_name)
|
|
||||||
{
|
|
||||||
std::lock_guard<std::mutex> lock(s_device_map_mutex);
|
|
||||||
s_es_handles[0]->LoadWAD(file_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XXX: also pass certificate chains?
|
|
||||||
void ES_DIVerify(const ES::TMDReader& tmd, const ES::TicketReader& ticket)
|
|
||||||
{
|
|
||||||
Device::ES::DIVerify(tmd, ticket);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDIO_EventNotify()
|
void SDIO_EventNotify()
|
||||||
{
|
{
|
||||||
// TODO: Potential race condition: If IsRunning() becomes false after
|
// TODO: Potential race condition: If IsRunning() becomes false after
|
||||||
|
|
|
@ -21,12 +21,6 @@ class CNANDContentLoader;
|
||||||
|
|
||||||
namespace IOS
|
namespace IOS
|
||||||
{
|
{
|
||||||
namespace ES
|
|
||||||
{
|
|
||||||
class TMDReader;
|
|
||||||
class TicketReader;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace HLE
|
namespace HLE
|
||||||
{
|
{
|
||||||
namespace Device
|
namespace Device
|
||||||
|
@ -72,10 +66,6 @@ bool BootstrapPPC(const DiscIO::CNANDContentLoader& content_loader);
|
||||||
// Do State
|
// Do State
|
||||||
void DoState(PointerWrap& p);
|
void DoState(PointerWrap& p);
|
||||||
|
|
||||||
// Set default content file
|
|
||||||
void SetDefaultContentFile(const std::string& file_name);
|
|
||||||
void ES_DIVerify(const ES::TMDReader& tmd, const ES::TicketReader& ticket);
|
|
||||||
|
|
||||||
void SDIO_EventNotify();
|
void SDIO_EventNotify();
|
||||||
|
|
||||||
std::shared_ptr<Device::Device> GetDeviceByName(const std::string& device_name);
|
std::shared_ptr<Device::Device> GetDeviceByName(const std::string& device_name);
|
||||||
|
|
Loading…
Reference in New Issue