Stub video decoder modules

This commit is contained in:
capriots
2026-04-25 11:13:41 +02:00
committed by Elad
parent 7dce197ec4
commit 631e7ef979
22 changed files with 1307 additions and 12 deletions
+8
View File
@@ -335,9 +335,17 @@ target_sources(rpcs3_emu PRIVATE
Cell/Modules/HLE_PATCHES.cpp
Cell/Modules/libad_async.cpp
Cell/Modules/libad_core.cpp
Cell/Modules/libavcdec.cpp
Cell/Modules/libdivx311dec.cpp
Cell/Modules/libdivxdec.cpp
Cell/Modules/libmedi.cpp
Cell/Modules/libmixer.cpp
Cell/Modules/libmvcdec.cpp
Cell/Modules/libsjvtd.cpp
Cell/Modules/libsmvd2.cpp
Cell/Modules/libsmvd4.cpp
Cell/Modules/libsnd3.cpp
Cell/Modules/libsvc1d.cpp
Cell/Modules/libsynth2.cpp
Cell/Modules/sceNp2.cpp
Cell/Modules/sceNpClans.cpp
-9
View File
@@ -1788,15 +1788,6 @@ DECLARE(ppu_module_manager::cellVdec)("libvdec", []()
avcodec_register_all();
#endif
static ppu_static_module libavcdec("libavcdec");
static ppu_static_module libdivx311dec("libdivx311dec");
static ppu_static_module libdivxdec("libdivxdec");
static ppu_static_module libmvcdec("libmvcdec");
static ppu_static_module libsjvtd("libsjvtd");
static ppu_static_module libsmvd2("libsmvd2");
static ppu_static_module libsmvd4("libsmvd4");
static ppu_static_module libsvc1d("libsvc1d");
REG_VAR(libvdec, _cell_vdec_prx_ver); // 0x085a7ecb
REG_FUNC(libvdec, cellVdecQueryAttr);
+107
View File
@@ -0,0 +1,107 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "libavcdec.h"
LOG_CHANNEL(libavcdec)
template<>
void fmt_class_string<AvcDecError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(AVC_DEC_ERROR_ARG);
}
return unknown;
});
}
error_code avcDecQueryMemory([[maybe_unused]] ppu_thread& ppu, vm::cptr<AvcDecParams> params, vm::ptr<AvcDecAttr> attr)
{
libavcdec.todo("avcDecQueryMemory(params=*0x%x, attr=*0x%x)", params, attr);
return CELL_OK;
}
void avcDecGetVersion([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> version)
{
libavcdec.notice("avcDecGetVersion(version=*0x%x)", version);
if (version)
{
*version = 0x11300;
}
}
error_code avcDecQueryCharacteristics([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> unk)
{
libavcdec.notice("avcDecGetVersion(unk=*0x%x)", unk);
if (!unk)
{
return AVC_DEC_ERROR_ARG;
}
unk[0] = 5; // Command queue depth
unk[1] = 20;
return CELL_OK;
}
error_code avcDecOpen()
{
UNIMPLEMENTED_FUNC(libavcdec);
return CELL_OK;
}
error_code avcDecClose()
{
UNIMPLEMENTED_FUNC(libavcdec);
return CELL_OK;
}
error_code avcDecReset()
{
UNIMPLEMENTED_FUNC(libavcdec);
return CELL_OK;
}
error_code avcDecFlush()
{
UNIMPLEMENTED_FUNC(libavcdec);
return CELL_OK;
}
error_code avcDecAccessUnit()
{
UNIMPLEMENTED_FUNC(libavcdec);
return CELL_OK;
}
error_code avcDecRlsFrame()
{
UNIMPLEMENTED_FUNC(libavcdec);
return CELL_OK;
}
error_code avcDecGetStatus()
{
UNIMPLEMENTED_FUNC(libavcdec);
return CELL_OK;
}
DECLARE(ppu_module_manager::libavcdec)("libavcdec", []
{
REG_FUNC(libavcdec, avcDecQueryMemory);
REG_FUNC(libavcdec, avcDecGetVersion);
REG_FUNC(libavcdec, avcDecQueryCharacteristics);
REG_FUNC(libavcdec, avcDecOpen);
REG_FUNC(libavcdec, avcDecClose);
REG_FUNC(libavcdec, avcDecReset);
REG_FUNC(libavcdec, avcDecFlush);
REG_FUNC(libavcdec, avcDecAccessUnit);
REG_FUNC(libavcdec, avcDecRlsFrame);
REG_FUNC(libavcdec, avcDecGetStatus);
});
+26
View File
@@ -0,0 +1,26 @@
#pragma once
enum AvcDecError : u32
{
AVC_DEC_ERROR_ARG = 0x80615201,
};
struct AvcDecParams
{
u8 profile_level;
b8 disable_deblocking_filter;
u8 number_of_decoded_frame_buffer;
be_t<u16> max_decoded_frame_width;
be_t<u16> max_decoded_frame_height;
};
struct AvcDecAttr
{
u32 unk;
be_t<u32> mem_size;
be_t<u32> mem_align;
};
error_code avcDecQueryMemory(ppu_thread& ppu, vm::cptr<AvcDecParams> params, vm::ptr<AvcDecAttr> attr);
void avcDecGetVersion(ppu_thread& ppu, vm::ptr<u32> version);
error_code avcDecQueryCharacteristics(ppu_thread& ppu, vm::ptr<u32> unk);
+87
View File
@@ -0,0 +1,87 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "libdivx311dec.h"
LOG_CHANNEL(libdivx311dec)
template<>
void fmt_class_string<Divx311DecError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(DIVX311_DEC_ERROR_ARG);
}
return unknown;
});
}
error_code divx311DecQueryAttr([[maybe_unused]] ppu_thread& ppu, vm::cptr<DivxDecParams> params, vm::ptr<u32> memSize, vm::ptr<u32> version)
{
libdivx311dec.todo("divx311DecQueryAttr(params=*0x%x, memSize=*0x%x, version=*0x%x)", params, memSize, version);
return CELL_OK;
}
error_code divx311DecOpen()
{
UNIMPLEMENTED_FUNC(libdivx311dec);
return CELL_OK;
}
error_code divx311DecClose()
{
UNIMPLEMENTED_FUNC(libdivx311dec);
return CELL_OK;
}
error_code divx311DecReset()
{
UNIMPLEMENTED_FUNC(libdivx311dec);
return CELL_OK;
}
error_code divx311DecFlushPicture()
{
UNIMPLEMENTED_FUNC(libdivx311dec);
return CELL_OK;
}
error_code divx311DecGetNumOfPictures()
{
UNIMPLEMENTED_FUNC(libdivx311dec);
return CELL_OK;
}
error_code divx311DecGetPicture()
{
UNIMPLEMENTED_FUNC(libdivx311dec);
return CELL_OK;
}
error_code divx311DecDecodeAu()
{
UNIMPLEMENTED_FUNC(libdivx311dec);
return CELL_OK;
}
error_code divx311DecReleasePicture()
{
UNIMPLEMENTED_FUNC(libdivx311dec);
return CELL_OK;
}
DECLARE(ppu_module_manager::libdivx311dec)("libdivx311dec", []
{
REG_FUNC(libdivx311dec, divx311DecQueryAttr);
REG_FUNC(libdivx311dec, divx311DecOpen);
REG_FUNC(libdivx311dec, divx311DecClose);
REG_FUNC(libdivx311dec, divx311DecReset);
REG_FUNC(libdivx311dec, divx311DecFlushPicture);
REG_FUNC(libdivx311dec, divx311DecGetNumOfPictures);
REG_FUNC(libdivx311dec, divx311DecGetPicture);
REG_FUNC(libdivx311dec, divx311DecDecodeAu);
REG_FUNC(libdivx311dec, divx311DecReleasePicture);
});
+10
View File
@@ -0,0 +1,10 @@
#pragma once
enum Divx311DecError : u32
{
DIVX311_DEC_ERROR_ARG = 0x80615502,
};
struct DivxDecParams;
error_code divx311DecQueryAttr(ppu_thread& ppu, vm::cptr<DivxDecParams> params, vm::ptr<u32> memSize, vm::ptr<u32> version);
+87
View File
@@ -0,0 +1,87 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "libdivxdec.h"
LOG_CHANNEL(libdivxdec)
template<>
void fmt_class_string<DivxDecError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(DIVX_DEC_ERROR_ARG);
}
return unknown;
});
}
error_code divxDecQueryAttr([[maybe_unused]] ppu_thread& ppu, vm::cptr<DivxDecParams> params, vm::ptr<u32> memSize, vm::ptr<u32> version)
{
libdivxdec.todo("divxDecQueryAttr(params=*0x%x, memSize=*0x%x, version=*0x%x)", params, memSize, version);
return CELL_OK;
}
error_code divxDecOpen()
{
UNIMPLEMENTED_FUNC(libdivxdec);
return CELL_OK;
}
error_code divxDecClose()
{
UNIMPLEMENTED_FUNC(libdivxdec);
return CELL_OK;
}
error_code divxDecReset()
{
UNIMPLEMENTED_FUNC(libdivxdec);
return CELL_OK;
}
error_code divxDecFlushPicture()
{
UNIMPLEMENTED_FUNC(libdivxdec);
return CELL_OK;
}
error_code divxDecGetNumOfPictures()
{
UNIMPLEMENTED_FUNC(libdivxdec);
return CELL_OK;
}
error_code divxDecGetPicture()
{
UNIMPLEMENTED_FUNC(libdivxdec);
return CELL_OK;
}
error_code divxDecDecodeAu()
{
UNIMPLEMENTED_FUNC(libdivxdec);
return CELL_OK;
}
error_code divxDecReleasePicture()
{
UNIMPLEMENTED_FUNC(libdivxdec);
return CELL_OK;
}
DECLARE(ppu_module_manager::libdivxdec)("libdivxdec", []
{
REG_FUNC(libdivxdec, divxDecQueryAttr);
REG_FUNC(libdivxdec, divxDecOpen);
REG_FUNC(libdivxdec, divxDecClose);
REG_FUNC(libdivxdec, divxDecReset);
REG_FUNC(libdivxdec, divxDecFlushPicture);
REG_FUNC(libdivxdec, divxDecGetNumOfPictures);
REG_FUNC(libdivxdec, divxDecGetPicture);
REG_FUNC(libdivxdec, divxDecDecodeAu);
REG_FUNC(libdivxdec, divxDecReleasePicture);
});
+16
View File
@@ -0,0 +1,16 @@
#pragma once
enum DivxDecError : u32
{
DIVX_DEC_ERROR_ARG = 0x80615502,
};
struct DivxDecParams
{
be_t<u32> profile_level;
be_t<u32> max_decoded_frame_width;
be_t<u32> max_decoded_frame_height;
be_t<u32> number_of_decoded_frame_buffer;
};
error_code divxDecQueryAttr(ppu_thread& ppu, vm::cptr<DivxDecParams> params, vm::ptr<u32> memSize, vm::ptr<u32> version);
+100
View File
@@ -0,0 +1,100 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "libmvcdec.h"
LOG_CHANNEL(libmvcdec)
template<>
void fmt_class_string<MvcDecError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(MVC_DEC_ERROR_ARG);
}
return unknown;
});
}
error_code mvcDecQueryMemory([[maybe_unused]] ppu_thread& ppu, vm::cptr<AvcDecParams> params, vm::ptr<AvcDecAttr> attr)
{
libmvcdec.todo("mvcDecQueryMemory(params=*0x%x, attr=*0x%x)", params, attr);
return CELL_OK;
}
void mvcDecGetVersion([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> version)
{
libmvcdec.notice("mvcDecGetVersion(version=*0x%x)", version);
if (version)
{
*version = 0x10804;
}
}
error_code mvcDecQueryCharacteristics([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> unk)
{
libmvcdec.notice("mvcDecGetVersion(unk=*0x%x)", unk);
if (!unk)
{
return MVC_DEC_ERROR_ARG;
}
unk[0] = 5; // Command queue depth
unk[1] = 36;
return CELL_OK;
}
error_code mvcDecOpen()
{
UNIMPLEMENTED_FUNC(libmvcdec);
return CELL_OK;
}
error_code mvcDecClose()
{
UNIMPLEMENTED_FUNC(libmvcdec);
return CELL_OK;
}
error_code mvcDecReset()
{
UNIMPLEMENTED_FUNC(libmvcdec);
return CELL_OK;
}
error_code mvcDecFlush()
{
UNIMPLEMENTED_FUNC(libmvcdec);
return CELL_OK;
}
error_code mvcDecAccessUnit()
{
UNIMPLEMENTED_FUNC(libmvcdec);
return CELL_OK;
}
error_code mvcDecRlsFrame()
{
UNIMPLEMENTED_FUNC(libmvcdec);
return CELL_OK;
}
DECLARE(ppu_module_manager::libmvcdec)("libmvcdec", []
{
REG_FUNC(libmvcdec, mvcDecQueryMemory);
REG_FUNC(libmvcdec, mvcDecGetVersion);
REG_FUNC(libmvcdec, mvcDecQueryCharacteristics);
REG_FUNC(libmvcdec, mvcDecOpen);
REG_FUNC(libmvcdec, mvcDecClose);
REG_FUNC(libmvcdec, mvcDecReset);
REG_FUNC(libmvcdec, mvcDecFlush);
REG_FUNC(libmvcdec, mvcDecAccessUnit);
REG_FUNC(libmvcdec, mvcDecRlsFrame);
});
+13
View File
@@ -0,0 +1,13 @@
#pragma once
enum MvcDecError : u32
{
MVC_DEC_ERROR_ARG = 0x80615901,
};
struct AvcDecAttr;
struct AvcDecParams;
error_code mvcDecQueryMemory(ppu_thread& ppu, vm::cptr<AvcDecParams> params, vm::ptr<AvcDecAttr> attr);
void mvcDecGetVersion(ppu_thread& ppu, vm::ptr<u32> version);
error_code mvcDecQueryCharacteristics(ppu_thread& ppu, vm::ptr<u32> unk);
+165
View File
@@ -0,0 +1,165 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "libsjvtd.h"
LOG_CHANNEL(libsjvtd)
template<>
void fmt_class_string<SjvtdError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(SJVTD_ERROR_ARG);
}
return unknown;
});
}
error_code sjvtdGetMemorySize([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel)
{
libsjvtd.todo("sjvtdGetMemorySize(memSize=*0x%x, profileLevel=%d)", memSize, +profileLevel);
return CELL_OK;
}
error_code sjvtdGetMemorySize2([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel, vm::cptr<SjvtdParams> params)
{
libsjvtd.todo("sjvtdGetMemorySize2(memSize=*0x%x, profileLevel=%d, params=*0x%x)", memSize, profileLevel, params);
return CELL_OK;
}
error_code sjvtdGetVersionNumber([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> version)
{
libsjvtd.notice("sjvtdGetVersionNumber(version=*0x%x)", version);
if (!version)
{
return SJVTD_ERROR_ARG;
}
*version = 0x1050000;
return CELL_OK;
}
error_code sjvtdInitialize()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdCreateInstance2()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdReleaseInstance()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdCancelDecode()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdFlushPicture()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdGetNumPicture()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdGetPicture()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdReleasePicture()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdGetAuxData()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdGetSideInfoSeq()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdGetSideInfoPic()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdSetAuxData()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdSetDecodeMode()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdDecodePicture()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdGetExistenceFlag()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
error_code sjvtdDiscontinue()
{
UNIMPLEMENTED_FUNC(libsjvtd);
return CELL_OK;
}
DECLARE(ppu_module_manager::libsjvtd)("libsjvtd", []
{
REG_FUNC(libsjvtd, sjvtdGetMemorySize);
REG_FUNC(libsjvtd, sjvtdGetMemorySize2);
REG_FUNC(libsjvtd, sjvtdGetVersionNumber);
REG_FUNC(libsjvtd, sjvtdInitialize);
REG_FUNC(libsjvtd, sjvtdCreateInstance2);
REG_FUNC(libsjvtd, sjvtdReleaseInstance);
REG_FUNC(libsjvtd, sjvtdCancelDecode);
REG_FUNC(libsjvtd, sjvtdFlushPicture);
REG_FUNC(libsjvtd, sjvtdGetNumPicture);
REG_FUNC(libsjvtd, sjvtdGetPicture);
REG_FUNC(libsjvtd, sjvtdReleasePicture);
REG_FUNC(libsjvtd, sjvtdGetAuxData);
REG_FUNC(libsjvtd, sjvtdGetSideInfoSeq);
REG_FUNC(libsjvtd, sjvtdGetSideInfoPic);
REG_FUNC(libsjvtd, sjvtdSetAuxData);
REG_FUNC(libsjvtd, sjvtdSetDecodeMode);
REG_FUNC(libsjvtd, sjvtdDecodePicture);
REG_FUNC(libsjvtd, sjvtdGetExistenceFlag);
REG_FUNC(libsjvtd, sjvtdDiscontinue);
});
+39
View File
@@ -0,0 +1,39 @@
#pragma once
enum SjvtdError : u32
{
SJVTD_ERROR_ARG = 0x80615841,
};
enum SjvtdProfileLevel : u8
{
SJVTD_LEVEL_1P0 = 1,
SJVTD_LEVEL_1P1,
SJVTD_LEVEL_1P2,
SJVTD_LEVEL_1P3,
SJVTD_LEVEL_2P0,
SJVTD_LEVEL_2P1,
SJVTD_LEVEL_2P2,
SJVTD_LEVEL_3P0,
SJVTD_LEVEL_3P1,
SJVTD_LEVEL_3P2,
SJVTD_LEVEL_4P0,
SJVTD_LEVEL_4P1,
SJVTD_LEVEL_4P2
};
struct SjvtdParams
{
be_t<u32> unk1;
be_t<u32> unk2;
be_t<u32> unk3;
be_t<s32> max_decoded_frame_width;
be_t<s32> max_decoded_frame_height;
be_t<u32> enable_deblocking_filter;
be_t<u32> unk;
be_t<u32> number_of_decoded_frame_buffer;
};
error_code sjvtdGetMemorySize(ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel);
error_code sjvtdGetMemorySize2(ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel, vm::cptr<SjvtdParams> params);
error_code sjvtdGetVersionNumber(ppu_thread& ppu, vm::ptr<u32> version);
+179
View File
@@ -0,0 +1,179 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "libsmvd2.h"
LOG_CHANNEL(libsmvd2)
template<>
void fmt_class_string<Smvd2Error>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(SMVD2_ERROR_ARG);
}
return unknown;
});
}
error_code smvd2GetMemorySize([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel)
{
libsmvd2.todo("smvd2GetMemorySize(memSize=*0x%x, profileLevel=%d)", memSize, +profileLevel);
return CELL_OK;
}
error_code smvd2GetMemorySize2([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel, vm::cptr<Smvd2Params> params)
{
libsmvd2.todo("smvd2GetMemorySize2(memSize=*0x%x, profileLevel=%d, params=*0x%x)", memSize, profileLevel, params);
return CELL_OK;
}
error_code smvd2GetVersionNumber([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> version)
{
libsmvd2.notice("smvd2GetVersionNumber(version=*0x%x)", version);
if (!version)
{
return SMVD2_ERROR_ARG;
}
*version = 0x1030000;
return CELL_OK;
}
error_code smvd2Initialize()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2CreateInstance2()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2ReleaseInstance()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2CancelDecode()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2FlushPicture()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2GetNumPicture()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2GetPicture()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2ReleasePicture()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2GetAuxData()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2GetSideInfoSeq()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2GetBnrData()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2GetSideInfoPic()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2SetAuxData()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2SetDecodeMode()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2DecodePicture()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2DecodePicture2()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2GetExistenceFlag()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
error_code smvd2Discontinue()
{
UNIMPLEMENTED_FUNC(libsmvd2);
return CELL_OK;
}
DECLARE(ppu_module_manager::libsmvd2)("libsmvd2", []
{
REG_FUNC(libsmvd2, smvd2GetMemorySize);
REG_FUNC(libsmvd2, smvd2GetMemorySize2);
REG_FUNC(libsmvd2, smvd2GetVersionNumber);
REG_FUNC(libsmvd2, smvd2Initialize);
REG_FUNC(libsmvd2, smvd2CreateInstance2);
REG_FUNC(libsmvd2, smvd2ReleaseInstance);
REG_FUNC(libsmvd2, smvd2CancelDecode);
REG_FUNC(libsmvd2, smvd2FlushPicture);
REG_FUNC(libsmvd2, smvd2GetNumPicture);
REG_FUNC(libsmvd2, smvd2GetPicture);
REG_FUNC(libsmvd2, smvd2ReleasePicture);
REG_FUNC(libsmvd2, smvd2GetAuxData);
REG_FUNC(libsmvd2, smvd2GetSideInfoSeq);
REG_FUNC(libsmvd2, smvd2GetBnrData);
REG_FUNC(libsmvd2, smvd2GetSideInfoPic);
REG_FUNC(libsmvd2, smvd2SetAuxData);
REG_FUNC(libsmvd2, smvd2SetDecodeMode);
REG_FUNC(libsmvd2, smvd2DecodePicture);
REG_FUNC(libsmvd2, smvd2DecodePicture2);
REG_FUNC(libsmvd2, smvd2GetExistenceFlag);
REG_FUNC(libsmvd2, smvd2Discontinue);
});
+27
View File
@@ -0,0 +1,27 @@
#pragma once
enum Smvd2Error : u32
{
SMVD2_ERROR_ARG = 0x80615041,
};
enum Smvd2ProfileLevel : u32
{
SMVD2_MP_LL = 1,
SMVD2_MP_ML,
SMVD2_MP_H14,
SMVD2_MP_HL
};
struct Smvd2Params
{
be_t<u32> unk1;
be_t<u32> unk2;
be_t<u32> unk3;
be_t<u32> max_decoded_frame_width;
be_t<u32> max_decoded_frame_height;
};
error_code smvd2GetMemorySize(ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel);
error_code smvd2GetMemorySize2(ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel, vm::cptr<Smvd2Params> params);
error_code smvd2GetVersionNumber(ppu_thread& ppu, vm::ptr<u32> version);
+158
View File
@@ -0,0 +1,158 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "libsmvd4.h"
LOG_CHANNEL(libsmvd4)
template<>
void fmt_class_string<Smvd4Error>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(SMVD4_ERROR_ARG);
}
return unknown;
});
}
error_code smvd4GetMemorySize([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel)
{
libsmvd4.todo("smvd4GetMemorySize(memSize=*0x%x, profileLevel=%d)", memSize, +profileLevel);
return CELL_OK;
}
error_code smvd4GetMemorySize2([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel, vm::cptr<Smvd4Params> params)
{
libsmvd4.todo("smvd4GetMemorySize2(memSize=*0x%x, profileLevel=%d, params=*0x%x)", memSize, profileLevel, params);
return CELL_OK;
}
error_code smvd4GetVersionNumber([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> version)
{
libsmvd4.notice("smvd4GetVersionNumber(version=*0x%x)", version);
if (!version)
{
return SMVD4_ERROR_ARG;
}
*version = 0x1080000;
return CELL_OK;
}
error_code smvd4Initialize()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4CreateInstance2()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4ReleaseInstance()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4CancelDecode()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4FlushPicture()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4GetNumPicture()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4GetPicture()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4ReleasePicture()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4GetAuxData()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4GetSideInfoSeq()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4GetSideInfoPic()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4SetAuxData()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4DecodePicture()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4GetExistenceFlag()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
error_code smvd4Discontinue()
{
UNIMPLEMENTED_FUNC(libsmvd4);
return CELL_OK;
}
DECLARE(ppu_module_manager::libsmvd4)("libsmvd4", []
{
REG_FUNC(libsmvd4, smvd4GetMemorySize);
REG_FUNC(libsmvd4, smvd4GetMemorySize2);
REG_FUNC(libsmvd4, smvd4GetVersionNumber);
REG_FUNC(libsmvd4, smvd4Initialize);
REG_FUNC(libsmvd4, smvd4CreateInstance2);
REG_FUNC(libsmvd4, smvd4ReleaseInstance);
REG_FUNC(libsmvd4, smvd4CancelDecode);
REG_FUNC(libsmvd4, smvd4FlushPicture);
REG_FUNC(libsmvd4, smvd4GetNumPicture);
REG_FUNC(libsmvd4, smvd4GetPicture);
REG_FUNC(libsmvd4, smvd4ReleasePicture);
REG_FUNC(libsmvd4, smvd4GetAuxData);
REG_FUNC(libsmvd4, smvd4GetSideInfoSeq);
REG_FUNC(libsmvd4, smvd4GetSideInfoPic);
REG_FUNC(libsmvd4, smvd4SetAuxData);
REG_FUNC(libsmvd4, smvd4DecodePicture);
REG_FUNC(libsmvd4, smvd4GetExistenceFlag);
REG_FUNC(libsmvd4, smvd4Discontinue);
});
+30
View File
@@ -0,0 +1,30 @@
#pragma once
enum Smvd4Error : u32
{
SMVD4_ERROR_ARG = 0x80615141,
};
enum Smvd4ProfileLevel : u32
{
SMVD4_SP_L1 = 1,
SMVD4_SP_L2,
SMVD4_SP_L3,
SMVD4_SP_D1_NTSC,
SMVD4_SP_VGA,
SMVD4_SP_D1_PAL
};
struct Smvd4Params
{
be_t<u32> unk1;
be_t<u32> unk2;
u32 unk[5];
be_t<u32> unk3;
be_t<u32> max_decoded_frame_width;
be_t<u32> max_decoded_frame_height;
};
error_code smvd4GetMemorySize(ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel);
error_code smvd4GetMemorySize2(ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel, vm::cptr<Smvd4Params> params);
error_code smvd4GetVersionNumber(ppu_thread& ppu, vm::ptr<u32> version);
+186
View File
@@ -0,0 +1,186 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "libsvc1d.h"
LOG_CHANNEL(libsvc1d)
template<>
void fmt_class_string<Svc1dError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(SVC1D_ERROR_ARG);
}
return unknown;
});
}
error_code svc1dGetMemorySize([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel)
{
libsvc1d.todo("svc1dGetMemorySize(memSize=*0x%x, profileLevel=%d)", memSize, profileLevel);
return CELL_OK;
}
error_code svc1dGetMemorySize2([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel, vm::cptr<Svc1dParams> params)
{
libsvc1d.todo("svc1dGetMemorySize2(memSize=*0x%x, profileLevel=%d, params=*0x%x)", memSize, profileLevel, params);
return CELL_OK;
}
error_code svc1dGetVersionNumber([[maybe_unused]] ppu_thread& ppu, vm::ptr<u32> version)
{
libsvc1d.notice("svc1dGetVersionNumber(version=*0x%x)", version);
if (!version)
{
return SVC1D_ERROR_ARG;
}
*version = 0x1090000;
return CELL_OK;
}
error_code svc1dInitialize()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dCreateInstance2()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dReleaseInstance()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dCancelDecode()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dFlushPicture()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dGetNumPicture()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dGetPicture()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dReleasePicture()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dGetAuxData()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dGetSideInfoSeq()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dGetSideInfoPic()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dSetAuxData()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dSetPictureSize()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dDecodeSeqHeader()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dSetDecodeMode()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dDecodePicture()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dDecodePicture2()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dGetExistenceFlag()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
error_code svc1dDiscontinue()
{
UNIMPLEMENTED_FUNC(libsvc1d);
return CELL_OK;
}
DECLARE(ppu_module_manager::libsvc1d)("libsvc1d", []
{
REG_FUNC(libsvc1d, svc1dGetMemorySize);
REG_FUNC(libsvc1d, svc1dGetMemorySize2);
REG_FUNC(libsvc1d, svc1dGetVersionNumber);
REG_FUNC(libsvc1d, svc1dInitialize);
REG_FUNC(libsvc1d, svc1dCreateInstance2);
REG_FUNC(libsvc1d, svc1dReleaseInstance);
REG_FUNC(libsvc1d, svc1dCancelDecode);
REG_FUNC(libsvc1d, svc1dFlushPicture);
REG_FUNC(libsvc1d, svc1dGetNumPicture);
REG_FUNC(libsvc1d, svc1dGetPicture);
REG_FUNC(libsvc1d, svc1dReleasePicture);
REG_FUNC(libsvc1d, svc1dGetAuxData);
REG_FUNC(libsvc1d, svc1dGetSideInfoSeq);
REG_FUNC(libsvc1d, svc1dGetSideInfoPic);
REG_FUNC(libsvc1d, svc1dSetAuxData);
REG_FUNC(libsvc1d, svc1dSetPictureSize);
REG_FUNC(libsvc1d, svc1dDecodeSeqHeader);
REG_FUNC(libsvc1d, svc1dSetDecodeMode);
REG_FUNC(libsvc1d, svc1dDecodePicture);
REG_FUNC(libsvc1d, svc1dDecodePicture2);
REG_FUNC(libsvc1d, svc1dGetExistenceFlag);
REG_FUNC(libsvc1d, svc1dDiscontinue);
});
+34
View File
@@ -0,0 +1,34 @@
#pragma once
enum Svc1dError : u32
{
SVC1D_ERROR_ARG = 0x80615341,
};
enum Svc1dProfileLevel : u32
{
SVC1D_SP_LL = 1,
SVC1D_SP_ML,
SVC1D_MP_LL,
SVC1D_MP_ML,
SVC1D_MP_HL,
SVC1D_AP_L0,
SVC1D_AP_L1,
SVC1D_AP_L2,
SVC1D_AP_L3,
SVC1D_AP_L4
};
struct Svc1dParams
{
be_t<u32> unk1;
be_t<u32> unk2;
u32 unk[5];
be_t<u32> unk3;
be_t<u32> max_decoded_frame_width;
be_t<u32> max_decoded_frame_height;
};
error_code svc1dGetMemorySize(ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel);
error_code svc1dGetMemorySize2(ppu_thread& ppu, vm::ptr<u32> memSize, u32 profileLevel, vm::cptr<Svc1dParams> params);
error_code svc1dGetVersionNumber(ppu_thread& ppu, vm::ptr<u32> version);
+8
View File
@@ -308,10 +308,18 @@ static void ppu_initialize_modules(ppu_linkage_info* link, utils::serial* ar = n
&ppu_module_manager::cellWMAPROdec,
&ppu_module_manager::libad_async,
&ppu_module_manager::libad_core,
&ppu_module_manager::libavcdec,
&ppu_module_manager::libdivx311dec,
&ppu_module_manager::libdivxdec,
&ppu_module_manager::libfs_utility_init,
&ppu_module_manager::libmedi,
&ppu_module_manager::libmixer,
&ppu_module_manager::libmvcdec,
&ppu_module_manager::libsjvtd,
&ppu_module_manager::libsmvd2,
&ppu_module_manager::libsmvd4,
&ppu_module_manager::libsnd3,
&ppu_module_manager::libsvc1d,
&ppu_module_manager::libsynth2,
&ppu_module_manager::sceNp,
&ppu_module_manager::sceNpBasicLimited,
+8
View File
@@ -277,10 +277,18 @@ public:
static const ppu_static_module cellWMAPROdec;
static const ppu_static_module libad_async;
static const ppu_static_module libad_core;
static const ppu_static_module libavcdec;
static const ppu_static_module libdivx311dec;
static const ppu_static_module libdivxdec;
static const ppu_static_module libfs_utility_init;
static const ppu_static_module libmedi;
static const ppu_static_module libmixer;
static const ppu_static_module libmvcdec;
static const ppu_static_module libsjvtd;
static const ppu_static_module libsmvd2;
static const ppu_static_module libsmvd4;
static const ppu_static_module libsnd3;
static const ppu_static_module libsvc1d;
static const ppu_static_module libsynth2;
static const ppu_static_module sceNp;
static const ppu_static_module sceNpBasicLimited;
+3 -3
View File
@@ -40,7 +40,7 @@ static std::array<serial_ver_t, 34> s_serial_versions;
return ::s_serial_versions[identifier].current_version;\
}
SERIALIZATION_VER(global_version, 0, 20) // For stuff not listed here
SERIALIZATION_VER(global_version, 0, 21) // For stuff not listed here
SERIALIZATION_VER(ppu, 1, 1, 2/*PPU sleep order*/, 3/*PPU FNID and module*/)
SERIALIZATION_VER(spu, 2, 1)
SERIALIZATION_VER(lv2_sync, 3, 1)
@@ -325,7 +325,7 @@ std::string get_savestate_file(std::string_view title_id, std::string_view boot_
{
if (std::all_of(entry.begin() + uc_pos + 1, entry.begin() + dot_idx, [](char c) { return c >= '0' && c <= '9'; }))
{
save_files.emplace(entry, dir_entry.size);
save_files.emplace(entry, dir_entry.size);
}
}
}
@@ -530,7 +530,7 @@ void clean_savestates(std::string_view title_id, std::string_view boot_path, usz
if (to_remove.empty())
{
break;
}
}
if (!fs::remove_file(to_remove))
{
+16
View File
@@ -426,9 +426,17 @@
<ClCompile Include="Emu\Cell\Modules\cellWebBrowser.cpp" />
<ClCompile Include="Emu\Cell\Modules\libad_async.cpp" />
<ClCompile Include="Emu\Cell\Modules\libad_core.cpp" />
<ClCompile Include="Emu\Cell\Modules\libavcdec.cpp" />
<ClCompile Include="Emu\Cell\Modules\libdivx311dec.cpp" />
<ClCompile Include="Emu\Cell\Modules\libdivxdec.cpp" />
<ClCompile Include="Emu\Cell\Modules\libmedi.cpp" />
<ClCompile Include="Emu\Cell\Modules\libmixer.cpp" />
<ClCompile Include="Emu\Cell\Modules\libmvcdec.cpp" />
<ClCompile Include="Emu\Cell\Modules\libsjvtd.cpp" />
<ClCompile Include="Emu\Cell\Modules\libsmvd2.cpp" />
<ClCompile Include="Emu\Cell\Modules\libsmvd4.cpp" />
<ClCompile Include="Emu\Cell\Modules\libsnd3.cpp" />
<ClCompile Include="Emu\Cell\Modules\libsvc1d.cpp" />
<ClCompile Include="Emu\Cell\Modules\libsynth2.cpp" />
<ClCompile Include="Emu\Cell\Modules\sceNp.cpp" />
<ClCompile Include="Emu\Cell\Modules\sceNp2.cpp" />
@@ -954,8 +962,16 @@
<ClInclude Include="Emu\Cell\Modules\cellVideoUpload.h" />
<ClInclude Include="Emu\Cell\Modules\cellVpost.h" />
<ClInclude Include="Emu\Cell\Modules\cellWebBrowser.h" />
<ClInclude Include="Emu\Cell\Modules\libavcdec.h" />
<ClInclude Include="Emu\Cell\Modules\libdivx311dec.h" />
<ClInclude Include="Emu\Cell\Modules\libdivxdec.h" />
<ClInclude Include="Emu\Cell\Modules\libmixer.h" />
<ClInclude Include="Emu\Cell\Modules\libmvcdec.h" />
<ClInclude Include="Emu\Cell\Modules\libsjvtd.h" />
<ClInclude Include="Emu\Cell\Modules\libsmvd2.h" />
<ClInclude Include="Emu\Cell\Modules\libsmvd4.h" />
<ClInclude Include="Emu\Cell\Modules\libsnd3.h" />
<ClInclude Include="Emu\Cell\Modules\libsvc1d.h" />
<ClInclude Include="Emu\Cell\Modules\libsynth2.h" />
<ClInclude Include="Emu\Cell\Modules\sceNp.h" />
<ClInclude Include="Emu\Cell\Modules\sceNp2.h" />