mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-03 22:14:02 +00:00
Merge pull request #907 from tambry/cellSailAndFixes
cellSail updates and many various fixes
This commit is contained in:
commit
dd067847dd
@ -139,7 +139,7 @@ void CPUThreadManager::Exec()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mtx_thread);
|
||||
|
||||
for(u32 i=0; i<m_threads.size(); ++i)
|
||||
for(u32 i = 0; i < m_threads.size(); ++i)
|
||||
{
|
||||
m_threads[i]->Exec();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
|
||||
template<typename... Targs> __noinline void Notice(const char* fmt, Targs... args) const
|
||||
{
|
||||
LogOutput(LogNotice, " : ", fmt::Format(fmt, args...));
|
||||
LogOutput(LogNotice, ": ", fmt::Format(fmt, args...));
|
||||
}
|
||||
|
||||
template<typename... Targs> __forceinline void Log(const char* fmt, Targs... args) const
|
||||
|
@ -195,7 +195,7 @@ u64 cellGcmGetTimeStampLocation(u32 index, u32 location)
|
||||
}
|
||||
|
||||
if (location == CELL_GCM_LOCATION_MAIN) {
|
||||
if (index >= 1024*1024) {
|
||||
if (index >= 1024 * 1024) {
|
||||
cellGcmSys->Error("cellGcmGetTimeStampLocation: Wrong main index (%d)", index);
|
||||
return 0;
|
||||
}
|
||||
@ -300,7 +300,7 @@ u32 cellGcmGetTiledPitchSize(u32 size)
|
||||
{
|
||||
cellGcmSys->Log("cellGcmGetTiledPitchSize(size=%d)", size);
|
||||
|
||||
for (size_t i=0; i < sizeof(tiled_pitches)/sizeof(tiled_pitches[0]) - 1; i++) {
|
||||
for (size_t i=0; i < sizeof(tiled_pitches) / sizeof(tiled_pitches[0]) - 1; i++) {
|
||||
if (tiled_pitches[i] < size && size <= tiled_pitches[i+1]) {
|
||||
return tiled_pitches[i+1];
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ int cellSailMemAllocatorInitialize(vm::ptr<CellSailMemAllocator> pSelf, vm::ptr<
|
||||
cellSail->Warning("cellSailMemAllocatorInitialize(pSelf_addr=0x%x, pCallbacks_addr=0x%x)", pSelf.addr(), pCallbacks.addr());
|
||||
|
||||
pSelf->callbacks = pCallbacks;
|
||||
// TODO: Create a cellSail thread
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -629,15 +630,18 @@ int cellSailPlayerCreateDescriptor(vm::ptr<CellSailPlayer> pSelf, s32 streamType
|
||||
//CellSailDescriptor *pDesc = new CellSailDescriptor();
|
||||
//u32 descriptorAddress = pSelf->allocator->callbacks->pAlloc(pSelf->allocator->pArg, sizeof(CellSailDescriptor), sizeof(CellSailDescriptor));
|
||||
u32 descriptorAddress = Memory.Alloc(sizeof(CellSailDescriptor), sizeof(CellSailDescriptor));
|
||||
cellSail->Error("Address: 0x%x", descriptorAddress);
|
||||
//CellSailMemAllocatorFuncAlloc test = pSelf->allocator->callbacks->pAlloc.call(Emu.GetCPU());
|
||||
//u32 descriptorAddress2 = test(pSelf->allocator->pArg, sizeof(CellSailDescriptor), sizeof(CellSailDescriptor));
|
||||
//cellSail->Error("Address: 0x%x", pSelf->allocator->callbacks.addr());
|
||||
//cellSail->Error("Address 2: 0x%x", descriptorAddress2);
|
||||
//vm::ptr<CellSailDescriptor> descriptor = vm::ptr<CellSailDescriptor>::make(Memory.RealToVirtualAddr(&descriptorAddress));
|
||||
vm::ptr<CellSailDescriptor> descriptor = vm::ptr<CellSailDescriptor>::make(descriptorAddress);
|
||||
//descriptor->streamType = streamType;
|
||||
//descriptor->registered = false;
|
||||
ppDesc = vm::ptr<CellSailDescriptor>::make(descriptorAddress);
|
||||
//cellSail->Error("Address 2: 0x%x", ppDesc.addr());
|
||||
ppDesc->streamType = streamType;
|
||||
ppDesc->registered = false;
|
||||
|
||||
pSelf->descriptors = 0;
|
||||
//pSelf->descriptors = 0;
|
||||
pSelf->repeatMode = 0;
|
||||
//ppDesc = descriptor;
|
||||
|
||||
//cellSail->Todo("pSelf_addr=0x%x, pDesc_addr=0x%x", pSelf.addr(), descriptor.addr());
|
||||
//cellSailPlayerAddDescriptor(pSelf, ppDesc);
|
||||
|
@ -679,8 +679,8 @@ typedef void(*CellSailPlayerFuncNotified)(u32 pArg, vm::ptr<CellSailEvent> event
|
||||
|
||||
struct CellSailMemAllocatorFuncs
|
||||
{
|
||||
CellSailMemAllocatorFuncAlloc pAlloc;
|
||||
CellSailMemAllocatorFuncFree pFree;
|
||||
vm::ptr<CellSailMemAllocatorFuncAlloc> pAlloc;
|
||||
vm::ptr<CellSailMemAllocatorFuncFree> pFree;
|
||||
};
|
||||
|
||||
struct CellSailMemAllocator
|
||||
@ -691,8 +691,8 @@ struct CellSailMemAllocator
|
||||
|
||||
struct CellSailFuture
|
||||
{
|
||||
u32 mutex_id;
|
||||
u32 cond_id;
|
||||
be_t<u32> mutex_id;
|
||||
be_t<u32> cond_id;
|
||||
volatile be_t<u32> flags;
|
||||
be_t<s32> result;
|
||||
be_t<u64> userParam;
|
||||
|
@ -110,7 +110,8 @@ void sys_game_process_exitspawn(vm::ptr<const char> path, u32 argv_addr, u32 env
|
||||
else if (_path.substr(1, 8) == "dev_hdd1")
|
||||
device = 1;
|
||||
|
||||
Emu.BootGame(_path.c_str(), true, device);
|
||||
if (device != 0)
|
||||
Emu.BootGame(_path.c_str(), true, device);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -283,7 +283,6 @@
|
||||
<ClInclude Include="..\Utilities\StrFmt.h" />
|
||||
<ClInclude Include="..\Utilities\Thread.h" />
|
||||
<ClInclude Include="..\Utilities\Timer.h" />
|
||||
<ClInclude Include="cellMic.h" />
|
||||
<ClInclude Include="Crypto\aes.h" />
|
||||
<ClInclude Include="Crypto\ec.h" />
|
||||
<ClInclude Include="Crypto\key_vault.h" />
|
||||
@ -420,8 +419,9 @@
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellGifDec.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellJpgDec.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellL10n.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellNetCtl.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellMic.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellMsgDialog.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellNetCtl.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPad.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPamf.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPng.h" />
|
||||
|
@ -742,6 +742,9 @@
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellL10n.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellMic.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellMouse.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
@ -1252,9 +1255,6 @@
|
||||
<ClInclude Include="Crypto\ec.h">
|
||||
<Filter>Crypto</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="cellMic.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\Cell\PPULLVMRecompiler.h">
|
||||
<Filter>Emu\CPU\Cell</Filter>
|
||||
</ClInclude>
|
||||
|
Loading…
x
Reference in New Issue
Block a user