This commit is contained in:
microsoftv 2024-11-26 19:59:07 -05:00
parent 58e26d01a7
commit 85d3e5d5e0
3 changed files with 29 additions and 32 deletions

View File

@ -7,9 +7,7 @@
#include <atomic>
#include "common/types.h"
#include <memory>
#include <mutex>
#include <stddef.h>
#include <vector>
namespace Core::Loader {

View File

@ -43,8 +43,8 @@ s32 StackBufferClose(StackBuffer* stackBuffer, size_t* outTotalSize) {
return ORBIS_OK;
}
s32 StackBufferOpen(StackBuffer* stackBuffer, void* bufferStart, size_t bufferSize, void** outBuffer,
u8 flags) {
s32 StackBufferOpen(StackBuffer* stackBuffer, void* bufferStart, size_t bufferSize,
void** outBuffer, u8 flags) {
stackBuffer->top = outBuffer;
stackBuffer->base = bufferStart;
stackBuffer->size = (size_t)bufferStart;
@ -144,15 +144,14 @@ s32 SystemSetup(const OrbisNgs2SystemOption* option, OrbisNgs2ContextBufferInfo*
}
if (hostBufferInfo->hostBufferSize < requiredBufferSize) {
LOG_ERROR(Lib_Ngs2, "Invalid system buffer size ({}<{}[byte])", hostBufferInfo->hostBufferSize,
requiredBufferSize);
LOG_ERROR(Lib_Ngs2, "Invalid system buffer size ({}<{}[byte])",
hostBufferInfo->hostBufferSize, requiredBufferSize);
return ORBIS_NGS2_ERROR_INVALID_BUFFER_SIZE;
}
// Setup
StackBufferOpen(&stackBuffer, hostBufferInfo->hostBuffer, hostBufferInfo->hostBufferSize,
&systemList,
optionFlags);
&systemList, optionFlags);
result = SystemSetupCore(&stackBuffer, option, &setupResult);
if (result < 0) {
@ -164,8 +163,8 @@ s32 SystemSetup(const OrbisNgs2SystemOption* option, OrbisNgs2ContextBufferInfo*
// Copy buffer results
setupResult.bufferInfo = *hostBufferInfo;
setupResult.hostFree = hostFree;
//setupResult.extraSystemData =
//setupResult.systemList = systemList;
// TODO
// setupResult.systemList = systemList;
OrbisNgs2Handle systemHandle = setupResult.systemHandle;
if (hostBufferInfo->hostBufferSize >= requiredBufferSize) {

View File

@ -55,27 +55,27 @@ struct OrbisNgs2SystemInfo {
struct OrbisNgs2RackInfo {
char name[ORBIS_NGS2_RACK_NAME_LENGTH]; // 0
OrbisNgs2Handle rackHandle; // 16
OrbisNgs2Handle rackHandle; // 16
OrbisNgs2ContextBufferInfo bufferInfo; // 24
OrbisNgs2Handle ownerSystemHandle; // 88
u32 type; // 96
u32 rackId; // 100
u32 uid; // 104
u32 type; // 96
u32 rackId; // 100
u32 uid; // 104
u32 minGrainSamples; // 108
u32 maxGrainSamples; // 112
u32 maxVoices; // 116
u32 maxVoices; // 116
u32 maxChannelWorks; // 120
u32 maxInputs; // 124
u32 maxMatrices; // 128
u32 maxPorts; // 132
u32 maxInputs; // 124
u32 maxMatrices; // 128
u32 maxPorts; // 132
u32 stateFlags; // 136
float lastProcessRatio; // 140
u64 lastProcessTick; // 144
u64 renderCount; // 152
u32 activeVoiceCount; // 160
u32 stateFlags; // 136
float lastProcessRatio; // 140
u64 lastProcessTick; // 144
u64 renderCount; // 152
u32 activeVoiceCount; // 160
u32 activeChannelWorkCount; // 164
};
@ -111,9 +111,9 @@ struct SystemInternal {
void* unknown;
};
rackList rackListPreset; // 152
rackList rackListNormal; // 176
rackList rackListMaster; // 200
rackList rackListPreset; // 152
rackList rackListNormal; // 176
rackList rackListMaster; // 200
void* unknown3; // 208
void* systemListPrev; // 216
@ -121,12 +121,12 @@ struct SystemInternal {
void* systemListNext; // 232
void* rackFunction; // 240
Kernel::PthreadMutex processLock; // 248
u32 hasProcessMutex; // 256
u32 unknown5; // 260
Kernel::PthreadMutex flushLock; // 264
u32 hasFlushMutex; // 272
u32 unknown6; // 276
Kernel::PthreadMutex processLock; // 248
u32 hasProcessMutex; // 256
u32 unknown5; // 260
Kernel::PthreadMutex flushLock; // 264
u32 hasFlushMutex; // 272
u32 unknown6; // 276
// info
u64 lastRenderTick; // 280