- Implemented ARM9Thread.

- Improved OpenGL Renderer.
- Improved RAW SPU mfc.
This commit is contained in:
DH 2013-11-03 21:23:16 +02:00
parent 6622dc42b5
commit 0b35be32a4
65 changed files with 3255 additions and 2207 deletions

View file

@ -356,8 +356,8 @@ s64 SysCalls::DoFunc(const u32 id)
case 0xc8f3bd09: FUNC_LOG_ERROR("TODO: cellGcmGetCurrentField");
case 0xcaabd992: FUNC_LOG_ERROR("TODO: cellGcmInitDefaultFifoMode");
case 0xd01b570d: FUNC_LOG_ERROR("TODO: cellGcmSetGraphicsHandler");
case 0xd0b1d189: ConLog.Error("TODO: cellGcmSetTile"); return SC_ARGS_1;
case 0xd34a420d: ConLog.Error("TODO: cellGcmSetZcull"); return SC_ARGS_1;
case 0xd0b1d189: FUNC_LOG_ERROR("TODO: cellGcmSetTile");
case 0xd34a420d: FUNC_LOG_ERROR("TODO: cellGcmSetZcull");
case 0xd8f88e1a: FUNC_LOG_ERROR("TODO: _cellGcmSetFlipCommandWithWaitLabel");
case 0xd9a0a879: FUNC_LOG_ERROR("TODO: cellGcmGetZcullInfo");
case 0xd9b7653e: FUNC_LOG_ERROR("TODO: cellGcmUnbindTile");
@ -817,9 +817,9 @@ s64 SysCalls::DoFunc(const u32 id)
case 0x516ee89e: FUNC_LOG_ERROR("TODO: cellRescInit");
case 0x5a338cdb: FUNC_LOG_ERROR("TODO: cellRescGetBufferSize");
case 0x66f5e388: FUNC_LOG_ERROR("TODO: cellRescGetLastFlipTime");
case 0x6cd0f95f: return cellRescSetSrc(SC_ARGS_2);//FUNC_LOG_ERROR("TODO: cellRescSetSrc");
case 0x6cd0f95f: FUNC_LOG_ERROR("TODO: cellRescSetSrc");
case 0x7af8a37f: FUNC_LOG_ERROR("TODO: cellRescSetRegisterCount");
case 0x8107277c: return cellRescSetBufferAddress(SC_ARGS_3); //FUNC_LOG_ERROR("TODO: cellRescSetBufferAddress");
case 0x8107277c: FUNC_LOG_ERROR("TODO: cellRescSetBufferAddress");
case 0xc47c5c22: FUNC_LOG_ERROR("TODO: cellRescGetFlipStatus");
case 0xd1ca0503: FUNC_LOG_ERROR("TODO: cellRescVideoOutResolutionId2RescBufferMode");
case 0xd3758645: FUNC_LOG_ERROR("TODO: cellRescSetVBlankHandler");
@ -1410,19 +1410,19 @@ s64 SysCalls::DoFunc(const u32 id)
case 0xa193143c: FUNC_LOG_ERROR("TODO: cellSysmoduleSetMemcontainer");
case 0x018a1381: FUNC_LOG_ERROR("TODO: cellSysutilAvcSetLayoutMode");
case 0x01f04d94: FUNC_LOG_ERROR("TODO: cellSysutilGamePowerOff_I");
case 0x02ff3c1b: return cellSysutilUnregisterCallback(SC_ARGS_1); //FUNC_LOG_ERROR("TODO: cellSysutilUnregisterCallback");
case 0x02ff3c1b: FUNC_LOG_ERROR("TODO: cellSysutilUnregisterCallback");
case 0x073b89d5: FUNC_LOG_ERROR("TODO: cellSysutilAvcGetSpeakerVolumeLevel");
case 0x08269f37: FUNC_LOG_ERROR("TODO: cellSysutilAvcGetShowStatus");
case 0x0bae8772: return cellVideoOutConfigure(SC_ARGS_4); //FUNC_LOG_ERROR("TODO: cellVideoOutConfigure");
case 0x0bae8772: FUNC_LOG_ERROR("TODO: cellVideoOutConfigure");
case 0x0c316b87: FUNC_LOG_ERROR("TODO: cellWebBrowserConfigGetHeapSize2");
case 0x0e091c36: FUNC_LOG_ERROR("TODO: cellSaveDataUserListAutoSave");
case 0x0f03cfb0: FUNC_LOG_ERROR("TODO: cellSaveDataUserListSave");
case 0x0f8a3b6b: FUNC_LOG_ERROR("TODO: cellWebBrowserConfigSetMimeSet");
case 0x10cabeff: FUNC_LOG_ERROR("TODO: cellWebBrowserGetUsrdataOnGameExit");
case 0x15b0b0cd: return cellVideoOutGetConfiguration(SC_ARGS_3); //FUNC_LOG_ERROR("TODO: cellVideoOutGetConfiguration");
case 0x15b0b0cd: FUNC_LOG_ERROR("TODO: cellVideoOutGetConfiguration");
case 0x15df71ed: FUNC_LOG_ERROR("TODO: cellSysutilAvcLoadAsync");
case 0x17dbe8b3: FUNC_LOG_ERROR("TODO: cellSysutilAvcJoinRequest");
case 0x189a74da: return cellSysutilCheckCallback(); //FUNC_LOG_ERROR("TODO: cellSysutilCheckCallback");
case 0x189a74da: FUNC_LOG_ERROR("TODO: cellSysutilCheckCallback");
case 0x1a91874b: FUNC_LOG_ERROR("TODO: cellWebBrowserConfigSetFullScreen2");
case 0x1d99c3ee: FUNC_LOG_ERROR("TODO: cellOskDialogGetInputText");
case 0x1dfbfdd6: FUNC_LOG_ERROR("TODO: cellSaveDataListLoad2");
@ -1484,8 +1484,8 @@ s64 SysCalls::DoFunc(const u32 id)
case 0x71acb8d3: FUNC_LOG_ERROR("TODO: cellSysutilAvcSetVideoMuting");
case 0x744c1544: FUNC_LOG_ERROR("TODO: cellSysCacheClear");
case 0x749c9b5f: FUNC_LOG_ERROR("TODO: cellWebBrowserInitialize");
case 0x75bbb672: return cellVideoOutGetNumberOfDevice(SC_ARGS_1); //FUNC_LOG_ERROR("TODO: cellVideoOutGetNumberOfDevice");
case 0x7603d3db: return cellMsgDialogOpen2(SC_ARGS_5); //FUNC_LOG_ERROR("TODO: cellMsgDialogOpen2");
case 0x75bbb672: FUNC_LOG_ERROR("TODO: cellVideoOutGetNumberOfDevice");
case 0x7603d3db: FUNC_LOG_ERROR("TODO: cellMsgDialogOpen2");
case 0x7663e368: FUNC_LOG_ERROR("TODO: cellAudioOutGetDeviceInfo");
case 0x76948bfc: FUNC_LOG_ERROR("TODO: cellSysconfAbort");
case 0x76fc8fb1: FUNC_LOG_ERROR("TODO: cellWebBrowserConfigSetHeapSize");
@ -1498,7 +1498,7 @@ s64 SysCalls::DoFunc(const u32 id)
case 0x7fb3c6a5: FUNC_LOG_ERROR("TODO: cellWebBrowserConfig2");
case 0x7fcfc915: FUNC_LOG_ERROR("TODO: cellOskDialogLoadAsync");
case 0x83668b8e: FUNC_LOG_ERROR("TODO: cellWebBrowserConfig");
case 0x887572d5: return cellVideoOutGetState(SC_ARGS_3);//FUNC_LOG_ERROR("TODO: cellVideoOutGetState");
case 0x887572d5: FUNC_LOG_ERROR("TODO: cellVideoOutGetState");
case 0x8a4cb646: FUNC_LOG_ERROR("TODO: cellWebBrowserCreateWithConfig");
case 0x8a5dbb58: FUNC_LOG_ERROR("TODO: cellWebComponentCreate");
case 0x8b7ed64b: FUNC_LOG_ERROR("TODO: cellSaveDataAutoSave2");
@ -1515,11 +1515,11 @@ s64 SysCalls::DoFunc(const u32 id)
case 0x9c9fe6a4: FUNC_LOG_ERROR("TODO: cellWebBrowserConfigSetFunction");
case 0x9ca9ffa7: FUNC_LOG_ERROR("TODO: cellHddGameSetSystemVer");
case 0x9d6af72a: FUNC_LOG_ERROR("TODO: cellMsgDialogProgressBarSetMsg");
case 0x9d98afa0: return cellSysutilRegisterCallback(SC_ARGS_3); //FUNC_LOG_ERROR("TODO: cellSysutilRegisterCallback");
case 0x9d98afa0: FUNC_LOG_ERROR("TODO: cellSysutilRegisterCallback");
case 0x9dfdad46: FUNC_LOG_ERROR("TODO: cellAudioOutUnregisterCallback");
case 0x9fb97b10: FUNC_LOG_ERROR("TODO: cellWebBrowserNavigate2");
case 0xa11552f6: FUNC_LOG_ERROR("TODO: cellSysutilGetBgmPlaybackStatus");
case 0xa322db75: return cellVideoOutGetResolutionAvailability(SC_ARGS_4); //FUNC_LOG_ERROR("TODO: cellVideoOutGetResolutionAvailability");
case 0xa322db75: FUNC_LOG_ERROR("TODO: cellVideoOutGetResolutionAvailability");
case 0xa36335a5: FUNC_LOG_ERROR("TODO: cellSysutilDisableBgmPlaybackEx");
case 0xa4dd11cc: FUNC_LOG_ERROR("TODO: cellWebBrowserConfigGetHeapSize");
case 0xa4ed7dfe: FUNC_LOG_ERROR("TODO: cellSaveDataDelete");
@ -1556,7 +1556,7 @@ s64 SysCalls::DoFunc(const u32 id)
case 0xdce51399: FUNC_LOG_ERROR("TODO: cellWebComponentDestroy");
case 0xdfdd302e: FUNC_LOG_ERROR("TODO: cellDiscGameRegisterDiscChangeCallback");
case 0xe22ed55d: FUNC_LOG_ERROR("TODO: cellWebBrowserConfigSetFunction2");
case 0xe558748d: return cellVideoOutGetResolution(SC_ARGS_2); //FUNC_LOG_ERROR("TODO: cellVideoOutGetResolution");
case 0xe558748d: FUNC_LOG_ERROR("TODO: cellVideoOutGetResolution");
case 0xe5e2b09d: FUNC_LOG_ERROR("TODO: cellAudioOutGetNumberOfDevice");
case 0xe7951dee: FUNC_LOG_ERROR("TODO: cellGameDataCheckCreate");
case 0xe7fa820b: FUNC_LOG_ERROR("TODO: cellSaveDataEnableOverlay");
@ -3563,28 +3563,25 @@ s64 SysCalls::DoFunc(const u32 id)
case 0x05c65656: FUNC_LOG_ERROR("TODO: sys_mempool_try_allocate_block");
case 0x0618936b: FUNC_LOG_ERROR("TODO: _sys_vsnprintf");
case 0x06574237: FUNC_LOG_ERROR("TODO: _sys_snprintf");
case 0x1573dc3f: return sys_lwmutex_lock(SC_ARGS_2);//FUNC_LOG_ERROR("TODO: sys_lwmutex_lock");
case 0x1573dc3f: FUNC_LOG_ERROR("TODO: sys_lwmutex_lock");
case 0x191f0c4a: FUNC_LOG_ERROR("TODO: _sys_strrchr");
case 0x1ae10b92: FUNC_LOG_ERROR("TODO: _sys_spu_printf_attach_thread");
case 0x1bc200f4: return sys_lwmutex_unlock(SC_ARGS_1);//FUNC_LOG_ERROR("TODO: sys_lwmutex_unlock");
case 0x1bc200f4: FUNC_LOG_ERROR("TODO: sys_lwmutex_unlock");
case 0x1c9a942c: FUNC_LOG_ERROR("TODO: sys_lwcond_destroy");
case 0x1ca525a2: FUNC_LOG_ERROR("TODO: _sys_strncasecmp");
case 0x1ed454ce: FUNC_LOG_ERROR("TODO: sys_spu_elf_get_information");
case 0x24a1ea07: return sys_ppu_thread_create(SC_ARGS_7);//FUNC_LOG_ERROR("TODO: sys_ppu_thread_create");
case 0x24a1ea07: FUNC_LOG_ERROR("TODO: sys_ppu_thread_create");
case 0x25596f51: FUNC_LOG_ERROR("TODO: sys_mempool_get_count");
case 0x26090058: FUNC_LOG_ERROR("TODO: sys_prx_load_module");
case 0x27427742: FUNC_LOG_ERROR("TODO: _sys_memmove");
case 0x2a6d9d51: FUNC_LOG_ERROR("TODO: sys_lwcond_wait");
case 0x2c847572: FUNC_LOG_ERROR("TODO: _sys_process_atexitspawn");
case 0x2d36462b:
//FUNC_LOG_ERROR("TODO: _sys_strlen");
ConLog.Write("sys_strlen(addr=0x%x(%s))", SC_ARGS_1, Memory.ReadString(SC_ARGS_1));
return strlen((const char*)&Memory[SC_ARGS_1]);
case 0x2f85c0ef: return sys_lwmutex_create(SC_ARGS_2);//FUNC_LOG_ERROR("TODO: sys_lwmutex_create");
case 0x2d36462b: FUNC_LOG_ERROR("TODO: _sys_strlen");
case 0x2f85c0ef: FUNC_LOG_ERROR("TODO: sys_lwmutex_create");
case 0x3172759d: FUNC_LOG_ERROR("TODO: sys_game_get_temperature");
case 0x318f17e1: FUNC_LOG_ERROR("TODO: _sys_memalign");
case 0x350d454e: return sys_ppu_thread_get_id(SC_ARGS_1);//FUNC_LOG_ERROR("TODO: sys_ppu_thread_get_id");
case 0x35168520: return sys_heap_malloc(SC_ARGS_2); //FUNC_LOG_ERROR("TODO: _sys_heap_malloc");
case 0x350d454e: FUNC_LOG_ERROR("TODO: sys_ppu_thread_get_id");
case 0x35168520: FUNC_LOG_ERROR("TODO: _sys_heap_malloc");
case 0x3bd53c7b: FUNC_LOG_ERROR("TODO: _sys_memchr");
case 0x3dd4a957: FUNC_LOG_ERROR("TODO: sys_ppu_thread_register_atexit");
case 0x409ad939: FUNC_LOG_ERROR("TODO: sys_mmapper_free_memory");
@ -3602,28 +3599,18 @@ s64 SysCalls::DoFunc(const u32 id)
case 0x608212fc: FUNC_LOG_ERROR("TODO: sys_mempool_free_block");
case 0x620e35a7: FUNC_LOG_ERROR("TODO: sys_game_get_system_sw_version");
case 0x67f9fedb: FUNC_LOG_ERROR("TODO: sys_game_process_exitspawn2");
case 0x68b9b011:
ConLog.Warning("_sys_memset(0x%llx, 0x%lld, 0x%lld)", SC_ARGS_3);
return
(u32)memset(Memory.GetMemFromAddr(CPU.GPR[3]), CPU.GPR[4], CPU.GPR[5])
- Memory.GetMemByAddr(CPU.GPR[3]).GetStartAddr();
FUNC_LOG_ERROR("TODO: _sys_memset");
case 0x68b9b011: FUNC_LOG_ERROR("TODO: _sys_memset");
case 0x6bf66ea7: FUNC_LOG_ERROR("TODO: _sys_memcpy");
case 0x6e05231d: FUNC_LOG_ERROR("TODO: sys_game_watchdog_stop");
case 0x70258515: FUNC_LOG_ERROR("TODO: sys_mmapper_allocate_memory_from_container");
case 0x71a8472a: FUNC_LOG_ERROR("TODO: sys_get_random_number");
case 0x722a0254: FUNC_LOG_ERROR("TODO: sys_spinlock_trylock");
case 0x74311398: FUNC_LOG_ERROR("TODO: sys_prx_get_my_module_id");
case 0x744680a2:
// FUNC_LOG_ERROR("TODO: sys_initialize_tls");
ConLog.Warning("sys_initialize_tls()");
//CPU.GPR[4] = Emu.GetTLSFilesz();
//CPU.GPR[5] = Emu.GetTLSMemsz();
return 0;//Memory.MainMem.Alloc(Emu.GetTLSMemsz());//Emu.GetTLSAddr();
case 0x744680a2: FUNC_LOG_ERROR("TODO: sys_initialize_tls");
case 0x7498887b: FUNC_LOG_ERROR("TODO: _sys_strchr");
case 0x791b9219: FUNC_LOG_ERROR("TODO: _sys_vsprintf");
case 0x80fb0c19: FUNC_LOG_ERROR("TODO: sys_prx_stop_module");
case 0x8461e528: return sys_time_get_system_time();//FUNC_LOG_ERROR("TODO: sys_time_get_system_time");
case 0x8461e528: FUNC_LOG_ERROR("TODO: sys_time_get_system_time");
case 0x84bb6774: FUNC_LOG_ERROR("TODO: sys_prx_get_module_info");
case 0x893305fa: FUNC_LOG_ERROR("TODO: sys_raw_spu_load");
case 0x8985b5b6: FUNC_LOG_ERROR("TODO: _sys_heap_stats");
@ -3640,33 +3627,27 @@ s64 SysCalls::DoFunc(const u32 id)
case 0x9f18429d: FUNC_LOG_ERROR("TODO: sys_prx_start_module");
case 0x9f950780: FUNC_LOG_ERROR("TODO: sys_game_get_rtc_status");
case 0xa146a143: FUNC_LOG_ERROR("TODO: sys_mempool_allocate_block");
case 0xa1f9eafe:
ConLog.Warning("_sys_sprintf(0x%llx, 0x%llx(%s), 0x%llx)", CPU.GPR[3], CPU.GPR[4], Memory.ReadString(CPU.GPR[4]), CPU.GPR[5]);
return vsprintf((char*)Memory.GetMemFromAddr(CPU.GPR[3]), Memory.ReadString(CPU.GPR[4]), (char*)Memory.GetMemFromAddr(CPU.GPR[5]));
FUNC_LOG_ERROR("TODO: _sys_sprintf");
case 0xa1f9eafe: FUNC_LOG_ERROR("TODO: _sys_sprintf");
case 0xa285139d: FUNC_LOG_ERROR("TODO: sys_spinlock_lock");
case 0xa2c7ba64: FUNC_LOG_ERROR("TODO: sys_prx_exitspawn_with_level");
case 0xa330ad84: FUNC_LOG_ERROR("TODO: sys_prx_load_module_on_memcontainer_by_fd");
case 0xa3e3be68: sys_ppu_thread_once(SC_ARGS_2); return SC_ARGS_1;//FUNC_LOG_ERROR("TODO: sys_ppu_thread_once");
case 0xa3e3be68: FUNC_LOG_ERROR("TODO: sys_ppu_thread_once");
case 0xa5d06bf0: FUNC_LOG_ERROR("TODO: sys_prx_get_module_list");
case 0xaa6d9bff: FUNC_LOG_ERROR("TODO: sys_prx_load_module_on_memcontainer");
case 0xac6fc404: FUNC_LOG_ERROR("TODO: sys_ppu_thread_unregister_atexit");
case 0xacad8fb6: FUNC_LOG_ERROR("TODO: sys_game_watchdog_clear");
case 0xaeb78725: return sys_lwmutex_trylock(SC_ARGS_1);//FUNC_LOG_ERROR("TODO: sys_lwmutex_trylock");
case 0xaeb78725: FUNC_LOG_ERROR("TODO: sys_lwmutex_trylock");
case 0xaede4b03: FUNC_LOG_ERROR("TODO: _sys_heap_delete_heap");
case 0xaff080a4: return sys_ppu_thread_exit(SC_ARGS_1);//FUNC_LOG_ERROR("TODO: sys_ppu_thread_exit");
case 0xb257540b: return sys_mmapper_allocate_memory(SC_ARGS_3); //FUNC_LOG_ERROR("TODO: sys_mmapper_allocate_memory");
case 0xaff080a4: FUNC_LOG_ERROR("TODO: sys_ppu_thread_exit");
case 0xb257540b: FUNC_LOG_ERROR("TODO: sys_mmapper_allocate_memory");
case 0xb27c8ae7: FUNC_LOG_ERROR("TODO: sys_prx_load_module_list");
case 0xb2fcf2c8: return sys_heap_create_heap(SC_ARGS_3);//FUNC_LOG_ERROR("TODO: _sys_heap_create_heap");
case 0xb2fcf2c8: FUNC_LOG_ERROR("TODO: _sys_heap_create_heap");
case 0xb3bbcf2a: FUNC_LOG_ERROR("TODO: _sys_spu_printf_detach_thread");
case 0xb6369393: FUNC_LOG_ERROR("TODO: _sys_heap_get_total_free_size");
case 0xb995662e: FUNC_LOG_ERROR("TODO: sys_raw_spu_image_load");
case 0xb9bf1078: FUNC_LOG_ERROR("TODO: _sys_heap_alloc_heap_memory");
case 0xbdb18f83:
ConLog.Warning("_sys_malloc(0x%llx)", SC_ARGS_1);
return Memory.Alloc(CPU.GPR[3], Emu.GetMallocPageSize());
FUNC_LOG_ERROR("TODO: _sys_malloc");
case 0xc3476d0c: return sys_lwmutex_destroy(SC_ARGS_1);////FUNC_LOG_ERROR("TODO: sys_lwmutex_destroy");
case 0xbdb18f83: FUNC_LOG_ERROR("TODO: _sys_malloc");
case 0xc3476d0c: FUNC_LOG_ERROR("TODO: sys_lwmutex_destroy");
case 0xc4fd6121: FUNC_LOG_ERROR("TODO: _sys_qsort");
case 0xca9a60bf: FUNC_LOG_ERROR("TODO: sys_mempool_create");
case 0xd0ea47a7: FUNC_LOG_ERROR("TODO: sys_prx_unregister_library");
@ -3674,13 +3655,13 @@ s64 SysCalls::DoFunc(const u32 id)
case 0xd3039d4d: FUNC_LOG_ERROR("TODO: _sys_strncpy");
case 0xda0eb71a: FUNC_LOG_ERROR("TODO: sys_lwcond_create");
case 0xdb6b3250: FUNC_LOG_ERROR("TODO: sys_spu_elf_get_segments");
case 0xdc578057: return sys_mmapper_map_memory(SC_ARGS_3); //FUNC_LOG_ERROR("TODO: sys_mmapper_map_memory");
case 0xdc578057: FUNC_LOG_ERROR("TODO: sys_mmapper_map_memory");
case 0xdd0c1e09: FUNC_LOG_ERROR("TODO: _sys_spu_printf_attach_group");
case 0xdd3b27ac: FUNC_LOG_ERROR("TODO: _sys_spu_printf_finalize");
case 0xe0998dbf: FUNC_LOG_ERROR("TODO: sys_prx_get_module_id_by_name");
case 0xe0da8efd: FUNC_LOG_ERROR("TODO: sys_spu_image_close");
case 0xe66bac36: FUNC_LOG_ERROR("TODO: console_putc");
case 0xe6f2c1e7: return sys_process_exit(SC_ARGS_1);///FUNC_LOG_ERROR("TODO: sys_process_exit");
case 0xe6f2c1e7: FUNC_LOG_ERROR("TODO: sys_process_exit");
case 0xe76964f5: FUNC_LOG_ERROR("TODO: sys_game_board_storage_read");
case 0xe7ef3a80: FUNC_LOG_ERROR("TODO: sys_prx_load_module_list_on_memcontainer");
case 0xe9a1bd84: FUNC_LOG_ERROR("TODO: sys_lwcond_signal_all");
@ -3693,7 +3674,7 @@ s64 SysCalls::DoFunc(const u32 id)
case 0xf7f7fb20: FUNC_LOG_ERROR("TODO: _sys_free");
case 0xfa7f693d: FUNC_LOG_ERROR("TODO: _sys_vprintf");
case 0xfb5db080: FUNC_LOG_ERROR("TODO: _sys_memcmp");
case 0xfc52a7a9: return sys_game_process_exitspawn(SC_ARGS_7); FUNC_LOG_ERROR("TODO: sys_game_process_exitspawn");
case 0xfc52a7a9: FUNC_LOG_ERROR("TODO: sys_game_process_exitspawn");
}
ConLog.Error("Unknown func id: 0x%08x", id);