diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 95e838aa7d..38643ffa0e 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -72,6 +72,7 @@ set(SRCS HLE/sceParseUri.cpp HLE/sceParseHttp.cpp HLE/sceVaudio.cpp + HLE/sceAudiocodec.cpp HW/MemoryStick.cpp HW/MediaEngine.cpp HW/SasAudio.cpp diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index cc7f5e9260..15613de74b 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -188,6 +188,7 @@ + @@ -368,6 +369,7 @@ + diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters index 7172448df5..4cf70aa22e 100644 --- a/Core/Core.vcxproj.filters +++ b/Core/Core.vcxproj.filters @@ -433,6 +433,9 @@ HW + + HLE\Libraries + @@ -801,6 +804,9 @@ HW + + HLE\Libraries + diff --git a/Core/HLE/HLETables.cpp b/Core/HLE/HLETables.cpp index 4d69d4e47f..4b2713828b 100644 --- a/Core/HLE/HLETables.cpp +++ b/Core/HLE/HLETables.cpp @@ -64,6 +64,7 @@ #include "sceNp.h" #include "sceMd5.h" #include "sceJpeg.h" +#include "sceAudiocodec.h" #define N(s) s @@ -269,6 +270,7 @@ void RegisterAllModules() { Register_sceNpAuth(); Register_sceMd5(); Register_sceJpeg(); + Register_sceAudiocodec(); for (int i = 0; i < numModules; i++) { diff --git a/Core/HLE/sceAudiocodec.cpp b/Core/HLE/sceAudiocodec.cpp new file mode 100644 index 0000000000..b89b3e6e1d --- /dev/null +++ b/Core/HLE/sceAudiocodec.cpp @@ -0,0 +1,45 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#include "Core/HLE/HLE.h" + +#include "sceAudiocodec.h" +#include "Core/Reporting.h" + +int sceAudiocodecInit(u32 audioCodec, int codeType) { + ERROR_LOG_REPORT(HLE, "UNIMPL sceAudiocodecInit(%08x, %x)", audioCodec, codeType); + return 0; +} +int sceAudiocodecDecode(u32 audioCodec, int codeType) { + ERROR_LOG_REPORT(HLE, "UNIMPL sceAudiocodecDecode(%08x, %x)", audioCodec, codeType); + return 0; +} + +const HLEFunction sceAudiocodec[] = +{ + {0x70A703F8, WrapI_UI, "sceAudiocodecDecode"}, + {0x5B37EB1D, WrapI_UI, "sceAudiocodecInit"}, + {0x8ACA11D5, 0, "sceAudiocodecGetInfo"}, + {0x3A20A200, 0, "sceAudiocodecGetEDRAM"}, + {0x29681260, 0, "sceAudiocodecReleaseEDRAM"}, + {0x9D3F790C, 0, "sceAudiocodeCheckNeedMem"}, +}; + +void Register_sceAudiocodec() +{ + RegisterModule("sceAudiocodec", ARRAY_SIZE(sceAudiocodec), sceAudiocodec); +} \ No newline at end of file diff --git a/Core/HLE/sceAudiocodec.h b/Core/HLE/sceAudiocodec.h new file mode 100644 index 0000000000..f909bef490 --- /dev/null +++ b/Core/HLE/sceAudiocodec.h @@ -0,0 +1,59 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#pragma once + +typedef struct +{ + s32 unk0; + s32 unk4; + s32 err; // 8 + s32 edramAddr; // 12 + s32 neededMem; // 16 + s32 unk20; + u32 inBuf; // 24 + s32 unk28; + u32 outBuf; // 32 + s32 unk36; + s8 unk40; + s8 unk41; + s8 unk42; + s8 unk43; + s8 unk44; + s8 unk45; + s8 unk46; + s8 unk47; + s32 unk48; + s32 unk52; + s32 unk56; + s32 unk60; + s32 unk64; + s32 unk68; + s32 unk72; + s32 unk76; + s32 unk80; + s32 unk84; + s32 unk88; + s32 unk92; + s32 unk96; + s32 unk100; + u32 allocMem; // 104 + // make sure the size is 128 + u8 unk[20]; +} SceAudiocodecCodec; + +void Register_sceAudiocodec(); \ No newline at end of file