IMPL Some Mpeg

ref https://github.com/hrydgard/ppsspp/issues/508
please help to check whether I IMPL correctly
This commit is contained in:
sum2012 2013-03-05 08:39:32 +08:00
parent 20fe29a05d
commit 5ce82bc028

View File

@ -77,6 +77,7 @@ static const int MPEG_HEADER_BUFFER_MINIMUM_SIZE = 2048;
static const int NUM_ES_BUFFERS = 2;
static const int PSP_ERROR_MPEG_NO_DATA = 0x80618001;
static const int PSP_ERROR_MPEG_INVALID_VALUE = 0x806101fe;
static const int TPSM_PIXEL_STORAGE_MODE_16BIT_BGR5650 = 0X00;
static const int TPSM_PIXEL_STORAGE_MODE_32BIT_ABGR8888 = 0X03;
@ -1324,6 +1325,31 @@ u32 sceMpegQueryUserdataEsSize(u32 mpeg, u32 esSizeAddr, u32 outSizeAddr)
return -1;
}
u32 sceMpegAvcResourceGetAvcDecTopAddr(u32 mpeg)
{
ERROR_LOG(HLE, "UNIMPL sceMpegAvcResourceGetAvcDecTopAddr(%08x)", mpeg);
return 0x12345678;
}
u32 sceMpegAvcResourceFinish(u32 mpeg)
{
return 0;
}
u32 sceMpegAvcResourceGetAvcEsBuf(u32 mpeg)
{
ERROR_LOG(HLE, "UNIMPL sceMpegAvcResourceGetAvcEsBuf(%08x)", mpeg);
return 0;
}
u32 sceMpegAvcResourceInit(u32 mpeg)
{
ERROR_LOG(HLE, "UNIMPL sceMpegAvcResourceInit(%08x)", mpeg);
if (mpeg != 1) {
return ERROR_MPEG_INVALID_VALUE;
}
return 0;
}
/* MP3 */
int sceMp3Decode(u32 mp3, u32 outPcmPtr)
@ -1695,6 +1721,10 @@ const HLEFunction sceMpeg[] =
{0xC02CF6B5,WrapI_UUU<sceMpegQueryPcmEsSize>,"sceMpegQueryPcmEsSize"},
{0xC45C99CC,WrapU_UUU<sceMpegQueryUserdataEsSize>,"sceMpegQueryUserdataEsSize"},
{0x234586AE,WrapU_UUI<sceMpegChangeGetAvcAuMode>,"sceMpegChangeGetAvcAuMode"},
{0x63B9536A,WrapU_U<sceMpegAvcResourceGetAvcDecTopAddr>,"sceMpegAvcResourceGetAvcDecTopAddr"},
{0x8160a2fe,WrapU_U<sceMpegAvcResourceFinish>,"sceMpegAvcResourceFinish"},
{0xaf26bb01,WrapU_U<sceMpegAvcResourceGetAvcEsBuf>,"sceMpegAvcResourceGetAvcEsBuf"},
{0xfcbdb5ad,WrapU_U<sceMpegAvcResourceInit>,"sceMpegAvcResourceInit"},
};
const HLEFunction sceMp3[] =