Merge pull request #55 from elisha464/master

More fixes
This commit is contained in:
Alexandro Sánchez Bach 2014-01-23 12:11:54 -08:00
commit 51512f25c5
4 changed files with 27 additions and 8 deletions

View File

@ -351,6 +351,11 @@ void CPUThread::Task()
{
ConLog.Error("Exception: %s", e);
}
catch(int exitcode)
{
ConLog.Success("Exit Code: %d", exitcode);
return;
}
//ConLog.Write("%s leave", CPUThread::GetFName());

View File

@ -4,7 +4,9 @@
#include "Emu/GS/GCM.h"
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_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);
if(!cellGcmSys.IsLoaded())
cellGcmSys.Load();
if(!local_size && !local_addr)
{
local_size = 0xf900000; //TODO
@ -591,7 +596,7 @@ void InitOffsetTable()
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*/)
return CELL_GCM_ERROR_FAILURE;
@ -799,9 +804,6 @@ int32_t cellGcmUnreserveIoMapSize(u32 size)
void cellGcmSys_init()
{
current_config.ioAddress = NULL;
current_config.localAddress = NULL;
cellGcmSys.AddFunc(0x055bd74d, cellGcmGetTiledPitchSize);
cellGcmSys.AddFunc(0x06edea9e, cellGcmSetUserHandler);
cellGcmSys.AddFunc(0x15bae46b, cellGcmInit);
@ -861,3 +863,15 @@ void cellGcmSys_init()
cellGcmSys.AddFunc(0xdb23e867, cellGcmUnmapIoAddress);
cellGcmSys.AddFunc(0x3b9bd5bd, cellGcmUnreserveIoMapSize);
}
void cellGcmSys_Load()
{
current_config.ioAddress = NULL;
current_config.localAddress = NULL;
local_size = 0;
local_addr = NULL;
}
void cellGcmSys_Unload()
{
}

View File

@ -169,7 +169,7 @@ extern int sys_mutex_trylock(u32 mutex_id);
extern int sys_mutex_unlock(u32 mutex_id);
//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_join(u32 thread_id, u32 vptr_addr);
extern int sys_ppu_thread_detach(u32 thread_id);

View File

@ -10,7 +10,7 @@ enum
SYS_PPU_THREAD_DONE_INIT,
};
int sys_ppu_thread_exit(int errorcode)
void sys_ppu_thread_exit(int errorcode)
{
if(errorcode == 0)
{
@ -25,7 +25,7 @@ int sys_ppu_thread_exit(int errorcode)
thr.SetExitStatus(errorcode);
Emu.GetCPU().RemoveThread(thr.GetId());
return CELL_OK;
throw errorcode;
}
int sys_ppu_thread_yield()