diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 306ef4305b02..4bef7851137d 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1131,7 +1131,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) // Throw virtual memory access violation exception [[noreturn]] void throw_access_violation(const char* cause, u32 address) // Don't change function definition { - throw EXCEPTION("Access violation %s location 0x%08x", cause, address); + //throw EXCEPTION("Access violation %s location 0x%08x", cause, address); } // Modify context in order to convert hardware exception to C++ exception diff --git a/rpcs3/Emu/Cell/PPUInterpreter.cpp b/rpcs3/Emu/Cell/PPUInterpreter.cpp index 0842b06ddb2a..a747e64f496d 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.cpp +++ b/rpcs3/Emu/Cell/PPUInterpreter.cpp @@ -73,12 +73,14 @@ void ppu_interpreter::TWI(PPUThread& CPU, ppu_opcode_t op) void ppu_interpreter::MFVSCR(PPUThread& CPU, ppu_opcode_t op) { - throw EXCEPTION(""); + CPU.VPR[op.vd]._u32[0] = CPU.VSCR.VSCR; + CPU.VPR[op.vd].clear(); } void ppu_interpreter::MTVSCR(PPUThread& CPU, ppu_opcode_t op) { - // ignored (MFVSCR disabled) + CPU.VSCR.VSCR = CPU.VPR[op.vb]._u32[0]; + CPU.VSCR.X = CPU.VSCR.Y = 0; } void ppu_interpreter::VADDCUW(PPUThread& CPU, ppu_opcode_t op) @@ -1696,7 +1698,7 @@ void ppu_interpreter::TW(PPUThread& CPU, ppu_opcode_t op) ((u32)a < (u32)b && (op.bo & 0x2)) || ((u32)a >(u32)b && (op.bo & 0x1))) { - throw EXCEPTION(""); + //throw EXCEPTION(""); } } diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index 9e550bea4d05..766a686ce562 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -2571,14 +2571,11 @@ class PPUInterpreter : public PPUOpcodes s32 a = (s32)CPU.GPR[ra]; s32 b = (s32)CPU.GPR[rb]; - if( (a < b && (to & 0x10)) || - (a > b && (to & 0x8)) || - (a == b && (to & 0x4)) || + if ((a < b && (to & 0x10)) || + (a > b && (to & 0x8)) || + (a == b && (to & 0x4)) || ((u32)a < (u32)b && (to & 0x2)) || - ((u32)a > (u32)b && (to & 0x1)) ) - { - throw EXCEPTION("Trap! (tw 0x%x, r%d, r%d)", to, ra, rb); - } + ((u32)a >(u32)b && (to & 0x1))); } void LVSL(u32 vd, u32 ra, u32 rb) override { diff --git a/rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp b/rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp index fc2e5aaf9733..30dcecbd880d 100644 --- a/rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp @@ -918,7 +918,7 @@ void spu_recompiler::BISL(spu_opcode_t op) void spu_recompiler::IRET(spu_opcode_t op) { - throw EXCEPTION("Unimplemented instruction"); + //throw EXCEPTION("Unimplemented instruction"); } void spu_recompiler::BISLED(spu_opcode_t op) diff --git a/rpcs3/Emu/Memory/vm.cpp b/rpcs3/Emu/Memory/vm.cpp index 1d8d2b61c420..114ba448939b 100644 --- a/rpcs3/Emu/Memory/vm.cpp +++ b/rpcs3/Emu/Memory/vm.cpp @@ -811,7 +811,7 @@ namespace vm { if (used > this->size) { - throw EXCEPTION("Unexpected memory amount used (0x%x)", used); + //throw EXCEPTION("Unexpected memory amount used (0x%x)", used); } if (used + size > this->size) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp index 3f9e4cfd975c..7b5125ff1e97 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp @@ -40,11 +40,10 @@ D3D12_BLEND get_blend_factor(u16 factor) case CELL_GCM_SRC_ALPHA_SATURATE: return D3D12_BLEND_SRC_ALPHA_SAT; case CELL_GCM_CONSTANT_COLOR: return D3D12_BLEND_DEST_COLOR; case CELL_GCM_ONE_MINUS_CONSTANT_COLOR: return D3D12_BLEND_INV_DEST_COLOR; - case CELL_GCM_CONSTANT_ALPHA: - case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA: - break; + case CELL_GCM_CONSTANT_ALPHA: return D3D12_BLEND_DEST_ALPHA; + case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA: return D3D12_BLEND_INV_DEST_ALPHA; } - throw EXCEPTION("Invalid or unsupported blend factor (0x%x)", factor); + throw EXCEPTION("Invalid blend factor (0x%x)", factor); } D3D12_BLEND get_blend_factor_alpha(u16 factor) @@ -62,10 +61,10 @@ D3D12_BLEND get_blend_factor_alpha(u16 factor) case CELL_GCM_DST_COLOR: return D3D12_BLEND_DEST_ALPHA; case CELL_GCM_ONE_MINUS_DST_COLOR: return D3D12_BLEND_INV_DEST_ALPHA; case CELL_GCM_SRC_ALPHA_SATURATE: return D3D12_BLEND_SRC_ALPHA_SAT; + case CELL_GCM_CONSTANT_ALPHA: return D3D12_BLEND_DEST_ALPHA; + case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA: return D3D12_BLEND_INV_DEST_ALPHA; case CELL_GCM_CONSTANT_COLOR: case CELL_GCM_ONE_MINUS_CONSTANT_COLOR: - case CELL_GCM_CONSTANT_ALPHA: - case CELL_GCM_ONE_MINUS_CONSTANT_ALPHA: break; } throw EXCEPTION("Invalid or unsupported blend alpha factor (0x%x)", factor); @@ -162,7 +161,7 @@ DXGI_FORMAT get_texture_format(u8 format) case CELL_GCM_TEXTURE_D8R8G8B8: return DXGI_FORMAT_R8G8B8A8_UNORM; case CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8: return DXGI_FORMAT_G8R8_G8B8_UNORM; case CELL_GCM_TEXTURE_COMPRESSED_R8B8_R8G8: return DXGI_FORMAT_R8G8_B8G8_UNORM; - case CELL_GCM_TEXTURE_Y16_X16_FLOAT: + case CELL_GCM_TEXTURE_Y16_X16_FLOAT: return DXGI_FORMAT_R16G16_FLOAT; case CELL_GCM_TEXTURE_COMPRESSED_HILO8: case CELL_GCM_TEXTURE_COMPRESSED_HILO_S8: case ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN) & CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8: @@ -305,7 +304,9 @@ DXGI_FORMAT get_color_surface_format(u8 format) case CELL_GCM_SURFACE_R5G6B5: return DXGI_FORMAT_B5G6R5_UNORM; case CELL_GCM_SURFACE_X8R8G8B8_O8R8G8B8: return DXGI_FORMAT_B8G8R8X8_UNORM; //BIT.TRIP Runner2 use this case CELL_GCM_SURFACE_A8R8G8B8: return DXGI_FORMAT_R8G8B8A8_UNORM; + case CELL_GCM_SURFACE_B8: return DXGI_FORMAT_R8_UNORM; case CELL_GCM_SURFACE_F_W16Z16Y16X16: return DXGI_FORMAT_R16G16B16A16_FLOAT; + case CELL_GCM_SURFACE_F_W32Z32Y32X32: return DXGI_FORMAT_R32G32B32A32_FLOAT; case CELL_GCM_SURFACE_F_X32: return DXGI_FORMAT_R32_FLOAT; case CELL_GCM_SURFACE_A8B8G8R8: return DXGI_FORMAT_R8G8B8A8_UNORM; } @@ -326,6 +327,7 @@ DXGI_FORMAT get_depth_stencil_surface_clear_format(u8 format) { switch (format) { + case 0: return DXGI_FORMAT_UNKNOWN; case CELL_GCM_SURFACE_Z16: return DXGI_FORMAT_D16_UNORM; case CELL_GCM_SURFACE_Z24S8: return DXGI_FORMAT_D24_UNORM_S8_UINT; } @@ -336,6 +338,7 @@ DXGI_FORMAT get_depth_stencil_typeless_surface_format(u8 format) { switch (format) { + case 0: return DXGI_FORMAT_UNKNOWN; case CELL_GCM_SURFACE_Z16: return DXGI_FORMAT_R16_TYPELESS; case CELL_GCM_SURFACE_Z24S8: return DXGI_FORMAT_R24G8_TYPELESS; } diff --git a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h index ef4ba8db27e1..a209a8634718 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h +++ b/rpcs3/Emu/RSX/D3D12/D3D12PipelineState.h @@ -166,7 +166,7 @@ struct D3D12Traits } } - fs::file(fs::get_config_dir() + "FragmentProgram" + std::to_string(ID) + ".hlsl", fom::rewrite) << shader; + fs::file(fs::get_config_dir() + "/hlsl/FragmentProgram" + std::to_string(ID) + ".hlsl", fom::rewrite) << shader; fragmentProgramData.id = (u32)ID; } @@ -177,7 +177,7 @@ struct D3D12Traits std::string shaderCode = VS.Decompile(); vertexProgramData.Compile(shaderCode, Shader::SHADER_TYPE::SHADER_TYPE_VERTEX); vertexProgramData.vertex_shader_inputs = VS.input_slots; - fs::file(fs::get_config_dir() + "VertexProgram" + std::to_string(ID) + ".hlsl", fom::rewrite) << shaderCode; + fs::file(fs::get_config_dir() + "/hlsl/VertexProgram" + std::to_string(ID) + ".hlsl", fom::rewrite) << shaderCode; vertexProgramData.id = (u32)ID; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp b/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp index b17f72d21d08..f6708676b4f7 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp @@ -39,6 +39,8 @@ AudioDecoder::AudioDecoder(s32 type, u32 addr, u32 size, vm::ptr switch (type) { + case CELL_ADEC_TYPE_LPCM_PAMF: + case CELL_ADEC_TYPE_AC3: case CELL_ADEC_TYPE_ATRACX: case CELL_ADEC_TYPE_ATRACX_2CH: case CELL_ADEC_TYPE_ATRACX_6CH: @@ -49,6 +51,7 @@ AudioDecoder::AudioDecoder(s32 type, u32 addr, u32 size, vm::ptr break; } case CELL_ADEC_TYPE_MP3: + case CELL_ADEC_TYPE_MPEG_L2: { codec = avcodec_find_decoder(AV_CODEC_ID_MP3); input_format = av_find_input_format("mp3"); @@ -412,12 +415,12 @@ void adecOpen(u32 adec_id) // TODO: call from the constructor if (got_frame) { - //u64 ts = av_frame_get_best_effort_timestamp(frame.data); - //if (ts != AV_NOPTS_VALUE) - //{ - // frame.pts = ts/* - adec.first_pts*/; - // adec.last_pts = frame.pts; - //} + /*u64 ts = av_frame_get_best_effort_timestamp(frame.data); + if (ts != AV_NOPTS_VALUE) + { + frame.pts = ts/* - adec.first_pts; + adec.last_pts = frame.pts; + }*/ adec.last_pts += ((u64)frame.data->nb_samples) * 90000 / frame.data->sample_rate; frame.pts = adec.last_pts; @@ -436,8 +439,8 @@ void adecOpen(u32 adec_id) // TODO: call from the constructor frame.userdata = task.au.userdata; frame.size = frame.data->nb_samples * frame.data->channels * nbps; - //LOG_NOTICE(HLE, "got audio frame (pts=0x%llx, nb_samples=%d, ch=%d, sample_rate=%d, nbps=%d)", - //frame.pts, frame.data->nb_samples, frame.data->channels, frame.data->sample_rate, nbps); + /*LOG_NOTICE(HLE, "got audio frame (pts=0x%llx, nb_samples=%d, ch=%d, sample_rate=%d, nbps=%d)", + frame.pts, frame.data->nb_samples, frame.data->channels, frame.data->sample_rate, nbps);*/ if (adec.frames.push(frame, &adec.is_closed)) { @@ -475,16 +478,16 @@ bool adecCheckType(s32 type) { switch (type) { + case CELL_ADEC_TYPE_AC3: cellAdec.Notice("adecCheckType(): AC3"); break; case CELL_ADEC_TYPE_ATRACX: cellAdec.Notice("adecCheckType(): ATRAC3plus"); break; case CELL_ADEC_TYPE_ATRACX_2CH: cellAdec.Notice("adecCheckType(): ATRAC3plus 2ch"); break; case CELL_ADEC_TYPE_ATRACX_6CH: cellAdec.Notice("adecCheckType(): ATRAC3plus 6ch"); break; case CELL_ADEC_TYPE_ATRACX_8CH: cellAdec.Notice("adecCheckType(): ATRAC3plus 8ch"); break; case CELL_ADEC_TYPE_MP3: cellAdec.Notice("adecCheckType(): MP3"); break; - - case CELL_ADEC_TYPE_LPCM_PAMF: - case CELL_ADEC_TYPE_AC3: + case CELL_ADEC_TYPE_LPCM_PAMF: cellAdec.Notice("adecCheckType(): LPCM PAMF"); break; + case CELL_ADEC_TYPE_MPEG_L2: cellAdec.Notice("adecCheckType(): MPEG L2"); break; + case CELL_ADEC_TYPE_ATRAC3: - case CELL_ADEC_TYPE_MPEG_L2: case CELL_ADEC_TYPE_CELP: case CELL_ADEC_TYPE_M4AAC: case CELL_ADEC_TYPE_CELP8: @@ -592,6 +595,8 @@ s32 cellAdecStartSeq(u32 handle, u32 param) switch (adec->type) { + case CELL_ADEC_TYPE_LPCM_PAMF: + case CELL_ADEC_TYPE_AC3: case CELL_ADEC_TYPE_ATRACX: case CELL_ADEC_TYPE_ATRACX_2CH: case CELL_ADEC_TYPE_ATRACX_6CH: @@ -612,6 +617,7 @@ s32 cellAdecStartSeq(u32 handle, u32 param) break; } case CELL_ADEC_TYPE_MP3: + case CELL_ADEC_TYPE_MPEG_L2: { const auto mp3 = vm::cptr::make(param); diff --git a/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp b/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp index afba36fc7013..f81fc6a80f5b 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellDmux.cpp @@ -656,26 +656,26 @@ void dmuxOpen(u32 dmux_id) // TODO: call from the constructor { esAVC[es.fidMajor % 16] = task.es.es_ptr; } - //else if ((es.fidMajor & -0x10) == 0xe0 && es.fidMinor == 0 && !es.sup1 && !es.sup2) - //{ - // esM2V[es.fidMajor % 16] = task.es.es_ptr; - //} + else if ((es.fidMajor & -0x10) == 0xe0 && es.fidMinor == 0 && !es.sup1 && !es.sup2) + { + esM2V[es.fidMajor % 16] = task.es.es_ptr; + } else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0 && !es.sup1 && !es.sup2) { esATX[es.fidMinor % 16] = task.es.es_ptr; } - //else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x20 && !es.sup1 && !es.sup2) - //{ - // esDATA[es.fidMinor % 16] = task.es.es_ptr; - //} - //else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x30 && !es.sup1 && !es.sup2) - //{ - // esAC3[es.fidMinor % 16] = task.es.es_ptr; - //} - //else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x40 && !es.sup1 && !es.sup2) - //{ - // esPCM[es.fidMinor % 16] = task.es.es_ptr; - //} + else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x20 && !es.sup1 && !es.sup2) + { + esDATA[es.fidMinor % 16] = task.es.es_ptr; + } + else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x30 && !es.sup1 && !es.sup2) + { + esAC3[es.fidMinor % 16] = task.es.es_ptr; + } + else if (es.fidMajor == 0xbd && (es.fidMinor & -0x10) == 0x40 && !es.sup1 && !es.sup2) + { + esPCM[es.fidMinor % 16] = task.es.es_ptr; + } else { throw EXCEPTION("dmuxEnableEs: unknown filter (0x%x, 0x%x, 0x%x, 0x%x)", es.fidMajor, es.fidMinor, es.sup1, es.sup2); diff --git a/rpcs3/Emu/SysCalls/Modules/cellFont.cpp b/rpcs3/Emu/SysCalls/Modules/cellFont.cpp index 749956f4cb53..c3eeee1a9755 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellFont.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellFont.cpp @@ -453,7 +453,7 @@ s32 cellFontSetEffectWeight() s32 cellFontGlyphSetupVertexesGlyph() { - UNIMPLEMENTED_FUNC(cellFont); + //UNIMPLEMENTED_FUNC(cellFont); return CELL_OK; } @@ -478,7 +478,7 @@ s32 cellFontSetScalePoint() s32 cellFontSetupRenderEffectSlant() { UNIMPLEMENTED_FUNC(cellFont); - return CELL_OK; + return -1; } s32 cellFontGraphicsSetLineRGBA() @@ -508,30 +508,30 @@ s32 cellFontGraphicsSetupDrawContext() s32 cellFontSetupRenderEffectWeight() { UNIMPLEMENTED_FUNC(cellFont); - return CELL_OK; + return -1; } s32 cellFontGlyphGetOutlineControlDistance() { - UNIMPLEMENTED_FUNC(cellFont); + //UNIMPLEMENTED_FUNC(cellFont); return CELL_OK; } s32 cellFontGlyphGetVertexesGlyphSize() { - UNIMPLEMENTED_FUNC(cellFont); + //UNIMPLEMENTED_FUNC(cellFont); return CELL_OK; } s32 cellFontGenerateCharGlyph() { - UNIMPLEMENTED_FUNC(cellFont); + //UNIMPLEMENTED_FUNC(cellFont); return CELL_OK; } s32 cellFontDeleteGlyph() { - UNIMPLEMENTED_FUNC(cellFont); + //UNIMPLEMENTED_FUNC(cellFont); return CELL_OK; } @@ -552,7 +552,7 @@ s32 cellFontExtend(u32 a1, u32 a2, u32 a3) //Something happens } //Something happens? - return CELL_OK; + return -1; } s32 cellFontRenderCharGlyphImageVertical() @@ -585,12 +585,14 @@ s32 cellFontGraphicsGetDrawType() s32 cellFontGetKerning() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellFont); + return -1;//throw EXCEPTION(""); } s32 cellFontGetRenderScaledKerning() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellFont); + return -1;//throw EXCEPTION(""); } s32 cellFontGetRenderScalePixel() @@ -620,7 +622,8 @@ s32 cellFontGetEffectWeight() s32 cellFontGetScalePixel() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellFont); + return -1;//throw EXCEPTION(""); } s32 cellFontClearFileCache() @@ -635,7 +638,8 @@ s32 cellFontAdjustFontScaling() s32 cellFontSetupRenderScalePoint() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellFont); + return CELL_OK; //throw EXCEPTION(""); } s32 cellFontGlyphGetVerticalShift() diff --git a/rpcs3/Emu/SysCalls/Modules/cellFs.cpp b/rpcs3/Emu/SysCalls/Modules/cellFs.cpp index f6d9cff98941..581afc563fe6 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellFs.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellFs.cpp @@ -144,7 +144,7 @@ s32 cellFsFsync(u32 fd) { cellFs.Todo("cellFsFsync(fd=0x%x)", fd); - return CELL_OK; + return -1; //CELL_OK; } s32 cellFsFGetBlockSize(u32 fd, vm::ptr sector_size, vm::ptr block_size) @@ -987,7 +987,8 @@ s32 cellFsSetIoBufferFromDefaultContainer(u32 fd, u32 buffer_size, u32 page_type s32 cellFsUtime() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellFs); + return CELL_OK; } s32 cellFsArcadeHddSerialNumber() @@ -1027,7 +1028,8 @@ s32 cellFsChangeFileSizeWithoutAllocation() s32 cellFsAllocateFileAreaWithoutZeroFill() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellFs); + return CELL_OK; } s32 cellFsChangeFileSizeByFdWithoutAllocation() diff --git a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp index 504d7acfc606..513d1f0e8f4e 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp @@ -139,7 +139,8 @@ s32 cellHddGameExitBroken() s32 cellGameDataGetSizeKB() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellGame); + return CELL_OK; } s32 cellGameDataSetSystemVer() @@ -670,12 +671,14 @@ s32 cellGameThemeInstallFromBuffer() s32 cellDiscGameGetBootDiscInfo() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellGame); + return CELL_OK; } s32 cellDiscGameRegisterDiscChangeCallback() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellGame); + return CELL_OK; } s32 cellDiscGameUnregisterDiscChangeCallback() diff --git a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp index 3ae0175f64d0..22cdd4137bd7 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp @@ -1189,12 +1189,14 @@ s32 cellGcmSetTile(u8 index, u8 location, u32 offset, u32 size, u32 pitch, u8 co s32 _cellGcmFunc2() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellGcmSys); + return CELL_OK; } s32 _cellGcmFunc3() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellGcmSys); + return -1; } s32 _cellGcmFunc4() @@ -1204,7 +1206,8 @@ s32 _cellGcmFunc4() s32 _cellGcmFunc13() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellGcmSys); + return -1; } s32 _cellGcmFunc38() diff --git a/rpcs3/Emu/SysCalls/Modules/cellMusic.cpp b/rpcs3/Emu/SysCalls/Modules/cellMusic.cpp index 66de4158a181..30dff70b1b53 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellMusic.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellMusic.cpp @@ -27,7 +27,7 @@ s32 cellMusicSetSelectionContext2() s32 cellMusicSetVolume2() { - throw EXCEPTION(""); + return CELL_OK; //throw EXCEPTION(""); } s32 cellMusicGetContentsId() diff --git a/rpcs3/Emu/SysCalls/Modules/cellOskDialog.cpp b/rpcs3/Emu/SysCalls/Modules/cellOskDialog.cpp index 6a83bd544e63..eb8f2918d908 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellOskDialog.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellOskDialog.cpp @@ -6,7 +6,8 @@ extern Module<> cellOskDialog; s32 cellOskDialogLoadAsync() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellOskDialog); + return -1; //CELL_OK; } s32 cellOskDialogUnloadAsync() @@ -51,7 +52,8 @@ s32 cellOskDialogDisableDimmer() s32 cellOskDialogSetKeyLayoutOption() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellOskDialog); + return -1; //CELL_OK; } s32 cellOskDialogAddSupportLanguage() @@ -61,7 +63,8 @@ s32 cellOskDialogAddSupportLanguage() s32 cellOskDialogSetLayoutMode() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(cellOskDialog); + return -1; //CELL_OK; } s32 cellOskDialogGetInputText() diff --git a/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp b/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp index 28248da4f00d..a906928b3fd4 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp @@ -302,12 +302,12 @@ s32 cellSysutilGetBgmPlaybackStatus2(vm::ptr stat s32 cellSysutilSetBgmPlaybackExtraParam() { - throw EXCEPTION(""); + return CELL_OK; //throw EXCEPTION(""); } s32 cellSysutilRegisterCallbackDispatcher() { - throw EXCEPTION(""); + return CELL_OK; //throw EXCEPTION(""); } s32 cellSysutilPacketWrite() diff --git a/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp b/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp index 999b3c8596ca..6d2cde602a3b 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp @@ -640,6 +640,11 @@ s32 cellVdecDecodeAu(u32 handle, CellVdecDecodeMode mode, vm::cptr str) diff --git a/rpcs3/Emu/SysCalls/Modules/sys_ppu_thread_.cpp b/rpcs3/Emu/SysCalls/Modules/sys_ppu_thread_.cpp index 4c29cac68f8f..53f25a2a0126 100644 --- a/rpcs3/Emu/SysCalls/Modules/sys_ppu_thread_.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sys_ppu_thread_.cpp @@ -70,12 +70,14 @@ void sys_ppu_thread_once(PPUThread& ppu, vm::ptr> once_ctrl, vm s32 sys_ppu_thread_register_atexit() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(sysPrxForUser); + return CELL_OK; } s32 sys_ppu_thread_unregister_atexit() { - throw EXCEPTION(""); + UNIMPLEMENTED_FUNC(sysPrxForUser); + return CELL_OK; } void sysPrxForUser_sys_ppu_thread_init() diff --git a/rpcs3/Emu/SysCalls/lv2/sys_fs.cpp b/rpcs3/Emu/SysCalls/lv2/sys_fs.cpp index 3d6651480cdf..7df3a4012d12 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_fs.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_fs.cpp @@ -100,7 +100,18 @@ s32 sys_fs_open(vm::cptr path, s32 flags, vm::ptr fd, s32 mode, vm::c throw EXCEPTION("Invalid or unimplemented flags (%#o): '%s'", flags, path.get_ptr()); } - std::shared_ptr file(Emu.GetVFS().OpenFile(path.get_ptr(), open_mode)); + const char *path_ptr = path.get_ptr(); + + if (strstr(path.get_ptr(), "/dev_hdd0") && + strncmp(path.get_ptr(), "/dev_hdd0", 9)) + { + path_ptr = strstr(path_ptr, "/dev_hdd0"); + + LOG_ERROR(HLE, "Path contains device root path but not at the start!"); + LOG_ERROR(HLE, "Path given is (%s), modified to (%s)", path.get_ptr(), path_ptr); + } + + std::shared_ptr file(Emu.GetVFS().OpenFile(path_ptr, open_mode)); if (!file || !file->IsOpened()) {