mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-22 21:09:52 +00:00
NPDRM: Logging cleanup, remove assert (turn into debug assert)
This commit is contained in:
parent
6f9a6b0d6e
commit
2e53d2f9f9
@ -428,10 +428,12 @@ NPDRMDemoBlockDevice::NPDRMDemoBlockDevice(FileLoader *fileLoader)
|
||||
memcpy(psarStr, &psar_id, 4);
|
||||
|
||||
// Protect against a badly decrypted header, and send information through the assert about what's being played (implicitly).
|
||||
_assert_msg_(blockLBAs_ <= 4096, "Bad blockLBAs in header: %08x (%s) psar: %s", blockLBAs_, fileLoader->GetPath().ToVisualString().c_str(), psarStr);
|
||||
_dbg_assert_msg_(blockLBAs_ <= 4096, "Bad blockLBAs in header: %08x (%s) psar: %s", blockLBAs_, fileLoader->GetPath().ToVisualString().c_str(), psarStr);
|
||||
|
||||
// When we remove the above assert, let's just try to survive.
|
||||
if (blockLBAs_ > 4096) {
|
||||
ERROR_LOG(Log::Loader, "Bad blockLBAs in header: %08x (%s) psar: %s", blockLBAs_, fileLoader->GetPath().ToVisualString().c_str(), psarStr);
|
||||
// We'll end up displaying an error message since ReadBlock will fail.
|
||||
return;
|
||||
}
|
||||
|
||||
@ -447,7 +449,7 @@ NPDRMDemoBlockDevice::NPDRMDemoBlockDevice(FileLoader *fileLoader)
|
||||
table_ = new table_info[numBlocks_];
|
||||
|
||||
readSize = fileLoader_->ReadAt(psarOffset + tableOffset_, 1, tableSize_, table_);
|
||||
if (readSize!=tableSize_){
|
||||
if (readSize != tableSize_){
|
||||
ERROR_LOG(Log::Loader, "Invalid NPUMDIMG table!");
|
||||
}
|
||||
|
||||
|
@ -4,27 +4,23 @@
|
||||
#include "Core/HLE/FunctionWrappers.h"
|
||||
#include "Core/HLE/sceIo.h"
|
||||
|
||||
static int sceNpDrmSetLicenseeKey(u32 npDrmKeyAddr)
|
||||
{
|
||||
INFO_LOG(Log::HLE, "call sceNpDrmSetLicenseeKey(%08x)", npDrmKeyAddr);
|
||||
static int sceNpDrmSetLicenseeKey(u32 npDrmKeyAddr) {
|
||||
WARN_LOG(Log::HLE, "UNIMPL: sceNpDrmSetLicenseeKey(%08x)", npDrmKeyAddr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sceNpDrmClearLicenseeKey()
|
||||
{
|
||||
INFO_LOG(Log::HLE, "call sceNpDrmClearLicenseeKey()");
|
||||
static int sceNpDrmClearLicenseeKey() {
|
||||
WARN_LOG(Log::HLE, "UNIMPL: sceNpDrmClearLicenseeKey()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sceNpDrmRenameCheck(const char *filename)
|
||||
{
|
||||
INFO_LOG(Log::HLE, "call sceNpDrmRenameCheck(%s)", filename);
|
||||
static int sceNpDrmRenameCheck(const char *filename) {
|
||||
WARN_LOG(Log::HLE, "UNIMPL: sceNpDrmRenameCheck(%s)", filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sceNpDrmEdataSetupKey(u32 edataFd)
|
||||
{
|
||||
INFO_LOG(Log::HLE, "call sceNpDrmEdataSetupKey %x", edataFd);
|
||||
static int sceNpDrmEdataSetupKey(u32 edataFd) {
|
||||
INFO_LOG(Log::HLE, "sceNpDrmEdataSetupKey(%x)", edataFd);
|
||||
int usec = 0;
|
||||
// set PGD offset
|
||||
int retval = __IoIoctl(edataFd, 0x04100002, 0x90, 0, 0, 0, usec);
|
||||
@ -37,20 +33,17 @@ static int sceNpDrmEdataSetupKey(u32 edataFd)
|
||||
return hleDelayResult(retval, "io ctrl command", usec);
|
||||
}
|
||||
|
||||
static int sceNpDrmEdataGetDataSize(u32 edataFd)
|
||||
{
|
||||
INFO_LOG(Log::HLE, "call sceNpDrmEdataGetDataSize %x", edataFd);
|
||||
static int sceNpDrmEdataGetDataSize(u32 edataFd) {
|
||||
INFO_LOG(Log::HLE, "sceNpDrmEdataGetDataSize %x", edataFd);
|
||||
return sceIoIoctl(edataFd, 0x04100010, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
static int sceNpDrmOpen()
|
||||
{
|
||||
ERROR_LOG(Log::HLE, "UNIMPL sceNpDrmOpen");
|
||||
static int sceNpDrmOpen() {
|
||||
ERROR_LOG(Log::HLE, "UNIMPL: sceNpDrmOpen()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
const HLEFunction sceNpDrm[] =
|
||||
{
|
||||
const HLEFunction sceNpDrm[] = {
|
||||
{0XA1336091, &WrapI_U<sceNpDrmSetLicenseeKey>, "sceNpDrmSetLicenseeKey", 'i', "x"},
|
||||
{0X9B745542, &WrapI_V<sceNpDrmClearLicenseeKey>, "sceNpDrmClearLicenseeKey", 'i', "" },
|
||||
{0X275987D1, &WrapI_C<sceNpDrmRenameCheck>, "sceNpDrmRenameCheck", 'i', "s"},
|
||||
@ -59,8 +52,7 @@ const HLEFunction sceNpDrm[] =
|
||||
{0X2BAA4294, &WrapI_V<sceNpDrmOpen>, "sceNpDrmOpen", 'i', "" },
|
||||
};
|
||||
|
||||
void Register_sceNpDrm()
|
||||
{
|
||||
void Register_sceNpDrm() {
|
||||
RegisterModule("sceNpDrm", ARRAY_SIZE(sceNpDrm), sceNpDrm);
|
||||
RegisterModule("scePspNpDrm_user", ARRAY_SIZE(sceNpDrm), sceNpDrm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user