diff --git a/rpcs3/Emu/Cell/PPUDisAsm.h b/rpcs3/Emu/Cell/PPUDisAsm.h index 7aea473b42..f071b88a2b 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.h +++ b/rpcs3/Emu/Cell/PPUDisAsm.h @@ -1399,6 +1399,10 @@ private: { DisAsm_R3("stdux", rs, ra, rb); } + void STWUX(u32 rs, u32 ra, u32 rb) + { + DisAsm_R3("stwux", rs, ra, rb); + } void STVEWX(u32 vs, u32 ra, u32 rb) { DisAsm_V1_R2("stvewx", vs, ra, rb); @@ -1435,6 +1439,10 @@ private: { DisAsm_R3("dcbtst", th, ra, rb); } + void STBUX(u32 rs, u32 ra, u32 rb) + { + DisAsm_R3("stbux", rs, ra, rb); + } void ADD(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) { DisAsm_R3_OE_RC("add", rd, ra, rb, oe, rc); @@ -1530,6 +1538,10 @@ private: { DisAsm_R3("ecowx", rs, ra, rb); } + void STHUX(u32 rs, u32 ra, u32 rb) + { + DisAsm_R3("sthux", rs, ra, rb); + } void OR(u32 ra, u32 rs, u32 rb, bool rc) { if(rs==rb) diff --git a/rpcs3/Emu/Cell/PPUInstrTable.h b/rpcs3/Emu/Cell/PPUInstrTable.h index ea524f4827..3ca379c35d 100644 --- a/rpcs3/Emu/Cell/PPUInstrTable.h +++ b/rpcs3/Emu/Cell/PPUInstrTable.h @@ -482,6 +482,7 @@ namespace PPU_instr /*0x097*/bind_instr(g1f_list, STWX, RS, RA, RB); /*0x0a7*/bind_instr(g1f_list, STVEHX, VS, RA, RB); /*0x0b5*/bind_instr(g1f_list, STDUX, RS, RA, RB); + /*0x0b7*/bind_instr(g1f_list, STWUX, RS, RA, RB); /*0x0c7*/bind_instr(g1f_list, STVEWX, VS, RA, RB); /*0x0ca*/bind_instr(g1f_list, ADDZE, RD, RA, OE, RC); /*0x0d6*/bind_instr(g1f_list, STDCX_, RS, RA, RB); @@ -491,6 +492,7 @@ namespace PPU_instr /*0x0ea*/bind_instr(g1f_list, ADDME, RD, RA, OE, RC); /*0x0eb*/bind_instr(g1f_list, MULLW, RD, RA, RB, OE, RC); /*0x0f6*/bind_instr(g1f_list, DCBTST, TH, RA, RB); + /*0x0f7*/bind_instr(g1f_list, STBUX, RS, RA, RB); /*0x10a*/bind_instr(g1f_list, ADD, RD, RA, RB, OE, RC); /*0x116*/bind_instr(g1f_list, DCBT, RA, RB, TH); /*0x117*/bind_instr(g1f_list, LHZX, RD, RA, RB); @@ -508,6 +510,7 @@ namespace PPU_instr /*0x197*/bind_instr(g1f_list, STHX, RS, RA, RB); /*0x19c*/bind_instr(g1f_list, ORC, RA, RS, RB, RC); /*0x1b6*/bind_instr(g1f_list, ECOWX, RS, RA, RB); + /*0x1b7*/bind_instr(g1f_list, STHUX, RS, RA, RB); /*0x1bc*/bind_instr(g1f_list, OR, RA, RS, RB, RC); /*0x1c9*/bind_instr(g1f_list, DIVDU, RD, RA, RB, OE, RC); /*0x1cb*/bind_instr(g1f_list, DIVWU, RD, RA, RB, OE, RC); diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index b6b54d4302..970b7de510 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -92,8 +92,8 @@ private: const int fpc = _fpclass(v); #ifdef __GNUG__ - if(fpc == FP_SUBNORMAL) - return signbit(v) ? -0.0f : 0.0f; + if(fpc == FP_SUBNORMAL) + return signbit(v) ? -0.0f : 0.0f; #else if(fpc & _FPCLASS_ND) return -0.0f; if(fpc & _FPCLASS_PD) return 0.0f; @@ -2650,6 +2650,12 @@ private: Memory.Write64(addr, CPU.GPR[rs]); CPU.GPR[ra] = addr; } + void STWUX(u32 rs, u32 ra, u32 rb) + { + const u64 addr = CPU.GPR[ra] + CPU.GPR[rb]; + Memory.Write32(addr, CPU.GPR[rs]); + CPU.GPR[ra] = addr; + } void STVEWX(u32 vs, u32 ra, u32 rb) { const u64 addr = (ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]) & ~3ULL; @@ -2719,6 +2725,12 @@ private: { //UNK("dcbtst", false); } + void STBUX(u32 rs, u32 ra, u32 rb) + { + const u64 addr = CPU.GPR[ra] + CPU.GPR[rb]; + Memory.Write8(addr, CPU.GPR[rs]); + CPU.GPR[ra] = addr; + } void ADD(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) { const u64 RA = CPU.GPR[ra]; @@ -2807,6 +2819,12 @@ private: //HACK! Memory.Write32((ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]), CPU.GPR[rs]); } + void STHUX(u32 rs, u32 ra, u32 rb) + { + const u64 addr = CPU.GPR[ra] + CPU.GPR[rb]; + Memory.Write16(addr, CPU.GPR[rs]); + CPU.GPR[ra] = addr; + } void OR(u32 ra, u32 rs, u32 rb, bool rc) { CPU.GPR[ra] = CPU.GPR[rs] | CPU.GPR[rb]; diff --git a/rpcs3/Emu/Cell/PPUOpcodes.h b/rpcs3/Emu/Cell/PPUOpcodes.h index 2f10abcfa1..219d63d7a8 100644 --- a/rpcs3/Emu/Cell/PPUOpcodes.h +++ b/rpcs3/Emu/Cell/PPUOpcodes.h @@ -256,7 +256,7 @@ namespace PPU_opcodes { CMP = 0x000, TW = 0x004, - LVSL = 0x006, //Load Vector for Shift Left + LVSL = 0x006, //Load Vector for Shift Left LVEBX = 0x007, //Load Vector Element Byte Indexed SUBFC = 0x008, //Subtract from Carrying MULHDU = 0x009, @@ -297,6 +297,7 @@ namespace PPU_opcodes STWX = 0x097, STVEHX = 0x0a7, //Store Vector Element Halfword Indexed STDUX = 0x0b5, + STWUX = 0x0b7, STVEWX = 0x0c7, //Store Vector Element Word Indexed ADDZE = 0x0ca, STDCX_ = 0x0d6, @@ -306,6 +307,7 @@ namespace PPU_opcodes ADDME = 0x0ea, MULLW = 0x0eb, DCBTST = 0x0f6, + STBUX = 0x0f7, DOZ = 0x108, ADD = 0x10a, DCBT = 0x116, @@ -324,6 +326,7 @@ namespace PPU_opcodes STHX = 0x197, //Store Halfword Indexed ORC = 0x19c, //OR with Complement ECOWX = 0x1b6, + STHUX = 0x1b7, OR = 0x1bc, DIVDU = 0x1c9, DIVWU = 0x1cb, @@ -678,6 +681,7 @@ public: virtual void STWX(u32 rs, u32 ra, u32 rb) = 0; virtual void STVEHX(u32 vs, u32 ra, u32 rb) = 0; virtual void STDUX(u32 rs, u32 ra, u32 rb) = 0; + virtual void STWUX(u32 rs, u32 ra, u32 rb) = 0; virtual void STVEWX(u32 vs, u32 ra, u32 rb) = 0; virtual void ADDZE(u32 rd, u32 ra, u32 oe, bool rc) = 0; virtual void STDCX_(u32 rs, u32 ra, u32 rb) = 0; @@ -687,6 +691,7 @@ public: virtual void ADDME(u32 rd, u32 ra, u32 oe, bool rc) = 0; virtual void MULLW(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0; virtual void DCBTST(u32 th, u32 ra, u32 rb) = 0; + virtual void STBUX(u32 rs, u32 ra, u32 rb) = 0; virtual void ADD(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0; virtual void DCBT(u32 ra, u32 rb, u32 th) = 0; virtual void LHZX(u32 rd, u32 ra, u32 rb) = 0; @@ -704,6 +709,7 @@ public: virtual void STHX(u32 rs, u32 ra, u32 rb) = 0; virtual void ORC(u32 rs, u32 ra, u32 rb, bool rc) = 0; virtual void ECOWX(u32 rs, u32 ra, u32 rb) = 0; + virtual void STHUX(u32 rs, u32 ra, u32 rb) = 0; virtual void OR(u32 ra, u32 rs, u32 rb, bool rc) = 0; virtual void DIVDU(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0; virtual void DIVWU(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0; diff --git a/rpcs3/Emu/SysCalls/Modules/cellAudio.cpp b/rpcs3/Emu/SysCalls/Modules/cellAudio.cpp index 1c72cbcae2..0b33d9eedf 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellAudio.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellAudio.cpp @@ -8,74 +8,74 @@ Module cellAudio(0x0011, cellAudio_init); enum { //libaudio Error Codes - CELL_AUDIO_ERROR_ALREADY_INIT = 0x80310701, - CELL_AUDIO_ERROR_AUDIOSYSTEM = 0x80310702, - CELL_AUDIO_ERROR_NOT_INIT = 0x80310703, - CELL_AUDIO_ERROR_PARAM = 0x80310704, - CELL_AUDIO_ERROR_PORT_FULL = 0x80310705, - CELL_AUDIO_ERROR_PORT_ALREADY_RUN = 0x80310706, - CELL_AUDIO_ERROR_PORT_NOT_OPEN = 0x80310707, - CELL_AUDIO_ERROR_PORT_NOT_RUN = 0x80310708, - CELL_AUDIO_ERROR_TRANS_EVENT = 0x80310709, - CELL_AUDIO_ERROR_PORT_OPEN = 0x8031070a, - CELL_AUDIO_ERROR_SHAREDMEMORY = 0x8031070b, - CELL_AUDIO_ERROR_MUTEX = 0x8031070c, - CELL_AUDIO_ERROR_EVENT_QUEUE = 0x8031070d, - CELL_AUDIO_ERROR_AUDIOSYSTEM_NOT_FOUND = 0x8031070e, + CELL_AUDIO_ERROR_ALREADY_INIT = 0x80310701, + CELL_AUDIO_ERROR_AUDIOSYSTEM = 0x80310702, + CELL_AUDIO_ERROR_NOT_INIT = 0x80310703, + CELL_AUDIO_ERROR_PARAM = 0x80310704, + CELL_AUDIO_ERROR_PORT_FULL = 0x80310705, + CELL_AUDIO_ERROR_PORT_ALREADY_RUN = 0x80310706, + CELL_AUDIO_ERROR_PORT_NOT_OPEN = 0x80310707, + CELL_AUDIO_ERROR_PORT_NOT_RUN = 0x80310708, + CELL_AUDIO_ERROR_TRANS_EVENT = 0x80310709, + CELL_AUDIO_ERROR_PORT_OPEN = 0x8031070a, + CELL_AUDIO_ERROR_SHAREDMEMORY = 0x8031070b, + CELL_AUDIO_ERROR_MUTEX = 0x8031070c, + CELL_AUDIO_ERROR_EVENT_QUEUE = 0x8031070d, + CELL_AUDIO_ERROR_AUDIOSYSTEM_NOT_FOUND = 0x8031070e, CELL_AUDIO_ERROR_TAG_NOT_FOUND = 0x8031070f, //libmixer Error Codes - CELL_LIBMIXER_ERROR_NOT_INITIALIZED = 0x80310002, - CELL_LIBMIXER_ERROR_INVALID_PARAMATER = 0x80310003, + CELL_LIBMIXER_ERROR_NOT_INITIALIZED = 0x80310002, + CELL_LIBMIXER_ERROR_INVALID_PARAMATER = 0x80310003, CELL_LIBMIXER_ERROR_NO_MEMORY = 0x80310005, - CELL_LIBMIXER_ERROR_ALREADY_EXIST = 0x80310006, + CELL_LIBMIXER_ERROR_ALREADY_EXIST = 0x80310006, CELL_LIBMIXER_ERROR_FULL = 0x80310007, - CELL_LIBMIXER_ERROR_NOT_EXIST = 0x80310008, - CELL_LIBMIXER_ERROR_TYPE_MISMATCH = 0x80310009, - CELL_LIBMIXER_ERROR_NOT_FOUND = 0x8031000a, + CELL_LIBMIXER_ERROR_NOT_EXIST = 0x80310008, + CELL_LIBMIXER_ERROR_TYPE_MISMATCH = 0x80310009, + CELL_LIBMIXER_ERROR_NOT_FOUND = 0x8031000a, //libsnd3 Error Codes - CELL_SND3_ERROR_PARAM = 0x80310301, - CELL_SND3_ERROR_CREATE_MUTEX = 0x80310302, - CELL_SND3_ERROR_SYNTH = 0x80310303, - CELL_SND3_ERROR_ALREADY = 0x80310304, + CELL_SND3_ERROR_PARAM = 0x80310301, + CELL_SND3_ERROR_CREATE_MUTEX = 0x80310302, + CELL_SND3_ERROR_SYNTH = 0x80310303, + CELL_SND3_ERROR_ALREADY = 0x80310304, CELL_SND3_ERROR_NOTINIT = 0x80310305, - CELL_SND3_ERROR_SMFFULL = 0x80310306, - CELL_SND3_ERROR_HD3ID = 0x80310307, - CELL_SND3_ERROR_SMF = 0x80310308, - CELL_SND3_ERROR_SMFCTX = 0x80310309, - CELL_SND3_ERROR_FORMAT = 0x8031030a, - CELL_SND3_ERROR_SMFID = 0x8031030b, + CELL_SND3_ERROR_SMFFULL = 0x80310306, + CELL_SND3_ERROR_HD3ID = 0x80310307, + CELL_SND3_ERROR_SMF = 0x80310308, + CELL_SND3_ERROR_SMFCTX = 0x80310309, + CELL_SND3_ERROR_FORMAT = 0x8031030a, + CELL_SND3_ERROR_SMFID = 0x8031030b, CELL_SND3_ERROR_SOUNDDATAFULL = 0x8031030c, - CELL_SND3_ERROR_VOICENUM = 0x8031030d, - CELL_SND3_ERROR_RESERVEDVOICE = 0x8031030e, - CELL_SND3_ERROR_REQUESTQUEFULL = 0x8031030f, - CELL_SND3_ERROR_OUTPUTMODE = 0x80310310, + CELL_SND3_ERROR_VOICENUM = 0x8031030d, + CELL_SND3_ERROR_RESERVEDVOICE = 0x8031030e, + CELL_SND3_ERROR_REQUESTQUEFULL = 0x8031030f, + CELL_SND3_ERROR_OUTPUTMODE = 0x80310310, //libsynt2 Error Codes - CELL_SOUND_SYNTH2_ERROR_FATAL = 0x80310201, - CELL_SOUND_SYNTH2_ERROR_INVALID_PARAMETER = 0x80310202, - CELL_SOUND_SYNTH2_ERROR_ALREADY_INITIALIZED = 0x80310203, + CELL_SOUND_SYNTH2_ERROR_FATAL = 0x80310201, + CELL_SOUND_SYNTH2_ERROR_INVALID_PARAMETER = 0x80310202, + CELL_SOUND_SYNTH2_ERROR_ALREADY_INITIALIZED = 0x80310203, }; //libaudio datatypes struct CellAudioPortParam { - u64 nChannel; - u64 nBlock; - u64 attr; - float level; + be_t nChannel; + be_t nBlock; + be_t attr; + be_t level; }; struct CellAudioPortConfig { - u32 readIndexAddr; - u32 status; - u64 nChannel; - u64 nBlock; - u32 portSize; - u32 portAddr; + be_t readIndexAddr; + be_t status; + be_t nChannel; + be_t nBlock; + be_t portSize; + be_t portAddr; }; CellAudioPortParam current_AudioPortParam; @@ -84,57 +84,57 @@ CellAudioPortConfig current_AudioPortConfig; //libmixer datatypes typedef void * CellAANHandle; -struct CellSSPlayerConfig +struct CellSSPlayerConfig { - u32 channels; - u32 outputMode; + u32 channels; + u32 outputMode; }; struct CellSSPlayerWaveParam { void *addr; - int format; - u32 samples; - u32 loopStartOffset; - u32 startOffset; + int format; + u32 samples; + u32 loopStartOffset; + u32 startOffset; }; struct CellSSPlayerCommonParam { - u32 loopMode; - u32 attackMode; + u32 loopMode; + u32 attackMode; }; struct CellSurMixerPosition { - float x; - float y; + float x; + float y; float z; }; struct CellSSPlayerRuntimeInfo { - float level; - float speed; + float level; + float speed; CellSurMixerPosition position; }; struct CellSurMixerConfig { - s32 priority; - u32 chStrips1; - u32 chStrips2; - u32 chStrips6; - u32 chStrips8; + s32 priority; + u32 chStrips1; + u32 chStrips2; + u32 chStrips6; + u32 chStrips8; }; struct CellSurMixerChStripParam { - u32 param; - void *attribute; - int dBSwitch; - float floatVal; - int intVal; + u32 param; + void *attribute; + int dBSwitch; + float floatVal; + int intVal; }; CellSSPlayerWaveParam current_SSPlayerWaveParam; @@ -152,10 +152,10 @@ struct CellSnd3SmfCtx struct CellSnd3KeyOnParam { - u8 vel; - u8 pan; - u8 panEx; - s32 addPitch; + u8 vel; + u8 pan; + u8 panEx; + s32 addPitch; }; struct CellSnd3VoiceBitCtx @@ -165,21 +165,21 @@ struct CellSnd3VoiceBitCtx struct CellSnd3RequestQueueCtx { - void *frontQueue; - u32 frontQueueSize; - void *rearQueue; - u32 rearQueueSize; + void *frontQueue; + u32 frontQueueSize; + void *rearQueue; + u32 rearQueueSize; }; //libsynt2 datatypes -struct CellSoundSynth2EffectAttr +struct CellSoundSynth2EffectAttr { - u16 core; - u16 mode; - s16 depth_L; - s16 depth_R; - u16 delay; - u16 feedback; + u16 core; + u16 mode; + s16 depth_L; + s16 depth_R; + u16 delay; + u16 feedback; }; // libaudio Functions @@ -205,7 +205,7 @@ int cellAudioQuit() bool g_is_audio_port_open = false; bool g_is_audio_port_start = false; -int cellAudioPortOpen() //CellAudioPortParam *audioParam, u32 *portNum +int cellAudioPortOpen(mem_ptr_t audioParam, mem32_t portNum) { UNIMPLEMENTED_FUNC(cellAudio); if(g_is_audio_port_open) return CELL_AUDIO_ERROR_PORT_OPEN; @@ -243,9 +243,18 @@ int cellAudioGetPortTimestamp() //u32 portNum, u64 tag, u64 *stamp return CELL_OK; } -int cellAudioGetPortConfig() //u32 portNum, CellAudioPortConfig *portConfig +int cellAudioGetPortConfig(mem32_t portNum, mem_ptr_t portConfig) { UNIMPLEMENTED_FUNC(cellAudio); + //TODO + portConfig->nBlock = 8; + portConfig->nChannel = 2; + portConfig->portSize = 256 * portConfig->nBlock * portConfig->nChannel; + portConfig->portAddr = Memory.Alloc(portConfig->portSize, 4); //WARNING: Memory leak. + portConfig->readIndexAddr = Memory.Alloc(8, 4); //WARNING: Memory leak. + portConfig->status = 2; + Memory.Write64(portConfig->readIndexAddr, 1); + return CELL_OK; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp b/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp index 66882aab96..a6d3c9eb97 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp @@ -125,6 +125,8 @@ int cellPngDecDestroy(u32 mainHandle) int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo) { + cellPngDec.Warning("cellPngDecOpen(mainHandle=0x%x,subHandle=0x%x,src_addr=0x%x,openInfo=0x%x)", mainHandle, subHandle.GetAddr(), src_addr, openInfo); + CellPngDecSrc* src; src = (CellPngDecSrc*)Memory.GetMemFromAddr(src_addr); @@ -134,12 +136,13 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo current_subHandle->fd = NULL; current_subHandle->src = *src; - switch(src->srcSelect.ToLE()) + switch(src->srcSelect.ToBE()) { - case CELL_PNGDEC_BUFFER: + case const_se_t::value: current_subHandle->fileSize = src->streamSize.ToLE(); break; - case CELL_PNGDEC_FILE: + + case const_se_t::value: // Get file descriptor MemoryAllocator> fd; int ret = cellFsOpen(src->fileName, 0, fd, NULL, 0); @@ -162,6 +165,8 @@ int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo int cellPngDecClose(u32 mainHandle, u32 subHandle) { + cellPngDec.Warning("cellPngDecClose(mainHandle=0x%x,subHandle=0x%x)", mainHandle, subHandle); + ID sub_handle_id_data; if(!cellPngDec.CheckId(subHandle, sub_handle_id_data)) return CELL_PNGDEC_ERROR_FATAL; @@ -176,7 +181,7 @@ int cellPngDecClose(u32 mainHandle, u32 subHandle) int cellPngDecReadHeader(u32 mainHandle, u32 subHandle, mem_ptr_t info) { - cellPngDec.Log("cellPngDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%llx)", mainHandle, subHandle, info.GetAddr()); + cellPngDec.Warning("cellPngDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info_addr=0x%llx)", mainHandle, subHandle, info.GetAddr()); ID sub_handle_id_data; if(!cellPngDec.CheckId(subHandle, sub_handle_id_data)) return CELL_PNGDEC_ERROR_FATAL; diff --git a/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp b/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp index e3bc93c238..18ff6343a6 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp @@ -476,7 +476,7 @@ int cellSysutilUnregisterCallback(int slot) return CELL_OK; } -int cellMsgDialogOpen2(u32 type, u32 msgString_addr, u32 callback_addr, u32 userData, u32 extParam) +int cellMsgDialogOpen2(u32 type, char* msgString, u32 callback_addr, u32 userData, u32 extParam) { long style = 0; @@ -498,7 +498,7 @@ int cellMsgDialogOpen2(u32 type, u32 msgString_addr, u32 callback_addr, u32 user style |= wxOK; } - int res = wxMessageBox(Memory.ReadString(msgString_addr), wxGetApp().GetAppName(), style); + int res = wxMessageBox(wxString(msgString, wxConvUTF8), wxGetApp().GetAppName(), style); u64 status; diff --git a/rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp b/rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp index fe473bb86f..21f39d886d 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp @@ -6,7 +6,7 @@ extern Module sys_fs; int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size) { - const wxString& path = Memory.ReadString(path_addr); + const wxString& path = wxString(Memory.ReadString(path_addr), wxConvUTF8); sys_fs.Log("cellFsOpen(path: %s, flags: 0x%x, fd_addr: 0x%x, arg_addr: 0x%x, size: 0x%llx)", path.mb_str(), flags, fd.GetAddr(), arg.GetAddr(), size); diff --git a/rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp b/rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp index 7ff708405c..087c0bff67 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp @@ -171,7 +171,7 @@ int cellPadGetInfo(u32 info_addr) { if(i >= pads.GetCount()) break; - info.status[i] = re(pads[i].m_port_status); + re(info.status[i], pads[i].m_port_status); info.product_id[i] = const_se_t::value; info.vendor_id[i] = const_se_t::value; } diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index f3903bcbea..368ac13a8e 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -201,7 +201,8 @@ void Emulator::Load() elf_path += "\\" + wxFileName(m_path).GetName() + ".elf"; } - DecryptSelf(elf_path, self_path); + if(!DecryptSelf(elf_path, self_path)) + return; m_path = elf_path; } @@ -312,7 +313,7 @@ void Emulator::Load() thread.SetEntry(l.GetEntry()); Memory.StackMem.Alloc(0x1000); thread.InitStack(); - thread.AddArgv(m_path); + thread.AddArgv(m_elf_path); //thread.AddArgv("-emu"); m_rsx_callback = Memory.MainMem.Alloc(4 * 4) + 4;