1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-24 19:52:37 +01:00

Conflicts fixed.

This commit is contained in:
O1L 2014-03-14 16:50:50 +03:00
commit 50d49141b0
33 changed files with 402 additions and 182 deletions

View File

@ -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})

View File

@ -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<g_al_buffers_count; ++i)
{
AddData(src, size);
AddBlock(m_buffers[i], m_buffer_size, src);
}
alSourceQueueBuffers(m_source, g_al_buffers_count, m_buffers);
checkForAlError("alSourceQueueBuffers");
Play();
}
void OpenALThread::AddData(const void* src, ALsizei size)
{
alGenBuffers(1, &mBuffer.mBufferID);
checkForAlError("alGenBuffers");
mBuffers[mBuffer.mBufferID] = mBuffer;
AddBlock(mBuffer.mBufferID, size, src);
const char* bsrc = (const char*)src;
ALuint buffer;
ALint buffers_count;
alGetSourcei(m_source, AL_BUFFERS_PROCESSED, &buffers_count);
checkForAlError("alGetSourcei");
alSourceQueueBuffers(mSource, 1, &mBuffer.mBufferID);
checkForAlError("alSourceQueueBuffers");
alGetSourcei(mSource, AL_BUFFERS_PROCESSED, &mProcessed);
while (mProcessed--)
while(size)
{
alSourceUnqueueBuffers(mSource, 1, &mBuffer.mBufferID);
if(buffers_count-- <= 0)
{
Play();
alGetSourcei(m_source, AL_BUFFERS_PROCESSED, &buffers_count);
checkForAlError("alGetSourcei");
continue;
}
alSourceUnqueueBuffers(m_source, 1, &buffer);
checkForAlError("alSourceUnqueueBuffers");
alDeleteBuffers(1, &mBuffer.mBufferID);
checkForAlError("alDeleteBuffers");
int bsize = size < m_buffer_size ? size : m_buffer_size;
AddBlock(buffer, bsize, bsrc);
alSourceQueueBuffers(m_source, 1, &buffer);
checkForAlError("alSourceQueueBuffers");
size -= bsize;
bsrc += bsize;
}
Play();
}
bool OpenALThread::AddBlock(ALuint bufferID, ALsizei size, const void* src)
bool OpenALThread::AddBlock(const ALuint buffer_id, ALsizei size, const void* src)
{
memset(&mTempBuffer, 0, sizeof(mTempBuffer));
memcpy(mTempBuffer, src, size);
long TotalRet = 0, ret;
if (size < 1) return false;
while (TotalRet < size)
{
ret = size;
// if buffer is empty
if (ret == 0) break;
else if (ret < 0)
{
ConLog.Error("Error in bitstream!");
}
else
{
TotalRet += ret;
}
}
if (TotalRet > 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;
}

View File

@ -2,49 +2,28 @@
#include "OpenAL/include/al.h"
#include "OpenAL/include/alc.h"
#include <map>
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<ALuint, SampleInfo> 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);
};

View File

@ -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);

View File

@ -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);

View File

@ -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)
{

View File

@ -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;

View File

@ -526,7 +526,7 @@ static const s32 MAX_INT_VALUE = 0x7fffffff;
class PPUThread : public PPCThread
{
public:
std::atomic<u32> owned_mutexes;
u32 owned_mutexes;
public:
PPCdouble FPR[32]; //Floating Point Register

View File

@ -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<m_parr.params.GetCount(); ++i)
{

View File

@ -2,7 +2,6 @@
#include "GLGSRender.h"
#include "Emu/Cell/PPCInstrTable.h"
#include "Gui/RSXDebugger.h"
#include "OpenGL.h"
#define CMD_DEBUG 0
#define DUMP_VERTEX_DATA 0
@ -650,10 +649,11 @@ void GLGSRender::OnInitThread()
#ifdef _WIN32
glSwapInterval(Ini.GSVSyncEnable.GetValue() ? 1 : 0);
#else
// Undefined reference: glXSwapIntervalEXT
/*#else
if (GLXDrawable drawable = glXGetCurrentDrawable()){
glXSwapIntervalEXT(glXGetCurrentDisplay(), drawable, Ini.GSVSyncEnable.GetValue() ? 1 : 0);
}
}*/
#endif
glGenTextures(1, &g_depth_tex);
glGenTextures(1, &g_flip_tex);

View File

@ -1,11 +1,9 @@
#pragma once
#include "Emu/GS/GSRender.h"
#include "Emu/GS/RSXThread.h"
#include <wx/glcanvas.h>
#include "GLBuffers.h"
#include "GLProgram.h"
#include "OpenGL.h"
#include "GLProgramBuffer.h"
#include <wx/glcanvas.h>
#pragma comment(lib, "opengl32.lib")

View File

@ -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<m_funcs.GetCount(); ++i)
{
@ -354,6 +355,11 @@ void GLVertexDecompilerThread::Task()
src[2].src2l = d3.src2l;
src[2].src2h = d2.src2h;
if(!d1.sca_opcode && !d1.vec_opcode)
{
m_body.Add("//nop");
}
switch(d1.sca_opcode)
{
case 0x00: break; // NOP
@ -364,11 +370,11 @@ void GLVertexDecompilerThread::Task()
case 0x05: AddScaCode("exp(" + GetSRC(2, true) + ")"); break; // EXP
case 0x06: AddScaCode("log(" + GetSRC(2, true) + ")"); break; // LOG
//case 0x07: break; // LIT
case 0x08: AddScaCode("{ /*BRA*/ " + GetFunc() + "; " + wxString(m_funcs.GetCount() == 1 || m_funcs[1].offset > 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()

View File

@ -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";
}

View File

@ -1,4 +1,7 @@
#pragma once
#ifndef _WIN32
#include <GL/glew.h>
#endif
#include <GL/gl.h>
#include "GL/glext.h"

View File

@ -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"},

View File

@ -119,8 +119,6 @@ u32 adecOpen(AudioDecoder* data)
case adecDecodeAu:
{
int err;
adec.reader.addr = task.au.addr;
adec.reader.size = task.au.size;

View File

@ -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<float> 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<u16[]> 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;
}

View File

@ -118,9 +118,15 @@ int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_t<CellGameConten
if (!type.IsGood() || !attributes.IsGood() || !size.IsGood() || !dirName.IsGood())
return CELL_GAME_ERROR_PARAM;
wxString dir = wxEmptyString;
// TODO: Locate the PARAM.SFO. The following path may be wrong.
vfsFile f("/app_home/PARAM.SFO");
PSFLoader psf(f);
if(!psf.Load(false))
return CELL_GAME_ERROR_FAILURE;
wxString dir = psf.m_info.serial(0,4) + psf.m_info.serial(5,5);
type = CELL_GAME_GAMETYPE_DISC;
// TODO: Only works for HDD games
type = CELL_GAME_GAMETYPE_HDD;
attributes = 0;
size->hddFreeSizeKB = 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<u8> contentInfoPath, mem_list_ptr_t<u8
if (!contentInfoPath.IsGood() || !usrdirPath.IsGood())
return CELL_GAME_ERROR_PARAM;
// TODO: Locate the PARAM.SFO. The following path may be wrong.
vfsFile f("/app_home/PARAM.SFO");
PSFLoader psf(f);
if(!psf.Load(false))
return CELL_GAME_ERROR_FAILURE;
wxString title_id = psf.m_info.serial(0,4) + psf.m_info.serial(5,5);
// TODO: Only works for HDD games
Memory.WriteString(contentInfoPath.GetAddr(), "/dev_hdd0/game/"+title_id);
Memory.WriteString(usrdirPath.GetAddr(), "/dev_hdd0/game/"+title_id+"/USRDIR");
return CELL_OK;
}
@ -172,7 +188,7 @@ int cellGameGetParamInt(u32 id, mem32_t value)
if(!value.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))
@ -198,7 +214,7 @@ int cellGameGetParamString(u32 id, mem_list_ptr_t<u8> 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))

View File

@ -2,7 +2,10 @@
#include "Emu/SysCalls/SysCalls.h"
#include "Emu/SysCalls/SC_FUNC.h"
// Requires GCC 4.10 apparently..
#ifdef _MSC_VER
#include <codecvt>
#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<std::codecvt_utf8_utf16<char16_t>,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);
}
}

View File

@ -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<u8> skip[10496];
};
@ -267,7 +273,8 @@ struct CellSpursTaskAttribute2
//be_t<u32> __reserved__[];
};
__declspec(align(128)) struct CellSpursTaskExitCode
//__declspec(align(128))
struct CellSpursTaskExitCode
{
unsigned char skip[128];
};

View File

@ -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<CellUserInfoUserStat> 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<CellUserInfoUserList> 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);
}

View File

@ -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<CellUserInfoUserList> fixedList;
u32 reserved_addr; // (void*)
};
struct CellUserInfoTypeSet
{
u32 title_addr; // (char*)
u32 focus;
CellUserInfoListType type;
u32 reserved_addr; // (void*)
};

View File

@ -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<be_t<u64>> 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);

View File

@ -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; i<sizeof(elf_path) / sizeof(*elf_path);i++)
@ -128,11 +128,11 @@ void Emulator::Load()
if(wxFileName(m_path).GetFullName().CmpNoCase("EBOOT.BIN") == 0)
{
elf_path += "\\BOOT.BIN";
elf_path += "/BOOT.BIN";
}
else
{
elf_path += "\\" + wxFileName(m_path).GetName() + ".elf";
elf_path += "/" + wxFileName(m_path).GetName() + ".elf";
}
if(!DecryptSelf(elf_path, self_path))

View File

@ -45,8 +45,8 @@ AboutDialog::AboutDialog(wxWindow *parent)
//Credits
wxBoxSizer* s_panel_credits(new wxBoxSizer(wxHORIZONTAL));
wxStaticText* t_section1 = new wxStaticText(this, wxID_ANY, "\nDevelopers:\n\nDH\nAlexAltea\nHykem\nOil", wxDefaultPosition, wxSize(156,160));
wxStaticText* t_section2 = new wxStaticText(this, wxID_ANY, "\nThanks:\n\nBlackDaemon", wxDefaultPosition, wxSize(156,160));
wxStaticText* t_section1 = new wxStaticText(this, wxID_ANY, "\nDevelopers:\n\nDH\nAlexAltea\nHykem\nOil\nNekotekina\nelisha464\nBigpet", wxDefaultPosition, wxSize(156,160));
wxStaticText* t_section2 = new wxStaticText(this, wxID_ANY, "\nThanks:\n\nBlackDaemon\nAishou\nkrofna\nxsacha", wxDefaultPosition, wxSize(156,160));
s_panel_credits->AddSpacer(12);
s_panel_credits->Add(t_section1);

View File

@ -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<std::mutex> 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<const char *>(frmt), "Red");
WriteToLog("E", static_cast<const char *>(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<const char *>(frmt), "Yellow");
WriteToLog("W", static_cast<const char *>(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<const char *>(frmt), "Green");
WriteToLog("S", static_cast<const char *>(frmt), 1);
}
void LogWriter::SkipLn()
{
WriteToLog("", "", "Black");
WriteToLog("", "", 0);
}
BEGIN_EVENT_TABLE(LogFrame, wxPanel)

View File

@ -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();

View File

@ -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();
}

View File

@ -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");

View File

@ -109,6 +109,7 @@ public:
IniEntry<bool> HLELogging;
IniEntry<bool> HLESaveTTY;
IniEntry<bool> HLEExitOnStop;
IniEntry<u8> HLELogLvl;
IniEntry<int> PadHandlerLeft;
IniEntry<int> 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<int>('A'));
PadHandlerDown.Load(static_cast<int>('S'));
@ -235,6 +238,7 @@ public:
HLELogging.Save();
HLESaveTTY.Save();
HLEExitOnStop.Save();
HLELogLvl.Save();
PadHandlerLeft.Save();
PadHandlerDown.Save();

View File

@ -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())
{

View File

@ -304,6 +304,7 @@
<ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSysutil.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellSysutilAp.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellUserInfo.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellVdec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellVpost.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\libmixer.cpp" />

View File

@ -463,6 +463,9 @@
<ClCompile Include="Emu\SysCalls\Modules\sys_net.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellUserInfo.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="rpcs3.rc" />