mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Merge pull request #7569 from sum2012/patch-1
Add sceAudioRouting,sceUsbCam,sceG729 module
This commit is contained in:
@@ -1172,6 +1172,8 @@ add_library(${CoreLibName} ${CoreLinkType}
|
||||
Core/HLE/sceAudio.cpp
|
||||
Core/HLE/sceAudiocodec.cpp
|
||||
Core/HLE/sceAudiocodec.h
|
||||
Core/HLE/sceAudioRouting.cpp
|
||||
Core/HLE/sceAudioRouting.h
|
||||
Core/HLE/sceAudio.h
|
||||
Core/HLE/sceCcc.h
|
||||
Core/HLE/sceCcc.cpp
|
||||
@@ -1185,6 +1187,8 @@ add_library(${CoreLibName} ${CoreLinkType}
|
||||
Core/HLE/sceDisplay.h
|
||||
Core/HLE/sceDmac.cpp
|
||||
Core/HLE/sceDmac.h
|
||||
Core/HLE/sceG729.cpp
|
||||
Core/HLE/sceG729.h
|
||||
Core/HLE/sceGameUpdate.cpp
|
||||
Core/HLE/sceGameUpdate.h
|
||||
Core/HLE/sceGe.cpp
|
||||
|
||||
@@ -32,6 +32,7 @@ set(SRCS
|
||||
HLE/sceAtrac.cpp
|
||||
HLE/__sceAudio.cpp
|
||||
HLE/sceAudio.cpp
|
||||
HLE/sceAudioRouting.cpp
|
||||
HLE/sceCcc.cpp
|
||||
HLE/sceChnnlsv.cpp
|
||||
HLE/sceCtrl.cpp
|
||||
|
||||
@@ -218,6 +218,7 @@
|
||||
<ClCompile Include="HLE\sceAtrac.cpp" />
|
||||
<ClCompile Include="HLE\sceAudio.cpp" />
|
||||
<ClCompile Include="HLE\sceAudiocodec.cpp" />
|
||||
<ClCompile Include="HLE\sceAudioRouting.cpp" />
|
||||
<ClCompile Include="HLE\sceCcc.cpp" />
|
||||
<ClCompile Include="HLE\sceChnnlsv.cpp" />
|
||||
<ClCompile Include="HLE\sceCtrl.cpp" />
|
||||
@@ -225,6 +226,7 @@
|
||||
<ClCompile Include="HLE\sceDisplay.cpp" />
|
||||
<ClCompile Include="HLE\sceDmac.cpp" />
|
||||
<ClCompile Include="HLE\sceFont.cpp" />
|
||||
<ClCompile Include="HLE\sceG729.cpp" />
|
||||
<ClCompile Include="HLE\sceGe.cpp" />
|
||||
<ClCompile Include="HLE\sceHeap.cpp" />
|
||||
<ClCompile Include="HLE\sceHprm.cpp" />
|
||||
@@ -469,6 +471,7 @@
|
||||
<ClInclude Include="HLE\sceAtrac.h" />
|
||||
<ClInclude Include="HLE\sceAudio.h" />
|
||||
<ClInclude Include="HLE\sceAudiocodec.h" />
|
||||
<ClInclude Include="HLE\sceAudioRouting.h" />
|
||||
<ClInclude Include="HLE\sceCcc.h" />
|
||||
<ClInclude Include="HLE\sceCtrl.h" />
|
||||
<ClInclude Include="HLE\sceChnnlsv.h" />
|
||||
@@ -476,6 +479,7 @@
|
||||
<ClInclude Include="HLE\sceDisplay.h" />
|
||||
<ClInclude Include="HLE\sceDmac.h" />
|
||||
<ClInclude Include="HLE\sceFont.h" />
|
||||
<ClInclude Include="HLE\sceG729.h" />
|
||||
<ClInclude Include="HLE\sceGe.h" />
|
||||
<ClInclude Include="HLE\sceHeap.h" />
|
||||
<ClInclude Include="HLE\sceHprm.h" />
|
||||
|
||||
@@ -177,6 +177,12 @@
|
||||
<ClCompile Include="HLE\sceAudio.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HLE\sceAudiocodec.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HLE\sceAudioRouting.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HLE\sceCcc.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
@@ -189,6 +195,9 @@
|
||||
<ClCompile Include="HLE\sceDmac.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HLE\sceG729.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HLE\sceGe.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
@@ -451,9 +460,6 @@
|
||||
<ClCompile Include="HW\MpegDemux.cpp">
|
||||
<Filter>HW</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HLE\sceAudiocodec.cpp">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="HDRemaster.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
@@ -664,6 +670,12 @@
|
||||
<ClInclude Include="HLE\sceAudio.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HLE\sceAudiocodec.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HLE\sceAudioRouting.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HLE\sceCcc.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
@@ -706,6 +718,9 @@
|
||||
<ClInclude Include="HLE\sceMt19937.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HLE\sceG729.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HLE\sceGameUpdate.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
@@ -925,9 +940,6 @@
|
||||
<ClInclude Include="HW\MpegDemux.h">
|
||||
<Filter>HW</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HLE\sceAudiocodec.h">
|
||||
<Filter>HLE\Libraries</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="HDRemaster.h">
|
||||
<Filter>Core</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "sceAtrac.h"
|
||||
#include "sceAudio.h"
|
||||
#include "sceAudiocodec.h"
|
||||
#include "sceAudioRouting.h"
|
||||
#include "sceCcc.h"
|
||||
#include "sceChnnlsv.h"
|
||||
#include "sceCtrl.h"
|
||||
@@ -72,6 +73,7 @@
|
||||
#include "sceSha256.h"
|
||||
#include "sceAdler.h"
|
||||
#include "sceSfmt19937.h"
|
||||
#include "sceG729.h"
|
||||
|
||||
#define N(s) s
|
||||
|
||||
@@ -336,5 +338,8 @@ void RegisterAllModules() {
|
||||
Register_sceSha256();
|
||||
Register_sceAdler();
|
||||
Register_sceSfmt19937();
|
||||
Register_sceAudioRouting();
|
||||
Register_sceUsbCam();
|
||||
Register_sceG729();
|
||||
}
|
||||
|
||||
|
||||
65
Core/HLE/sceAudioRouting.cpp
Normal file
65
Core/HLE/sceAudioRouting.cpp
Normal file
@@ -0,0 +1,65 @@
|
||||
// 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 "Core/HLE/FunctionWrappers.h"
|
||||
#include "Core/HLE/sceAudiocodec.h"
|
||||
|
||||
enum {
|
||||
AUDIO_ROUTING_SPEAKER_OFF = 0,
|
||||
AUDIO_ROUTING_SPEAKER_ON = 1,
|
||||
};
|
||||
|
||||
u32 audioRoutingMode = AUDIO_ROUTING_SPEAKER_ON;
|
||||
u32 audioRoutineVolumeMode = AUDIO_ROUTING_SPEAKER_ON;
|
||||
|
||||
static int sceAudioRoutingGetMode() {
|
||||
INFO_LOG(HLE, "sceAudioRoutingGetMode");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sceAudioRoutingSetVolumeMode(int mode) {
|
||||
INFO_LOG(HLE, "sceAudioRoutingSetVolumeMode %d", mode);
|
||||
int previousMode = audioRoutineVolumeMode;
|
||||
audioRoutineVolumeMode = audioRoutingMode;
|
||||
return previousMode;
|
||||
}
|
||||
|
||||
static int sceAudioRoutingGetVolumeMode() {
|
||||
INFO_LOG(HLE, "sceAudioRoutingGetMode");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sceAudioRoutingSetMode(int mode) {
|
||||
INFO_LOG(HLE, "sceAudioRoutingSetMode %d", mode);
|
||||
int previousMode = audioRoutingMode;
|
||||
audioRoutingMode = mode;
|
||||
return previousMode;
|
||||
}
|
||||
|
||||
const HLEFunction sceAudioRouting[] =
|
||||
{
|
||||
{0x39240E7D, WrapI_V<sceAudioRoutingGetMode>, "sceAudioRoutingGetMode" },
|
||||
{0x28235C56, WrapI_V<sceAudioRoutingGetVolumeMode>, "sceAudioRoutingGetVolumeMode" },
|
||||
{0x36FD8AA9, WrapI_I<sceAudioRoutingSetMode>, "sceAudioRoutingSetMode" },
|
||||
{0xBB548475, WrapI_I<sceAudioRoutingSetVolumeMode>, "sceAudioRoutingSetVolumeMode" },
|
||||
};
|
||||
|
||||
void Register_sceAudioRouting()
|
||||
{
|
||||
RegisterModule("sceAudioRouting", ARRAY_SIZE(sceAudioRouting), sceAudioRouting);
|
||||
}
|
||||
20
Core/HLE/sceAudioRouting.h
Normal file
20
Core/HLE/sceAudioRouting.h
Normal file
@@ -0,0 +1,20 @@
|
||||
// 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
|
||||
|
||||
void Register_sceAudioRouting();
|
||||
40
Core/HLE/sceG729.cpp
Normal file
40
Core/HLE/sceG729.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
// 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 "Core/HLE/FunctionWrappers.h"
|
||||
|
||||
const HLEFunction sceG729[] =
|
||||
{
|
||||
{ 0x13F1028A, 0, "sceG729DecodeExit" },
|
||||
{ 0x17C11696, 0, "sceG729DecodeInitResource" },
|
||||
{ 0x3489D1F3, 0, "sceG729DecodeCore" },
|
||||
{ 0x55E14F75, 0, "sceG729DecodeInit" },
|
||||
{ 0x5A409D1B, 0, "sceG729EncodeExit" },
|
||||
{ 0x74804D93, 0, "sceG729DecodeReset" },
|
||||
{ 0x890B86AE, 0, "sceG729DecodeTermResource" },
|
||||
{ 0x8C87A2CA, 0, "sceG729EncodeReset" },
|
||||
{ 0x94714D50, 0, "sceG729EncodeTermResource" },
|
||||
{ 0xAA1E5462, 0, "sceG729EncodeInitResource" },
|
||||
{ 0xCFCD367C, 0, "sceG729EncodeInit" },
|
||||
{ 0xDB7259D5, 0, "sceG729EncodeCore" },
|
||||
};
|
||||
|
||||
void Register_sceG729()
|
||||
{
|
||||
RegisterModule("sceG729", ARRAY_SIZE(sceG729), sceG729);
|
||||
}
|
||||
20
Core/HLE/sceG729.h
Normal file
20
Core/HLE/sceG729.h
Normal file
@@ -0,0 +1,20 @@
|
||||
// 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
|
||||
|
||||
void Register_sceG729();
|
||||
@@ -122,9 +122,68 @@ const HLEFunction sceUsbstorBoot[] =
|
||||
{0xA55C9E16, 0, "sceUsbstorBootUnregisterNotify"},
|
||||
};
|
||||
|
||||
const HLEFunction sceUsbCam[] =
|
||||
{
|
||||
{ 0x17F7B2FB, 0, "sceUsbCamSetupVideo" },
|
||||
{ 0xF93C4669, 0, "sceUsbCamAutoImageReverseSW" },
|
||||
{ 0x574A8C3F, 0, "sceUsbCamStartVideo" },
|
||||
{ 0x6CF32CB9, 0, "sceUsbCamStopVideo" },
|
||||
{ 0x03ED7A82, 0, "sceUsbCamSetupMic" },
|
||||
{ 0x82A64030, 0, "sceUsbCamStartMic" },
|
||||
{ 0x7DAC0C71, 0, "sceUsbCamReadVideoFrameBlocking" },
|
||||
{ 0x99D86281, 0, "sceUsbCamReadVideoFrame" },
|
||||
{ 0x41E73E95, 0, "sceUsbCamPollReadVideoFrameEnd" },
|
||||
{ 0xF90B2293, 0, "sceUsbCamWaitReadVideoFrameEnd" },
|
||||
{ 0x4C34F553, 0, "sceUsbCamGetLensDirection" },
|
||||
{ 0x3F0CF289, 0, "sceUsbCamSetupStill" },
|
||||
{ 0x0A41A298, 0, "sceUsbCamSetupStillEx" },
|
||||
{ 0x61BE5CAC, 0, "sceUsbCamStillInputBlocking" },
|
||||
{ 0xFB0A6C5D, 0, "sceUsbCamStillInput" },
|
||||
{ 0x7563AFA1, 0, "sceUsbCamStillWaitInputEnd" },
|
||||
{ 0x1A46CFE7, 0, "sceUsbCamStillPollInputEnd" },
|
||||
{ 0xA720937C, 0, "sceUsbCamStillCancelInput" },
|
||||
{ 0xE5959C36, 0, "sceUsbCamStillGetInputLength" },
|
||||
{ 0xCFE9E999, 0, "sceUsbCamSetupVideoEx" },
|
||||
{ 0xDF9D0C92, 0, "sceUsbCamGetReadVideoFrameSize" },
|
||||
{ 0x6E205974, 0, "sceUsbCamSetSaturation" },
|
||||
{ 0x4F3D84D5, 0, "sceUsbCamSetBrightness" },
|
||||
{ 0x09C26C7E, 0, "sceUsbCamSetContrast" },
|
||||
{ 0x622F83CC, 0, "sceUsbCamSetSharpness" },
|
||||
{ 0xD4876173, 0, "sceUsbCamSetImageEffectMode" },
|
||||
{ 0x1D686870, 0, "sceUsbCamSetEvLevel" },
|
||||
{ 0x951BEDF5, 0, "sceUsbCamSetReverseMode" },
|
||||
{ 0xC484901F, 0, "sceUsbCamSetZoom" },
|
||||
{ 0x383E9FA8, 0, "sceUsbCamGetSaturation" },
|
||||
{ 0x70F522C5, 0, "sceUsbCamGetBrightness" },
|
||||
{ 0xA063A957, 0, "sceUsbCamGetContrast" },
|
||||
{ 0xFDB68C23, 0, "sceUsbCamGetSharpness" },
|
||||
{ 0x994471E0, 0, "sceUsbCamGetImageEffectMode" },
|
||||
{ 0x2BCD50C0, 0, "sceUsbCamGetEvLevel" },
|
||||
{ 0xD5279339, 0, "sceUsbCamGetReverseMode" },
|
||||
{ 0x9E8AAF8D, 0, "sceUsbCamGetZoom" },
|
||||
{ 0x11A1F128, 0, "sceUsbCamGetAutoImageReverseState" },
|
||||
{ 0x08AEE98A, 0, "sceUsbCamSetMicGain" },
|
||||
{ 0x2E930264, 0, "sceUsbCamSetupMicEx" },
|
||||
{ 0x36636925, 0, "sceUsbCamReadMicBlocking" },
|
||||
{ 0x3DC0088E, 0, "sceUsbCamReadMic" },
|
||||
{ 0x41EE8797, 0, "sceUsbCamUnregisterLensRotationCallback" },
|
||||
{ 0x5145868A, 0, "sceUsbCamStopMic" },
|
||||
{ 0x5778B452, 0, "sceUsbCamGetMicDataLength" },
|
||||
{ 0x6784E6A8, 0, "sceUsbCamSetAntiFlicker" },
|
||||
{ 0xAA7D94BA, 0, "sceUsbCamGetAntiFlicker" },
|
||||
{ 0xB048A67D, 0, "sceUsbCamWaitReadMicEnd" },
|
||||
{ 0xD293A100, 0, "sceUsbCamRegisterLensRotationCallback" },
|
||||
{ 0xF8847F60, 0, "sceUsbCamPollReadMicEnd" },
|
||||
};
|
||||
|
||||
void Register_sceUsb()
|
||||
{
|
||||
RegisterModule("sceUsbstor", ARRAY_SIZE(sceUsbstor), sceUsbstor);
|
||||
RegisterModule("sceUsbstorBoot", ARRAY_SIZE(sceUsbstorBoot), sceUsbstorBoot);
|
||||
RegisterModule("sceUsb", ARRAY_SIZE(sceUsb), sceUsb);
|
||||
}
|
||||
|
||||
void Register_sceUsbCam()
|
||||
{
|
||||
RegisterModule("sceUsbCam", ARRAY_SIZE(sceUsbCam), sceUsbCam);
|
||||
}
|
||||
|
||||
@@ -21,3 +21,5 @@ void Register_sceUsb();
|
||||
|
||||
void __UsbInit();
|
||||
void __UsbDoState(PointerWrap &p);
|
||||
|
||||
void Register_sceUsbCam();
|
||||
|
||||
@@ -226,12 +226,14 @@ EXEC_AND_LIB_FILES := \
|
||||
$(SRC)/Core/HLE/__sceAudio.cpp.arm \
|
||||
$(SRC)/Core/HLE/sceAudio.cpp.arm \
|
||||
$(SRC)/Core/HLE/sceAudiocodec.cpp.arm \
|
||||
$(SRC)/Core/HLE/sceAudioRouting.cpp \
|
||||
$(SRC)/Core/HLE/sceChnnlsv.cpp \
|
||||
$(SRC)/Core/HLE/sceCcc.cpp \
|
||||
$(SRC)/Core/HLE/sceCtrl.cpp.arm \
|
||||
$(SRC)/Core/HLE/sceDeflt.cpp \
|
||||
$(SRC)/Core/HLE/sceDisplay.cpp \
|
||||
$(SRC)/Core/HLE/sceDmac.cpp \
|
||||
$(SRC)/Core/HLE/sceG729.cpp \
|
||||
$(SRC)/Core/HLE/sceGe.cpp \
|
||||
$(SRC)/Core/HLE/sceFont.cpp \
|
||||
$(SRC)/Core/HLE/sceHeap.cpp \
|
||||
|
||||
Reference in New Issue
Block a user