mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-01 16:13:23 +00:00
Various cellSailPlayer improvements
Added default attributes, fixed a Travis error and added currently broken player booting that I can't figure out.
This commit is contained in:
parent
c9f3871c68
commit
5a7327492a
@ -1,5 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Callback.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
#include "Emu/FS/vfsFile.h"
|
||||
|
||||
@ -8,7 +10,25 @@
|
||||
|
||||
extern Module cellSail;
|
||||
|
||||
// TODO: Create an internal cellSail thread
|
||||
void playerBoot(vm::ptr<CellSailPlayer> pSelf, u64 userParam)
|
||||
{
|
||||
Emu.GetCallbackManager().Async([=](CPUThread& cpu)
|
||||
{
|
||||
CellSailEvent evnt;
|
||||
evnt.minor = 0;
|
||||
pSelf->callback(static_cast<PPUThread&>(cpu), pSelf->callbackArg, evnt, CELL_SAIL_PLAYER_STATE_BOOT_TRANSITION, 0);
|
||||
});
|
||||
|
||||
// TODO: Do stuff here
|
||||
pSelf->booted = true;
|
||||
|
||||
/*Emu.GetCallbackManager().Async([=](CPUThread& CPU)
|
||||
{
|
||||
CellSailEvent evnt;
|
||||
evnt.u32x2.minor = CELL_SAIL_PLAYER_CALL_BOOT;
|
||||
pSelf->callback(static_cast<PPUThread&>(CPU), pSelf->callbackArg, evnt, 0, 0);
|
||||
});*/
|
||||
}
|
||||
|
||||
s32 cellSailMemAllocatorInitialize(vm::ptr<CellSailMemAllocator> pSelf, vm::ptr<CellSailMemAllocatorFuncs> pCallbacks)
|
||||
{
|
||||
@ -607,6 +627,7 @@ s32 cellSailPlayerInitialize2(
|
||||
pSelf->callbackArg = callbackArg;
|
||||
pSelf->attribute = *pAttribute;
|
||||
pSelf->resource = *pResource;
|
||||
pSelf->booted = false;
|
||||
pSelf->paused = true;
|
||||
|
||||
return CELL_OK;
|
||||
@ -693,13 +714,25 @@ s32 cellSailPlayerSetRendererVideo()
|
||||
|
||||
s32 cellSailPlayerSetParameter(vm::ptr<CellSailPlayer> pSelf, s32 parameterType, u64 param0, u64 param1)
|
||||
{
|
||||
cellSail.Todo("cellSailPlayerSetParameter(pSelf=*0x%x, parameterType=0x%x (%s), param0=0x%llx, param1=0x%llx)", pSelf, parameterType, ParameterCodeToName(parameterType), param0, param1);
|
||||
cellSail.Todo("cellSailPlayerSetParameter(pSelf=*0x%x, parameterType=0x%x, param0=0x%llx, param1=0x%llx)", pSelf, parameterType, param0, param1);
|
||||
|
||||
switch (parameterType)
|
||||
{
|
||||
default: cellSail.Error("cellSailPlayerSetParameter(): unimplemented parameter %s", ParameterCodeToName(parameterType));
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellSailPlayerGetParameter()
|
||||
s32 cellSailPlayerGetParameter(vm::ptr<CellSailPlayer> pSelf, s32 parameterType, vm::ptr<u64> pParam0, vm::ptr<u64> pParam1)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellSail);
|
||||
cellSail.Todo("cellSailPlayerGetParameter(pSelf=*0x%x, parameterType=0x%x, param0=*0x%x, param1=*0x%x)", pSelf, parameterType, pParam0, pParam1);
|
||||
|
||||
switch (parameterType)
|
||||
{
|
||||
default: cellSail.Error("cellSailPlayerGetParameter(): unimplemented parameter %s", ParameterCodeToName(parameterType));
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -721,9 +754,12 @@ s32 cellSailPlayerReplaceEventHandler()
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellSailPlayerBoot()
|
||||
s32 cellSailPlayerBoot(PPUThread& ppu, vm::ptr<CellSailPlayer> pSelf, u64 userParam)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellSail);
|
||||
cellSail.Todo("cellSailPlayerBoot(pSelf=*0x%x, userParam=%d)", pSelf, userParam);
|
||||
|
||||
playerBoot(pSelf, userParam);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -610,16 +610,23 @@ struct CellSailSourceStreamingProfile
|
||||
|
||||
union CellSailEvent
|
||||
{
|
||||
struct u32x2
|
||||
struct
|
||||
{
|
||||
be_t<u32> major;
|
||||
be_t<u32> minor;
|
||||
};
|
||||
|
||||
struct ui64
|
||||
be_t<u64> value;
|
||||
};
|
||||
|
||||
template<typename T, bool is_enum> struct cast_ppu_gpr;
|
||||
|
||||
template<> struct cast_ppu_gpr<CellSailEvent, false>
|
||||
{
|
||||
inline static u64 to_gpr(const CellSailEvent& event)
|
||||
{
|
||||
be_t<u64> value;
|
||||
};
|
||||
return event.value;
|
||||
}
|
||||
};
|
||||
|
||||
using CellSailMemAllocatorFuncAlloc = vm::ptr<void>(vm::ptr<void> pArg, u32 boundary, u32 size);
|
||||
@ -679,7 +686,7 @@ using CellSailRendererVideoFuncCancel = void(vm::ptr<void> pArg);
|
||||
using CellSailRendererVideoFuncCheckout = s32(vm::ptr<void> pArg, vm::pptr<CellSailVideoFrameInfo> ppInfo);
|
||||
using CellSailRendererVideoFuncCheckin = s32(vm::ptr<void> pArg, vm::ptr<CellSailVideoFrameInfo> pInfo);
|
||||
|
||||
using CellSailPlayerFuncNotified = void(vm::ptr<void> pArg, CellSailEvent event, u64 arg0, u64 arg1);
|
||||
using CellSailPlayerFuncNotified = void(vm::ptr<void> pArg, CellSailEvent evnt, u64 arg0, u64 arg1);
|
||||
|
||||
struct CellSailMemAllocatorFuncs
|
||||
{
|
||||
@ -689,7 +696,7 @@ struct CellSailMemAllocatorFuncs
|
||||
|
||||
struct CellSailMemAllocator
|
||||
{
|
||||
vm::ptr<CellSailMemAllocatorFuncs> callbacks;
|
||||
vm::bptr<CellSailMemAllocatorFuncs> callbacks;
|
||||
be_t<u32> pArg;
|
||||
};
|
||||
|
||||
@ -1130,6 +1137,7 @@ struct CellSailPlayer
|
||||
s32 descriptors;
|
||||
vm::ptr<CellSailDescriptor> registeredDescriptors[2];
|
||||
bool paused;
|
||||
bool booted;
|
||||
vm::ptr<CellSailSoundAdapter> sAdapter;
|
||||
vm::ptr<CellSailGraphicsAdapter> gAdapter;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user