#include "stdafx.h" #include "Emu/System.h" #include "Emu/ARMv7/PSVFuncList.h" extern psv_log_base sceNgs; struct SceNgsVoiceDefinition; typedef u32 SceNgsModuleID; typedef u32 SceNgsParamsID; typedef vm::psv::ptr SceNgsHVoice; typedef vm::psv::ptr SceNgsHPatch; typedef vm::psv::ptr SceNgsHSynSystem; typedef vm::psv::ptr SceNgsHRack; struct SceNgsModuleParamHeader { s32 moduleId; s32 chan; }; struct SceNgsParamsDescriptor { SceNgsParamsID id; u32 size; }; struct SceNgsBufferInfo { vm::psv::ptr data; u32 size; }; struct SceNgsVoicePreset { s32 nNameOffset; u32 uNameLength; s32 nPresetDataOffset; u32 uSizePresetData; s32 nBypassFlagsOffset; u32 uNumBypassFlags; }; struct SceNgsSystemInitParams { s32 nMaxRacks; s32 nMaxVoices; s32 nGranularity; s32 nSampleRate; s32 nMaxModules; }; struct SceNgsRackDescription { vm::psv::ptr pVoiceDefn; s32 nVoices; s32 nChannelsPerVoice; s32 nMaxPatchesPerInput; s32 nPatchesPerOutput; vm::psv::ptr pUserReleaseData; }; struct SceNgsPatchSetupInfo { SceNgsHVoice hVoiceSource; s32 nSourceOutputIndex; s32 nSourceOutputSubIndex; SceNgsHVoice hVoiceDestination; s32 nTargetInputIndex; }; struct SceNgsVolumeMatrix { float m[2][2]; }; struct SceNgsPatchRouteInfo { s32 nOutputChannels; s32 nInputChannels; SceNgsVolumeMatrix vols; }; struct SceNgsVoiceInfo { u32 uVoiceState; u32 uNumModules; u32 uNumInputs; u32 uNumOutputs; u32 uNumPatchesPerOutput; }; struct SceNgsCallbackInfo { SceNgsHVoice hVoiceHandle; SceNgsHRack hRackHandle; SceNgsModuleID uModuleID; s32 nCallbackData; s32 nCallbackData2; vm::psv::ptr pCallbackPtr; vm::psv::ptr pUserData; }; typedef vm::psv::ptr pCallbackInfo)> SceNgsCallbackFunc; typedef SceNgsCallbackFunc SceNgsRackReleaseCallbackFunc; typedef SceNgsCallbackFunc SceNgsModuleCallbackFunc; typedef SceNgsCallbackFunc SceNgsParamsErrorCallbackFunc; struct SceSulphaNgsConfig { u32 maxNamedObjects; u32 maxTraceBufferBytes; }; s32 sceNgsSystemGetRequiredMemorySize(vm::psv::ptr pSynthParams, vm::psv::ptr pnSize) { throw __FUNCTION__; } s32 sceNgsSystemInit(vm::psv::ptr pSynthSysMemory, const u32 uMemSize, vm::psv::ptr pSynthParams, vm::psv::ptr pSystemHandle) { throw __FUNCTION__; } s32 sceNgsSystemUpdate(SceNgsHSynSystem hSystemHandle) { throw __FUNCTION__; } s32 sceNgsSystemRelease(SceNgsHSynSystem hSystemHandle) { throw __FUNCTION__; } s32 sceNgsSystemLock(SceNgsHSynSystem hSystemHandle) { throw __FUNCTION__; } s32 sceNgsSystemUnlock(SceNgsHSynSystem hSystemHandle) { throw __FUNCTION__; } s32 sceNgsSystemSetParamErrorCallback(SceNgsHSynSystem hSystemHandle, const SceNgsParamsErrorCallbackFunc callbackFuncPtr) { throw __FUNCTION__; } s32 sceNgsSystemSetFlags(SceNgsHSynSystem hSystemHandle, const u32 uSystemFlags) { throw __FUNCTION__; } s32 sceNgsRackGetRequiredMemorySize(SceNgsHSynSystem hSystemHandle, vm::psv::ptr pRackDesc, vm::psv::ptr pnSize) { throw __FUNCTION__; } s32 sceNgsRackInit(SceNgsHSynSystem hSystemHandle, vm::psv::ptr pRackBuffer, vm::psv::ptr pRackDesc, vm::psv::ptr pRackHandle) { throw __FUNCTION__; } s32 sceNgsRackGetVoiceHandle(SceNgsHRack hRackHandle, const u32 uIndex, vm::psv::ptr pVoiceHandle) { throw __FUNCTION__; } s32 sceNgsRackRelease(SceNgsHRack hRackHandle, const SceNgsRackReleaseCallbackFunc callbackFuncPtr) { throw __FUNCTION__; } s32 sceNgsRackSetParamErrorCallback(SceNgsHRack hRackHandle, const SceNgsParamsErrorCallbackFunc callbackFuncPtr) { throw __FUNCTION__; } s32 sceNgsVoiceInit(SceNgsHVoice hVoiceHandle, vm::psv::ptr pPreset, const u32 uInitFlags) { throw __FUNCTION__; } s32 sceNgsVoicePlay(SceNgsHVoice hVoiceHandle) { throw __FUNCTION__; } s32 sceNgsVoiceKeyOff(SceNgsHVoice hVoiceHandle) { throw __FUNCTION__; } s32 sceNgsVoiceKill(SceNgsHVoice hVoiceHandle) { throw __FUNCTION__; } s32 sceNgsVoicePause(SceNgsHVoice hVoiceHandle) { throw __FUNCTION__; } s32 sceNgsVoiceResume(SceNgsHVoice hVoiceHandle) { throw __FUNCTION__; } s32 sceNgsVoiceSetPreset(SceNgsHVoice hVoiceHandle, vm::psv::ptr pVoicePreset) { throw __FUNCTION__; } s32 sceNgsVoiceLockParams(SceNgsHVoice hVoiceHandle, const u32 uModule, const SceNgsParamsID uParamsInterfaceId, vm::psv::ptr pParamsBuffer) { throw __FUNCTION__; } s32 sceNgsVoiceUnlockParams(SceNgsHVoice hVoiceHandle, const u32 uModule) { throw __FUNCTION__; } s32 sceNgsVoiceSetParamsBlock(SceNgsHVoice hVoiceHandle, vm::psv::ptr pParamData, const u32 uSize, vm::psv::ptr pnErrorCount) { throw __FUNCTION__; } s32 sceNgsVoiceBypassModule(SceNgsHVoice hVoiceHandle, const u32 uModule, const u32 uBypassFlag) { throw __FUNCTION__; } s32 sceNgsVoiceSetModuleCallback(SceNgsHVoice hVoiceHandle, const u32 uModule, const SceNgsModuleCallbackFunc callbackFuncPtr, vm::psv::ptr pUserData) { throw __FUNCTION__; } s32 sceNgsVoiceSetFinishedCallback(SceNgsHVoice hVoiceHandle, const SceNgsCallbackFunc callbackFuncPtr, vm::psv::ptr pUserData) { throw __FUNCTION__; } s32 sceNgsVoiceGetStateData(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pMem, const u32 uMemSize) { throw __FUNCTION__; } s32 sceNgsVoiceGetInfo(SceNgsHVoice hVoiceHandle, vm::psv::ptr pInfo) { throw __FUNCTION__; } s32 sceNgsVoiceGetModuleType(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pModuleType) { throw __FUNCTION__; } s32 sceNgsVoiceGetModuleBypass(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr puBypassFlag) { throw __FUNCTION__; } s32 sceNgsVoiceGetParamsOutOfRange(SceNgsHVoice hVoiceHandle, const u32 uModule, vm::psv::ptr pszMessageBuffer) { throw __FUNCTION__; } s32 sceNgsPatchCreateRouting(vm::psv::ptr pPatchInfo, vm::psv::ptr pPatchHandle) { throw __FUNCTION__; } s32 sceNgsPatchGetInfo(SceNgsHPatch hPatchHandle, vm::psv::ptr pRouteInfo, vm::psv::ptr pSetup) { throw __FUNCTION__; } s32 sceNgsVoiceGetOutputPatch(SceNgsHVoice hVoiceHandle, const s32 nOutputIndex, const s32 nSubIndex, vm::psv::ptr pPatchHandle) { throw __FUNCTION__; } s32 sceNgsPatchRemoveRouting(SceNgsHPatch hPatchHandle) { throw __FUNCTION__; } //s32 sceNgsVoicePatchSetVolume(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, const s32 nInputChannel, const float fVol) //{ // throw __FUNCTION__; //} s32 sceNgsVoicePatchSetVolumes(SceNgsHPatch hPatchHandle, const s32 nOutputChannel, vm::psv::ptr pVolumes, const s32 nVols) { throw __FUNCTION__; } s32 sceNgsVoicePatchSetVolumesMatrix(SceNgsHPatch hPatchHandle, vm::psv::ptr pMatrix) { throw __FUNCTION__; } s32 sceNgsModuleGetNumPresets(SceNgsHSynSystem hSystemHandle, const SceNgsModuleID uModuleID, vm::psv::ptr puNumPresets) { throw __FUNCTION__; } s32 sceNgsModuleGetPreset(SceNgsHSynSystem hSystemHandle, const SceNgsModuleID uModuleID, const u32 uPresetIndex, vm::psv::ptr pParamsBuffer) { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetCompressorBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetCompressorSideChainBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetDelayBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetDistortionBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetEnvelopeBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetEqBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetMasterBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetMixerBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetPauserBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetReverbBuss() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetSasEmuVoice() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetSimpleVoice() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetTemplate1() { throw __FUNCTION__; } vm::psv::ptr sceNgsVoiceDefGetAtrac9Voice() { throw __FUNCTION__; } s32 sceSulphaNgsGetDefaultConfig(vm::psv::ptr config) { throw __FUNCTION__; } s32 sceSulphaNgsGetNeededMemory(vm::psv::ptr config, vm::psv::ptr sizeInBytes) { throw __FUNCTION__; } s32 sceSulphaNgsInit(vm::psv::ptr config, vm::psv::ptr buffer, u32 sizeInBytes) { throw __FUNCTION__; } s32 sceSulphaNgsShutdown() { throw __FUNCTION__; } s32 sceSulphaNgsSetSynthName(SceNgsHSynSystem synthHandle, vm::psv::ptr name) { throw __FUNCTION__; } s32 sceSulphaNgsSetRackName(SceNgsHRack rackHandle, vm::psv::ptr name) { throw __FUNCTION__; } s32 sceSulphaNgsSetVoiceName(SceNgsHVoice voiceHandle, vm::psv::ptr name) { throw __FUNCTION__; } s32 sceSulphaNgsSetSampleName(vm::psv::ptr location, u32 length, vm::psv::ptr name) { throw __FUNCTION__; } s32 sceSulphaNgsTrace(vm::psv::ptr message) { throw __FUNCTION__; } #define REG_FUNC(nid, name) reg_psv_func(nid, &sceNgs, #name, name) psv_log_base sceNgs("SceNgs", []() { sceNgs.on_load = nullptr; sceNgs.on_unload = nullptr; sceNgs.on_stop = nullptr; REG_FUNC(0x6CE8B36F, sceNgsSystemGetRequiredMemorySize); REG_FUNC(0xED14CF4A, sceNgsSystemInit); REG_FUNC(0x684F080C, sceNgsSystemUpdate); REG_FUNC(0x4A25BEBC, sceNgsSystemRelease); REG_FUNC(0xB9D971F2, sceNgsSystemLock); REG_FUNC(0x0A93EA96, sceNgsSystemUnlock); REG_FUNC(0x5ADD22DC, sceNgsSystemSetParamErrorCallback); REG_FUNC(0x64D80013, sceNgsSystemSetFlags); REG_FUNC(0x477318C0, sceNgsRackGetRequiredMemorySize); REG_FUNC(0x0A92E4EC, sceNgsRackInit); REG_FUNC(0xFE1A98E9, sceNgsRackGetVoiceHandle); REG_FUNC(0xDD5CA10B, sceNgsRackRelease); REG_FUNC(0x534B6E3F, sceNgsRackSetParamErrorCallback); REG_FUNC(0x1DDBEBEB, sceNgsVoiceInit); REG_FUNC(0xFA0A0F34, sceNgsVoicePlay); REG_FUNC(0xBB13373D, sceNgsVoiceKeyOff); REG_FUNC(0x0E291AAD, sceNgsVoiceKill); REG_FUNC(0xD7786E99, sceNgsVoicePause); REG_FUNC(0x54CFB981, sceNgsVoiceResume); REG_FUNC(0x8A88E665, sceNgsVoiceSetPreset); REG_FUNC(0xAB6BEF8F, sceNgsVoiceLockParams); REG_FUNC(0x3D46D8A7, sceNgsVoiceUnlockParams); REG_FUNC(0xFB8174B1, sceNgsVoiceSetParamsBlock); REG_FUNC(0x9AB87E71, sceNgsVoiceBypassModule); REG_FUNC(0x24E909A8, sceNgsVoiceSetModuleCallback); REG_FUNC(0x17A6F564, sceNgsVoiceSetFinishedCallback); REG_FUNC(0xC9B8C0B4, sceNgsVoiceGetStateData); REG_FUNC(0x5551410D, sceNgsVoiceGetInfo); REG_FUNC(0xB307185E, sceNgsVoiceGetModuleType); REG_FUNC(0x431BF3AB, sceNgsVoiceGetModuleBypass); REG_FUNC(0xD668B49C, sceNgsPatchCreateRouting); REG_FUNC(0x98703DBC, sceNgsPatchGetInfo); REG_FUNC(0x01A52E3A, sceNgsVoiceGetOutputPatch); REG_FUNC(0xD0C9AE5A, sceNgsPatchRemoveRouting); //REG_FUNC(0xA3C807BC, sceNgsVoicePatchSetVolume); REG_FUNC(0xBD6F57F0, sceNgsVoicePatchSetVolumes); REG_FUNC(0xA0F5402D, sceNgsVoicePatchSetVolumesMatrix); REG_FUNC(0xF6B68C31, sceNgsVoiceDefGetEnvelopeBuss); REG_FUNC(0x9DCF50F5, sceNgsVoiceDefGetReverbBuss); REG_FUNC(0x214485D6, sceNgsVoiceDefGetPauserBuss); REG_FUNC(0xE0AC8776, sceNgsVoiceDefGetMixerBuss); REG_FUNC(0x79A121D1, sceNgsVoiceDefGetMasterBuss); REG_FUNC(0x0E0ACB68, sceNgsVoiceDefGetCompressorBuss); REG_FUNC(0x1AF83512, sceNgsVoiceDefGetCompressorSideChainBuss); REG_FUNC(0xAAD90DEB, sceNgsVoiceDefGetDistortionBuss); REG_FUNC(0xF964120E, sceNgsVoiceDefGetEqBuss); REG_FUNC(0xE9B572B7, sceNgsVoiceDefGetTemplate1); REG_FUNC(0x0D5399CF, sceNgsVoiceDefGetSimpleVoice); REG_FUNC(0x1F51C2BA, sceNgsVoiceDefGetSasEmuVoice); REG_FUNC(0x4CBE08F3, sceNgsVoiceGetParamsOutOfRange); REG_FUNC(0x14EF65A0, sceNgsVoiceDefGetAtrac9Voice); REG_FUNC(0x4D705E3E, sceNgsVoiceDefGetDelayBuss); REG_FUNC(0x5FD8AEDB, sceSulphaNgsGetDefaultConfig); REG_FUNC(0x793E3E8C, sceSulphaNgsGetNeededMemory); REG_FUNC(0xAFCD824F, sceSulphaNgsInit); REG_FUNC(0xD124BFB1, sceSulphaNgsShutdown); REG_FUNC(0x2F3F7515, sceSulphaNgsSetSynthName); REG_FUNC(0x251AF6A9, sceSulphaNgsSetRackName); REG_FUNC(0x508975BD, sceSulphaNgsSetVoiceName); REG_FUNC(0x54EC5B8D, sceSulphaNgsSetSampleName); REG_FUNC(0xDC7C0F05, sceSulphaNgsTrace); REG_FUNC(0x5C71FE09, sceNgsModuleGetNumPresets); REG_FUNC(0xC58298A7, sceNgsModuleGetPreset); });