mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-03 21:41:19 +12:00
24 lines
611 B
C++
24 lines
611 B
C++
#include "Cafe/OS/common/OSCommon.h"
|
|
|
|
namespace nn::temp
|
|
{
|
|
uint64 tempIdGenerator = 0xdc1b04bd961f2c04ULL;
|
|
|
|
void nnTempExport_TEMPCreateAndInitTempDir(PPCInterpreter_t* hCPU)
|
|
{
|
|
forceLogDebug_printf("TEMPCreateAndInitTempDir(...) - placeholder");
|
|
|
|
// create random temp id
|
|
memory_writeU64Slow(hCPU->gpr[5], tempIdGenerator);
|
|
tempIdGenerator = (tempIdGenerator << 3) | (tempIdGenerator >> 61);
|
|
tempIdGenerator += 0x56e28bd5f4ULL;
|
|
|
|
osLib_returnFromFunction(hCPU, 0);
|
|
}
|
|
|
|
void Initialize()
|
|
{
|
|
osLib_addFunction("nn_temp", "TEMPCreateAndInitTempDir", nnTempExport_TEMPCreateAndInitTempDir);
|
|
}
|
|
};
|
|
|