mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Minor lv2 / GCM updates and double-click loading
This commit is contained in:
parent
13fec1cd9a
commit
5bd85bd4eb
6 changed files with 36 additions and 13 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
#include "sysPrxForUser.h"
|
||||
|
||||
//#include "Emu/RSX/GCM.h"
|
||||
//#include "Emu/SysCalls/lv2/sys_process.h"
|
||||
|
@ -803,25 +804,26 @@ s32 cellGcmAddressToOffset(u64 address, mem32_t offset)
|
|||
{
|
||||
cellGcmSys->Log("cellGcmAddressToOffset(address=0x%x,offset_addr=0x%x)", address, offset.GetAddr());
|
||||
|
||||
if (address >= 0xD0000000/*not on main memory or local*/)
|
||||
// Address not on main memory or local memory
|
||||
if (address >= 0xD0000000) {
|
||||
return CELL_GCM_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
u32 result;
|
||||
|
||||
// If address is in range of local memory
|
||||
if (Memory.RSXFBMem.IsInMyRange(address))
|
||||
{
|
||||
// Address in local memory
|
||||
if (Memory.RSXFBMem.IsInMyRange(address)) {
|
||||
result = address - Memory.RSXFBMem.GetStartAddr();
|
||||
}
|
||||
// else check if the adress (main memory) is mapped in IO
|
||||
// Address in main memory else check
|
||||
else
|
||||
{
|
||||
u16 upper12Bits = Memory.Read16(offsetTable.ioAddress + sizeof(u16)*(address >> 20));
|
||||
|
||||
// If the address is mapped in IO
|
||||
if (upper12Bits != 0xFFFF) {
|
||||
result = (((u64)upper12Bits << 20) | (address & (0xFFFFF)));
|
||||
result = ((u64)upper12Bits << 20) | (address & 0xFFFFF);
|
||||
}
|
||||
// address is not mapped in IO
|
||||
else {
|
||||
return CELL_GCM_ERROR_FAILURE;
|
||||
}
|
||||
|
|
|
@ -13,3 +13,6 @@ struct HeapInfo
|
|||
{
|
||||
}
|
||||
};
|
||||
|
||||
// SysCalls
|
||||
u32 _sys_memset(u32 addr, s32 value, u32 size);
|
||||
|
|
|
@ -99,7 +99,7 @@ static func_caller* sc_table[kSyscallTableLength] =
|
|||
null_func,//bind_func(sys_ppu_thread_start), //53 (0x035)
|
||||
null_func,//bind_func(sys_ppu_...), //54 (0x036) ROOT
|
||||
null_func,//bind_func(sys_ppu_...), //55 (0x037) ROOT
|
||||
null_func,//bind_func(sys_ppu_thread_rename), //56 (0x038)
|
||||
bind_func(sys_ppu_thread_rename), //56 (0x038)
|
||||
null_func,//bind_func(sys_ppu_thread_recover_page_fault)//57 (0x039)
|
||||
null_func,//bind_func(sys_ppu_thread_get_page_fault_context),//58 (0x03A)
|
||||
null_func, //59 (0x03B) UNS
|
||||
|
|
|
@ -210,10 +210,23 @@ void sys_ppu_thread_once(mem_ptr_t<std::atomic<be_t<u32>>> once_ctrl, u32 entry)
|
|||
}
|
||||
}
|
||||
|
||||
s32 sys_ppu_thread_get_id(const u32 id_addr)
|
||||
s32 sys_ppu_thread_get_id(mem64_t thread_id)
|
||||
{
|
||||
sys_ppu_thread.Log("sys_ppu_thread_get_id(id_addr=0x%x)", id_addr);
|
||||
sys_ppu_thread.Log("sys_ppu_thread_get_id(thread_id_addr=0x%x)", thread_id.GetAddr());
|
||||
|
||||
Memory.Write64(id_addr, GetCurrentPPUThread().GetId());
|
||||
thread_id = GetCurrentPPUThread().GetId();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 sys_ppu_thread_rename(u64 thread_id, u32 name_addr)
|
||||
{
|
||||
sys_ppu_thread.Log("sys_ppu_thread_rename(thread_id=%d, name_addr=0x%x)", thread_id, name_addr);
|
||||
|
||||
CPUThread* thr = Emu.GetCPU().GetThread(thread_id);
|
||||
if (!thr) {
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
thr->SetThreadName(Memory.ReadString(name_addr));
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -26,4 +26,5 @@ s32 sys_ppu_thread_stop(u64 thread_id);
|
|||
s32 sys_ppu_thread_restart(u64 thread_id);
|
||||
s32 sys_ppu_thread_create(mem64_t thread_id, u32 entry, u64 arg, s32 prio, u32 stacksize, u64 flags, u32 threadname_addr);
|
||||
void sys_ppu_thread_once(mem_ptr_t<std::atomic<be_t<u32>>> once_ctrl, u32 entry);
|
||||
s32 sys_ppu_thread_get_id(const u32 id_addr);
|
||||
s32 sys_ppu_thread_get_id(mem64_t thread_id);
|
||||
s32 sys_ppu_thread_rename(u64 thread_id, u32 name_addr);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#endif
|
||||
|
||||
#include "Gui/GLGSFrame.h"
|
||||
#include <wx/stdpaths.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <wx/msw/wrapwin.h>
|
||||
|
@ -114,10 +115,13 @@ bool Rpcs3App::OnInit()
|
|||
SetAppName(_PRGNAME_);
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
// RPCS3 assumes the current working directory is the folder where it is contained, so we make sure this is true
|
||||
const wxString executablePath = wxStandardPaths::Get().GetExecutablePath();
|
||||
wxSetWorkingDirectory(wxPathOnly(executablePath));
|
||||
|
||||
main_thread = std::this_thread::get_id();
|
||||
|
||||
Ini.Load();
|
||||
|
||||
m_MainFrame = new MainFrame();
|
||||
SetTopWindow(m_MainFrame);
|
||||
Emu.Init();
|
||||
|
|
Loading…
Add table
Reference in a new issue