mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 10:18:40 +12:00
Implement cellSaveDataListAutoLoad, fix textureProj
This commit is contained in:
parent
872e41825e
commit
4b516273f6
2 changed files with 59 additions and 56 deletions
|
@ -496,8 +496,8 @@ void GLFragmentDecompilerThread::Task()
|
||||||
case RSX_FP_OPCODE_BEM: LOG_ERROR(RSX, "Unimplemented TEX_SRB instruction: BEM"); break;
|
case RSX_FP_OPCODE_BEM: LOG_ERROR(RSX, "Unimplemented TEX_SRB instruction: BEM"); break;
|
||||||
case RSX_FP_OPCODE_TEX: SetDst("texture($t, $0.xy)"); break;
|
case RSX_FP_OPCODE_TEX: SetDst("texture($t, $0.xy)"); break;
|
||||||
case RSX_FP_OPCODE_TEXBEM: SetDst("texture($t, $0.xy, $1.x)"); break;
|
case RSX_FP_OPCODE_TEXBEM: SetDst("texture($t, $0.xy, $1.x)"); break;
|
||||||
case RSX_FP_OPCODE_TXP: SetDst("textureProj($t, $0.xy, $1.x)"); break; //TODO: More testing (Sonic The Hedgehog (NPUB-30442/NPEB-00478) and The Simpsons Arcade Game (NPUB30563))
|
case RSX_FP_OPCODE_TXP: SetDst("textureProj($t, $0.xyz, $1.x)"); break; //TODO: More testing (Sonic The Hedgehog (NPUB-30442/NPEB-00478) and The Simpsons Arcade Game (NPUB30563))
|
||||||
case RSX_FP_OPCODE_TXPBEM: SetDst("textureProj($t, $0.xy, $1.x)"); break;
|
case RSX_FP_OPCODE_TXPBEM: SetDst("textureProj($t, $0.xyz, $1.x)"); break;
|
||||||
case RSX_FP_OPCODE_TXD: LOG_ERROR(RSX, "Unimplemented TEX_SRB instruction: TXD"); break;
|
case RSX_FP_OPCODE_TXD: LOG_ERROR(RSX, "Unimplemented TEX_SRB instruction: TXD"); break;
|
||||||
case RSX_FP_OPCODE_TXB: SetDst("texture($t, $0.xy, $1.x)"); break;
|
case RSX_FP_OPCODE_TXB: SetDst("texture($t, $0.xy, $1.x)"); break;
|
||||||
case RSX_FP_OPCODE_TXL: SetDst("textureLod($t, $0.xy, $1.x)"); break;
|
case RSX_FP_OPCODE_TXL: SetDst("textureLod($t, $0.xy, $1.x)"); break;
|
||||||
|
|
|
@ -868,74 +868,77 @@ s32 cellSaveDataListAutoLoad(
|
||||||
u32 container,
|
u32 container,
|
||||||
vm::ptr<void> userdata)
|
vm::ptr<void> userdata)
|
||||||
{
|
{
|
||||||
cellSysutil.Todo("cellSaveDataListAutoLoad(version=%d, errDialog=%d, setList_addr=0x%x, setBuf_addr=0x%x, funcFixed_addr=0x%x, funcStat_addr=0x%x, funcFile_addr=0x%x, container=%d, userdata_addr=0x%x)",
|
cellSysutil.Warning("cellSaveDataListAutoLoad(version=%d, errDialog=%d, setList_addr=0x%x, setBuf_addr=0x%x, funcFixed_addr=0x%x, funcStat_addr=0x%x, funcFile_addr=0x%x, container=%d, userdata_addr=0x%x)",
|
||||||
version, errDialog, setList.addr(), setBuf.addr(), funcFixed.addr(), funcStat.addr(), funcFile.addr(), container, userdata.addr());
|
version, errDialog, setList.addr(), setBuf.addr(), funcFixed.addr(), funcStat.addr(), funcFile.addr(), container, userdata.addr());
|
||||||
|
|
||||||
//vm::var<CellSaveDataCBResult> result;
|
vm::var<CellSaveDataCBResult> result;
|
||||||
//vm::var<CellSaveDataListGet> listGet;
|
vm::var<CellSaveDataListGet> listGet;
|
||||||
//vm::var<CellSaveDataFixedSet> fixedSet;
|
vm::var<CellSaveDataFixedSet> fixedSet;
|
||||||
//vm::var<CellSaveDataStatGet> statGet;
|
vm::var<CellSaveDataStatGet> statGet;
|
||||||
//vm::var<CellSaveDataStatSet> statSet;
|
vm::var<CellSaveDataStatSet> statSet;
|
||||||
|
|
||||||
//std::string saveBaseDir = "/dev_hdd0/home/00000001/savedata/"; // TODO: Get the path of the current user
|
std::string saveBaseDir = "/dev_hdd0/home/00000001/savedata/"; // TODO: Get the path of the current user
|
||||||
//vfsDir dir(saveBaseDir);
|
vfsDir dir(saveBaseDir);
|
||||||
|
|
||||||
//if (!dir.IsOpened())
|
if (!dir.IsOpened())
|
||||||
// return CELL_SAVEDATA_ERROR_INTERNAL;
|
return CELL_SAVEDATA_ERROR_INTERNAL;
|
||||||
|
|
||||||
//std::string dirNamePrefix = setList->dirNamePrefix.get_ptr();
|
std::string dirNamePrefix = setList->dirNamePrefix.get_ptr();
|
||||||
//std::vector<SaveDataEntry> saveEntries;
|
std::vector<SaveDataEntry> saveEntries;
|
||||||
|
|
||||||
//for (const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
for (const DirEntryInfo* entry = dir.Read(); entry; entry = dir.Read())
|
||||||
//{
|
{
|
||||||
// if (entry->flags & DirEntry_TypeDir && entry->name.substr(0, dirNamePrefix.size()) == dirNamePrefix)
|
if (entry->flags & DirEntry_TypeDir && entry->name.substr(0, dirNamePrefix.size()) == dirNamePrefix)
|
||||||
// {
|
{
|
||||||
// // Count the amount of matches and the amount of listed directories
|
// Count the amount of matches and the amount of listed directories
|
||||||
// listGet->dirListNum++;
|
listGet->dirListNum++;
|
||||||
// if (listGet->dirListNum > setBuf->dirListMax)
|
if (listGet->dirListNum > setBuf->dirListMax)
|
||||||
// continue;
|
continue;
|
||||||
// listGet->dirNum++;
|
listGet->dirNum++;
|
||||||
|
|
||||||
// std::string saveDir = saveBaseDir + entry->name;
|
std::string saveDir = saveBaseDir + entry->name;
|
||||||
// addSaveDataEntry(saveEntries, saveDir);
|
addSaveDataEntry(saveEntries, saveDir);
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
//// Sort the entries and fill the listGet->dirList array
|
// Sort the entries and fill the listGet->dirList array
|
||||||
//std::sort(saveEntries.begin(), saveEntries.end(), sortSaveDataEntry(setList->sortType, setList->sortOrder));
|
std::sort(saveEntries.begin(), saveEntries.end(), sortSaveDataEntry(setList->sortType, setList->sortOrder));
|
||||||
//listGet->dirList = vm::bptr<CellSaveDataDirList>::make(setBuf->buf.addr());
|
listGet->dirList = vm::bptr<CellSaveDataDirList>::make(setBuf->buf.addr());
|
||||||
//auto dirList = vm::get_ptr<CellSaveDataDirList>(listGet->dirList.addr());
|
auto dirList = vm::get_ptr<CellSaveDataDirList>(listGet->dirList.addr());
|
||||||
|
|
||||||
//for (u32 i = 0; i<saveEntries.size(); i++) {
|
for (u32 i = 0; i<saveEntries.size(); i++) {
|
||||||
// strcpy_trunc(dirList[i].dirName, saveEntries[i].dirName);
|
strcpy_trunc(dirList[i].dirName, saveEntries[i].dirName);
|
||||||
// strcpy_trunc(dirList[i].listParam, saveEntries[i].listParam);
|
strcpy_trunc(dirList[i].listParam, saveEntries[i].listParam);
|
||||||
// memset(dirList[i].reserved, 0, sizeof(dirList[i].reserved));
|
memset(dirList[i].reserved, 0, sizeof(listGet->dirList[i].reserved));
|
||||||
//}
|
}
|
||||||
|
|
||||||
//funcFixed(result, listGet, fixedSet);
|
funcFixed(result, listGet, fixedSet);
|
||||||
|
|
||||||
//if (result->result < 0) {
|
if (result->result < 0) {
|
||||||
// cellSysutil.Error("cellSaveDataListAutoLoad: CellSaveDataListCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
cellSysutil.Error("cellSaveDataListAutoLoad: CellSaveDataListCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||||
// return CELL_SAVEDATA_ERROR_CBRESULT;
|
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||||
//}
|
}
|
||||||
|
|
||||||
//setSaveDataFixed(saveEntries, fixedSet);
|
setSaveDataFixed(saveEntries, fixedSet);
|
||||||
//getSaveDataStat(saveEntries[0], statGet); // There should be only one element in this list
|
getSaveDataStat(saveEntries[0], statGet); // There should be only one element in this list
|
||||||
//// TODO: Display the Yes|No dialog here
|
// TODO: Display the Yes|No dialog here
|
||||||
//result->userdata = userdata;
|
result->userdata = userdata;
|
||||||
|
|
||||||
//funcStat(result, statGet, statSet);
|
funcStat(result, statGet, statSet);
|
||||||
//Memory.Free(statGet->fileList.addr());
|
Memory.Free(statGet->fileList.addr());
|
||||||
//if (result->result < 0) {
|
|
||||||
// cellSysutil.Error("cellSaveDataFixedLoad2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
if (result->result < 0) {
|
||||||
// return CELL_SAVEDATA_ERROR_CBRESULT;
|
cellSysutil.Error("cellSaveDataFixedLoad2: CellSaveDataStatCallback failed."); // TODO: Once we verify that the entire SysCall is working, delete this debug error message.
|
||||||
//}
|
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||||
///*if (statSet->setParam)
|
}
|
||||||
//// TODO: Write PARAM.SFO file
|
|
||||||
//*/
|
/*if (statSet->setParam)
|
||||||
|
// TODO: Write PARAM.SFO file
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Enter the loop where the save files are read/created/deleted.
|
||||||
|
s32 ret = modifySaveDataFiles(funcFile, result, saveBaseDir + (char*)statGet->dir.dirName);
|
||||||
|
|
||||||
//// Enter the loop where the save files are read/created/deleted.
|
|
||||||
//s32 ret = modifySaveDataFiles(funcFile, result, saveBaseDir + (char*)statGet->dir.dirName);
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue