mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Merge pull request #896 from tambry/SailThings
cellSail additions, updates and fixes
This commit is contained in:
commit
e5718ed264
@ -71,7 +71,7 @@ int cellSailDescriptorGetMediaInfo()
|
|||||||
|
|
||||||
int cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, bool autoSelection)
|
int cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, bool autoSelection)
|
||||||
{
|
{
|
||||||
cellSail->Todo("cellSailDescriptorSetAutoSelection(pSelf_addr=0x%x, autoSelection=%s)", pSelf.addr(), autoSelection ? "true" : "false");
|
cellSail->Warning("cellSailDescriptorSetAutoSelection(pSelf_addr=0x%x, autoSelection=%s)", pSelf.addr(), autoSelection ? "true" : "false");
|
||||||
|
|
||||||
if (pSelf) {
|
if (pSelf) {
|
||||||
pSelf->autoSelection = autoSelection;
|
pSelf->autoSelection = autoSelection;
|
||||||
@ -84,7 +84,7 @@ int cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, bool a
|
|||||||
int cellSailDescriptorIsAutoSelection(vm::ptr<CellSailDescriptor> pSelf)
|
int cellSailDescriptorIsAutoSelection(vm::ptr<CellSailDescriptor> pSelf)
|
||||||
{
|
{
|
||||||
cellSail->Warning("cellSailDescriptorIsAutoSelection(pSelf_addr=0x%x)", pSelf.addr());
|
cellSail->Warning("cellSailDescriptorIsAutoSelection(pSelf_addr=0x%x)", pSelf.addr());
|
||||||
|
|
||||||
if (pSelf)
|
if (pSelf)
|
||||||
return pSelf->autoSelection;
|
return pSelf->autoSelection;
|
||||||
|
|
||||||
@ -621,12 +621,17 @@ int cellSailPlayerCreateDescriptor(vm::ptr<CellSailPlayer> pSelf, s32 streamType
|
|||||||
cellSail->Todo("cellSailPlayerCreateDescriptor(pSelf_addr=0x%x, streamType=%d, pMediaInfo_addr=0x%x, pUri_addr=0x%x, ppDesc_addr=0x%x)", pSelf.addr(), streamType,
|
cellSail->Todo("cellSailPlayerCreateDescriptor(pSelf_addr=0x%x, streamType=%d, pMediaInfo_addr=0x%x, pUri_addr=0x%x, ppDesc_addr=0x%x)", pSelf.addr(), streamType,
|
||||||
pMediaInfo.addr(), pUri.addr(), ppDesc.addr());
|
pMediaInfo.addr(), pUri.addr(), ppDesc.addr());
|
||||||
|
|
||||||
|
//cellSail->Todo("Descriptor: %i", sizeof(CellSailDescriptor));
|
||||||
|
//cellSail->Todo("Player: %i", sizeof(CellSailPlayer));
|
||||||
|
|
||||||
// TODO: Let the game allocate memory for the descriptor, setup the descriptor and pass it back to the game
|
// TODO: Let the game allocate memory for the descriptor, setup the descriptor and pass it back to the game
|
||||||
|
|
||||||
//CellSailDescriptor *pDesc = new CellSailDescriptor();
|
//CellSailDescriptor *pDesc = new CellSailDescriptor();
|
||||||
//u32 descriptorAddress = pSelf->allocator->callbacks->pAlloc(pSelf->allocator->pArg, 4, descriptorAddress);
|
//u32 descriptorAddress = pSelf->allocator->callbacks->pAlloc(pSelf->allocator->pArg, sizeof(CellSailDescriptor), sizeof(CellSailDescriptor));
|
||||||
//cellSail->Error("Address: 0x%x", descriptorAddress);
|
u32 descriptorAddress = Memory.Alloc(sizeof(CellSailDescriptor), sizeof(CellSailDescriptor));
|
||||||
|
cellSail->Error("Address: 0x%x", descriptorAddress);
|
||||||
//vm::ptr<CellSailDescriptor> descriptor = vm::ptr<CellSailDescriptor>::make(Memory.RealToVirtualAddr(&descriptorAddress));
|
//vm::ptr<CellSailDescriptor> descriptor = vm::ptr<CellSailDescriptor>::make(Memory.RealToVirtualAddr(&descriptorAddress));
|
||||||
|
vm::ptr<CellSailDescriptor> descriptor = vm::ptr<CellSailDescriptor>::make(descriptorAddress);
|
||||||
//descriptor->streamType = streamType;
|
//descriptor->streamType = streamType;
|
||||||
//descriptor->registered = false;
|
//descriptor->registered = false;
|
||||||
|
|
||||||
@ -766,16 +771,16 @@ int cellSailPlayerCancel()
|
|||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSailPlayerSetPaused()
|
int cellSailPlayerSetPaused(vm::ptr<CellSailPlayer> pSelf, bool paused)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellSail);
|
cellSail->Todo("cellSailPlayerSetPaused(pSelf_addr=0x%x, paused=)", pSelf.addr(), paused);
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSailPlayerIsPaused()
|
int cellSailPlayerIsPaused(vm::ptr<CellSailPlayer> pSelf)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED_FUNC(cellSail);
|
cellSail->Warning("cellSailPlayerIsPaused(pSelf_addr=0x%x)", pSelf.addr());
|
||||||
return CELL_OK;
|
return pSelf->paused;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellSailPlayerSetRepeatMode(vm::ptr<CellSailPlayer> pSelf, s32 repeatMode, vm::ptr<CellSailStartCommand> pCommand)
|
int cellSailPlayerSetRepeatMode(vm::ptr<CellSailPlayer> pSelf, s32 repeatMode, vm::ptr<CellSailStartCommand> pCommand)
|
||||||
|
@ -1038,9 +1038,11 @@ struct CellSailDescriptor
|
|||||||
bool autoSelection;
|
bool autoSelection;
|
||||||
bool registered;
|
bool registered;
|
||||||
be_t<s32> streamType;
|
be_t<s32> streamType;
|
||||||
be_t<u64> internalData[32];
|
be_t<u64> internalData[31];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(CellSailDescriptor) == 0x100, "Invalid CellSailDescriptor size");
|
||||||
|
|
||||||
struct CellSailStartCommand
|
struct CellSailStartCommand
|
||||||
{
|
{
|
||||||
be_t<u32> startType;
|
be_t<u32> startType;
|
||||||
@ -1102,4 +1104,8 @@ struct CellSailPlayer
|
|||||||
be_t<s32> repeatMode;
|
be_t<s32> repeatMode;
|
||||||
be_t<s32> descriptors;
|
be_t<s32> descriptors;
|
||||||
vm::ptr<CellSailDescriptor> registeredDescriptors[2];
|
vm::ptr<CellSailDescriptor> registeredDescriptors[2];
|
||||||
};
|
bool paused = true;
|
||||||
|
be_t<u64> internalData[26];
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(CellSailPlayer) == 0x100, "Invalid CellSailPlayer size");
|
@ -183,13 +183,15 @@ public:
|
|||||||
|
|
||||||
void LoadSave(bool isLoad, const std::string& path, wxListView* list = NULL)
|
void LoadSave(bool isLoad, const std::string& path, wxListView* list = NULL)
|
||||||
{
|
{
|
||||||
if(isLoad) Init();
|
if (isLoad)
|
||||||
else if(list)
|
Init();
|
||||||
|
else if (list)
|
||||||
{
|
{
|
||||||
for(int c=0; c<list->GetColumnCount(); ++c)
|
for (int c = 0; c < list->GetColumnCount(); ++c)
|
||||||
{
|
{
|
||||||
Column* col = GetColumnByPos(c);
|
Column* col = GetColumnByPos(c);
|
||||||
if(col) col->width = list->GetColumnWidth(c);
|
if (col)
|
||||||
|
col->width = list->GetColumnWidth(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,21 +207,21 @@ public:
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
for(u32 i=0; i<m_columns.size(); ++i)
|
for (u32 i = 0; i < m_columns.size(); ++i)
|
||||||
{
|
{
|
||||||
ADD_COLUMN(pos, m_columns[i].def_pos, int, "position", 1);
|
ADD_COLUMN(pos, m_columns[i].def_pos, int, "position", 1);
|
||||||
ADD_COLUMN(width, m_columns[i].def_width, int, "width", 1);
|
ADD_COLUMN(width, m_columns[i].def_width, int, "width", 1);
|
||||||
ADD_COLUMN(shown, true, bool, "shown", 0);
|
ADD_COLUMN(shown, true, bool, "shown", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isLoad)
|
if (isLoad)
|
||||||
{
|
{
|
||||||
//check for errors
|
//check for errors
|
||||||
for(u32 c1=0; c1<m_columns.size(); ++c1)
|
for (u32 c1 = 0; c1 < m_columns.size(); ++c1)
|
||||||
{
|
{
|
||||||
for(u32 c2=c1+1; c2<m_columns.size(); ++c2)
|
for (u32 c2 = c1 + 1; c2 < m_columns.size(); ++c2)
|
||||||
{
|
{
|
||||||
if(m_columns[c1].pos == m_columns[c2].pos)
|
if (m_columns[c1].pos == m_columns[c2].pos)
|
||||||
{
|
{
|
||||||
LOG_ERROR(HLE, "Columns loaded with error!");
|
LOG_ERROR(HLE, "Columns loaded with error!");
|
||||||
Init();
|
Init();
|
||||||
@ -228,17 +230,19 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(u32 p=0; p<m_columns.size(); ++p)
|
for (u32 p = 0; p < m_columns.size(); ++p)
|
||||||
{
|
{
|
||||||
bool ishas = false;
|
bool ishas = false;
|
||||||
for(u32 c=0; c<m_columns.size(); ++c)
|
for (u32 c = 0; c < m_columns.size(); ++c)
|
||||||
{
|
{
|
||||||
if(m_columns[c].pos != p) continue;
|
if (m_columns[c].pos != p)
|
||||||
|
continue;
|
||||||
|
|
||||||
ishas = true;
|
ishas = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!ishas)
|
if (!ishas)
|
||||||
{
|
{
|
||||||
LOG_ERROR(HLE, "Columns loaded with error!");
|
LOG_ERROR(HLE, "Columns loaded with error!");
|
||||||
Init();
|
Init();
|
||||||
|
Loading…
Reference in New Issue
Block a user