Fixed cellFsStReadInit issue

* Disabled automatic HLEExitOnStop option when the ELF file argument is
provided.
* Reverted some changes of last pull.
This commit is contained in:
Alexandro Sánchez Bach 2014-09-09 23:18:21 +02:00
parent 218399afcb
commit b881e095e9
7 changed files with 18 additions and 19 deletions

View file

@ -609,7 +609,7 @@ int cellAdecQueryAttr(vm::ptr<CellAdecType> type, vm::ptr<CellAdecAttr> attr)
// TODO: check values // TODO: check values
attr->adecVerLower = 0x280000; // from dmux attr->adecVerLower = 0x280000; // from dmux
attr->adecVerUpper = 0x260000; attr->adecVerUpper = 0x260000;
attr->workMemSize = 4194304; // 4MB attr->workMemSize = 4 * 1024 * 1024; // 4 MB
return CELL_OK; return CELL_OK;
} }

View file

@ -130,7 +130,7 @@ s32 cellGemGetMemorySize(be_t<s32> max_connect)
if (max_connect > CELL_GEM_MAX_NUM) if (max_connect > CELL_GEM_MAX_NUM)
return CELL_GEM_ERROR_INVALID_PARAMETER; return CELL_GEM_ERROR_INVALID_PARAMETER;
return 1048576 * max_connect; // 1MB * max_connect return 1024 * 1024 * max_connect; // 1 MB * max_connect
} }
int cellGemGetRGB() int cellGemGetRGB()

View file

@ -664,7 +664,7 @@ int cellHddGameCheck(u32 version, vm::ptr<const char> dirName, u32 errDialog, vm
vm::var<CellHddGameStatGet> get; vm::var<CellHddGameStatGet> get;
vm::var<CellHddGameStatSet> set; vm::var<CellHddGameStatSet> set;
get->hddFreeSizeKB = 40 * 1048576; // 40 GB, TODO: Use the free space of the computer's HDD where RPCS3 is being run. get->hddFreeSizeKB = 40 * 1024 * 1024; // 40 GB, TODO: Use the free space of the computer's HDD where RPCS3 is being run.
get->isNewData = CELL_HDDGAME_ISNEWDATA_EXIST; get->isNewData = CELL_HDDGAME_ISNEWDATA_EXIST;
get->sysSizeKB = 0; // TODO get->sysSizeKB = 0; // TODO
get->st_atime__ = 0; // TODO get->st_atime__ = 0; // TODO
@ -710,11 +710,10 @@ int cellHddGameCheck(u32 version, vm::ptr<const char> dirName, u32 errDialog, vm
funcStat(result, get, set); funcStat(result, get, set);
/* if (result->result.ToLE() != CELL_HDDGAME_CBRESULT_OK &&
if (result->result != CELL_HDDGAME_CBRESULT_OK && result->result.ToLE() != CELL_HDDGAME_CBRESULT_OK_CANCEL) {
result->result != CELL_HDDGAME_CBRESULT_OK_CANCEL) // Error in compiling in MVS. Need to use LE byte order?
return CELL_HDDGAME_ERROR_CBRESULT; return CELL_HDDGAME_ERROR_CBRESULT;
*/ }
// TODO ? // TODO ?
@ -794,7 +793,7 @@ int cellWebBrowserEstimate2(const vm::ptr<const CellWebBrowserConfig2> config, v
// TODO: When cellWebBrowser stuff is implemented, change this to some real // TODO: When cellWebBrowser stuff is implemented, change this to some real
// needed memory buffer size. // needed memory buffer size.
*memSize = 1048576; // 1 MB *memSize = 1 * 1024 * 1024; // 1 MB
return CELL_OK; return CELL_OK;
} }

View file

@ -174,7 +174,7 @@ u32 vdecQueryAttr(CellVdecCodecType type, u32 profile, u32 spec_addr /* may be 0
// TODO: check values // TODO: check values
attr->decoderVerLower = 0x280000; // from dmux attr->decoderVerLower = 0x280000; // from dmux
attr->decoderVerUpper = 0x260000; attr->decoderVerUpper = 0x260000;
attr->memSize = 4194304; // 4MB attr->memSize = 4 * 1024 * 1024; // 4 MB
attr->cmdDepth = 16; attr->cmdDepth = 16;
return CELL_OK; return CELL_OK;
} }

View file

@ -21,7 +21,7 @@ int cellVpostQueryAttr(vm::ptr<const CellVpostCfgParam> cfgParam, vm::ptr<CellVp
// TODO: check cfgParam and output values // TODO: check cfgParam and output values
attr->delay = 0; attr->delay = 0;
attr->memSize = 4194304; // 4MB attr->memSize = 4 * 1024 * 1024; // 4 MB
attr->vpostVerLower = 0x280000; // from dmux attr->vpostVerLower = 0x280000; // from dmux
attr->vpostVerUpper = 0x260000; attr->vpostVerUpper = 0x260000;

View file

@ -534,7 +534,7 @@ s32 cellFsGetFreeSize(vm::ptr<const char> path, vm::ptr<be_t<u32>> block_size, v
// TODO: Get real values. Currently, it always returns 40 GB of free space divided in 4 KB blocks // TODO: Get real values. Currently, it always returns 40 GB of free space divided in 4 KB blocks
*block_size = 4096; // ? *block_size = 4096; // ?
*block_count = 10485760; // ? *block_count = 10 * 1024 * 1024; // ?
return CELL_OK; return CELL_OK;
} }
@ -589,9 +589,13 @@ s32 cellFsStReadInit(u32 fd, vm::ptr<CellFsRingBuffer> ringbuf)
fs_config.m_ring_buffer = *ringbuf; fs_config.m_ring_buffer = *ringbuf;
if(ringbuf->ringbuf_size < 0x40000000) // If the size is less than 1MB // If the size is less than 1MB
fs_config.m_alloc_mem_size = (((u32)ringbuf->ringbuf_size + 65535) / (65536)) * (65536); if(ringbuf->ringbuf_size < 0x40000000) {
fs_config.m_alloc_mem_size = (((u32)ringbuf->ringbuf_size + 1048575) / (1048576)) * (1048576); fs_config.m_alloc_mem_size = (((u32)ringbuf->ringbuf_size + 64 * 1024 - 1) / (64 * 1024)) * (64 * 1024);
}
else {
fs_config.m_alloc_mem_size = (((u32)ringbuf->ringbuf_size + 1024 * 1024 - 1) / (1024 * 1024)) * (1024 * 1024);
}
// alloc memory // alloc memory
fs_config.m_buffer = (u32)Memory.Alloc(fs_config.m_alloc_mem_size, 1024); fs_config.m_buffer = (u32)Memory.Alloc(fs_config.m_alloc_mem_size, 1024);

View file

@ -152,11 +152,7 @@ void Rpcs3App::OnArguments()
// rpcs3-*.exe Initializes RPCS3 // rpcs3-*.exe Initializes RPCS3
// rpcs3-*.exe [(S)ELF] Initializes RPCS3, then loads and runs the specified (S)ELF file. // rpcs3-*.exe [(S)ELF] Initializes RPCS3, then loads and runs the specified (S)ELF file.
if (Rpcs3App::argc > 1) if (Rpcs3App::argc > 1) {
{
// Force this value to be true
Ini.HLEExitOnStop.SetValue(true);
Emu.SetPath(fmt::ToUTF8(argv[1])); Emu.SetPath(fmt::ToUTF8(argv[1]));
Emu.Load(); Emu.Load();
Emu.Run(); Emu.Run();