diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index ba436d5957..b0e9b5eb5d 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -10,21 +10,29 @@ if (CMAKE_COMPILER_IS_GNUCXX) endif() set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules) -SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../bin") +set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../bin") add_definitions(-DGL_GLEXT_PROTOTYPES) add_definitions(-DGLX_GLXEXT_PROTOTYPES) find_package(wxWidgets COMPONENTS core base net aui gl REQUIRED) +find_package(GLEW REQUIRED) find_package(OpenGL REQUIRED) -find_package(FFMPEG REQUIRED) find_package(ZLIB REQUIRED) +find_package(OpenAL REQUIRED) include("${wxWidgets_USE_FILE}") +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(PLATFORM_ARCH "linux/x86_64") +else() + set(PLATFORM_ARCH "linux/x86") +endif() + include_directories( ${wxWidgets_INCLUDE_DIRS} -${FFMPEG_INCLUDE_DIR} +${OPENAL_INCLUDE_DIR} +${CMAKE_SOURCE_DIR}/../ffmpeg/${PLATFORM_ARCH}/include ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/Emu ${CMAKE_SOURCE_DIR}/Gui @@ -33,6 +41,8 @@ ${CMAKE_SOURCE_DIR}/Crypto ${CMAKE_SOURCE_DIR}/.. ) +link_directories(${CMAKE_SOURCE_DIR}/../ffmpeg/${PLATFORM_ARCH}/lib) + file( GLOB_RECURSE RPCS3_SRC @@ -48,5 +58,5 @@ ${CMAKE_SOURCE_DIR}/../Utilities/* add_executable(rpcs3 ${RPCS3_SRC}) -target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES}) +target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES} libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a ${ZLIB_LIBRARIES}) diff --git a/rpcs3/Emu/Audio/AL/OpenALThread.cpp b/rpcs3/Emu/Audio/AL/OpenALThread.cpp index e4a461171a..c5255988b6 100644 --- a/rpcs3/Emu/Audio/AL/OpenALThread.cpp +++ b/rpcs3/Emu/Audio/AL/OpenALThread.cpp @@ -4,8 +4,8 @@ ALenum g_last_al_error = AL_NO_ERROR; ALCenum g_last_alc_error = ALC_NO_ERROR; -ALCdevice* pDevice; -ALCcontext* pContext; +#define checkForAlError(sit) if((g_last_al_error = alGetError()) != AL_NO_ERROR) printAlError(g_last_al_error, sit) +#define checkForAlcError(sit) if((g_last_alc_error = alcGetError(m_device)) != ALC_NO_ERROR) printAlcError(g_last_alc_error, sit) void printAlError(ALenum err, const char* situation) { @@ -25,120 +25,124 @@ void printAlcError(ALCenum err, const char* situation) } } +OpenALThread::~OpenALThread() +{ + Quit(); +} + void OpenALThread::Init() { - pDevice = alcOpenDevice(NULL); + m_device = alcOpenDevice(nullptr); checkForAlcError("alcOpenDevice"); - pContext = alcCreateContext(pDevice, NULL); + m_context = alcCreateContext(m_device, nullptr); checkForAlcError("alcCreateContext"); - alcMakeContextCurrent(pContext); + alcMakeContextCurrent(m_context); checkForAlcError("alcMakeContextCurrent"); } void OpenALThread::Quit() { - for (SampleBuffer::iterator i = mBuffers.begin(); i != mBuffers.end(); i++) - alDeleteBuffers(1, &i->second.mBufferID); - - alcMakeContextCurrent(NULL); - alcDestroyContext(pContext); - alcCloseDevice(pDevice); + alcMakeContextCurrent(nullptr); + alcDestroyContext(m_context); + alcCloseDevice(m_device); } void OpenALThread::Play() { - alSourcePlay(mSource); - checkForAlError("alSourcePlay"); + ALint state; + alGetSourcei(m_source, AL_SOURCE_STATE, &state); + checkForAlError("alGetSourcei"); + + if(state != AL_PLAYING) + { + alSourcePlay(m_source); + checkForAlError("alSourcePlay"); + } } void OpenALThread::Close() { - alSourceStop(mSource); + alSourceStop(m_source); checkForAlError("alSourceStop"); - if (alIsSource(mSource)) - alDeleteSources(1, &mSource); + if (alIsSource(m_source)) + alDeleteSources(1, &m_source); + + alDeleteBuffers(g_al_buffers_count, m_buffers); + checkForAlError("alDeleteBuffers"); } void OpenALThread::Stop() { - alSourceStop(mSource); + alSourceStop(m_source); checkForAlError("alSourceStop"); } void OpenALThread::Open(const void* src, ALsizei size) { - alGenSources(1, &mSource); + alGenSources(1, &m_source); checkForAlError("alGenSources"); - alSourcei(mSource, AL_LOOPING, AL_FALSE); + alGenBuffers(g_al_buffers_count, m_buffers); + checkForAlError("alGenBuffers"); + + alSourcei(m_source, AL_LOOPING, AL_FALSE); checkForAlError("alSourcei"); - mProcessed = 0; - mBuffer.mFreq = 48000; - mBuffer.mFormat = AL_FORMAT_STEREO16; + m_buffer_size = size; - for (int i = 0; i < NUM_OF_BUFFERS; i++) + for(uint i=0; i 0) - { - alBufferData(bufferID, mBuffers[bufferID].mFormat, mTempBuffer, - TotalRet, mBuffers[bufferID].mFreq); + alBufferData(buffer_id, AL_FORMAT_STEREO16, src, size, 48000); checkForAlError("alBufferData"); - } - return (ret > 0); + return true; } \ No newline at end of file diff --git a/rpcs3/Emu/Audio/AL/OpenALThread.h b/rpcs3/Emu/Audio/AL/OpenALThread.h index 62a16c42f6..cf65d31919 100644 --- a/rpcs3/Emu/Audio/AL/OpenALThread.h +++ b/rpcs3/Emu/Audio/AL/OpenALThread.h @@ -2,49 +2,28 @@ #include "OpenAL/include/al.h" #include "OpenAL/include/alc.h" -#include - -extern ALenum g_last_al_error; -extern ALCenum g_last_alc_error; - -void printAlError(ALenum err, const char* situation); -void printAlcError(ALCenum err, const char* situation); - -#define checkForAlError(sit) if((g_last_al_error = alGetError()) != AL_NO_ERROR) printAlError(g_last_al_error, sit) -#define checkForAlcError(sit) if((g_last_alc_error = alcGetError(pDevice)) != ALC_NO_ERROR) printAlcError(g_last_alc_error, sit) - -struct SampleInfo -{ - uint mBufferID; - uint mFreq; - uint mFormat; -}; - -typedef std::map SampleBuffer; - -#define NUM_OF_BUFFERS 16 - - -extern ALCdevice* pDevice; -extern ALCcontext* pContext; class OpenALThread { private: - ALuint mSource; - SampleBuffer mBuffers; - SampleInfo mBuffer; - ALint mProcessed; - u16 mTempBuffer[512]; + static const uint g_al_buffers_count = 16; + + ALuint m_source; + ALuint m_buffers[g_al_buffers_count]; + ALCdevice* m_device; + ALCcontext* m_context; + u32 m_buffer_size; public: + ~OpenALThread(); + void Init(); void Quit(); void Play(); void Open(const void* src, ALsizei size); void Close(); void Stop(); - bool AddBlock(ALuint bufferID, ALsizei size, const void* src); + bool AddBlock(const ALuint buffer_id, ALsizei size, const void* src); void AddData(const void* src, ALsizei size); }; diff --git a/rpcs3/Emu/Cell/PPUDisAsm.h b/rpcs3/Emu/Cell/PPUDisAsm.h index a5cbf1775b..218c1baf57 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.h +++ b/rpcs3/Emu/Cell/PPUDisAsm.h @@ -1606,6 +1606,10 @@ private: { DisAsm_V1_R2("lvlx", vd, ra, rb); } + void LDBRX(u32 rd, u32 ra, u32 rb) + { + DisAsm_R3("ldbrx", rd, ra, rb); + } void LWBRX(u32 rd, u32 ra, u32 rb) { DisAsm_R3("lwbrx", rd, ra, rb); diff --git a/rpcs3/Emu/Cell/PPUInstrTable.h b/rpcs3/Emu/Cell/PPUInstrTable.h index e82c02abdb..9095d44bfe 100644 --- a/rpcs3/Emu/Cell/PPUInstrTable.h +++ b/rpcs3/Emu/Cell/PPUInstrTable.h @@ -527,6 +527,7 @@ namespace PPU_instr /*0x1e9*/bind_instr(g1f_list, DIVD, RD, RA, RB, OE, RC); /*0x1eb*/bind_instr(g1f_list, DIVW, RD, RA, RB, OE, RC); /*0x207*/bind_instr(g1f_list, LVLX, VD, RA, RB); + /*0x214*/bind_instr(g1f_list, LDBRX, RD, RA, RB); /*0x216*/bind_instr(g1f_list, LWBRX, RD, RA, RB); /*0x217*/bind_instr(g1f_list, LFSX, FRD, RA, RB); /*0x218*/bind_instr(g1f_list, SRW, RA, RS, RB, RC); diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index ea916d43b1..1cd1dc8eb7 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -2313,8 +2313,7 @@ private: #ifdef _M_X64 CPU.GPR[rd] = __umulh(CPU.GPR[ra], CPU.GPR[rb]); #else - ConLog.Warning("MULHDU"); - + //ConLog.Warning("MULHDU"); const u64 RA = CPU.GPR[ra]; const u64 RB = CPU.GPR[rb]; @@ -2520,7 +2519,7 @@ private: #ifdef _M_X64 CPU.GPR[rd] = __mulh(CPU.GPR[ra], CPU.GPR[rb]); #else - ConLog.Warning("MULHD"); + //ConLog.Warning("MULHD"); const s64 RA = CPU.GPR[ra]; const s64 RB = CPU.GPR[rb]; @@ -2982,6 +2981,10 @@ private: Memory.ReadLeft(CPU.VPR[vd]._u8 + eb, addr, 16 - eb); } + void LDBRX(u32 rd, u32 ra, u32 rb) + { + CPU.GPR[rd] = (u64&)Memory[ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]]; + } void LWBRX(u32 rd, u32 ra, u32 rb) { CPU.GPR[rd] = (u32&)Memory[ra ? CPU.GPR[ra] + CPU.GPR[rb] : CPU.GPR[rb]]; @@ -3759,8 +3762,7 @@ private: } void FRSQRTE(u32 frd, u32 frb, bool rc) { - UNIMPLEMENTED(); - //CPU.FPR[frd] = 1.0f / (float)sqrt(CPU.FPR[frb]); + CPU.FPR[frd] = 1.0f / (float)sqrt(CPU.FPR[frb]); } void FMSUB(u32 frd, u32 fra, u32 frc, u32 frb, bool rc) { diff --git a/rpcs3/Emu/Cell/PPUOpcodes.h b/rpcs3/Emu/Cell/PPUOpcodes.h index 71a8d3b2f1..5b8475d022 100644 --- a/rpcs3/Emu/Cell/PPUOpcodes.h +++ b/rpcs3/Emu/Cell/PPUOpcodes.h @@ -340,6 +340,7 @@ namespace PPU_opcodes DIVD = 0x1e9, DIVW = 0x1eb, LVLX = 0x207, //Load Vector Left Indexed + LDBRX = 0x214, LWBRX = 0x216, LFSX = 0x217, SRW = 0x218, @@ -729,6 +730,7 @@ public: virtual void DIVD(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0; virtual void DIVW(u32 rd, u32 ra, u32 rb, u32 oe, bool rc) = 0; virtual void LVLX(u32 vd, u32 ra, u32 rb) = 0; + virtual void LDBRX(u32 rd, u32 ra, u32 rb) = 0; virtual void LWBRX(u32 rd, u32 ra, u32 rb) = 0; virtual void LFSX(u32 frd, u32 ra, u32 rb) = 0; virtual void SRW(u32 ra, u32 rs, u32 rb, bool rc) = 0; diff --git a/rpcs3/Emu/Cell/PPUThread.h b/rpcs3/Emu/Cell/PPUThread.h index fbb53bf1ae..0302180399 100644 --- a/rpcs3/Emu/Cell/PPUThread.h +++ b/rpcs3/Emu/Cell/PPUThread.h @@ -526,7 +526,7 @@ static const s32 MAX_INT_VALUE = 0x7fffffff; class PPUThread : public PPCThread { public: - std::atomic owned_mutexes; + u32 owned_mutexes; public: PPCdouble FPR[32]; //Floating Point Register diff --git a/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp b/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp index 4a1103a7bd..b79097942e 100644 --- a/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp +++ b/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp @@ -5,7 +5,7 @@ void GLFragmentDecompilerThread::AddCode(std::string code, bool append_mask) { if(!src0.exec_if_eq && !src0.exec_if_gr && !src0.exec_if_lt) return; - const std::string mask = GetMask().c_str(); + const std::string mask = GetMask(); std::string cond; if(!src0.exec_if_gr || !src0.exec_if_lt || !src0.exec_if_eq) @@ -227,7 +227,7 @@ std::string GLFragmentDecompilerThread::BuildCode() main += "\t" + m_parr.AddParam(PARAM_OUT, "vec4", "ocol", 0) + " = " + (m_ctrl & 0x40 ? "r0" : "h0") + ";\n"; if(m_ctrl & 0xe) main += "\tgl_FragDepth = r1.z;\n"; - std::string p = ""; + std::string p; for(u32 i=0; i #include "GLBuffers.h" -#include "GLProgram.h" -#include "OpenGL.h" #include "GLProgramBuffer.h" +#include #pragma comment(lib, "opengl32.lib") diff --git a/rpcs3/Emu/GS/GL/GLVertexProgram.cpp b/rpcs3/Emu/GS/GL/GLVertexProgram.cpp index 2c4119d433..323ff04c61 100644 --- a/rpcs3/Emu/GS/GL/GLVertexProgram.cpp +++ b/rpcs3/Emu/GS/GL/GLVertexProgram.cpp @@ -319,7 +319,8 @@ wxString GLVertexDecompilerThread::BuildCode() wxString f = wxEmptyString; - f += wxString::Format("void %s()\n{\n\tgl_Position = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n%s\tgl_Position = gl_Position * scaleOffsetMat;\n}\n", m_funcs[0].name.wx_str(), BuildFuncBody(m_funcs[0]).wx_str()); + f += wxString::Format("void %s()\n{\n\tgl_Position = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n\t%s();\n\tgl_Position = gl_Position * scaleOffsetMat;\n}\n", + m_funcs[0].name.wx_str(), m_funcs[1].name.wx_str()); for(uint i=1; i intsCount ? "gl_Position = gl_Position * scaleOffsetMat;" : "") + " return; }", false, true); break; // BRA - case 0x09: AddScaCode("{ " + GetFunc() + "; " + wxString(m_funcs.GetCount() == 1 || m_funcs[1].offset > intsCount ? "gl_Position = gl_Position * scaleOffsetMat;" : "") + " return; }", false, true); break; // BRI : works differently (BRI o[1].x(TR) L0;) + case 0x08: AddScaCode("{ /*BRA*/ " + GetFunc() + "; return; }", false, true); break; // BRA + case 0x09: AddScaCode("{ " + GetFunc() + "; return; }", false, true); break; // BRI : works differently (BRI o[1].x(TR) L0;) case 0x0a: AddScaCode("/*CAL*/ " + GetFunc(), false, true); break; // CAL : works same as BRI case 0x0b: AddScaCode("/*CLI*/ " + GetFunc(), false, true); break; // CLI : works same as BRI - case 0x0c: AddScaCode("{ " + wxString(m_funcs.GetCount() == 1 || m_funcs[1].offset > intsCount ? "gl_Position = gl_Position * scaleOffsetMat;" : "") + "return; }", false, true); break; // RET : works like BRI but shorter (RET o[1].x(TR);) + case 0x0c: AddScaCode("return", false, true); break; // RET : works like BRI but shorter (RET o[1].x(TR);) case 0x0d: AddScaCode("log2(" + GetSRC(2, true) + ")"); break; // LG2 case 0x0e: AddScaCode("exp2(" + GetSRC(2, true) + ")"); break; // EX2 case 0x0f: AddScaCode("sin(" + GetSRC(2, true) + ")"); break; // SIN @@ -429,7 +435,7 @@ void GLVertexDecompilerThread::Task() m_shader = BuildCode(); m_body.Clear(); - m_funcs.RemoveAt(1, m_funcs.GetCount() - 1); + m_funcs.RemoveAt(2, m_funcs.GetCount() - 2); } GLVertexProgram::GLVertexProgram() diff --git a/rpcs3/Emu/GS/GL/GLVertexProgram.h b/rpcs3/Emu/GS/GL/GLVertexProgram.h index fde1ab1079..57a3b12b1d 100644 --- a/rpcs3/Emu/GS/GL/GLVertexProgram.h +++ b/rpcs3/Emu/GS/GL/GLVertexProgram.h @@ -151,6 +151,9 @@ struct GLVertexDecompilerThread : public ThreadBase m_funcs.Add(new FuncInfo()); m_funcs[0].offset = 0; m_funcs[0].name = "main"; + m_funcs.Add(new FuncInfo()); + m_funcs[1].offset = 0; + m_funcs[1].name = "func0"; //m_cur_func->body = "\tgl_Position = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n"; } diff --git a/rpcs3/Emu/GS/GL/OpenGL.h b/rpcs3/Emu/GS/GL/OpenGL.h index 4089f466e1..5122b47589 100644 --- a/rpcs3/Emu/GS/GL/OpenGL.h +++ b/rpcs3/Emu/GS/GL/OpenGL.h @@ -1,4 +1,7 @@ #pragma once +#ifndef _WIN32 +#include +#endif #include #include "GL/glext.h" diff --git a/rpcs3/Emu/SysCalls/Modules.cpp b/rpcs3/Emu/SysCalls/Modules.cpp index 07404f49ad..370ad88004 100644 --- a/rpcs3/Emu/SysCalls/Modules.cpp +++ b/rpcs3/Emu/SysCalls/Modules.cpp @@ -63,7 +63,7 @@ static const g_module_list[] = {0x002e, "cellLv2dbg"}, {0x0030, "cellUsbpspcm"}, {0x0031, "cellAvconfExt"}, - {0x0032, "cellSysutilUserinfo"}, + {0x0032, "cellUserInfo"}, {0x0033, "cellSysutilSavedata"}, {0x0034, "cellSubdisplay"}, {0x0035, "cellSysutilRec"}, diff --git a/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp b/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp index 94a754d8e4..e1781bd82e 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellAdec.cpp @@ -119,8 +119,6 @@ u32 adecOpen(AudioDecoder* data) case adecDecodeAu: { - int err; - adec.reader.addr = task.au.addr; adec.reader.size = task.au.size; diff --git a/rpcs3/Emu/SysCalls/Modules/cellAudio.cpp b/rpcs3/Emu/SysCalls/Modules/cellAudio.cpp index 145f3e7f10..f0c1e38588 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellAudio.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellAudio.cpp @@ -17,9 +17,6 @@ int cellAudioInit() { cellAudio.Warning("cellAudioInit()"); - if(Ini.AudioOutMode.GetValue() == 1) - m_audio_out->Init(); - if (m_config.m_is_audio_initialized) { return CELL_AUDIO_ERROR_ALREADY_INIT; @@ -53,14 +50,21 @@ int cellAudioInit() float buffer[2*256]; // buffer for 2 channels be_t buffer2[8*256]; // buffer for 8 channels (max count) - u16 oal_buffer[2*256]; // buffer for OpenAL + //u16 oal_buffer[2*256]; // buffer for OpenAL - memset(&buffer, 0, sizeof(buffer)); - memset(&buffer2, 0, sizeof(buffer2)); - memset(&oal_buffer, 0, sizeof(oal_buffer)); + uint oal_buffer_offset = 0; + uint oal_buffer_size = 2 * 256; + std::unique_ptr oal_buffer(new u16[oal_buffer_size]); + + memset(buffer, 0, sizeof(buffer)); + memset(buffer2, 0, sizeof(buffer2)); + memset(oal_buffer.get(), 0, oal_buffer_size * sizeof(u16)); if(Ini.AudioOutMode.GetValue() == 1) - m_audio_out->Open(oal_buffer, sizeof(oal_buffer)); + { + m_audio_out->Init(); + m_audio_out->Open(oal_buffer.get(), oal_buffer_size*sizeof(u16)); + } while (m_config.m_is_audio_initialized) { @@ -120,8 +124,10 @@ int cellAudioInit() buffer[i] = buffer2[i]; // convert the data from float to u16 - oal_buffer[i] = (u16)((float)buffer[i] * (1 << 15)); + assert(buffer[i] >= -4.0f && buffer[i] <= 4.0f); + oal_buffer[oal_buffer_offset + i] = (u16)(buffer[i] * ((1 << 13) - 1)); } + first_mix = false; } else @@ -131,7 +137,8 @@ int cellAudioInit() buffer[i] = (buffer[i] + buffer2[i]) * 0.5; // TODO: valid mixing // convert the data from float to u16 - oal_buffer[i] = (u16)((float)buffer[i] * (1 << 15)); + assert(buffer[i] >= -4.0f && buffer[i] <= 4.0f); + oal_buffer[oal_buffer_offset + i] = (u16)(buffer[i] * ((1 << 13) - 1)); } } } @@ -140,8 +147,14 @@ int cellAudioInit() // TODO: check event source Emu.GetEventManager().SendEvent(m_config.event_key, 0x10103000e010e07, 0, 0, 0); - if(Ini.AudioOutMode.GetValue() == 1) - m_audio_out->AddData(oal_buffer, sizeof(oal_buffer)); + oal_buffer_offset += sizeof(buffer) / sizeof(float); + + if(oal_buffer_offset >= oal_buffer_size) + { + m_audio_out->AddData(oal_buffer.get(), oal_buffer_offset * sizeof(u16)); + + oal_buffer_offset = 0; + } if(Ini.AudioDumpToFile.GetValue()) { @@ -160,8 +173,6 @@ abort: m_dump.Finalize(); m_config.m_is_audio_finalized = true; - if(Ini.AudioOutMode.GetValue() == 1) - m_audio_out->Quit(); }); t.detach(); @@ -191,8 +202,6 @@ int cellAudioQuit() Memory.Free(m_config.m_buffer); Memory.Free(m_config.m_indexes); - if(Ini.AudioOutMode.GetValue() == 1) - m_audio_out->Quit(); return CELL_OK; } @@ -301,9 +310,6 @@ int cellAudioPortStart(u32 portNum) m_config.m_ports[portNum].m_is_audio_port_started = true; - if(Ini.AudioOutMode.GetValue() == 1) - m_audio_out->Play(); - return CELL_OK; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp index a42dcb14fe..1b3ad08eae 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp @@ -118,9 +118,15 @@ int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_thddFreeSizeKB = 40000000; //40 GB, TODO: Use the free space of the computer's HDD where RPCS3 is being run. size->sizeKB = CELL_GAME_SIZEKB_NOTCALC; @@ -150,6 +156,16 @@ int cellGameContentPermit(mem_list_ptr_t contentInfoPath, mem_list_ptr_t buf, u32 bufsize) if(!buf.IsGood()) return CELL_GAME_ERROR_PARAM; - // TODO: Locate the PARAM.SFO. The following path is in most cases wrong. + // TODO: Locate the PARAM.SFO. The following path may be wrong. vfsFile f("/app_home/PARAM.SFO"); PSFLoader psf(f); if(!psf.Load(false)) diff --git a/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp b/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp index dcf34cd9d7..7745ed224d 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp @@ -2,7 +2,10 @@ #include "Emu/SysCalls/SysCalls.h" #include "Emu/SysCalls/SC_FUNC.h" +// Requires GCC 4.10 apparently.. +#ifdef _MSC_VER #include +#endif void cellL10n_init(); Module cellL10n(0x001e, cellL10n_init); @@ -26,7 +29,7 @@ int UTF16stoUTF8s(mem16_ptr_t utf16, mem64_t utf16_len, mem8_ptr_t utf8, mem64_t std::u16string wstr =(char16_t*)Memory.VirtualToRealAddr(utf16); wstr.resize(utf16_len.GetValue()); // TODO: Is this really the role of utf16_len in this function? - +#ifdef _MSC_VER std::wstring_convert,char16_t> convert; std::string str = convert.to_bytes(wstr); @@ -36,6 +39,7 @@ int UTF16stoUTF8s(mem16_ptr_t utf16, mem64_t utf16_len, mem8_ptr_t utf8, mem64_t utf8_len = str.size(); Memory.WriteString(utf8, str.c_str()); +#endif return ConversionOK; } @@ -208,4 +212,4 @@ void cellL10n_init() // cellL10n.AddFunc(0xf9b1896d, SJISstoUCS2s); // cellL10n.AddFunc(0xfa4a675a, BIG5stoUCS2s); // cellL10n.AddFunc(0xfdbf6ac5, UTF8stoUCS2s); -} \ No newline at end of file +} diff --git a/rpcs3/Emu/SysCalls/Modules/cellSpurs.h b/rpcs3/Emu/SysCalls/Modules/cellSpurs.h index af9f4c4e6c..bc9f70b848 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSpurs.h +++ b/rpcs3/Emu/SysCalls/Modules/cellSpurs.h @@ -87,7 +87,8 @@ struct CellSpursTraceInfo //u8 padding[]; }; -__declspec(align(8)) struct CellTraceHeader +//__declspec(align(8)) +struct CellTraceHeader { u8 tag; u8 length; @@ -135,17 +136,20 @@ struct CellSpursTracePacket } data; }; -__declspec(align(128)) struct CellSpurs +//__declspec(align(128)) +struct CellSpurs { u8 skip[CELL_SPURS_SIZE]; }; -__declspec(align(128)) struct CellSpurs2 +//__declspec(align(128)) +struct CellSpurs2 { u8 skip[CELL_SPURS_SIZE2 - CELL_SPURS_SIZE]; }; -__declspec(align(8)) struct CellSpursAttribute +//__declspec(align(8)) +struct CellSpursAttribute { u8 skip[CELL_SPURS_ATTRIBUTE_SIZE]; }; @@ -184,7 +188,8 @@ enum }; -__declspec(align(128)) struct CellSpursTaskset +//__declspec(align(128)) +struct CellSpursTaskset { u8 skip[6400]; }; @@ -217,7 +222,8 @@ struct CellSpursTasksetInfo #define CELL_SPURS_TASKSET_SIZE CELL_SPURS_TASKSET_CLASS0_SIZE */ -__declspec(align(128)) struct CellSpursTaskset2 +//__declspec(align(128)) +struct CellSpursTaskset2 { be_t skip[10496]; }; @@ -267,7 +273,8 @@ struct CellSpursTaskAttribute2 //be_t __reserved__[]; }; -__declspec(align(128)) struct CellSpursTaskExitCode +//__declspec(align(128)) +struct CellSpursTaskExitCode { unsigned char skip[128]; }; diff --git a/rpcs3/Emu/SysCalls/Modules/cellUserInfo.cpp b/rpcs3/Emu/SysCalls/Modules/cellUserInfo.cpp new file mode 100644 index 0000000000..3c0a541d56 --- /dev/null +++ b/rpcs3/Emu/SysCalls/Modules/cellUserInfo.cpp @@ -0,0 +1,75 @@ +#include "stdafx.h" +#include "Emu/SysCalls/SysCalls.h" +#include "Emu/SysCalls/SC_FUNC.h" + +#include "cellUserInfo.h" + +void cellUserInfo_init(); +Module cellUserInfo(0x0032, cellUserInfo_init); + +int cellUserInfoGetStat(u32 id, mem_ptr_t stat) +{ + cellUserInfo.Warning("cellUserInfoGetStat(id=%d, stat_addr=0x%x)", id, stat.GetAddr()); + + if (!stat.IsGood()) + return CELL_USERINFO_ERROR_PARAM; + if (id > CELL_USERINFO_USER_MAX) + return CELL_USERINFO_ERROR_NOUSER; + + char path [256]; + sprintf(path, "/dev_hdd0/home/%08d", id); + if (!Emu.GetVFS().ExistsDir(path)) + return CELL_USERINFO_ERROR_NOUSER; + + sprintf(path, "/dev_hdd0/home/%08d/localusername", id); + vfsStream* stream = Emu.GetVFS().OpenFile(path, vfsRead); + if (!stream || !(stream->IsOpened())) + return CELL_USERINFO_ERROR_INTERNAL; + + char name [CELL_USERINFO_USERNAME_SIZE]; + memset(name, 0, CELL_USERINFO_USERNAME_SIZE); + stream->Read(name, CELL_USERINFO_USERNAME_SIZE); + stream->Close(); + + stat->id = id; + memcpy(stat->name, name, CELL_USERINFO_USERNAME_SIZE); + return CELL_OK; +} + +int cellUserInfoSelectUser_ListType() +{ + UNIMPLEMENTED_FUNC(cellUserInfo); + return CELL_OK; +} + +int cellUserInfoSelectUser_SetList() +{ + UNIMPLEMENTED_FUNC(cellUserInfo); + return CELL_OK; +} + +int cellUserInfoEnableOverlay() +{ + UNIMPLEMENTED_FUNC(cellUserInfo); + return CELL_OK; +} + +int cellUserInfoGetList(mem32_t listNum, mem_ptr_t listBuf, mem32_t currentUserId) +{ + cellUserInfo.Warning("cellUserInfoGetList(listNum_addr=0x%x, listBuf_addr=0x%x, currentUserId_addr=0x%x)", + listNum.GetAddr(), listBuf.GetAddr(), currentUserId.GetAddr()); + + listNum = 1; + listBuf->userId[0] = 1; + currentUserId = 1; + return CELL_OK; +} + +void cellUserInfo_init() +{ + cellUserInfo.AddFunc(0x2b761140, cellUserInfoGetStat); + cellUserInfo.AddFunc(0x3097cc1c, cellUserInfoSelectUser_ListType); + cellUserInfo.AddFunc(0x55123a25, cellUserInfoSelectUser_SetList); + cellUserInfo.AddFunc(0xb3516536, cellUserInfoEnableOverlay); + cellUserInfo.AddFunc(0xc55e338b, cellUserInfoGetList); +} diff --git a/rpcs3/Emu/SysCalls/Modules/cellUserInfo.h b/rpcs3/Emu/SysCalls/Modules/cellUserInfo.h new file mode 100644 index 0000000000..3498b0293c --- /dev/null +++ b/rpcs3/Emu/SysCalls/Modules/cellUserInfo.h @@ -0,0 +1,55 @@ +#pragma once + +// Return Codes +enum +{ + CELL_USERINFO_RET_OK = 0, + CELL_USERINFO_RET_CANCEL = 1, + CELL_USERINFO_ERROR_BUSY = 0x8002c301, + CELL_USERINFO_ERROR_INTERNAL = 0x8002c302, + CELL_USERINFO_ERROR_PARAM = 0x8002c303, + CELL_USERINFO_ERROR_NOUSER = 0x8002c304, +}; + +// Enums +enum CellUserInfoParamSize +{ + CELL_USERINFO_USER_MAX = 16, + CELL_USERINFO_TITLE_SIZE = 256, + CELL_USERINFO_USERNAME_SIZE = 64, +}; + +enum CellUserInfoListType +{ + CELL_USERINFO_LISTTYPE_ALL = 0, + CELL_USERINFO_LISTTYPE_NOCURRENT = 1, +}; + +// Structs +struct CellUserInfoUserStat +{ + u32 id; + u8 name[CELL_USERINFO_USERNAME_SIZE]; +}; + +struct CellUserInfoUserList +{ + u32 userId[CELL_USERINFO_USER_MAX]; +}; + +struct CellUserInfoListSet +{ + u32 title_addr; // (char*) + u32 focus; + u32 fixedListNum; + mem_ptr_t fixedList; + u32 reserved_addr; // (void*) +}; + +struct CellUserInfoTypeSet +{ + u32 title_addr; // (char*) + u32 focus; + CellUserInfoListType type; + u32 reserved_addr; // (void*) +}; diff --git a/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp b/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp index 6f9589b6c0..a76a583acc 100644 --- a/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp @@ -270,6 +270,25 @@ int cellFsAioFinish(mem8_ptr_t mount_point) return CELL_OK; } +int cellFsReadWithOffset(u32 fd, u64 offset, u32 buf_addr, u64 buffer_size, mem64_t nread) +{ + sys_fs.Warning("cellFsReadWithOffset(fd=%d, offset=0x%llx, buf_addr=0x%x, buffer_size=%lld nread=0x%llx)", + fd, offset, buf_addr, buffer_size, nread.GetAddr()); + + int ret; + MemoryAllocator> oldPos, newPos; + ret = cellFsLseek(fd, 0, CELL_SEEK_CUR, oldPos.GetAddr()); // Save the current position + if (ret) return ret; + ret = cellFsLseek(fd, offset, CELL_SEEK_SET, newPos.GetAddr()); // Move to the specified offset + if (ret) return ret; + ret = cellFsRead(fd, buf_addr, buffer_size, nread.GetAddr()); // Read the file + if (ret) return ret; + ret = cellFsLseek(fd, Memory.Read64(oldPos.GetAddr()), CELL_SEEK_SET, newPos.GetAddr()); // Return to the old position + if (ret) return ret; + + return CELL_OK; +} + void sys_fs_init() { sys_fs.AddFunc(0x718bf5f8, cellFsOpen); @@ -295,6 +314,7 @@ void sys_fs_init() sys_fs.AddFunc(0x9f951810, cellFsAioFinish); sys_fs.AddFunc(0x1a108ab7, cellFsGetBlockSize); sys_fs.AddFunc(0xaa3b4bcd, cellFsGetFreeSize); + sys_fs.AddFunc(0x0d5b4a14, cellFsReadWithOffset); sys_fs.AddFunc(0x9b882495, cellFsGetDirectoryEntries); sys_fs.AddFunc(0x2664c8ae, cellFsStReadInit); sys_fs.AddFunc(0xd73938df, cellFsStReadFinish); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 08f356707e..7c92cb7e3d 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -93,12 +93,12 @@ bool Emulator::BootGame(const std::string& path) { static const char* elf_path[6] = { - "\\PS3_GAME\\USRDIR\\BOOT.BIN", - "\\USRDIR\\BOOT.BIN", - "\\BOOT.BIN", - "\\PS3_GAME\\USRDIR\\EBOOT.BIN", - "\\USRDIR\\EBOOT.BIN", - "\\EBOOT.BIN", + "/PS3_GAME/USRDIR/BOOT.BIN", + "/USRDIR/BOOT.BIN", + "/BOOT.BIN", + "/PS3_GAME/USRDIR/EBOOT.BIN", + "/USRDIR/EBOOT.BIN", + "/EBOOT.BIN", }; for(int i=0; iAddSpacer(12); s_panel_credits->Add(t_section1); diff --git a/rpcs3/Gui/ConLog.cpp b/rpcs3/Gui/ConLog.cpp index 7b5ee9300c..e284983695 100644 --- a/rpcs3/Gui/ConLog.cpp +++ b/rpcs3/Gui/ConLog.cpp @@ -14,6 +14,11 @@ std::mutex g_cs_conlog; static const uint max_item_count = 500; static const uint buffer_size = 1024 * 64; +static const std::string g_log_colors[] = +{ + "Black", "Green", "White", "Yellow", "Red", +}; + struct LogPacket { std::string m_prefix; @@ -112,7 +117,7 @@ LogWriter::LogWriter() } } -void LogWriter::WriteToLog(std::string prefix, std::string value, std::string colour/*, wxColour bgcolour*/) +void LogWriter::WriteToLog(std::string prefix, std::string value, u8 lvl/*, wxColour bgcolour*/) { if(!prefix.empty()) { @@ -125,7 +130,8 @@ void LogWriter::WriteToLog(std::string prefix, std::string value, std::string co if(m_logfile.IsOpened()) m_logfile.Write(wxString(prefix.empty() ? "" : std::string("[" + prefix + "]: ") + value + "\n").wx_str()); - if(!ConLogFrame) return; + if(!ConLogFrame || Ini.HLELogLvl.GetValue() == 4 || (lvl != 0 && lvl <= Ini.HLELogLvl.GetValue())) + return; std::lock_guard lock(g_cs_conlog); @@ -156,7 +162,7 @@ void LogWriter::WriteToLog(std::string prefix, std::string value, std::string co //if(LogBuffer.put == LogBuffer.get) LogBuffer.Flush(); - LogBuffer.Push(LogPacket(prefix, value, colour)); + LogBuffer.Push(LogPacket(prefix, value, g_log_colors[lvl])); } void LogWriter::Write(const wxString fmt, ...) @@ -169,7 +175,7 @@ void LogWriter::Write(const wxString fmt, ...) va_end(list); - WriteToLog("!", (const char *)frmt.ToAscii(), "White"); + WriteToLog("!", (const char *)frmt.ToAscii(), 2); } void LogWriter::Error(const wxString fmt, ...) @@ -182,7 +188,7 @@ void LogWriter::Error(const wxString fmt, ...) va_end(list); - WriteToLog("E", static_cast(frmt), "Red"); + WriteToLog("E", static_cast(frmt), 4); } void LogWriter::Warning(const wxString fmt, ...) @@ -195,7 +201,7 @@ void LogWriter::Warning(const wxString fmt, ...) va_end(list); - WriteToLog("W", static_cast(frmt), "Yellow"); + WriteToLog("W", static_cast(frmt), 3); } void LogWriter::Success(const wxString fmt, ...) @@ -208,12 +214,12 @@ void LogWriter::Success(const wxString fmt, ...) va_end(list); - WriteToLog("S", static_cast(frmt), "Green"); + WriteToLog("S", static_cast(frmt), 1); } void LogWriter::SkipLn() { - WriteToLog("", "", "Black"); + WriteToLog("", "", 0); } BEGIN_EVENT_TABLE(LogFrame, wxPanel) diff --git a/rpcs3/Gui/ConLog.h b/rpcs3/Gui/ConLog.h index 6d2535e04f..fec015d43a 100644 --- a/rpcs3/Gui/ConLog.h +++ b/rpcs3/Gui/ConLog.h @@ -11,7 +11,7 @@ class LogWriter std::string m_prefix; std::string m_value; - virtual void WriteToLog(std::string prefix, std::string value, std::string colour); + virtual void WriteToLog(std::string prefix, std::string value, u8 lvl); public: LogWriter(); diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index f56c305934..653664072e 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -346,6 +346,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) wxStaticBoxSizer* s_round_audio_out( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Audio Out") ) ); wxStaticBoxSizer* s_round_hle( new wxStaticBoxSizer( wxVERTICAL, &diag, _("HLE / Misc.") ) ); + wxStaticBoxSizer* s_round_hle_log_lvl( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Log lvl") ) ); wxComboBox* cbox_cpu_decoder = new wxComboBox(&diag, wxID_ANY); wxComboBox* cbox_gs_render = new wxComboBox(&diag, wxID_ANY); @@ -355,6 +356,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) wxComboBox* cbox_keyboard_handler = new wxComboBox(&diag, wxID_ANY); wxComboBox* cbox_mouse_handler = new wxComboBox(&diag, wxID_ANY); wxComboBox* cbox_audio_out = new wxComboBox(&diag, wxID_ANY); + wxComboBox* cbox_hle_loglvl = new wxComboBox(&diag, wxID_ANY); wxCheckBox* chbox_cpu_ignore_rwerrors = new wxCheckBox(&diag, wxID_ANY, "Ignore Read/Write errors"); wxCheckBox* chbox_gs_log_prog = new wxCheckBox(&diag, wxID_ANY, "Log vertex/fragment programs"); @@ -397,6 +399,12 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) cbox_audio_out->Append("Null"); cbox_audio_out->Append("OpenAL"); + cbox_hle_loglvl->Append("All"); + cbox_hle_loglvl->Append("Success"); + cbox_hle_loglvl->Append("Warnings"); + cbox_hle_loglvl->Append("Errors"); + cbox_hle_loglvl->Append("Nothing"); + chbox_cpu_ignore_rwerrors->SetValue(Ini.CPUIgnoreRWErrors.GetValue()); chbox_gs_log_prog->SetValue(Ini.GSLogPrograms.GetValue()); chbox_gs_dump_depth->SetValue(Ini.GSDumpDepthBuffer.GetValue()); @@ -408,6 +416,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) chbox_hle_exitonstop->SetValue(Ini.HLEExitOnStop.GetValue()); chbox_audio_dump->Enable(Emu.IsStopped()); + cbox_audio_out->Enable(Emu.IsStopped()); chbox_hle_logging->Enable(Emu.IsStopped()); cbox_cpu_decoder->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() - 1 : 0); @@ -418,6 +427,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) cbox_keyboard_handler->SetSelection(Ini.KeyboardHandlerMode.GetValue()); cbox_mouse_handler->SetSelection(Ini.MouseHandlerMode.GetValue()); cbox_audio_out->SetSelection(Ini.AudioOutMode.GetValue()); + cbox_hle_loglvl->SetSelection(Ini.HLELogLvl.GetValue()); s_round_cpu_decoder->Add(cbox_cpu_decoder, wxSizerFlags().Border(wxALL, 5).Expand()); s_round_cpu->Add(s_round_cpu_decoder, wxSizerFlags().Border(wxALL, 5).Expand()); @@ -445,6 +455,8 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) s_round_audio_out->Add(chbox_audio_dump, wxSizerFlags().Border(wxALL, 5).Expand()); s_round_audio->Add(s_round_audio_out, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_hle_log_lvl->Add(cbox_hle_loglvl, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_hle->Add(s_round_hle_log_lvl, wxSizerFlags().Border(wxALL, 5).Expand()); s_round_hle->Add(chbox_hle_logging, wxSizerFlags().Border(wxALL, 5).Expand()); s_round_hle->Add(chbox_hle_savetty, wxSizerFlags().Border(wxALL, 5).Expand()); s_round_hle->Add(chbox_hle_exitonstop, wxSizerFlags().Border(wxALL, 5).Expand()); @@ -487,6 +499,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) Ini.HLELogging.SetValue(chbox_hle_logging->GetValue()); Ini.HLESaveTTY.SetValue(chbox_hle_savetty->GetValue()); Ini.HLEExitOnStop.SetValue(chbox_hle_exitonstop->GetValue()); + Ini.HLELogLvl.SetValue(cbox_hle_loglvl->GetSelection()); Ini.Save(); } diff --git a/rpcs3/Ini.cpp b/rpcs3/Ini.cpp index e5b84d76af..66518c6d98 100644 --- a/rpcs3/Ini.cpp +++ b/rpcs3/Ini.cpp @@ -152,7 +152,7 @@ Ini::Ini() { #ifdef _WIN32 m_Config = new wxIniConfig( wxEmptyString, wxEmptyString, - wxGetCwd() + "\\rpcs3.ini", + wxGetCwd() + "/rpcs3.ini", wxEmptyString, wxCONFIG_USE_LOCAL_FILE ); #else m_Config = new wxConfig("rpcs3"); diff --git a/rpcs3/Ini.h b/rpcs3/Ini.h index c7b08a3f8f..778228b97b 100644 --- a/rpcs3/Ini.h +++ b/rpcs3/Ini.h @@ -109,6 +109,7 @@ public: IniEntry HLELogging; IniEntry HLESaveTTY; IniEntry HLEExitOnStop; + IniEntry HLELogLvl; IniEntry PadHandlerLeft; IniEntry PadHandlerDown; @@ -132,11 +133,11 @@ public: { wxString path; - path = DefPath + "\\" + "CPU"; + path = DefPath + "/" + "CPU"; CPUDecoderMode.Init("DecoderMode", path); CPUIgnoreRWErrors.Init("IgnoreRWErrors", path); - path = DefPath + "\\" + "GS"; + path = DefPath + "/" + "GS"; GSRenderMode.Init("RenderMode", path); GSResolution.Init("Resolution", path); GSAspectRatio.Init("AspectRatio", path); @@ -145,12 +146,12 @@ public: GSDumpColorBuffers.Init("DumpColorBuffers", path); GSDumpDepthBuffer.Init("DumpDepthBuffer", path); - path = DefPath + "\\" + "IO"; + path = DefPath + "/" + "IO"; PadHandlerMode.Init("PadHandlerMode", path); KeyboardHandlerMode.Init("KeyboardHandlerMode", path); MouseHandlerMode.Init("MouseHandlerMode", path); - path = DefPath + "\\" + "ControlSetings"; + path = DefPath + "/" + "ControlSetings"; PadHandlerLeft.Init("PadHandlerLeft", path); PadHandlerDown.Init("PadHandlerDown", path); PadHandlerRight.Init("PadHandlerRight", path); @@ -168,14 +169,15 @@ public: PadHandlerR2.Init("PadHandlerR2", path); PadHandlerL2.Init("PadHandlerL2", path); - path = DefPath + "\\" + "Audio"; + path = DefPath + "/" + "Audio"; AudioOutMode.Init("AudioOutMode", path); AudioDumpToFile.Init("AudioDumpToFile", path); - path = DefPath + "\\" + "HLE"; + path = DefPath + "/" + "HLE"; HLELogging.Init("HLELogging", path); HLESaveTTY.Init("HLESaveTTY", path); HLEExitOnStop.Init("HLEExitOnStop", path); + HLELogLvl.Init("HLELogLvl", path); } void Load() @@ -197,6 +199,7 @@ public: HLELogging.Load(false); HLESaveTTY.Load(false); HLEExitOnStop.Load(false); + HLELogLvl.Load(0); PadHandlerLeft.Load(static_cast('A')); PadHandlerDown.Load(static_cast('S')); @@ -235,6 +238,7 @@ public: HLELogging.Save(); HLESaveTTY.Save(); HLEExitOnStop.Save(); + HLELogLvl.Save(); PadHandlerLeft.Save(); PadHandlerDown.Save(); diff --git a/rpcs3/Loader/Loader.cpp b/rpcs3/Loader/Loader.cpp index 4dae78d73b..b9107cce0e 100644 --- a/rpcs3/Loader/Loader.cpp +++ b/rpcs3/Loader/Loader.cpp @@ -165,7 +165,7 @@ bool Loader::Load() /* const wxString& root = wxFileName(wxFileName(m_stream->GetPath()).GetPath()).GetPath(); wxString ps3_path; - const wxString& psf_path = root + "\\" + "PARAM.SFO"; + const wxString& psf_path = root + "/" + "PARAM.SFO"; vfsFile f(psf_path); if(f.IsOpened()) { diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj index 5a9fa6fb3f..1dfb346159 100644 --- a/rpcs3/rpcs3.vcxproj +++ b/rpcs3/rpcs3.vcxproj @@ -304,6 +304,7 @@ + diff --git a/rpcs3/rpcs3.vcxproj.filters b/rpcs3/rpcs3.vcxproj.filters index 6f796ff3fe..b10d1cb470 100644 --- a/rpcs3/rpcs3.vcxproj.filters +++ b/rpcs3/rpcs3.vcxproj.filters @@ -463,6 +463,9 @@ Emu\SysCalls\Modules + + Emu\SysCalls\Modules +