mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
Conflicts fixed
This commit is contained in:
commit
c6c6dbe546
102 changed files with 3039 additions and 3008 deletions
|
@ -1,11 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
extern u64 get_system_time();
|
||||
|
||||
// Error codes
|
||||
enum
|
||||
{
|
||||
//libaudio Error Codes
|
||||
CELL_AUDIO_ERROR_ALREADY_INIT = 0x80310701,
|
||||
CELL_AUDIO_ERROR_AUDIOSYSTEM = 0x80310702,
|
||||
CELL_AUDIO_ERROR_NOT_INIT = 0x80310703,
|
||||
|
|
|
@ -257,3 +257,23 @@ struct CellAudioInDeviceConfiguration
|
|||
u8 reserved[31];
|
||||
};
|
||||
|
||||
enum CellBgmPlaybackStatusState
|
||||
{
|
||||
CELL_BGMPLAYBACK_STATUS_PLAY = 0,
|
||||
CELL_BGMPLAYBACK_STATUS_STOP = 1
|
||||
};
|
||||
|
||||
enum CellBgmPlaybackStatusEnabled
|
||||
{
|
||||
CELL_BGMPLAYBACK_STATUS_ENABLE = 0,
|
||||
CELL_BGMPLAYBACK_STATUS_DISABLE = 1
|
||||
};
|
||||
|
||||
struct CellBgmPlaybackStatus
|
||||
{
|
||||
u8 playbackState;
|
||||
u8 enabled;
|
||||
char contentId[16];
|
||||
u8 fadeRatio;
|
||||
char reserved[13];
|
||||
};
|
||||
|
|
|
@ -79,10 +79,8 @@ enum
|
|||
CELL_ADEC_ERROR_M4AAC_INVERSE_QUANTIZATION_FAILED = 0x80612438,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_CB_MAP_FAILED = 0x80612439,
|
||||
CELL_ADEC_ERROR_M4AAC_GET_PULSE_FAILED = 0x8061243a,
|
||||
CELL_ADEC_ERROR_M4AAC_MONO_MIXDOWN_ELEMENT_IS_NOT_SUPPORTED
|
||||
= 0x8061243b,
|
||||
CELL_ADEC_ERROR_M4AAC_STEREO_MIXDOWN_ELEMENT_IS_NOT_SUPPORTED
|
||||
= 0x8061243c,
|
||||
CELL_ADEC_ERROR_M4AAC_MONO_MIXDOWN_ELEMENT_IS_NOT_SUPPORTED = 0x8061243b,
|
||||
CELL_ADEC_ERROR_M4AAC_STEREO_MIXDOWN_ELEMENT_IS_NOT_SUPPORTED = 0x8061243c,
|
||||
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_CH_OVERFLOW = 0x80612480,
|
||||
CELL_ADEC_ERROR_M4AAC_SBR_NOSYNCH = 0x80612481,
|
||||
|
|
|
@ -319,8 +319,10 @@ int cellAudioInit()
|
|||
|
||||
const u64 stamp1 = get_system_time();
|
||||
|
||||
if (!first_mix)
|
||||
if (first_mix)
|
||||
{
|
||||
memset(&oal_buffer[oal_pos][0], 0, oal_buffer_size * sizeof(u16));
|
||||
}
|
||||
oal_buffer_offset += sizeof(buf2ch) / sizeof(float);
|
||||
|
||||
if(oal_buffer_offset >= oal_buffer_size)
|
||||
|
@ -332,7 +334,6 @@ int cellAudioInit()
|
|||
|
||||
oal_buffer_offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const u64 stamp2 = get_system_time();
|
||||
|
||||
|
|
|
@ -257,6 +257,7 @@ int cellPngDecSetParameter(u32 mainHandle, u32 subHandle, const mem_ptr_t<CellPn
|
|||
current_outParam.outputWidth = current_info.imageWidth;
|
||||
current_outParam.outputHeight = current_info.imageHeight;
|
||||
current_outParam.outputColorSpace = inParam->outputColorSpace;
|
||||
|
||||
switch (current_outParam.outputColorSpace)
|
||||
{
|
||||
case CELL_PNGDEC_PALETTE:
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/SysCalls/SysCalls.h"
|
||||
#include "Emu/SysCalls/SC_FUNC.h"
|
||||
#include <mutex>
|
||||
|
||||
void cellSync_init();
|
||||
Module cellSync("cellSync", cellSync_init);
|
||||
|
@ -23,8 +22,8 @@ enum
|
|||
CELL_SYNC_ERROR_NO_SPU_CONTEXT_STORAGE = 0x80410114,
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct CellSyncMutex {
|
||||
struct CellSyncMutex
|
||||
{
|
||||
be_t<u16> m_freed;
|
||||
be_t<u16> m_order;
|
||||
|
||||
|
@ -39,7 +38,8 @@ struct CellSyncMutex {
|
|||
(???) TryLock: ?????
|
||||
*/
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
static_assert(sizeof(CellSyncMutex) == 4, "CellSyncMutex: wrong sizeof");
|
||||
|
||||
int cellSyncMutexInitialize(mem_ptr_t<CellSyncMutex> mutex)
|
||||
{
|
||||
|
|
|
@ -911,6 +911,19 @@ int cellHddGameCheck(u32 version, u32 dirName_addr, u32 errDialog, mem_func_ptr_
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSysutilGetBgmPlaybackStatus(mem_ptr_t<CellBgmPlaybackStatus> status)
|
||||
{
|
||||
cellSysutil.Warning("cellSysutilGetBgmPlaybackStatus(status=0x%x)", status.GetAddr());
|
||||
|
||||
// non-essential, so always assume background music is stopped/disabled
|
||||
status->playbackState = CELL_BGMPLAYBACK_STATUS_STOP;
|
||||
status->enabled = CELL_BGMPLAYBACK_STATUS_DISABLE;
|
||||
status->fadeRatio = 0; // volume ratio
|
||||
memset(status->contentId, 0, sizeof(status->contentId));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void cellSysutil_init()
|
||||
{
|
||||
cellSysutil.AddFunc(0x40e895d3, cellSysutilGetSystemParamInt);
|
||||
|
@ -940,6 +953,8 @@ void cellSysutil_init()
|
|||
cellSysutil.AddFunc(0xed5d96af, cellAudioOutGetConfiguration);
|
||||
cellSysutil.AddFunc(0xc96e89e9, cellAudioOutSetCopyControl);
|
||||
|
||||
cellSysutil.AddFunc(0xa11552f6, cellSysutilGetBgmPlaybackStatus);
|
||||
|
||||
cellSysutil.AddFunc(0x1e7bff94, cellSysCacheMount);
|
||||
cellSysutil.AddFunc(0x744c1544, cellSysCacheClear);
|
||||
|
||||
|
|
|
@ -155,6 +155,8 @@ int cellVpostExec(u32 handle, const u32 inPicBuff_addr, const mem_ptr_t<CellVpos
|
|||
picInfo->reserved1 = 0;
|
||||
picInfo->reserved2 = 0;
|
||||
|
||||
u64 stamp0 = get_system_time();
|
||||
|
||||
u8* pY = (u8*)malloc(w*h); // color planes
|
||||
u8* pU = (u8*)malloc(w*h/4);
|
||||
u8* pV = (u8*)malloc(w*h/4);
|
||||
|
@ -182,8 +184,12 @@ int cellVpostExec(u32 handle, const u32 inPicBuff_addr, const mem_ptr_t<CellVpos
|
|||
|
||||
memset(pA, alpha, w*h);
|
||||
|
||||
u64 stamp1 = get_system_time();
|
||||
|
||||
SwsContext* sws = sws_getContext(w, h, AV_PIX_FMT_YUVA420P, ow, oh, AV_PIX_FMT_RGBA, SWS_BILINEAR, NULL, NULL, NULL);
|
||||
|
||||
u64 stamp2 = get_system_time();
|
||||
|
||||
u8* in_data[4] = { pY, pU, pV, pA };
|
||||
int in_line[4] = { w, w/2, w/2, w };
|
||||
u8* out_data[4] = { (u8*)res, NULL, NULL, NULL };
|
||||
|
@ -193,24 +199,7 @@ int cellVpostExec(u32 handle, const u32 inPicBuff_addr, const mem_ptr_t<CellVpos
|
|||
|
||||
sws_freeContext(sws);
|
||||
|
||||
/*
|
||||
for (u32 i = 0; i < h; i++) for (u32 j = 0; j < w; j++)
|
||||
{
|
||||
float Cr = pV[(i/2)*(w/2)+j/2] - 128;
|
||||
float Cb = pU[(i/2)*(w/2)+j/2] - 128;
|
||||
float Y = pY[i*w+j];
|
||||
|
||||
int R = Y + 1.5701f * Cr;
|
||||
if (R < 0) R = 0;
|
||||
if (R > 255) R = 255;
|
||||
int G = Y - 0.1870f * Cb - 0.4664f * Cr;
|
||||
if (G < 0) G = 0;
|
||||
if (G > 255) G = 255;
|
||||
int B = Y - 1.8556f * Cb;
|
||||
if (B < 0) B = 0;
|
||||
if (B > 255) B = 255;
|
||||
res[i*w+j] = ((u32)alpha << 24) | (B << 16) | (G << 8) | (R);
|
||||
}*/
|
||||
u64 stamp3 = get_system_time();
|
||||
|
||||
if (!Memory.CopyFromReal(outPicBuff_addr, res, ow*oh*4))
|
||||
{
|
||||
|
@ -223,6 +212,9 @@ int cellVpostExec(u32 handle, const u32 inPicBuff_addr, const mem_ptr_t<CellVpos
|
|||
free(pV);
|
||||
free(pA);
|
||||
free(res);
|
||||
|
||||
//ConLog.Write("cellVpostExec() perf (access=%d, getContext=%d, scale=%d, finalize=%d)",
|
||||
//stamp1 - stamp0, stamp2 - stamp1, stamp3 - stamp2, get_system_time() - stamp3);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
enum
|
||||
enum //libmixer Error Codes
|
||||
{
|
||||
//libmixer Error Codes
|
||||
CELL_LIBMIXER_ERROR_NOT_INITIALIZED = 0x80310002,
|
||||
CELL_LIBMIXER_ERROR_INVALID_PARAMATER = 0x80310003,
|
||||
CELL_LIBMIXER_ERROR_NO_MEMORY = 0x80310005,
|
||||
|
|
|
@ -471,3 +471,5 @@ void StaticFinalize();
|
|||
#define REG_SUB(module, group, name,...) \
|
||||
static const u64 name ## _table[] = {__VA_ARGS__ ## 0}; \
|
||||
module.AddFuncSub(group, name ## _table, #name, name)
|
||||
|
||||
extern u64 get_system_time();
|
|
@ -74,6 +74,7 @@ int sys_cond_signal(u32 cond_id)
|
|||
|
||||
if (u32 target = (mutex->protocol == SYS_SYNC_PRIORITY ? cond->m_queue.pop_prio() : cond->m_queue.pop()))
|
||||
{
|
||||
cond->signal_stamp = get_system_time();
|
||||
cond->signal.lock(target);
|
||||
|
||||
if (Emu.IsStopped())
|
||||
|
@ -99,6 +100,7 @@ int sys_cond_signal_all(u32 cond_id)
|
|||
|
||||
while (u32 target = (mutex->protocol == SYS_SYNC_PRIORITY ? cond->m_queue.pop_prio() : cond->m_queue.pop()))
|
||||
{
|
||||
cond->signal_stamp = get_system_time();
|
||||
cond->signal.lock(target);
|
||||
|
||||
if (Emu.IsStopped())
|
||||
|
@ -134,6 +136,7 @@ int sys_cond_signal_to(u32 cond_id, u32 thread_id)
|
|||
|
||||
u32 target = thread_id;
|
||||
{
|
||||
cond->signal_stamp = get_system_time();
|
||||
cond->signal.lock(target);
|
||||
}
|
||||
|
||||
|
@ -199,7 +202,9 @@ int sys_cond_wait(u32 cond_id, u64 timeout)
|
|||
}
|
||||
}
|
||||
mutex->recursive = 1;
|
||||
const volatile u64 stamp = cond->signal_stamp;
|
||||
cond->signal.unlock(tid);
|
||||
//ConLog.Write("sys_cond_wait(): signal latency %d", get_system_time() - stamp);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ struct Cond
|
|||
Mutex* mutex; // associated with mutex
|
||||
SMutex signal;
|
||||
SleepQueue m_queue;
|
||||
u64 signal_stamp;
|
||||
|
||||
Cond(Mutex* mutex, u64 name)
|
||||
: mutex(mutex)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue