From b500fcbaedc5a1c2b386eda66ce2014a5eccda73 Mon Sep 17 00:00:00 2001 From: DH Date: Tue, 24 Dec 2013 05:58:32 +0200 Subject: [PATCH 1/3] Fixed ELF64 loader. Fixed cellPadGetInfo. Fixed cellFsOpen path encoding. Draft implementation of cellAudioGetPortConfig. Implemented STBUX, STHUX, STWUX. Improved Boot (S)ELF / Install PKG UI. --- rpcs3/Emu/Cell/PPUDisAsm.h | 12 ++ rpcs3/Emu/Cell/PPUInstrTable.h | 3 + rpcs3/Emu/Cell/PPUInterpreter.h | 22 ++- rpcs3/Emu/Cell/PPUOpcodes.h | 8 +- rpcs3/Emu/SysCalls/Modules/cellAudio.cpp | 183 +++++++++++---------- rpcs3/Emu/SysCalls/Modules/cellPngDec.cpp | 13 +- rpcs3/Emu/SysCalls/Modules/cellSysutil.cpp | 4 +- rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp | 2 +- rpcs3/Emu/SysCalls/lv2/SC_Pad.cpp | 2 +- rpcs3/Emu/System.cpp | 5 +- 10 files changed, 154 insertions(+), 100 deletions(-) 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; From 456374d487020933eae69fbeb063aece803de53e Mon Sep 17 00:00:00 2001 From: DH Date: Tue, 24 Dec 2013 06:02:21 +0200 Subject: [PATCH 2/3] Added missed files. --- rpcs3/Gui/MainFrame.cpp | 17 +++++++++++++---- rpcs3/Loader/ELF64.cpp | 15 +++++---------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index ea154ffc1b..a8c1bac8fc 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -218,7 +218,6 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event)) void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) { - //TODO: progress bar bool stopped = false; if(Emu.IsRunning()) @@ -227,7 +226,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) stopped = true; } - wxFileDialog ctrl (this, L"Select PKG", wxEmptyString, wxEmptyString, "*.pkg", + wxFileDialog ctrl (this, L"Select PKG", wxEmptyString, wxEmptyString, "PKG files (*.pkg)|*.pkg|All files (*.*)|*.*", wxFD_OPEN | wxFD_FILE_MUST_EXIST); if(ctrl.ShowModal() == wxID_CANCEL) @@ -241,7 +240,11 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) Emu.Stop(); wxString fileName = ctrl.GetPath(); - pkg_unpack((const char *)fileName.mb_str()); + + { + wxProgressDialog pdlg("Please wait", "Installing PKG...", 0, this, wxPD_APP_MODAL); + pkg_unpack((const char *)fileName.mb_str()); + } if (!wxRemoveFile(ctrl.GetPath()+".dec")) ConLog.Warning("Could not delete the decoded DEC file"); @@ -290,7 +293,13 @@ void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event)) stopped = true; } - wxFileDialog ctrl(this, L"Select (S)ELF", wxEmptyString, wxEmptyString, "*.*", + wxFileDialog ctrl(this, L"Select (S)ELF", wxEmptyString, wxEmptyString, + "(S)ELF files (*BOOT.BIN;*.elf;*.self)|*BOOT.BIN;*.elf;*.self" + "|ELF files (BOOT.BIN;*.elf)|BOOT.BIN;*.elf" + "|SELF files (EBOOT.BIN;*.self)|EBOOT.BIN;*.self" + "|BOOT files (*BOOT.BIN)|*BOOT.BIN" + "|BIN files (*.bin)|*.bin" + "|All files (*.*)|*.*", wxFD_OPEN | wxFD_FILE_MUST_EXIST); if(ctrl.ShowModal() == wxID_CANCEL) diff --git a/rpcs3/Loader/ELF64.cpp b/rpcs3/Loader/ELF64.cpp index f0406e0aea..94c5e57884 100644 --- a/rpcs3/Loader/ELF64.cpp +++ b/rpcs3/Loader/ELF64.cpp @@ -436,7 +436,7 @@ bool ELF64Loader::LoadShdrData(u64 offset) if(size == 0 || !Memory.IsGoodAddr(offset + addr, size)) continue; - if(shdr.sh_addr < min_addr) + if(shdr.sh_addr && shdr.sh_addr < min_addr) { min_addr = shdr.sh_addr; } @@ -455,18 +455,13 @@ bool ELF64Loader::LoadShdrData(u64 offset) switch(shdr.sh_type) { case SHT_NOBITS: - memset(&Memory[offset + addr], 0, size); + //ConLog.Warning("SHT_NOBITS: addr=0x%llx, size=0x%llx", offset + addr, size); + //memset(&Memory[offset + addr], 0, size); break; case SHT_PROGBITS: - /* - elf64_f.Seek(shdr.sh_offset); - elf64_f.Read(&Memory[addr], shdr.sh_size); - */ - break; - - case SHT_RELA: - ConLog.Warning("ELF64: RELA"); + //elf64_f.Seek(shdr.sh_offset); + //elf64_f.Read(&Memory[offset + addr], shdr.sh_size); break; } } From eb2ab73e1667b341604988d974c6c1f9f12fd8a2 Mon Sep 17 00:00:00 2001 From: DH Date: Tue, 24 Dec 2013 07:25:15 +0200 Subject: [PATCH 3/3] Implemented LWZUX, LWAX, LWAUX, LHA, LHAU, LWA, STWBRX, STHBRX. --- rpcs3/Emu/Cell/PPUDisAsm.h | 42 +++++++++++++++++++++++++++++---- rpcs3/Emu/Cell/PPUInstrTable.h | 9 +++++++ rpcs3/Emu/Cell/PPUInterpreter.h | 38 +++++++++++++++++++++++++++++ rpcs3/Emu/Cell/PPUOpcodes.h | 14 +++++++++++ 4 files changed, 98 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUDisAsm.h b/rpcs3/Emu/Cell/PPUDisAsm.h index f071b88a2b..2011dcff32 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.h +++ b/rpcs3/Emu/Cell/PPUDisAsm.h @@ -1291,7 +1291,7 @@ private: } void SUBF(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) { - DisAsm_R3_OE_RC("subf", rd, ra, rb, oe, rc); + DisAsm_R3_OE_RC("subf", rd, ra, rb, oe, rc); } void LDUX(u32 rd, u32 ra, u32 rb) { @@ -1301,6 +1301,10 @@ private: { DisAsm_R2("dcbst", ra, rb); } + void LWZUX(u32 rd, u32 ra, u32 rb) + { + DisAsm_R3("lwzux", rd, ra, rb); + } void CNTLZD(u32 ra, u32 rs, bool rc) { DisAsm_R2_RC("cntlzd", ra, rs, rc); @@ -1482,6 +1486,10 @@ private: default: DisAsm_R1_IMM("mfspr", rd, spr); break; } } + void LWAX(u32 rd, u32 ra, u32 rb) + { + DisAsm_R3("lwax", rd, ra, rb); + } void DST(u32 ra, u32 rb, u32 strm, u32 t) { if(t) @@ -1511,6 +1519,10 @@ private: default: DisAsm_R1_IMM("mftb", rd, spr); break; } } + void LWAUX(u32 rd, u32 ra, u32 rb) + { + DisAsm_R3("lwaux", rd, ra, rb); + } void DSTST(u32 ra, u32 rb, u32 strm, u32 t) { if(t) @@ -1630,9 +1642,13 @@ private: { DisAsm_F1_R2("lfdux", frd, ra, rb); } - void STVLX(u32 sd, u32 ra, u32 rb) + void STVLX(u32 vs, u32 ra, u32 rb) { - DisAsm_V1_R2("stvlx", sd, ra, rb); + DisAsm_V1_R2("stvlx", vs, ra, rb); + } + void STWBRX(u32 rs, u32 ra, u32 rb) + { + DisAsm_R3("stwbrx", rs, ra, rb); } void STFSX(u32 frs, u32 ra, u32 rb) { @@ -1693,9 +1709,13 @@ private: { Write("eieio"); } - void STVLXL(u32 sd, u32 ra, u32 rb) + void STVLXL(u32 vs, u32 ra, u32 rb) { - DisAsm_V1_R2("stvlxl", sd, ra, rb); + DisAsm_V1_R2("stvlxl", vs, ra, rb); + } + void STHBRX(u32 rs, u32 ra, u32 rb) + { + DisAsm_R3("sthbrx", rs, ra, rb); } void EXTSH(u32 ra, u32 rs, bool rc) { @@ -1762,6 +1782,14 @@ private: { DisAsm_R2_IMM("lhzu", rs, ra, d); } + void LHA(u32 rs, u32 ra, s32 d) + { + DisAsm_R2_IMM("lha", rs, ra, d); + } + void LHAU(u32 rs, u32 ra, s32 d) + { + DisAsm_R2_IMM("lhau", rs, ra, d); + } void STH(u32 rs, u32 ra, s32 d) { DisAsm_R2_IMM("sth", rs, ra, d); @@ -1818,6 +1846,10 @@ private: { DisAsm_R2_IMM("ldu", rd, ra, ds); } + void LWA(u32 rd, u32 ra, s32 ds) + { + DisAsm_R2_IMM("lwa", rd, ra, ds); + } void FDIVS(u32 frd, u32 fra, u32 frb, bool rc) { DisAsm_F3_RC("fdivs", frd, fra, frb, rc); diff --git a/rpcs3/Emu/Cell/PPUInstrTable.h b/rpcs3/Emu/Cell/PPUInstrTable.h index 3ca379c35d..c7b90aede8 100644 --- a/rpcs3/Emu/Cell/PPUInstrTable.h +++ b/rpcs3/Emu/Cell/PPUInstrTable.h @@ -250,6 +250,8 @@ namespace PPU_instr bind_instr(main_list, STBU, RS, RA, D); bind_instr(main_list, LHZ, RD, RA, D); bind_instr(main_list, LHZU, RD, RA, D); + bind_instr(main_list, LHA, RD, RA, D); + bind_instr(main_list, LHAU, RD, RA, D); bind_instr(main_list, STH, RS, RA, D); bind_instr(main_list, STHU, RS, RA, D); bind_instr(main_list, LMW, RD, RA, D); @@ -460,7 +462,9 @@ namespace PPU_instr /*0x026*/bind_instr(g1f_list, LVSR, VD, RA, RB); /*0x027*/bind_instr(g1f_list, LVEHX, VD, RA, RB); /*0x028*/bind_instr(g1f_list, SUBF, RD, RA, RB, OE, RC); + /*0x035*/bind_instr(g1f_list, LDUX, RD, RA, RB); /*0x036*/bind_instr(g1f_list, DCBST, RA, RB); + /*0x037*/bind_instr(g1f_list, LWZUX, RD, RA, RB); /*0x03a*/bind_instr(g1f_list, CNTLZD, RA, RS, RC); /*0x03c*/bind_instr(g1f_list, ANDC, RA, RS, RB, RC); /*0x047*/bind_instr(g1f_list, LVEWX, VD, RA, RB); @@ -501,10 +505,12 @@ namespace PPU_instr /*0x137*/bind_instr(g1f_list, LHZUX, RD, RA, RB); /*0x13c*/bind_instr(g1f_list, XOR, RA, RS, RB, RC); /*0x153*/bind_instr(g1f_list, MFSPR, RD, SPR); + /*0x155*/bind_instr(g1f_list, LWAX, RD, RA, RB); /*0x156*/bind_instr(g1f_list, DST, RA, RB, STRM, L_6); /*0x157*/bind_instr(g1f_list, LHAX, RD, RA, RB); /*0x167*/bind_instr(g1f_list, LVXL, VD, RA, RB); /*0x173*/bind_instr(g1f_list, MFTB, RD, SPR); + /*0x175*/bind_instr(g1f_list, LWAUX, RD, RA, RB); /*0x176*/bind_instr(g1f_list, DSTST, RA, RB, STRM, L_6); /*0x177*/bind_instr(g1f_list, LHAUX, RD, RA, RB); /*0x197*/bind_instr(g1f_list, STHX, RS, RA, RB); @@ -531,6 +537,7 @@ namespace PPU_instr /*0x257*/bind_instr(g1f_list, LFDX, FRD, RA, RB); /*0x277*/bind_instr(g1f_list, LFDUX, FRD, RA, RB); /*0x287*/bind_instr(g1f_list, STVLX, VS, RA, RB); + /*0x296*/bind_instr(g1f_list, STWBRX, RS, RA, RB); /*0x297*/bind_instr(g1f_list, STFSX, FRS, RA, RB); /*0x2a7*/bind_instr(g1f_list, STVRX, VS, RA, RB); /*0x2d7*/bind_instr(g1f_list, STFDX, FRS, RA, RB); @@ -545,6 +552,7 @@ namespace PPU_instr /*0x33b*/bind_instr(g1f_list, SRADI2, RA, RS, sh, RC); /*0x356*/bind_instr(g1f_list, EIEIO); /*0x387*/bind_instr(g1f_list, STVLXL, VS, RA, RB); + /*0x396*/bind_instr(g1f_list, STHBRX, RS, RA, RB); /*0x39a*/bind_instr(g1f_list, EXTSH, RA, RS, RC); /*0x387*/bind_instr(g1f_list, STVRXL, VS, RA, RB); /*0x3ba*/bind_instr(g1f_list, EXTSB, RA, RS, RC); @@ -555,6 +563,7 @@ namespace PPU_instr bind_instr(g3a_list, LD, RD, RA, DS); bind_instr(g3a_list, LDU, RD, RA, DS); + bind_instr(g3a_list, LWA, RD, RA, DS); bind_instr(g3b_list, FDIVS, FRD, FRA, FRB, RC); bind_instr(g3b_list, FSUBS, FRD, FRA, FRB, RC); diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index 970b7de510..485c055cfa 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -2452,6 +2452,12 @@ private: { //UNK("dcbst", false); } + void LWZUX(u32 rd, u32 ra, u32 rb) + { + const u64 addr = CPU.GPR[ra] + CPU.GPR[rb]; + CPU.GPR[rd] = Memory.Read32(addr); + CPU.GPR[ra] = addr; + } void CNTLZD(u32 ra, u32 rs, bool rc) { u32 i; @@ -2773,6 +2779,10 @@ private: { CPU.GPR[rd] = GetRegBySPR(spr); } + void LWAX(u32 rd, u32 ra, u32 rb) + { + CPU.GPR[rd] = (s64)(s32)Memory.Read32(ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]); + } void DST(u32 ra, u32 rb, u32 strm, u32 t) { } @@ -2795,6 +2805,12 @@ private: default: UNK(wxString::Format("mftb r%d, %d", rd, spr)); break; } } + void LWAUX(u32 rd, u32 ra, u32 rb) + { + const u64 addr = ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]; + CPU.GPR[rd] = (s64)(s32)Memory.Read32(addr); + CPU.GPR[ra] = addr; + } void DSTST(u32 ra, u32 rb, u32 strm, u32 t) { } @@ -2981,6 +2997,10 @@ private: Memory.WriteLeft(addr, 16 - eb, CPU.VPR[vs]._u8 + eb); } + void STWBRX(u32 rs, u32 ra, u32 rb) + { + (u32&)Memory[ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]] = CPU.GPR[rs]; + } void STFSX(u32 frs, u32 ra, u32 rb) { Memory.Write32((ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]), CPU.FPR[frs].To32()); @@ -3065,6 +3085,10 @@ private: Memory.WriteLeft(addr, 16 - eb, CPU.VPR[vs]._u8 + eb); } + void STHBRX(u32 rs, u32 ra, u32 rb) + { + (u16&)Memory[ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]] = CPU.GPR[rs]; + } void EXTSH(u32 ra, u32 rs, bool rc) { CPU.GPR[ra] = (s64)(s16)CPU.GPR[rs]; @@ -3146,6 +3170,16 @@ private: CPU.GPR[rd] = Memory.Read16(addr); CPU.GPR[ra] = addr; } + void LHA(u32 rd, u32 ra, s32 d) + { + CPU.GPR[rd] = (s64)(s16)Memory.Read16(ra ? CPU.GPR[ra] + d : d); + } + void LHAU(u32 rd, u32 ra, s32 d) + { + const u64 addr = CPU.GPR[ra] + d; + CPU.GPR[rd] = (s64)(s16)Memory.Read16(addr); + CPU.GPR[ra] = addr; + } void STH(u32 rs, u32 ra, s32 d) { Memory.Write16(ra ? CPU.GPR[ra] + d : d, CPU.GPR[rs]); @@ -3225,6 +3259,10 @@ private: CPU.GPR[rd] = Memory.Read64(addr); CPU.GPR[ra] = addr; } + void LWA(u32 rd, u32 ra, s32 ds) + { + CPU.GPR[rd] = (s64)(s32)Memory.Read32(ra ? CPU.GPR[ra] + ds : ds); + } void FDIVS(u32 frd, u32 fra, u32 frb, bool rc) { if(FPRdouble::IsNaN(CPU.FPR[fra])) diff --git a/rpcs3/Emu/Cell/PPUOpcodes.h b/rpcs3/Emu/Cell/PPUOpcodes.h index 219d63d7a8..71a8d3b2f1 100644 --- a/rpcs3/Emu/Cell/PPUOpcodes.h +++ b/rpcs3/Emu/Cell/PPUOpcodes.h @@ -276,6 +276,7 @@ namespace PPU_opcodes SUBF = 0x028, LDUX = 0x035, //Load Doubleword with Update Indexed DCBST = 0x036, + LWZUX = 0x037, CNTLZD = 0x03a, ANDC = 0x03c, LVEWX = 0x047, //Load Vector Element Word Indexed @@ -317,10 +318,12 @@ namespace PPU_opcodes LHZUX = 0x137, XOR = 0x13c, MFSPR = 0x153, + LWAX = 0x155, DST = 0x156, //Data Stream Touch LHAX = 0x157, LVXL = 0x167, //Load Vector Indexed Last MFTB = 0x173, + LWAUX = 0x175, DSTST = 0x176, //Data Stream Touch for Store LHAUX = 0x177, STHX = 0x197, //Store Halfword Indexed @@ -347,6 +350,7 @@ namespace PPU_opcodes LFDX = 0x257, LFDUX = 0x277, STVLX = 0x287, //Store Vector Left Indexed + STWBRX = 0x296, STFSX = 0x297, STVRX = 0x2a7, //Store Vector Right Indexed STFDX = 0x2d7, //Store Floating-Point Double Indexed @@ -361,6 +365,7 @@ namespace PPU_opcodes SRADI2 = 0x33b, //sh_5 != 0 EIEIO = 0x356, STVLXL = 0x387, //Store Vector Left Indexed Last + STHBRX = 0x396, EXTSH = 0x39a, STVRXL = 0x3a7, //Store Vector Right Indexed Last EXTSB = 0x3ba, @@ -374,6 +379,7 @@ namespace PPU_opcodes { LD = 0x0, LDU = 0x1, + LWA = 0x2, }; enum G_3bOpcodes //Field 26 - 30 @@ -660,6 +666,7 @@ public: virtual void SUBF(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0; virtual void LDUX(u32 rd, u32 ra, u32 rb) = 0; virtual void DCBST(u32 ra, u32 rb) = 0; + virtual void LWZUX(u32 rd, u32 ra, u32 rb) = 0; virtual void CNTLZD(u32 ra, u32 rs, bool rc) = 0; virtual void ANDC(u32 ra, u32 rs, u32 rb, bool rc) = 0; virtual void LVEWX(u32 vd, u32 ra, u32 rb) = 0; @@ -700,10 +707,12 @@ public: virtual void LHZUX(u32 rd, u32 ra, u32 rb) = 0; virtual void XOR(u32 rs, u32 ra, u32 rb, bool rc) = 0; virtual void MFSPR(u32 rd, u32 spr) = 0; + virtual void LWAX(u32 rd, u32 ra, u32 rb) = 0; virtual void DST(u32 ra, u32 rb, u32 strm, u32 t) = 0; virtual void LHAX(u32 rd, u32 ra, u32 rb) = 0; virtual void LVXL(u32 vd, u32 ra, u32 rb) = 0; virtual void MFTB(u32 rd, u32 spr) = 0; + virtual void LWAUX(u32 rd, u32 ra, u32 rb) = 0; virtual void DSTST(u32 ra, u32 rb, u32 strm, u32 t) = 0; virtual void LHAUX(u32 rd, u32 ra, u32 rb) = 0; virtual void STHX(u32 rs, u32 ra, u32 rb) = 0; @@ -730,6 +739,7 @@ public: virtual void LFDX(u32 frd, u32 ra, u32 rb) = 0; virtual void LFDUX(u32 frd, u32 ra, u32 rb) = 0; virtual void STVLX(u32 vs, u32 ra, u32 rb) = 0; + virtual void STWBRX(u32 rs, u32 ra, u32 rb) = 0; virtual void STFSX(u32 frs, u32 ra, u32 rb) = 0; virtual void STVRX(u32 vs, u32 ra, u32 rb) = 0; virtual void STFDX(u32 frs, u32 ra, u32 rb) = 0; @@ -744,6 +754,7 @@ public: virtual void SRADI2(u32 ra, u32 rs, u32 sh, bool rc) = 0; virtual void EIEIO() = 0; virtual void STVLXL(u32 vs, u32 ra, u32 rb) = 0; + virtual void STHBRX(u32 rs, u32 ra, u32 rb) = 0; virtual void EXTSH(u32 ra, u32 rs, bool rc) = 0; virtual void STVRXL(u32 sd, u32 ra, u32 rb) = 0; virtual void EXTSB(u32 ra, u32 rs, bool rc) = 0; @@ -761,6 +772,8 @@ public: virtual void STBU(u32 rs, u32 ra, s32 d) = 0; virtual void LHZ(u32 rd, u32 ra, s32 d) = 0; virtual void LHZU(u32 rd, u32 ra, s32 d) = 0; + virtual void LHA(u32 rs, u32 ra, s32 d) = 0; + virtual void LHAU(u32 rs, u32 ra, s32 d) = 0; virtual void STH(u32 rs, u32 ra, s32 d) = 0; virtual void STHU(u32 rs, u32 ra, s32 d) = 0; virtual void LMW(u32 rd, u32 ra, s32 d) = 0; @@ -775,6 +788,7 @@ public: virtual void STFDU(u32 frs, u32 ra, s32 d) = 0; virtual void LD(u32 rd, u32 ra, s32 ds) = 0; virtual void LDU(u32 rd, u32 ra, s32 ds) = 0; + virtual void LWA(u32 rd, u32 ra, s32 ds) = 0; virtual void FDIVS(u32 frd, u32 fra, u32 frb, bool rc) = 0; virtual void FSUBS(u32 frd, u32 fra, u32 frb, bool rc) = 0; virtual void FADDS(u32 frd, u32 fra, u32 frb, bool rc) = 0;