mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
Merge branch 'master' of https://github.com/DHrpcs3/rpcs3
This commit is contained in:
commit
fc3f5348b8
4 changed files with 27 additions and 8 deletions
|
@ -351,6 +351,11 @@ void CPUThread::Task()
|
||||||
{
|
{
|
||||||
ConLog.Error("Exception: %s", e);
|
ConLog.Error("Exception: %s", e);
|
||||||
}
|
}
|
||||||
|
catch(int exitcode)
|
||||||
|
{
|
||||||
|
ConLog.Success("Exit Code: %d", exitcode);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//ConLog.Write("%s leave", CPUThread::GetFName());
|
//ConLog.Write("%s leave", CPUThread::GetFName());
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
#include "Emu/GS/GCM.h"
|
#include "Emu/GS/GCM.h"
|
||||||
|
|
||||||
void cellGcmSys_init();
|
void cellGcmSys_init();
|
||||||
Module cellGcmSys(0x0010, cellGcmSys_init);
|
void cellGcmSys_Load();
|
||||||
|
void cellGcmSys_Unload();
|
||||||
|
Module cellGcmSys(0x0010, cellGcmSys_init, cellGcmSys_Load, cellGcmSys_Unload);
|
||||||
|
|
||||||
u32 local_size = 0;
|
u32 local_size = 0;
|
||||||
u32 local_addr = NULL;
|
u32 local_addr = NULL;
|
||||||
|
@ -54,6 +56,9 @@ int cellGcmInit(u32 context_addr, u32 cmdSize, u32 ioSize, u32 ioAddress)
|
||||||
{
|
{
|
||||||
cellGcmSys.Warning("cellGcmInit(context_addr=0x%x,cmdSize=0x%x,ioSize=0x%x,ioAddress=0x%x)", context_addr, cmdSize, ioSize, ioAddress);
|
cellGcmSys.Warning("cellGcmInit(context_addr=0x%x,cmdSize=0x%x,ioSize=0x%x,ioAddress=0x%x)", context_addr, cmdSize, ioSize, ioAddress);
|
||||||
|
|
||||||
|
if(!cellGcmSys.IsLoaded())
|
||||||
|
cellGcmSys.Load();
|
||||||
|
|
||||||
if(!local_size && !local_addr)
|
if(!local_size && !local_addr)
|
||||||
{
|
{
|
||||||
local_size = 0xf900000; //TODO
|
local_size = 0xf900000; //TODO
|
||||||
|
@ -591,7 +596,7 @@ void InitOffsetTable()
|
||||||
|
|
||||||
int32_t cellGcmAddressToOffset(u64 address, mem32_t offset)
|
int32_t cellGcmAddressToOffset(u64 address, mem32_t offset)
|
||||||
{
|
{
|
||||||
cellGcmSys.Warning("cellGcmAddressToOffset(address=0x%x,offset_addr=0x%x)", address, offset.GetAddr());
|
cellGcmSys.Log("cellGcmAddressToOffset(address=0x%x,offset_addr=0x%x)", address, offset.GetAddr());
|
||||||
|
|
||||||
if(address >= 0xD0000000/*not on main memory or local*/)
|
if(address >= 0xD0000000/*not on main memory or local*/)
|
||||||
return CELL_GCM_ERROR_FAILURE;
|
return CELL_GCM_ERROR_FAILURE;
|
||||||
|
@ -799,9 +804,6 @@ int32_t cellGcmUnreserveIoMapSize(u32 size)
|
||||||
|
|
||||||
void cellGcmSys_init()
|
void cellGcmSys_init()
|
||||||
{
|
{
|
||||||
current_config.ioAddress = NULL;
|
|
||||||
current_config.localAddress = NULL;
|
|
||||||
|
|
||||||
cellGcmSys.AddFunc(0x055bd74d, cellGcmGetTiledPitchSize);
|
cellGcmSys.AddFunc(0x055bd74d, cellGcmGetTiledPitchSize);
|
||||||
cellGcmSys.AddFunc(0x06edea9e, cellGcmSetUserHandler);
|
cellGcmSys.AddFunc(0x06edea9e, cellGcmSetUserHandler);
|
||||||
cellGcmSys.AddFunc(0x15bae46b, cellGcmInit);
|
cellGcmSys.AddFunc(0x15bae46b, cellGcmInit);
|
||||||
|
@ -861,3 +863,15 @@ void cellGcmSys_init()
|
||||||
cellGcmSys.AddFunc(0xdb23e867, cellGcmUnmapIoAddress);
|
cellGcmSys.AddFunc(0xdb23e867, cellGcmUnmapIoAddress);
|
||||||
cellGcmSys.AddFunc(0x3b9bd5bd, cellGcmUnreserveIoMapSize);
|
cellGcmSys.AddFunc(0x3b9bd5bd, cellGcmUnreserveIoMapSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cellGcmSys_Load()
|
||||||
|
{
|
||||||
|
current_config.ioAddress = NULL;
|
||||||
|
current_config.localAddress = NULL;
|
||||||
|
local_size = 0;
|
||||||
|
local_addr = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cellGcmSys_Unload()
|
||||||
|
{
|
||||||
|
}
|
|
@ -169,7 +169,7 @@ extern int sys_mutex_trylock(u32 mutex_id);
|
||||||
extern int sys_mutex_unlock(u32 mutex_id);
|
extern int sys_mutex_unlock(u32 mutex_id);
|
||||||
|
|
||||||
//ppu_thread
|
//ppu_thread
|
||||||
extern int sys_ppu_thread_exit(int errorcode);
|
extern void sys_ppu_thread_exit(int errorcode);
|
||||||
extern int sys_ppu_thread_yield();
|
extern int sys_ppu_thread_yield();
|
||||||
extern int sys_ppu_thread_join(u32 thread_id, u32 vptr_addr);
|
extern int sys_ppu_thread_join(u32 thread_id, u32 vptr_addr);
|
||||||
extern int sys_ppu_thread_detach(u32 thread_id);
|
extern int sys_ppu_thread_detach(u32 thread_id);
|
||||||
|
|
|
@ -10,7 +10,7 @@ enum
|
||||||
SYS_PPU_THREAD_DONE_INIT,
|
SYS_PPU_THREAD_DONE_INIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
int sys_ppu_thread_exit(int errorcode)
|
void sys_ppu_thread_exit(int errorcode)
|
||||||
{
|
{
|
||||||
if(errorcode == 0)
|
if(errorcode == 0)
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ int sys_ppu_thread_exit(int errorcode)
|
||||||
thr.SetExitStatus(errorcode);
|
thr.SetExitStatus(errorcode);
|
||||||
Emu.GetCPU().RemoveThread(thr.GetId());
|
Emu.GetCPU().RemoveThread(thr.GetId());
|
||||||
|
|
||||||
return CELL_OK;
|
throw errorcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_ppu_thread_yield()
|
int sys_ppu_thread_yield()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue