Files
ppsspp/Core/HLE/scePspNpDrm_user.h
T
Henrik RydgårdandClaude Opus 5.5 52299a5e17 Savestate: Save sceDmac and sceUsbCam, which were never called, and NpDrm
__DmacDoState and __UsbCamDoState existed but weren't in the module list,
so the memcpy deadline and camera state carried over from before a load.
The NpDrm licensee key wasn't saved or reset at all, so EDATA opened after
a load in a fresh session couldn't be decrypted.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-28 11:32:07 -06:00

20 lines
823 B
C++

#pragma once
#include "Common/CommonTypes.h"
class PointerWrap;
void Register_sceNpDrm();
void __NpDrmInit();
void __NpDrmDoState(PointerWrap &p);
// A module wrapped in an NPDRM "\0PSPEDAT" container has its PRX encrypted against a key built
// from that container's header and, usually, the licensee key the game handed over through
// sceNpDrmSetLicenseeKey - which is why this lives here rather than with the PRX decrypter.
// Writes 16 bytes to keyOut, to be passed to pspDecryptPRX() as the seed.
//
// edatHeader must point at the 0x90 readable bytes of the container header. Returns false if the
// header asks for something we can't build, notably a licensee key the game never set.
// See docs/pkg_notes.md for the layout and where this came from.
bool NpDrmDeriveModuleKey(const u8 *edatHeader, u8 *keyOut);