HLE: add even more error_code

This commit is contained in:
Megamouse 2019-11-16 23:30:19 +01:00
parent 9dab0575fa
commit ca59ab59e9
8 changed files with 381 additions and 77 deletions

View file

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/PPUModule.h"
@ -23,6 +23,231 @@ extern std::mutex g_mutex_avcodec_open2;
LOG_CHANNEL(cellAdec);
template <>
void fmt_class_string<CellAdecError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](CellAdecError value)
{
switch (value)
{
STR_CASE(CELL_ADEC_ERROR_FATAL);
STR_CASE(CELL_ADEC_ERROR_SEQ);
STR_CASE(CELL_ADEC_ERROR_ARG);
STR_CASE(CELL_ADEC_ERROR_BUSY);
STR_CASE(CELL_ADEC_ERROR_EMPTY);
STR_CASE(CELL_ADEC_ERROR_CELP_BUSY);
STR_CASE(CELL_ADEC_ERROR_CELP_EMPTY);
STR_CASE(CELL_ADEC_ERROR_CELP_ARG);
STR_CASE(CELL_ADEC_ERROR_CELP_SEQ);
STR_CASE(CELL_ADEC_ERROR_CELP_CORE_FATAL);
STR_CASE(CELL_ADEC_ERROR_CELP_CORE_ARG);
STR_CASE(CELL_ADEC_ERROR_CELP_CORE_SEQ);
STR_CASE(CELL_ADEC_ERROR_CELP8_BUSY);
STR_CASE(CELL_ADEC_ERROR_CELP8_EMPTY);
STR_CASE(CELL_ADEC_ERROR_CELP8_ARG);
STR_CASE(CELL_ADEC_ERROR_CELP8_SEQ);
STR_CASE(CELL_ADEC_ERROR_CELP8_CORE_FATAL);
STR_CASE(CELL_ADEC_ERROR_CELP8_CORE_ARG);
STR_CASE(CELL_ADEC_ERROR_CELP8_CORE_SEQ);
STR_CASE(CELL_ADEC_ERROR_M4AAC_FATAL);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SEQ);
STR_CASE(CELL_ADEC_ERROR_M4AAC_ARG);
STR_CASE(CELL_ADEC_ERROR_M4AAC_BUSY);
STR_CASE(CELL_ADEC_ERROR_M4AAC_EMPTY);
STR_CASE(CELL_ADEC_ERROR_M4AAC_BUFFER_OVERFLOW);
STR_CASE(CELL_ADEC_ERROR_M4AAC_END_OF_BITSTREAM);
STR_CASE(CELL_ADEC_ERROR_M4AAC_CH_CONFIG_INCONSISTENCY);
STR_CASE(CELL_ADEC_ERROR_M4AAC_NO_CH_DEFAULT_POS);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_CH_POS);
STR_CASE(CELL_ADEC_ERROR_M4AAC_UNANTICIPATED_COUPLING_CH);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_LAYER_ID);
STR_CASE(CELL_ADEC_ERROR_M4AAC_ADTS_SYNCWORD_ERROR);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_ADTS_ID);
STR_CASE(CELL_ADEC_ERROR_M4AAC_CH_CHANGED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SAMPLING_FREQ_CHANGED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_WRONG_SBR_CH);
STR_CASE(CELL_ADEC_ERROR_M4AAC_WRONG_SCALE_FACTOR);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_BOOKS);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_SECTION_DATA);
STR_CASE(CELL_ADEC_ERROR_M4AAC_PULSE_IS_NOT_LONG);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GC_IS_NOT_SUPPORTED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_ELEMENT_ID);
STR_CASE(CELL_ADEC_ERROR_M4AAC_NO_CH_CONFIG);
STR_CASE(CELL_ADEC_ERROR_M4AAC_UNEXPECTED_OVERLAP_CRC);
STR_CASE(CELL_ADEC_ERROR_M4AAC_CRC_BUFFER_EXCEEDED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_CRC);
STR_CASE(CELL_ADEC_ERROR_M4AAC_BAD_WINDOW_CODE);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_ADIF_HEADER_ID);
STR_CASE(CELL_ADEC_ERROR_M4AAC_NOT_SUPPORTED_PROFILE);
STR_CASE(CELL_ADEC_ERROR_M4AAC_PROG_NUMBER_NOT_FOUND);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_SAMP_RATE_INDEX);
STR_CASE(CELL_ADEC_ERROR_M4AAC_UNANTICIPATED_CH_CONFIG);
STR_CASE(CELL_ADEC_ERROR_M4AAC_PULSE_OVERFLOWED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_CAN_NOT_UNPACK_INDEX);
STR_CASE(CELL_ADEC_ERROR_M4AAC_DEINTERLEAVE_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_CALC_BAND_OFFSET_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GET_SCALE_FACTOR_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GET_CC_GAIN_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_MIX_COUPLING_CH_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GROUP_IS_INVALID);
STR_CASE(CELL_ADEC_ERROR_M4AAC_PREDICT_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_PREDICT_RESET_PATTERN);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVALID_TNS_FRAME_INFO);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GET_MASK_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GET_GROUP_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GET_LPFLAG_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_INVERSE_QUANTIZATION_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GET_CB_MAP_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_GET_PULSE_FAILED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_MONO_MIXDOWN_ELEMENT_IS_NOT_SUPPORTED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_STEREO_MIXDOWN_ELEMENT_IS_NOT_SUPPORTED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_CH_OVERFLOW);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_NOSYNCH);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_PROGRAM);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_TAG);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_CHN_CONFIG);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_SECTION);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_SCFACTORS);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_PULSE_DATA);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_MAIN_PROFILE_NOT_IMPLEMENTED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_GC_NOT_IMPLEMENTED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_ILLEGAL_PLUS_ELE_ID);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_CREATE_ERROR);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_NOT_INITIALIZED);
STR_CASE(CELL_ADEC_ERROR_M4AAC_SBR_INVALID_ENVELOPE);
STR_CASE(CELL_ADEC_ERROR_AC3_BUSY);
STR_CASE(CELL_ADEC_ERROR_AC3_EMPTY);
STR_CASE(CELL_ADEC_ERROR_AC3_PARAM);
STR_CASE(CELL_ADEC_ERROR_AC3_FRAME);
STR_CASE(CELL_ADEC_ERROR_AT3_OK); // CELL_ADEC_ERROR_AT3_OFFSET
STR_CASE(CELL_ADEC_ERROR_AT3_BUSY);
STR_CASE(CELL_ADEC_ERROR_AT3_EMPTY);
STR_CASE(CELL_ADEC_ERROR_AT3_ERROR);
STR_CASE(CELL_ADEC_ERROR_ATX_OK); // CELL_ADEC_ERROR_ATX_OFFSET, CELL_ADEC_ERROR_ATX_NONE
STR_CASE(CELL_ADEC_ERROR_ATX_BUSY);
STR_CASE(CELL_ADEC_ERROR_ATX_EMPTY);
STR_CASE(CELL_ADEC_ERROR_ATX_ATSHDR);
STR_CASE(CELL_ADEC_ERROR_ATX_NON_FATAL);
STR_CASE(CELL_ADEC_ERROR_ATX_NOT_IMPLE);
STR_CASE(CELL_ADEC_ERROR_ATX_PACK_CE_OVERFLOW);
STR_CASE(CELL_ADEC_ERROR_ATX_ILLEGAL_NPROCQUS);
STR_CASE(CELL_ADEC_ERROR_ATX_FATAL);
STR_CASE(CELL_ADEC_ERROR_ATX_ENC_OVERFLOW);
STR_CASE(CELL_ADEC_ERROR_ATX_PACK_CE_UNDERFLOW);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDCT);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_GAINADJ);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDSF);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_SPECTRA);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDWL);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_GHWAVE);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_SHEADER);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_A);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_B);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_C);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_D);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDWL_E);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDSF_A);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDSF_B);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDSF_C);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDSF_D);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_IDCT_A);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_GC_NGC);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_GC_IDLEV_A);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_GC_IDLOC_A);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_GC_IDLEV_B);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_GC_IDLOC_B);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_SN_NWVS);
STR_CASE(CELL_ADEC_ERROR_ATX_FATAL_HANDLE);
STR_CASE(CELL_ADEC_ERROR_ATX_ASSERT_SAMPLING_FREQ);
STR_CASE(CELL_ADEC_ERROR_ATX_ASSERT_CH_CONFIG_INDEX);
STR_CASE(CELL_ADEC_ERROR_ATX_ASSERT_NBYTES);
STR_CASE(CELL_ADEC_ERROR_ATX_ASSERT_BLOCK_NUM);
STR_CASE(CELL_ADEC_ERROR_ATX_ASSERT_BLOCK_ID);
STR_CASE(CELL_ADEC_ERROR_ATX_ASSERT_CHANNELS);
STR_CASE(CELL_ADEC_ERROR_ATX_UNINIT_BLOCK_SPECIFIED);
STR_CASE(CELL_ADEC_ERROR_ATX_POSCFG_PRESENT);
STR_CASE(CELL_ADEC_ERROR_ATX_BUFFER_OVERFLOW);
STR_CASE(CELL_ADEC_ERROR_ATX_ILL_BLK_TYPE_ID);
STR_CASE(CELL_ADEC_ERROR_ATX_UNPACK_CHANNEL_BLK_FAILED);
STR_CASE(CELL_ADEC_ERROR_ATX_ILL_BLK_ID_USED_1);
STR_CASE(CELL_ADEC_ERROR_ATX_ILL_BLK_ID_USED_2);
STR_CASE(CELL_ADEC_ERROR_ATX_ILLEGAL_ENC_SETTING);
STR_CASE(CELL_ADEC_ERROR_ATX_ILLEGAL_DEC_SETTING);
STR_CASE(CELL_ADEC_ERROR_ATX_ASSERT_NSAMPLES);
STR_CASE(CELL_ADEC_ERROR_ATX_ILL_SYNCWORD);
STR_CASE(CELL_ADEC_ERROR_ATX_ILL_SAMPLING_FREQ);
STR_CASE(CELL_ADEC_ERROR_ATX_ILL_CH_CONFIG_INDEX);
STR_CASE(CELL_ADEC_ERROR_ATX_RAW_DATA_FRAME_SIZE_OVER);
STR_CASE(CELL_ADEC_ERROR_ATX_SYNTAX_ENHANCE_LENGTH_OVER);
STR_CASE(CELL_ADEC_ERROR_ATX_SPU_INTERNAL_FAIL);
STR_CASE(CELL_ADEC_ERROR_LPCM_FATAL);
STR_CASE(CELL_ADEC_ERROR_LPCM_SEQ);
STR_CASE(CELL_ADEC_ERROR_LPCM_ARG);
STR_CASE(CELL_ADEC_ERROR_LPCM_BUSY);
STR_CASE(CELL_ADEC_ERROR_LPCM_EMPTY);
STR_CASE(CELL_ADEC_ERROR_MP3_OK); // CELL_ADEC_ERROR_MP3_OFFSET
STR_CASE(CELL_ADEC_ERROR_MP3_BUSY);
STR_CASE(CELL_ADEC_ERROR_MP3_EMPTY);
STR_CASE(CELL_ADEC_ERROR_MP3_ERROR);
STR_CASE(CELL_ADEC_ERROR_MP3_LOST_SYNC);
STR_CASE(CELL_ADEC_ERROR_MP3_NOT_L3);
STR_CASE(CELL_ADEC_ERROR_MP3_BAD_BITRATE);
STR_CASE(CELL_ADEC_ERROR_MP3_BAD_SFREQ);
STR_CASE(CELL_ADEC_ERROR_MP3_BAD_EMPHASIS);
STR_CASE(CELL_ADEC_ERROR_MP3_BAD_BLKTYPE);
STR_CASE(CELL_ADEC_ERROR_MP3_BAD_VERSION);
STR_CASE(CELL_ADEC_ERROR_MP3_BAD_MODE);
STR_CASE(CELL_ADEC_ERROR_MP3_BAD_MODE_EXT);
STR_CASE(CELL_ADEC_ERROR_MP3_HUFFMAN_NUM);
STR_CASE(CELL_ADEC_ERROR_MP3_HUFFMAN_CASE_ID);
STR_CASE(CELL_ADEC_ERROR_MP3_SCALEFAC_COMPRESS);
STR_CASE(CELL_ADEC_ERROR_MP3_HGETBIT);
STR_CASE(CELL_ADEC_ERROR_MP3_FLOATING_EXCEPTION);
STR_CASE(CELL_ADEC_ERROR_MP3_ARRAY_OVERFLOW);
STR_CASE(CELL_ADEC_ERROR_MP3_STEREO_PROCESSING);
STR_CASE(CELL_ADEC_ERROR_MP3_JS_BOUND);
STR_CASE(CELL_ADEC_ERROR_MP3_PCMOUT);
STR_CASE(CELL_ADEC_ERROR_M2BC_FATAL);
STR_CASE(CELL_ADEC_ERROR_M2BC_SEQ);
STR_CASE(CELL_ADEC_ERROR_M2BC_ARG);
STR_CASE(CELL_ADEC_ERROR_M2BC_BUSY);
STR_CASE(CELL_ADEC_ERROR_M2BC_EMPTY);
STR_CASE(CELL_ADEC_ERROR_M2BC_SYNCF);
STR_CASE(CELL_ADEC_ERROR_M2BC_LAYER);
STR_CASE(CELL_ADEC_ERROR_M2BC_BITRATE);
STR_CASE(CELL_ADEC_ERROR_M2BC_SAMPLEFREQ);
STR_CASE(CELL_ADEC_ERROR_M2BC_VERSION);
STR_CASE(CELL_ADEC_ERROR_M2BC_MODE_EXT);
STR_CASE(CELL_ADEC_ERROR_M2BC_UNSUPPORT);
STR_CASE(CELL_ADEC_ERROR_M2BC_OPENBS_EX);
STR_CASE(CELL_ADEC_ERROR_M2BC_SYNCF_EX);
STR_CASE(CELL_ADEC_ERROR_M2BC_CRCGET_EX);
STR_CASE(CELL_ADEC_ERROR_M2BC_CRC_EX);
STR_CASE(CELL_ADEC_ERROR_M2BC_CRCGET);
STR_CASE(CELL_ADEC_ERROR_M2BC_CRC);
STR_CASE(CELL_ADEC_ERROR_M2BC_BITALLOC);
STR_CASE(CELL_ADEC_ERROR_M2BC_SCALE);
STR_CASE(CELL_ADEC_ERROR_M2BC_SAMPLE);
STR_CASE(CELL_ADEC_ERROR_M2BC_OPENBS);
STR_CASE(CELL_ADEC_ERROR_M2BC_MC_CRCGET);
STR_CASE(CELL_ADEC_ERROR_M2BC_MC_CRC);
STR_CASE(CELL_ADEC_ERROR_M2BC_MC_BITALLOC);
STR_CASE(CELL_ADEC_ERROR_M2BC_MC_SCALE);
STR_CASE(CELL_ADEC_ERROR_M2BC_MC_SAMPLE);
STR_CASE(CELL_ADEC_ERROR_M2BC_MC_HEADER);
STR_CASE(CELL_ADEC_ERROR_M2BC_MC_STATUS);
STR_CASE(CELL_ADEC_ERROR_M2BC_AG_CCRCGET);
STR_CASE(CELL_ADEC_ERROR_M2BC_AG_CRC);
STR_CASE(CELL_ADEC_ERROR_M2BC_AG_BITALLOC);
STR_CASE(CELL_ADEC_ERROR_M2BC_AG_SCALE);
STR_CASE(CELL_ADEC_ERROR_M2BC_AG_SAMPLE);
STR_CASE(CELL_ADEC_ERROR_M2BC_AG_STATUS);
}
return unknown;
});
}
class AudioDecoder : public ppu_thread
{
public:
@ -538,7 +763,7 @@ bool adecCheckType(s32 type)
return true;
}
s32 cellAdecQueryAttr(vm::ptr<CellAdecType> type, vm::ptr<CellAdecAttr> attr)
error_code cellAdecQueryAttr(vm::ptr<CellAdecType> type, vm::ptr<CellAdecAttr> attr)
{
cellAdec.warning("cellAdecQueryAttr(type=*0x%x, attr=*0x%x)", type, attr);
@ -555,7 +780,7 @@ s32 cellAdecQueryAttr(vm::ptr<CellAdecType> type, vm::ptr<CellAdecAttr> attr)
return CELL_OK;
}
s32 cellAdecOpen(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResource> res, vm::ptr<CellAdecCb> cb, vm::ptr<u32> handle)
error_code cellAdecOpen(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResource> res, vm::ptr<CellAdecCb> cb, vm::ptr<u32> handle)
{
cellAdec.warning("cellAdecOpen(type=*0x%x, res=*0x%x, cb=*0x%x, handle=*0x%x)", type, res, cb, handle);
@ -567,7 +792,7 @@ s32 cellAdecOpen(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResource> res, vm::
fmt::throw_exception("cellAdec disabled, use LLE.");
}
s32 cellAdecOpenEx(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResourceEx> res, vm::ptr<CellAdecCb> cb, vm::ptr<u32> handle)
error_code cellAdecOpenEx(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResourceEx> res, vm::ptr<CellAdecCb> cb, vm::ptr<u32> handle)
{
cellAdec.warning("cellAdecOpenEx(type=*0x%x, res=*0x%x, cb=*0x%x, handle=*0x%x)", type, res, cb, handle);
@ -579,14 +804,14 @@ s32 cellAdecOpenEx(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResourceEx> res,
fmt::throw_exception("cellAdec disabled, use LLE.");
}
s32 cellAdecOpenExt(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResourceEx> res, vm::ptr<CellAdecCb> cb, vm::ptr<u32> handle)
error_code cellAdecOpenExt(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResourceEx> res, vm::ptr<CellAdecCb> cb, vm::ptr<u32> handle)
{
cellAdec.warning("cellAdecOpenExt(type=*0x%x, res=*0x%x, cb=*0x%x, handle=*0x%x)", type, res, cb, handle);
return cellAdecOpenEx(type, res, cb, handle);
}
s32 cellAdecClose(u32 handle)
error_code cellAdecClose(u32 handle)
{
cellAdec.warning("cellAdecClose(handle=0x%x)", handle);
@ -609,7 +834,7 @@ s32 cellAdecClose(u32 handle)
return CELL_OK;
}
s32 cellAdecStartSeq(u32 handle, u32 param)
error_code cellAdecStartSeq(u32 handle, u32 param)
{
cellAdec.warning("cellAdecStartSeq(handle=0x%x, param=*0x%x)", handle, param);
@ -662,7 +887,7 @@ s32 cellAdecStartSeq(u32 handle, u32 param)
return CELL_OK;
}
s32 cellAdecEndSeq(u32 handle)
error_code cellAdecEndSeq(u32 handle)
{
cellAdec.warning("cellAdecEndSeq(handle=0x%x)", handle);
@ -677,7 +902,7 @@ s32 cellAdecEndSeq(u32 handle)
return CELL_OK;
}
s32 cellAdecDecodeAu(u32 handle, vm::ptr<CellAdecAuInfo> auInfo)
error_code cellAdecDecodeAu(u32 handle, vm::ptr<CellAdecAuInfo> auInfo)
{
cellAdec.trace("cellAdecDecodeAu(handle=0x%x, auInfo=*0x%x)", handle, auInfo);
@ -700,7 +925,7 @@ s32 cellAdecDecodeAu(u32 handle, vm::ptr<CellAdecAuInfo> auInfo)
return CELL_OK;
}
s32 cellAdecGetPcm(u32 handle, vm::ptr<float> outBuffer)
error_code cellAdecGetPcm(u32 handle, vm::ptr<float> outBuffer)
{
cellAdec.trace("cellAdecGetPcm(handle=0x%x, outBuffer=*0x%x)", handle, outBuffer);
@ -816,7 +1041,7 @@ s32 cellAdecGetPcm(u32 handle, vm::ptr<float> outBuffer)
return CELL_OK;
}
s32 cellAdecGetPcmItem(u32 handle, vm::pptr<CellAdecPcmItem> pcmItem)
error_code cellAdecGetPcmItem(u32 handle, vm::pptr<CellAdecPcmItem> pcmItem)
{
cellAdec.trace("cellAdecGetPcmItem(handle=0x%x, pcmItem=**0x%x)", handle, pcmItem);

View file

@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Error Codes
enum
enum CellAdecError : u32
{
CELL_ADEC_ERROR_FATAL = 0x80610001,
CELL_ADEC_ERROR_SEQ = 0x80610002,

View file

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUModule.h"
@ -6,7 +6,41 @@
LOG_CHANNEL(cellAtrac);
s32 cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<u32> puiWorkMemByte)
template <>
void fmt_class_string<CellAtracError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](CellAtracError value)
{
switch (value)
{
STR_CASE(CELL_ATRAC_ERROR_API_FAIL);
STR_CASE(CELL_ATRAC_ERROR_READSIZE_OVER_BUFFER);
STR_CASE(CELL_ATRAC_ERROR_UNKNOWN_FORMAT);
STR_CASE(CELL_ATRAC_ERROR_READSIZE_IS_TOO_SMALL);
STR_CASE(CELL_ATRAC_ERROR_ILLEGAL_SAMPLING_RATE);
STR_CASE(CELL_ATRAC_ERROR_ILLEGAL_DATA);
STR_CASE(CELL_ATRAC_ERROR_NO_DECODER);
STR_CASE(CELL_ATRAC_ERROR_UNSET_DATA);
STR_CASE(CELL_ATRAC_ERROR_DECODER_WAS_CREATED);
STR_CASE(CELL_ATRAC_ERROR_ALLDATA_WAS_DECODED);
STR_CASE(CELL_ATRAC_ERROR_NODATA_IN_BUFFER);
STR_CASE(CELL_ATRAC_ERROR_NOT_ALIGNED_OUT_BUFFER);
STR_CASE(CELL_ATRAC_ERROR_NEED_SECOND_BUFFER);
STR_CASE(CELL_ATRAC_ERROR_ALLDATA_IS_ONMEMORY);
STR_CASE(CELL_ATRAC_ERROR_ADD_DATA_IS_TOO_BIG);
STR_CASE(CELL_ATRAC_ERROR_NONEED_SECOND_BUFFER);
STR_CASE(CELL_ATRAC_ERROR_UNSET_LOOP_NUM);
STR_CASE(CELL_ATRAC_ERROR_ILLEGAL_SAMPLE);
STR_CASE(CELL_ATRAC_ERROR_ILLEGAL_RESET_BYTE);
STR_CASE(CELL_ATRAC_ERROR_ILLEGAL_PPU_THREAD_PRIORITY);
STR_CASE(CELL_ATRAC_ERROR_ILLEGAL_SPU_THREAD_PRIORITY);
}
return unknown;
});
}
error_code cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<u32> puiWorkMemByte)
{
cellAtrac.warning("cellAtracSetDataAndGetMemSize(pHandle=*0x%x, pucBufferAddr=*0x%x, uiReadByte=0x%x, uiBufferByte=0x%x, puiWorkMemByte=*0x%x)", pHandle, pucBufferAddr, uiReadByte, uiBufferByte, puiWorkMemByte);
@ -14,7 +48,7 @@ s32 cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8>
return CELL_OK;
}
s32 cellAtracCreateDecoder(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucWorkMem, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority)
error_code cellAtracCreateDecoder(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucWorkMem, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority)
{
cellAtrac.warning("cellAtracCreateDecoder(pHandle=*0x%x, pucWorkMem=*0x%x, uiPpuThreadPriority=%d, uiSpuThreadPriority=%d)", pHandle, pucWorkMem, uiPpuThreadPriority, uiSpuThreadPriority);
@ -22,7 +56,7 @@ s32 cellAtracCreateDecoder(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucWork
return CELL_OK;
}
s32 cellAtracCreateDecoderExt(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucWorkMem, u32 uiPpuThreadPriority, vm::ptr<CellAtracExtRes> pExtRes)
error_code cellAtracCreateDecoderExt(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucWorkMem, u32 uiPpuThreadPriority, vm::ptr<CellAtracExtRes> pExtRes)
{
cellAtrac.warning("cellAtracCreateDecoderExt(pHandle=*0x%x, pucWorkMem=*0x%x, uiPpuThreadPriority=%d, pExtRes=*0x%x)", pHandle, pucWorkMem, uiPpuThreadPriority, pExtRes);
@ -30,14 +64,14 @@ s32 cellAtracCreateDecoderExt(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucW
return CELL_OK;
}
s32 cellAtracDeleteDecoder(vm::ptr<CellAtracHandle> pHandle)
error_code cellAtracDeleteDecoder(vm::ptr<CellAtracHandle> pHandle)
{
cellAtrac.warning("cellAtracDeleteDecoder(pHandle=*0x%x)", pHandle);
return CELL_OK;
}
s32 cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, vm::ptr<float> pfOutAddr, vm::ptr<u32> puiSamples, vm::ptr<u32> puiFinishflag, vm::ptr<s32> piRemainFrame)
error_code cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, vm::ptr<float> pfOutAddr, vm::ptr<u32> puiSamples, vm::ptr<u32> puiFinishflag, vm::ptr<s32> piRemainFrame)
{
cellAtrac.warning("cellAtracDecode(pHandle=*0x%x, pfOutAddr=*0x%x, puiSamples=*0x%x, puiFinishFlag=*0x%x, piRemainFrame=*0x%x)", pHandle, pfOutAddr, puiSamples, puiFinishflag, piRemainFrame);
@ -47,7 +81,7 @@ s32 cellAtracDecode(vm::ptr<CellAtracHandle> pHandle, vm::ptr<float> pfOutAddr,
return CELL_OK;
}
s32 cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::pptr<u8> ppucWritePointer, vm::ptr<u32> puiWritableByte, vm::ptr<u32> puiReadPosition)
error_code cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::pptr<u8> ppucWritePointer, vm::ptr<u32> puiWritableByte, vm::ptr<u32> puiReadPosition)
{
cellAtrac.warning("cellAtracGetStreamDataInfo(pHandle=*0x%x, ppucWritePointer=**0x%x, puiWritableByte=*0x%x, puiReadPosition=*0x%x)", pHandle, ppucWritePointer, puiWritableByte, puiReadPosition);
@ -57,14 +91,14 @@ s32 cellAtracGetStreamDataInfo(vm::ptr<CellAtracHandle> pHandle, vm::pptr<u8> pp
return CELL_OK;
}
s32 cellAtracAddStreamData(vm::ptr<CellAtracHandle> pHandle, u32 uiAddByte)
error_code cellAtracAddStreamData(vm::ptr<CellAtracHandle> pHandle, u32 uiAddByte)
{
cellAtrac.warning("cellAtracAddStreamData(pHandle=*0x%x, uiAddByte=0x%x)", pHandle, uiAddByte);
return CELL_OK;
}
s32 cellAtracGetRemainFrame(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piRemainFrame)
error_code cellAtracGetRemainFrame(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piRemainFrame)
{
cellAtrac.warning("cellAtracGetRemainFrame(pHandle=*0x%x, piRemainFrame=*0x%x)", pHandle, piRemainFrame);
@ -72,7 +106,7 @@ s32 cellAtracGetRemainFrame(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piRem
return CELL_OK;
}
s32 cellAtracGetVacantSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiVacantSize)
error_code cellAtracGetVacantSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiVacantSize)
{
cellAtrac.warning("cellAtracGetVacantSize(pHandle=*0x%x, puiVacantSize=*0x%x)", pHandle, puiVacantSize);
@ -80,14 +114,14 @@ s32 cellAtracGetVacantSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiVac
return CELL_OK;
}
s32 cellAtracIsSecondBufferNeeded(vm::ptr<CellAtracHandle> pHandle)
error_code cellAtracIsSecondBufferNeeded(vm::ptr<CellAtracHandle> pHandle)
{
cellAtrac.warning("cellAtracIsSecondBufferNeeded(pHandle=*0x%x)", pHandle);
return 0;
}
s32 cellAtracGetSecondBufferInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiReadPosition, vm::ptr<u32> puiDataByte)
error_code cellAtracGetSecondBufferInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiReadPosition, vm::ptr<u32> puiDataByte)
{
cellAtrac.warning("cellAtracGetSecondBufferInfo(pHandle=*0x%x, puiReadPosition=*0x%x, puiDataByte=*0x%x)", pHandle, puiReadPosition, puiDataByte);
@ -96,14 +130,14 @@ s32 cellAtracGetSecondBufferInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32>
return CELL_OK;
}
s32 cellAtracSetSecondBuffer(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucSecondBufferAddr, u32 uiSecondBufferByte)
error_code cellAtracSetSecondBuffer(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucSecondBufferAddr, u32 uiSecondBufferByte)
{
cellAtrac.warning("cellAtracSetSecondBuffer(pHandle=*0x%x, pucSecondBufferAddr=*0x%x, uiSecondBufferByte=0x%x)", pHandle, pucSecondBufferAddr, uiSecondBufferByte);
return CELL_OK;
}
s32 cellAtracGetChannel(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiChannel)
error_code cellAtracGetChannel(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiChannel)
{
cellAtrac.warning("cellAtracGetChannel(pHandle=*0x%x, puiChannel=*0x%x)", pHandle, puiChannel);
@ -111,7 +145,7 @@ s32 cellAtracGetChannel(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiChanne
return CELL_OK;
}
s32 cellAtracGetMaxSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiMaxSample)
error_code cellAtracGetMaxSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiMaxSample)
{
cellAtrac.warning("cellAtracGetMaxSample(pHandle=*0x%x, puiMaxSample=*0x%x)", pHandle, puiMaxSample);
@ -119,7 +153,7 @@ s32 cellAtracGetMaxSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiMaxS
return CELL_OK;
}
s32 cellAtracGetNextSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiNextSample)
error_code cellAtracGetNextSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiNextSample)
{
cellAtrac.warning("cellAtracGetNextSample(pHandle=*0x%x, puiNextSample=*0x%x)", pHandle, puiNextSample);
@ -127,7 +161,7 @@ s32 cellAtracGetNextSample(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiNex
return CELL_OK;
}
s32 cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piEndSample, vm::ptr<s32> piLoopStartSample, vm::ptr<s32> piLoopEndSample)
error_code cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piEndSample, vm::ptr<s32> piLoopStartSample, vm::ptr<s32> piLoopEndSample)
{
cellAtrac.warning("cellAtracGetSoundInfo(pHandle=*0x%x, piEndSample=*0x%x, piLoopStartSample=*0x%x, piLoopEndSample=*0x%x)", pHandle, piEndSample, piLoopStartSample, piLoopEndSample);
@ -137,7 +171,7 @@ s32 cellAtracGetSoundInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piEndSa
return CELL_OK;
}
s32 cellAtracGetNextDecodePosition(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiSamplePosition)
error_code cellAtracGetNextDecodePosition(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiSamplePosition)
{
cellAtrac.warning("cellAtracGetNextDecodePosition(pHandle=*0x%x, puiSamplePosition=*0x%x)", pHandle, puiSamplePosition);
@ -145,7 +179,7 @@ s32 cellAtracGetNextDecodePosition(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32
return CELL_ATRAC_ERROR_ALLDATA_WAS_DECODED;
}
s32 cellAtracGetBitrate(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiBitrate)
error_code cellAtracGetBitrate(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiBitrate)
{
cellAtrac.warning("cellAtracGetBitrate(pHandle=*0x%x, puiBitrate=*0x%x)", pHandle, puiBitrate);
@ -153,7 +187,7 @@ s32 cellAtracGetBitrate(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u32> puiBitrat
return CELL_OK;
}
s32 cellAtracGetLoopInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piLoopNum, vm::ptr<u32> puiLoopStatus)
error_code cellAtracGetLoopInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piLoopNum, vm::ptr<u32> puiLoopStatus)
{
cellAtrac.warning("cellAtracGetLoopInfo(pHandle=*0x%x, piLoopNum=*0x%x, puiLoopStatus=*0x%x)", pHandle, piLoopNum, puiLoopStatus);
@ -162,14 +196,14 @@ s32 cellAtracGetLoopInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piLoopNu
return CELL_OK;
}
s32 cellAtracSetLoopNum(vm::ptr<CellAtracHandle> pHandle, s32 iLoopNum)
error_code cellAtracSetLoopNum(vm::ptr<CellAtracHandle> pHandle, s32 iLoopNum)
{
cellAtrac.warning("cellAtracSetLoopNum(pHandle=*0x%x, iLoopNum=%d)", pHandle, iLoopNum);
return CELL_OK;
}
s32 cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, vm::ptr<CellAtracBufferInfo> pBufferInfo)
error_code cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, vm::ptr<CellAtracBufferInfo> pBufferInfo)
{
cellAtrac.warning("cellAtracGetBufferInfoForResetting(pHandle=*0x%x, uiSample=0x%x, pBufferInfo=*0x%x)", pHandle, uiSample, pBufferInfo);
@ -180,14 +214,14 @@ s32 cellAtracGetBufferInfoForResetting(vm::ptr<CellAtracHandle> pHandle, u32 uiS
return CELL_OK;
}
s32 cellAtracResetPlayPosition(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, u32 uiWriteByte)
error_code cellAtracResetPlayPosition(vm::ptr<CellAtracHandle> pHandle, u32 uiSample, u32 uiWriteByte)
{
cellAtrac.warning("cellAtracResetPlayPosition(pHandle=*0x%x, uiSample=0x%x, uiWriteByte=0x%x)", pHandle, uiSample, uiWriteByte);
return CELL_OK;
}
s32 cellAtracGetInternalErrorInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piResult)
error_code cellAtracGetInternalErrorInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32> piResult)
{
cellAtrac.warning("cellAtracGetInternalErrorInfo(pHandle=*0x%x, piResult=*0x%x)", pHandle, piResult);
@ -195,7 +229,7 @@ s32 cellAtracGetInternalErrorInfo(vm::ptr<CellAtracHandle> pHandle, vm::ptr<s32>
return CELL_OK;
}
s32 cellAtracGetSamplingRate()
error_code cellAtracGetSamplingRate()
{
UNIMPLEMENTED_FUNC(cellAtrac);
return CELL_OK;

View file

@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Return Codes
enum
enum CellAtracError : u32
{
CELL_ATRAC_ERROR_API_FAIL = 0x80610301,
CELL_ATRAC_ERROR_READSIZE_OVER_BUFFER = 0x80610311,
@ -36,6 +36,11 @@ enum : s32
CELL_ATRAC_LOOP_STREAM_DATA_IS_ON_MEMORY = -3,
};
enum
{
CELL_ATRAC_HANDLE_SIZE = 512
};
struct alignas(8) CellAtracHandle
{
vm::ptr<u8> pucWorkMem;

View file

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUModule.h"
@ -6,7 +6,42 @@
LOG_CHANNEL(cellAtracMulti);
s32 cellAtracMultiSetDataAndGetMemSize(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, u32 uiOutputChNum, vm::ptr<s32> piTrackArray, vm::ptr<u32> puiWorkMemByte)
template <>
void fmt_class_string<CellAtracMultiError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](CellAtracMultiError value)
{
switch (value)
{
STR_CASE(CELL_ATRACMULTI_ERROR_API_FAIL);
STR_CASE(CELL_ATRACMULTI_ERROR_READSIZE_OVER_BUFFER);
STR_CASE(CELL_ATRACMULTI_ERROR_UNKNOWN_FORMAT);
STR_CASE(CELL_ATRACMULTI_ERROR_READSIZE_IS_TOO_SMALL);
STR_CASE(CELL_ATRACMULTI_ERROR_ILLEGAL_SAMPLING_RATE);
STR_CASE(CELL_ATRACMULTI_ERROR_ILLEGAL_DATA);
STR_CASE(CELL_ATRACMULTI_ERROR_NO_DECODER);
STR_CASE(CELL_ATRACMULTI_ERROR_UNSET_DATA);
STR_CASE(CELL_ATRACMULTI_ERROR_DECODER_WAS_CREATED);
STR_CASE(CELL_ATRACMULTI_ERROR_ALLDATA_WAS_DECODED);
STR_CASE(CELL_ATRACMULTI_ERROR_NODATA_IN_BUFFER);
STR_CASE(CELL_ATRACMULTI_ERROR_NOT_ALIGNED_OUT_BUFFER);
STR_CASE(CELL_ATRACMULTI_ERROR_NEED_SECOND_BUFFER);
STR_CASE(CELL_ATRACMULTI_ERROR_ALLDATA_IS_ONMEMORY);
STR_CASE(CELL_ATRACMULTI_ERROR_ADD_DATA_IS_TOO_BIG);
STR_CASE(CELL_ATRACMULTI_ERROR_NONEED_SECOND_BUFFER);
STR_CASE(CELL_ATRACMULTI_ERROR_UNSET_LOOP_NUM);
STR_CASE(CELL_ATRACMULTI_ERROR_ILLEGAL_SAMPLE);
STR_CASE(CELL_ATRACMULTI_ERROR_ILLEGAL_RESET_BYTE);
STR_CASE(CELL_ATRACMULTI_ERROR_ILLEGAL_PPU_THREAD_PRIORITY);
STR_CASE(CELL_ATRACMULTI_ERROR_ILLEGAL_SPU_THREAD_PRIORITY);
STR_CASE(CELL_ATRACMULTI_ERROR_API_PARAMETER);
}
return unknown;
});
}
error_code cellAtracMultiSetDataAndGetMemSize(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, u32 uiOutputChNum, vm::ptr<s32> piTrackArray, vm::ptr<u32> puiWorkMemByte)
{
cellAtracMulti.warning("cellAtracMultiSetDataAndGetMemSize(pHandle=*0x%x, pucBufferAddr=*0x%x, uiReadByte=0x%x, uiBufferByte=0x%x, uiOutputChNum=%d, piTrackArray=*0x%x, puiWorkMemByte=*0x%x)",
pHandle, pucBufferAddr, uiReadByte, uiBufferByte, uiOutputChNum, piTrackArray, puiWorkMemByte);
@ -15,7 +50,7 @@ s32 cellAtracMultiSetDataAndGetMemSize(vm::ptr<CellAtracMultiHandle> pHandle, vm
return CELL_OK;
}
s32 cellAtracMultiCreateDecoder(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucWorkMem, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority)
error_code cellAtracMultiCreateDecoder(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucWorkMem, u32 uiPpuThreadPriority, u32 uiSpuThreadPriority)
{
cellAtracMulti.warning("cellAtracMultiCreateDecoder(pHandle=*0x%x, pucWorkMem=*0x%x, uiPpuThreadPriority=%d, uiSpuThreadPriority=%d)", pHandle, pucWorkMem, uiPpuThreadPriority, uiSpuThreadPriority);
@ -23,7 +58,7 @@ s32 cellAtracMultiCreateDecoder(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u
return CELL_OK;
}
s32 cellAtracMultiCreateDecoderExt(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucWorkMem, u32 uiPpuThreadPriority, vm::ptr<CellAtracMultiExtRes> pExtRes)
error_code cellAtracMultiCreateDecoderExt(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucWorkMem, u32 uiPpuThreadPriority, vm::ptr<CellAtracMultiExtRes> pExtRes)
{
cellAtracMulti.warning("cellAtracMultiCreateDecoderExt(pHandle=*0x%x, pucWorkMem=*0x%x, uiPpuThreadPriority=%d, pExtRes=*0x%x)", pHandle, pucWorkMem, uiPpuThreadPriority, pExtRes);
@ -31,14 +66,14 @@ s32 cellAtracMultiCreateDecoderExt(vm::ptr<CellAtracMultiHandle> pHandle, vm::pt
return CELL_OK;
}
s32 cellAtracMultiDeleteDecoder(vm::ptr<CellAtracMultiHandle> pHandle)
error_code cellAtracMultiDeleteDecoder(vm::ptr<CellAtracMultiHandle> pHandle)
{
cellAtracMulti.warning("cellAtracMultiDeleteDecoder(pHandle=*0x%x)", pHandle);
return CELL_OK;
}
s32 cellAtracMultiDecode(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<float> pfOutAddr, vm::ptr<u32> puiSamples, vm::ptr<u32> puiFinishflag, vm::ptr<s32> piRemainFrame)
error_code cellAtracMultiDecode(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<float> pfOutAddr, vm::ptr<u32> puiSamples, vm::ptr<u32> puiFinishflag, vm::ptr<s32> piRemainFrame)
{
cellAtracMulti.warning("cellAtracMultiDecode(pHandle=*0x%x, pfOutAddr=*0x%x, puiSamples=*0x%x, puiFinishFlag=*0x%x, piRemainFrame=*0x%x)", pHandle, pfOutAddr, puiSamples, puiFinishflag, piRemainFrame);
@ -48,7 +83,7 @@ s32 cellAtracMultiDecode(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<float> p
return CELL_OK;
}
s32 cellAtracMultiGetStreamDataInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::pptr<u8> ppucWritePointer, vm::ptr<u32> puiWritableByte, vm::ptr<u32> puiReadPosition)
error_code cellAtracMultiGetStreamDataInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::pptr<u8> ppucWritePointer, vm::ptr<u32> puiWritableByte, vm::ptr<u32> puiReadPosition)
{
cellAtracMulti.warning("cellAtracMultiGetStreamDataInfo(pHandle=*0x%x, ppucWritePointer=**0x%x, puiWritableByte=*0x%x, puiReadPosition=*0x%x)", pHandle, ppucWritePointer, puiWritableByte, puiReadPosition);
@ -58,14 +93,14 @@ s32 cellAtracMultiGetStreamDataInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::p
return CELL_OK;
}
s32 cellAtracMultiAddStreamData(vm::ptr<CellAtracMultiHandle> pHandle, u32 uiAddByte)
error_code cellAtracMultiAddStreamData(vm::ptr<CellAtracMultiHandle> pHandle, u32 uiAddByte)
{
cellAtracMulti.warning("cellAtracMultiAddStreamData(pHandle=*0x%x, uiAddByte=0x%x)", pHandle, uiAddByte);
return CELL_OK;
}
s32 cellAtracMultiGetRemainFrame(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piRemainFrame)
error_code cellAtracMultiGetRemainFrame(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piRemainFrame)
{
cellAtracMulti.warning("cellAtracMultiGetRemainFrame(pHandle=*0x%x, piRemainFrame=*0x%x)", pHandle, piRemainFrame);
@ -73,7 +108,7 @@ s32 cellAtracMultiGetRemainFrame(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<
return CELL_OK;
}
s32 cellAtracMultiGetVacantSize(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiVacantSize)
error_code cellAtracMultiGetVacantSize(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiVacantSize)
{
cellAtracMulti.warning("cellAtracMultiGetVacantSize(pHandle=*0x%x, puiVacantSize=*0x%x)", pHandle, puiVacantSize);
@ -81,14 +116,14 @@ s32 cellAtracMultiGetVacantSize(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u
return CELL_OK;
}
s32 cellAtracMultiIsSecondBufferNeeded(vm::ptr<CellAtracMultiHandle> pHandle)
error_code cellAtracMultiIsSecondBufferNeeded(vm::ptr<CellAtracMultiHandle> pHandle)
{
cellAtracMulti.warning("cellAtracMultiIsSecondBufferNeeded(pHandle=*0x%x)", pHandle);
return 0;
return not_an_error(0);
}
s32 cellAtracMultiGetSecondBufferInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiReadPosition, vm::ptr<u32> puiDataByte)
error_code cellAtracMultiGetSecondBufferInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiReadPosition, vm::ptr<u32> puiDataByte)
{
cellAtracMulti.warning("cellAtracMultiGetSecondBufferInfo(pHandle=*0x%x, puiReadPosition=*0x%x, puiDataByte=*0x%x)", pHandle, puiReadPosition, puiDataByte);
@ -97,14 +132,14 @@ s32 cellAtracMultiGetSecondBufferInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm:
return CELL_OK;
}
s32 cellAtracMultiSetSecondBuffer(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucSecondBufferAddr, u32 uiSecondBufferByte)
error_code cellAtracMultiSetSecondBuffer(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucSecondBufferAddr, u32 uiSecondBufferByte)
{
cellAtracMulti.warning("cellAtracMultiSetSecondBuffer(pHandle=*0x%x, pucSecondBufferAddr=*0x%x, uiSecondBufferByte=0x%x)", pHandle, pucSecondBufferAddr, uiSecondBufferByte);
return CELL_OK;
}
s32 cellAtracMultiGetChannel(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiChannel)
error_code cellAtracMultiGetChannel(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiChannel)
{
cellAtracMulti.warning("cellAtracMultiGetChannel(pHandle=*0x%x, puiChannel=*0x%x)", pHandle, puiChannel);
@ -112,7 +147,7 @@ s32 cellAtracMultiGetChannel(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32>
return CELL_OK;
}
s32 cellAtracMultiGetMaxSample(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiMaxSample)
error_code cellAtracMultiGetMaxSample(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiMaxSample)
{
cellAtracMulti.warning("cellAtracMultiGetMaxSample(pHandle=*0x%x, puiMaxSample=*0x%x)", pHandle, puiMaxSample);
@ -120,7 +155,7 @@ s32 cellAtracMultiGetMaxSample(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u3
return CELL_OK;
}
s32 cellAtracMultiGetNextSample(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiNextSample)
error_code cellAtracMultiGetNextSample(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiNextSample)
{
cellAtracMulti.warning("cellAtracMultiGetNextSample(pHandle=*0x%x, puiNextSample=*0x%x)", pHandle, puiNextSample);
@ -128,7 +163,7 @@ s32 cellAtracMultiGetNextSample(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u
return CELL_OK;
}
s32 cellAtracMultiGetSoundInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piEndSample, vm::ptr<s32> piLoopStartSample, vm::ptr<s32> piLoopEndSample)
error_code cellAtracMultiGetSoundInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piEndSample, vm::ptr<s32> piLoopStartSample, vm::ptr<s32> piLoopEndSample)
{
cellAtracMulti.warning("cellAtracMultiGetSoundInfo(pHandle=*0x%x, piEndSample=*0x%x, piLoopStartSample=*0x%x, piLoopEndSample=*0x%x)", pHandle, piEndSample, piLoopStartSample, piLoopEndSample);
@ -138,7 +173,7 @@ s32 cellAtracMultiGetSoundInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s3
return CELL_OK;
}
s32 cellAtracMultiGetNextDecodePosition(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiSamplePosition)
error_code cellAtracMultiGetNextDecodePosition(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiSamplePosition)
{
cellAtracMulti.warning("cellAtracMultiGetNextDecodePosition(pHandle=*0x%x, puiSamplePosition=*0x%x)", pHandle, puiSamplePosition);
@ -146,7 +181,7 @@ s32 cellAtracMultiGetNextDecodePosition(vm::ptr<CellAtracMultiHandle> pHandle, v
return CELL_ATRACMULTI_ERROR_ALLDATA_WAS_DECODED;
}
s32 cellAtracMultiGetBitrate(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiBitrate)
error_code cellAtracMultiGetBitrate(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32> puiBitrate)
{
cellAtracMulti.warning("cellAtracMultiGetBitrate(pHandle=*0x%x, puiBitrate=*0x%x)", pHandle, puiBitrate);
@ -154,14 +189,14 @@ s32 cellAtracMultiGetBitrate(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u32>
return CELL_OK;
}
s32 cellAtracMultiGetTrackArray(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piTrackArray)
error_code cellAtracMultiGetTrackArray(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piTrackArray)
{
cellAtracMulti.error("cellAtracMultiGetTrackArray(pHandle=*0x%x, piTrackArray=*0x%x)", pHandle, piTrackArray);
return CELL_OK;
}
s32 cellAtracMultiGetLoopInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piLoopNum, vm::ptr<u32> puiLoopStatus)
error_code cellAtracMultiGetLoopInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piLoopNum, vm::ptr<u32> puiLoopStatus)
{
cellAtracMulti.warning("cellAtracMultiGetLoopInfo(pHandle=*0x%x, piLoopNum=*0x%x, puiLoopStatus=*0x%x)", pHandle, piLoopNum, puiLoopStatus);
@ -170,14 +205,14 @@ s32 cellAtracMultiGetLoopInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32
return CELL_OK;
}
s32 cellAtracMultiSetLoopNum(vm::ptr<CellAtracMultiHandle> pHandle, s32 iLoopNum)
error_code cellAtracMultiSetLoopNum(vm::ptr<CellAtracMultiHandle> pHandle, s32 iLoopNum)
{
cellAtracMulti.warning("cellAtracMultiSetLoopNum(pHandle=*0x%x, iLoopNum=%d)", pHandle, iLoopNum);
return CELL_OK;
}
s32 cellAtracMultiGetBufferInfoForResetting(vm::ptr<CellAtracMultiHandle> pHandle, u32 uiSample, vm::ptr<CellAtracMultiBufferInfo> pBufferInfo)
error_code cellAtracMultiGetBufferInfoForResetting(vm::ptr<CellAtracMultiHandle> pHandle, u32 uiSample, vm::ptr<CellAtracMultiBufferInfo> pBufferInfo)
{
cellAtracMulti.warning("cellAtracMultiGetBufferInfoForResetting(pHandle=*0x%x, uiSample=0x%x, pBufferInfo=*0x%x)", pHandle, uiSample, pBufferInfo);
@ -188,14 +223,14 @@ s32 cellAtracMultiGetBufferInfoForResetting(vm::ptr<CellAtracMultiHandle> pHandl
return CELL_OK;
}
s32 cellAtracMultiResetPlayPosition(vm::ptr<CellAtracMultiHandle> pHandle, u32 uiSample, u32 uiWriteByte, vm::ptr<s32> piTrackArray)
error_code cellAtracMultiResetPlayPosition(vm::ptr<CellAtracMultiHandle> pHandle, u32 uiSample, u32 uiWriteByte, vm::ptr<s32> piTrackArray)
{
cellAtracMulti.warning("cellAtracMultiResetPlayPosition(pHandle=*0x%x, uiSample=0x%x, uiWriteByte=0x%x, piTrackArray=*0x%x)", pHandle, uiSample, uiWriteByte, piTrackArray);
return CELL_OK;
}
s32 cellAtracMultiGetInternalErrorInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piResult)
error_code cellAtracMultiGetInternalErrorInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<s32> piResult)
{
cellAtracMulti.warning("cellAtracMultiGetInternalErrorInfo(pHandle=*0x%x, piResult=*0x%x)", pHandle, piResult);
@ -203,7 +238,7 @@ s32 cellAtracMultiGetInternalErrorInfo(vm::ptr<CellAtracMultiHandle> pHandle, vm
return CELL_OK;
}
s32 cellAtracMultiGetSamplingRate()
error_code cellAtracMultiGetSamplingRate()
{
UNIMPLEMENTED_FUNC(cellAtracMulti);
return CELL_OK;

View file

@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Return Codes
enum
enum CellAtracMultiError : u32
{
CELL_ATRACMULTI_ERROR_API_FAIL = 0x80610b01,
CELL_ATRACMULTI_ERROR_READSIZE_OVER_BUFFER = 0x80610b11,
@ -37,6 +37,11 @@ enum : s32
CELL_ATRACMULTI_LOOP_STREAM_DATA_IS_ON_MEMORY = -3,
};
enum
{
CELL_ATRACMULTI_HANDLE_SIZE = 512
};
struct alignas(8) CellAtracMultiHandle
{
vm::ptr<u8> pucWorkMem;

View file

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUModule.h"
@ -8,25 +8,25 @@
LOG_CHANNEL(cellBGDL);
s32 cellBGDLGetInfo(vm::cptr<char> content_id, vm::ptr<CellBGDLInfo> info, s32 num)
error_code cellBGDLGetInfo(vm::cptr<char> content_id, vm::ptr<CellBGDLInfo> info, s32 num)
{
cellBGDL.todo("cellBGDLGetInfo(content_id=%s, info=*0x%x, num=%d)", content_id, info, num);
return 0;
return CELL_OK;
}
s32 cellBGDLGetInfo2(vm::cptr<char> service_id, vm::ptr<CellBGDLInfo> info, s32 num)
error_code cellBGDLGetInfo2(vm::cptr<char> service_id, vm::ptr<CellBGDLInfo> info, s32 num)
{
cellBGDL.todo("cellBGDLGetInfo2(service_id=%s, info=*0x%x, num=%d)", service_id, info, num);
return 0;
return CELL_OK;
}
s32 cellBGDLSetMode(CellBGDLMode mode)
error_code cellBGDLSetMode(CellBGDLMode mode)
{
cellBGDL.todo("cellBGDLSetMode(mode=%d)", (s32) mode);
return CELL_OK;
}
s32 cellBGDLGetMode(vm::ptr<CellBGDLMode> mode)
error_code cellBGDLGetMode(vm::ptr<CellBGDLMode> mode)
{
cellBGDL.todo("cellBGDLGetMode(mode=*0x%x)", mode);
return CELL_OK;

View file

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"