diff --git a/Common/ArmEmitter.cpp b/Common/ArmEmitter.cpp index af6e6e3df7..ebc801c033 100644 --- a/Common/ArmEmitter.cpp +++ b/Common/ArmEmitter.cpp @@ -22,11 +22,16 @@ #include #include -// For cache flushing on Symbian/Blackberry +// For cache flushing on Symbian/iOS/Blackberry #ifdef __SYMBIAN32__ #include #endif +#ifdef IOS +#include +#include +#endif + #ifdef BLACKBERRY #include #endif @@ -185,13 +190,13 @@ void ARMXEmitter::FlushIcache() void ARMXEmitter::FlushIcacheSection(u8 *start, u8 *end) { #ifdef __SYMBIAN32__ - User::IMB_Range( start, end); + User::IMB_Range(start, end); #elif defined(BLACKBERRY) msync(start, end - start, MS_SYNC | MS_INVALIDATE_ICACHE); -#else -#ifndef _WIN32 - __builtin___clear_cache (start, end); -#endif +#elif defined(IOS) + sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start); +#elif !defined(_WIN32) + __builtin___clear_cache(start, end); #endif } diff --git a/Common/Atomic_GCC.h b/Common/Atomic_GCC.h index c6f508cc3d..2ee4622da1 100644 --- a/Common/Atomic_GCC.h +++ b/Common/Atomic_GCC.h @@ -20,6 +20,8 @@ #ifdef BLACKBERRY #include +#elif defined(__SYMBIAN32__) +#include #endif #include "Common.h" @@ -79,6 +81,8 @@ inline void AtomicStore(volatile u32& dest, u32 value) { inline void AtomicStoreRelease(volatile u32& dest, u32 value) { #ifdef BLACKBERRY atomic_set(&dest, value); +#elif defined(__SYMBIAN32__) + g_atomic_int_set(&dest, value); #else __sync_lock_test_and_set(&dest, value); // TODO: Wrong! This function is has acquire semantics. #endif diff --git a/Core/Config.cpp b/Core/Config.cpp index 18ea2bc499..9b5cfe94b5 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -55,7 +55,7 @@ void CConfig::Load(const char *iniFileName) general->Get("ShowDebuggerOnLoad", &bShowDebuggerOnLoad, false); IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU"); - cpu->Get("Core", &iCpuCore, 0); + cpu->Get("Core", &iCpuCore, 2); cpu->Get("FastMemory", &bFastMemory, false); IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics"); diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index 2732991d5e..ecb032d694 100644 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -738,7 +738,7 @@ int PSPSaveDialog::Update() status = SCE_UTILITY_STATUS_FINISHED; break; case SCE_UTILITY_SAVEDATA_TYPE_SINGLEDELETE: - if(param.Delete(param.GetPspParam()), param.GetSelectedSave()) + if(param.Delete(param.GetPspParam(), param.GetSelectedSave())) { param.GetPspParam()->result = 0; } diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index 218da28757..34bfa08029 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -20,6 +20,11 @@ namespace MIPSComp { + void Jit::Comp_VPFX(u32 op) + { + DISABLE; + } + void Jit::Comp_SVQ(u32 op) { DISABLE; @@ -30,6 +35,11 @@ namespace MIPSComp DISABLE; } + void Jit::Comp_VecDo3(u32 op) + { + DISABLE; + } + void Jit::Comp_Mftv(u32 op) { DISABLE; @@ -39,4 +49,8 @@ namespace MIPSComp DISABLE; } + void Jit::Comp_Vmtvc(u32 op) { + DISABLE; + } + } diff --git a/Core/MIPS/ARM/ArmJit.h b/Core/MIPS/ARM/ArmJit.h index 1a987bed4b..4bca7b1140 100644 --- a/Core/MIPS/ARM/ArmJit.h +++ b/Core/MIPS/ARM/ArmJit.h @@ -104,13 +104,16 @@ public: void Comp_FPU3op(u32 op); void Comp_FPU2op(u32 op); void Comp_mxc1(u32 op); - void Comp_Mftv(u32 op); - void Comp_VDot(u32 op); void Comp_DoNothing(u32 op); void Comp_SV(u32 op); void Comp_SVQ(u32 op); + void Comp_VPFX(u32 op); + void Comp_VDot(u32 op); + void Comp_VecDo3(u32 op); + void Comp_Mftv(u32 op); + void Comp_Vmtvc(u32 op); ArmJitBlockCache *GetBlockCache() { return &blocks; } diff --git a/Core/MIPS/MIPSInt.cpp b/Core/MIPS/MIPSInt.cpp index f408055b5c..057c1edf9a 100644 --- a/Core/MIPS/MIPSInt.cpp +++ b/Core/MIPS/MIPSInt.cpp @@ -517,8 +517,8 @@ namespace MIPSInt switch((op>>21)&0x1f) { - case 0: R(rt) = FI(fs); break; //mfc1 - case 2: R(rt) = currentMIPS->ReadFCR(fs); break; //cfc1 + case 0: if (rt != 0) R(rt) = FI(fs); break; //mfc1 + case 2: if (rt != 0) R(rt) = currentMIPS->ReadFCR(fs); break; //cfc1 case 4: FI(fs) = R(rt); break; //mtc1 case 6: currentMIPS->WriteFCR(fs, R(rt)); break; //ctc1 diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index b2b7d07831..edfa630ec3 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -1336,15 +1336,16 @@ namespace MIPSInt switch ((op >> 21) & 0x1f) { case 3: //mfv / mfvc - if (imm < 128) { - R(rt) = VI(imm); - } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc - R(rt) = currentMIPS->vfpuCtrl[imm - 128]; - } else if (rt == 0 && imm == 255) { - // This appears to be used as a CPU interlock by some games. Do nothing. - } else { - //ERROR - maybe need to make this value too an "interlock" value? - _dbg_assert_msg_(CPU,0,"mfv - invalid register"); + // rt = 0, imm = 255 appears to be used as a CPU interlock by some games. + if (rt != 0) { + if (imm < 128) { + R(rt) = VI(imm); + } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc + R(rt) = currentMIPS->vfpuCtrl[imm - 128]; + } else { + //ERROR - maybe need to make this value too an "interlock" value? + _dbg_assert_msg_(CPU,0,"mfv - invalid register"); + } } break; diff --git a/Core/MIPS/MIPSTables.cpp b/Core/MIPS/MIPSTables.cpp index 8e1b0a0f1a..ea58c8de4c 100644 --- a/Core/MIPS/MIPSTables.cpp +++ b/Core/MIPS/MIPSTables.cpp @@ -363,11 +363,11 @@ const MIPSInstruction tableCop2[32] = INSTR("mfc2", &Jit::Comp_Generic, Dis_Generic, 0, OUT_RT), {-2}, INSTR("cfc2", &Jit::Comp_Generic, Dis_Generic, 0, 0), - INSTR("mfv", &Jit::Comp_Mftv, Dis_Mftv, Int_Mftv, 0), + INSTR("mfv", &Jit::Comp_Mftv, Dis_Mftv, Int_Mftv, IS_VFPU), INSTR("mtc2", &Jit::Comp_Generic, Dis_Generic, 0, IN_RT), {-2}, INSTR("ctc2", &Jit::Comp_Generic, Dis_Generic, 0, 0), - INSTR("mtv", &Jit::Comp_Mftv, Dis_Mftv, Int_Mftv, 0), + INSTR("mtv", &Jit::Comp_Mftv, Dis_Mftv, Int_Mftv, IS_VFPU), {Cop2BC2}, INSTR("??", &Jit::Comp_Generic, Dis_Generic, 0, 0), @@ -478,17 +478,17 @@ const MIPSInstruction tableCop1BC[32] = const MIPSInstruction tableVFPU0[8] = { - INSTR("vadd",&Jit::Comp_Generic, Dis_VectorSet3, Int_VecDo3, IS_VFPU), - INSTR("vsub",&Jit::Comp_Generic, Dis_VectorSet3, Int_VecDo3, IS_VFPU), + INSTR("vadd",&Jit::Comp_VecDo3, Dis_VectorSet3, Int_VecDo3, IS_VFPU), + INSTR("vsub",&Jit::Comp_VecDo3, Dis_VectorSet3, Int_VecDo3, IS_VFPU), INSTR("vsbn",&Jit::Comp_Generic, Dis_VectorSet3, Int_Vsbn, IS_VFPU), {-2}, {-2}, {-2}, {-2}, - INSTR("vdiv",&Jit::Comp_Generic, Dis_VectorSet3, Int_VecDo3, IS_VFPU), + INSTR("vdiv",&Jit::Comp_VecDo3, Dis_VectorSet3, Int_VecDo3, IS_VFPU), }; const MIPSInstruction tableVFPU1[8] = { - INSTR("vmul",&Jit::Comp_Generic, Dis_VectorSet3, Int_VecDo3, IS_VFPU), + INSTR("vmul",&Jit::Comp_VecDo3, Dis_VectorSet3, Int_VecDo3, IS_VFPU), INSTR("vdot",&Jit::Comp_VDot, Dis_VectorDot, Int_VDot, IS_VFPU), INSTR("vscl",&Jit::Comp_Generic, Dis_VScl, Int_VScl, IS_VFPU), {-2}, @@ -613,12 +613,12 @@ const MIPSInstruction tableVFPU4[32] = //110100 00000 xxxxx MIPSInstruction tableVFPU5[8] = //110111 xxx { - INSTR("vpfxs",&Jit::Comp_Generic, Dis_VPFXST, Int_VPFX, IS_VFPU), - INSTR("vpfxs",&Jit::Comp_Generic, Dis_VPFXST, Int_VPFX, IS_VFPU), - INSTR("vpfxt",&Jit::Comp_Generic, Dis_VPFXST, Int_VPFX, IS_VFPU), - INSTR("vpfxt",&Jit::Comp_Generic, Dis_VPFXST, Int_VPFX, IS_VFPU), - INSTR("vpfxd", &Jit::Comp_Generic, Dis_VPFXD, Int_VPFX, IS_VFPU), - INSTR("vpfxd", &Jit::Comp_Generic, Dis_VPFXD, Int_VPFX, IS_VFPU), + INSTR("vpfxs",&Jit::Comp_VPFX, Dis_VPFXST, Int_VPFX, IS_VFPU), + INSTR("vpfxs",&Jit::Comp_VPFX, Dis_VPFXST, Int_VPFX, IS_VFPU), + INSTR("vpfxt",&Jit::Comp_VPFX, Dis_VPFXST, Int_VPFX, IS_VFPU), + INSTR("vpfxt",&Jit::Comp_VPFX, Dis_VPFXST, Int_VPFX, IS_VFPU), + INSTR("vpfxd", &Jit::Comp_VPFX, Dis_VPFXD, Int_VPFX, IS_VFPU), + INSTR("vpfxd", &Jit::Comp_VPFX, Dis_VPFXD, Int_VPFX, IS_VFPU), INSTR("viim.s",&Jit::Comp_Generic, Dis_Viim,Int_Viim, IS_VFPU), INSTR("vfim.s",&Jit::Comp_Generic, Dis_Viim,Int_Viim, IS_VFPU), }; diff --git a/Core/MIPS/x86/CompALU.cpp b/Core/MIPS/x86/CompALU.cpp index 1f80c714d7..e7da034134 100644 --- a/Core/MIPS/x86/CompALU.cpp +++ b/Core/MIPS/x86/CompALU.cpp @@ -32,9 +32,9 @@ using namespace MIPSAnalyst; // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -//#define CONDITIONAL_DISABLE Comp_Generic(op); return; +//#define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; -#define DISABLE Comp_Generic(op); return; +#define DISABLE { Comp_Generic(op); return; } namespace MIPSComp { diff --git a/Core/MIPS/x86/CompFPU.cpp b/Core/MIPS/x86/CompFPU.cpp index e4fc1c3082..e1f86794c7 100644 --- a/Core/MIPS/x86/CompFPU.cpp +++ b/Core/MIPS/x86/CompFPU.cpp @@ -34,9 +34,9 @@ // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -// #define CONDITIONAL_DISABLE Comp_Generic(op); return; +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; -#define DISABLE Comp_Generic(op); return; +#define DISABLE { Comp_Generic(op); return; } namespace MIPSComp { @@ -167,8 +167,6 @@ enum void Jit::CompFPComp(int lhs, int rhs, u8 compare, bool allowNaN) { - CONDITIONAL_DISABLE; - MOVSS(XMM0, fpr.R(lhs)); CMPSS(XMM0, fpr.R(rhs), compare); MOVSS(M((void *) ¤tMIPS->fpcond), XMM0); @@ -314,12 +312,15 @@ void Jit::Comp_mxc1(u32 op) switch((op >> 21) & 0x1f) { case 0: // R(rt) = FI(fs); break; //mfc1 - // Cross move! slightly tricky - fpr.StoreFromRegister(fs); - gpr.Lock(rt); - gpr.BindToRegister(rt, false, true); - MOV(32, gpr.R(rt), fpr.R(fs)); - gpr.UnlockAll(); + if (rt != 0) + { + // Cross move! slightly tricky + fpr.StoreFromRegister(fs); + gpr.Lock(rt); + gpr.BindToRegister(rt, false, true); + MOV(32, gpr.R(rt), fpr.R(fs)); + gpr.UnlockAll(); + } return; case 2: // R(rt) = currentMIPS->ReadFCR(fs); break; //cfc1 diff --git a/Core/MIPS/x86/CompLoadStore.cpp b/Core/MIPS/x86/CompLoadStore.cpp index eb37eb9666..f0dc88e1d2 100644 --- a/Core/MIPS/x86/CompLoadStore.cpp +++ b/Core/MIPS/x86/CompLoadStore.cpp @@ -35,9 +35,9 @@ // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -// #define CONDITIONAL_DISABLE Comp_Generic(op); return; +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; -#define DISABLE Comp_Generic(op); return; +#define DISABLE { Comp_Generic(op); return; } namespace MIPSComp { diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index 19c9725cb0..e693afbba1 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -28,9 +28,9 @@ // All functions should have CONDITIONAL_DISABLE, so we can narrow things down to a file quickly. // Currently known non working ones should have DISABLE. -// #define CONDITIONAL_DISABLE Comp_Generic(op); return; +// #define CONDITIONAL_DISABLE { Comp_Generic(op); return; } #define CONDITIONAL_DISABLE ; -#define DISABLE Comp_Generic(op); return; +#define DISABLE { Comp_Generic(op); return; } #define _RS ((op>>21) & 0x1F) @@ -56,24 +56,23 @@ const u32 GC_ALIGNED16( signBitLower[4] ) = {0x80000000, 0, 0, 0}; void Jit::Comp_VPFX(u32 op) { + CONDITIONAL_DISABLE; int data = op & 0xFFFFF; int regnum = (op >> 24) & 3; switch (regnum) { case 0: // S js.prefixS = data; - js.prefixSKnown = true; + js.prefixSFlag = JitState::PREFIX_KNOWN_DIRTY; break; case 1: // T js.prefixT = data; - js.prefixTKnown = true; + js.prefixTFlag = JitState::PREFIX_KNOWN_DIRTY; break; case 2: // D js.prefixD = data; - js.prefixDKnown = true; + js.prefixDFlag = JitState::PREFIX_KNOWN_DIRTY; break; } - // TODO: Defer this to end of block - MOV(32, M((void *)&mips_->vfpuCtrl[VFPU_CTRL_SPREFIX + regnum]), Imm32(data)); } @@ -113,7 +112,7 @@ void Jit::ApplyPrefixST(u8 *vregs, u32 prefix, VectorSize sz) { } void Jit::ApplyPrefixD(const u8 *vregs, u32 prefix, VectorSize sz, bool onlyWriteMask) { - _assert_(js.prefixDKnown); + _assert_(js.prefixDFlag & JitState::PREFIX_KNOWN); if (!prefix) return; int n = GetNumVectorElements(sz); @@ -142,7 +141,7 @@ void Jit::ApplyPrefixD(const u8 *vregs, u32 prefix, VectorSize sz, bool onlyWrit static u32 GC_ALIGNED16(ssLoadStoreTemp[1]); void Jit::Comp_SV(u32 op) { - // DISABLE; + CONDITIONAL_DISABLE; s32 imm = (signed short)(op&0xFFFC); int vt = ((op >> 16) & 0x1f) | ((op & 3) << 5); @@ -201,13 +200,14 @@ void Jit::Comp_SV(u32 op) { break; default: - _dbg_assert_msg_(CPU,0,"Trying to interpret instruction that can't be interpreted"); - break; + DISABLE; } } void Jit::Comp_SVQ(u32 op) { + CONDITIONAL_DISABLE; + int imm = (signed short)(op&0xFFFC); int vt = (((op >> 16) & 0x1f)) | ((op&1) << 5); int rs = _RS; @@ -285,10 +285,15 @@ void Jit::Comp_SVQ(u32 op) } } - void Jit::Comp_VDot(u32 op) { DISABLE; + // WARNING: No prefix support! + if (js.MayHavePrefix()) { + Comp_Generic(op); + js.EatPrefix(); + return; + } int vd = _VD; int vs = _VS; @@ -306,7 +311,6 @@ void Jit::Comp_VDot(u32 op) { MOVSS(XMM0, fpr.V(sregs[0])); MULSS(XMM0, fpr.V(tregs[0])); - float sum = 0.0f; int n = GetNumVectorElements(sz); for (int i = 1; i < n; i++) { @@ -328,24 +332,101 @@ void Jit::Comp_VDot(u32 op) { js.EatPrefix(); } +void Jit::Comp_VecDo3(u32 op) { + DISABLE; + + // WARNING: No prefix support! + if (js.MayHavePrefix()) + { + Comp_Generic(op); + js.EatPrefix(); + return; + } + + int vd = _VD; + int vs = _VS; + int vt = _VT; + VectorSize sz = GetVecSize(op); + + u8 sregs[4], tregs[4], dregs[4]; + GetVectorRegs(sregs, sz, vs); + GetVectorRegs(tregs, sz, vt); + GetVectorRegs(dregs, sz, vd); + + void (XEmitter::*xmmop)(X64Reg, OpArg) = NULL; + switch (op >> 26) + { + case 24: //VFPU0 + switch ((op >> 23)&7) + { + case 0: // d[i] = s[i] + t[i]; break; //vadd + xmmop = &XEmitter::ADDSS; + break; + case 1: // d[i] = s[i] - t[i]; break; //vsub + xmmop = &XEmitter::SUBSS; + break; + case 7: // d[i] = s[i] / t[i]; break; //vdiv + xmmop = &XEmitter::DIVSS; + break; + } + break; + case 25: //VFPU1 + switch ((op >> 23)&7) + { + case 0: // d[i] = s[i] * t[i]; break; //vmul + xmmop = &XEmitter::MULSS; + break; + } + break; + } + + if (xmmop == NULL) + { + Comp_Generic(op); + js.EatPrefix(); + return; + } + + int n = GetNumVectorElements(sz); + // We need at least n temporaries... + if (n > 2) + fpr.Flush(); + + for (int i = 0; i < n; ++i) + MOVSS((X64Reg) (XMM0 + i), fpr.V(sregs[i])); + for (int i = 0; i < n; ++i) + (this->*xmmop)((X64Reg) (XMM0 + i), fpr.V(tregs[i])); + for (int i = 0; i < n; ++i) + MOVSS(fpr.V(dregs[i]), (X64Reg) (XMM0 + i)); + + fpr.ReleaseSpillLocks(); + + js.EatPrefix(); +} + void Jit::Comp_Mftv(u32 op) { + CONDITIONAL_DISABLE; + int imm = op & 0xFF; int rt = _RT; switch ((op >> 21) & 0x1f) { case 3: //mfv / mfvc - if (imm < 128) { //R(rt) = VI(imm); - fpr.StoreFromRegisterV(imm); - gpr.BindToRegister(rt, false, true); - MOV(32, gpr.R(rt), fpr.V(imm)); - } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc - gpr.BindToRegister(rt, false, true); - MOV(32, gpr.R(rt), M(¤tMIPS->vfpuCtrl[imm - 128])); - } else if (rt == 0 && imm == 255) { - // This appears to be used as a CPU interlock by some games. Do nothing. - } else { - //ERROR - maybe need to make this value too an "interlock" value? - _dbg_assert_msg_(CPU,0,"mfv - invalid register"); + // rt = 0, imm = 255 appears to be used as a CPU interlock by some games. + if (rt != 0) { + if (imm < 128) { //R(rt) = VI(imm); + fpr.StoreFromRegisterV(imm); + gpr.BindToRegister(rt, false, true); + MOV(32, gpr.R(rt), fpr.V(imm)); + } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc + // In case we have a saved prefix. + FlushPrefixV(); + gpr.BindToRegister(rt, false, true); + MOV(32, gpr.R(rt), M(¤tMIPS->vfpuCtrl[imm - 128])); + } else { + //ERROR - maybe need to make this value too an "interlock" value? + _dbg_assert_msg_(CPU,0,"mfv - invalid register"); + } } break; @@ -358,6 +439,15 @@ void Jit::Comp_Mftv(u32 op) { } else if (imm < 128 + VFPU_CTRL_MAX) { //mtvc //currentMIPS->vfpuCtrl[imm - 128] = R(rt); gpr.BindToRegister(rt, true, false); MOV(32, M(¤tMIPS->vfpuCtrl[imm - 128]), gpr.R(rt)); + + // TODO: Optimization if rt is Imm? + if (imm - 128 == VFPU_CTRL_SPREFIX) { + js.prefixSFlag = JitState::PREFIX_UNKNOWN; + } else if (imm - 128 == VFPU_CTRL_TPREFIX) { + js.prefixTFlag = JitState::PREFIX_UNKNOWN; + } else if (imm - 128 == VFPU_CTRL_DPREFIX) { + js.prefixDFlag = JitState::PREFIX_UNKNOWN; + } } else { //ERROR _dbg_assert_msg_(CPU,0,"mtv - invalid register"); @@ -366,8 +456,25 @@ void Jit::Comp_Mftv(u32 op) { default: DISABLE; - _dbg_assert_msg_(CPU,0,"Trying to interpret instruction that can't be interpreted"); - break; + } +} + +void Jit::Comp_Vmtvc(u32 op) { + CONDITIONAL_DISABLE; + int vs = _VS; + int imm = op & 0xFF; + if (imm >= 128 && imm < 128 + VFPU_CTRL_MAX) { + fpr.MapRegV(vs, 0); + MOVSS(M(¤tMIPS->vfpuCtrl[imm - 128]), fpr.RX(vs)); + fpr.ReleaseSpillLocks(); + + if (imm - 128 == VFPU_CTRL_SPREFIX) { + js.prefixSFlag = JitState::PREFIX_UNKNOWN; + } else if (imm - 128 == VFPU_CTRL_TPREFIX) { + js.prefixTFlag = JitState::PREFIX_UNKNOWN; + } else if (imm - 128 == VFPU_CTRL_DPREFIX) { + js.prefixDFlag = JitState::PREFIX_UNKNOWN; + } } } diff --git a/Core/MIPS/x86/Jit.cpp b/Core/MIPS/x86/Jit.cpp index dc6a789830..0a859ca2ae 100644 --- a/Core/MIPS/x86/Jit.cpp +++ b/Core/MIPS/x86/Jit.cpp @@ -109,6 +109,34 @@ void Jit::FlushAll() { gpr.Flush(); fpr.Flush(); + FlushPrefixV(); +} + +void Jit::FlushPrefixV() +{ + if ((js.prefixSFlag & JitState::PREFIX_DIRTY) != 0) + { + MOV(32, M((void *)&mips_->vfpuCtrl[VFPU_CTRL_SPREFIX]), Imm32(js.prefixS)); + js.prefixSFlag = (JitState::PrefixState) (js.prefixSFlag & ~JitState::PREFIX_DIRTY); + } + + if ((js.prefixTFlag & JitState::PREFIX_DIRTY) != 0) + { + MOV(32, M((void *)&mips_->vfpuCtrl[VFPU_CTRL_TPREFIX]), Imm32(js.prefixT)); + js.prefixTFlag = (JitState::PrefixState) (js.prefixTFlag & ~JitState::PREFIX_DIRTY); + } + + if ((js.prefixDFlag & JitState::PREFIX_DIRTY) != 0) + { + MOV(32, M((void *)&mips_->vfpuCtrl[VFPU_CTRL_DPREFIX]), Imm32(js.prefixD)); + + _dbg_assert_msg_(JIT, sizeof(bool) <= 4, "Bools shouldn't be that big?"); + const size_t bool_stride = 4 / sizeof(bool); + for (size_t i = 0; i < ARRAY_SIZE(mips_->vfpuWriteMask); i += bool_stride) + MOV(32, M((void *)&mips_->vfpuWriteMask[i]), Imm32(*(u32 *)&js.writeMask[i])); + + js.prefixDFlag = (JitState::PrefixState) (js.prefixDFlag & ~JitState::PREFIX_DIRTY); + } } void Jit::WriteDowncount(int offset) @@ -259,6 +287,10 @@ void Jit::Comp_Generic(u32 op) } else _dbg_assert_msg_(JIT, 0, "Trying to compile instruction that can't be interpreted"); + + // Might have eaten prefixes, hard to tell... + if ((MIPSGetInfo(op) & IS_VFPU) != 0) + js.PrefixStart(); } void Jit::WriteExit(u32 destination, int exit_num) diff --git a/Core/MIPS/x86/Jit.h b/Core/MIPS/x86/Jit.h index 89b3abc09e..2d5f9ef3c1 100644 --- a/Core/MIPS/x86/Jit.h +++ b/Core/MIPS/x86/Jit.h @@ -48,6 +48,14 @@ struct JitOptions struct JitState { + enum PrefixState + { + PREFIX_UNKNOWN = 0x00, + PREFIX_KNOWN = 0x01, + PREFIX_DIRTY = 0x10, + PREFIX_KNOWN_DIRTY = 0x11, + }; + u32 compilerPC; u32 blockStart; bool cancel; @@ -62,22 +70,39 @@ struct JitState u32 prefixT; u32 prefixD; bool writeMask[4]; - bool prefixSKnown; - bool prefixTKnown; - bool prefixDKnown; + PrefixState prefixSFlag; + PrefixState prefixTFlag; + PrefixState prefixDFlag; void PrefixStart() { - prefixSKnown = false; - prefixTKnown = false; - prefixDKnown = false; + prefixSFlag = PREFIX_UNKNOWN; + prefixTFlag = PREFIX_UNKNOWN; + prefixDFlag = PREFIX_UNKNOWN; + } + bool MayHavePrefix() const { + if (!(prefixSFlag & PREFIX_KNOWN) || !(prefixTFlag & PREFIX_KNOWN) || !(prefixDFlag & PREFIX_KNOWN)) { + return true; + } else if (prefixS != 0xE4 || prefixT != 0xE4 || prefixD != 0) { + return true; + } else if (writeMask[0] || writeMask[1] || writeMask[2] || writeMask[3]) { + return true; + } + + return false; } void EatPrefix() { - prefixSKnown = true; - prefixTKnown = true; - prefixDKnown = true; - prefixS = 0xE4; - prefixT = 0xE4; - prefixD = 0x0; - writeMask[0] = writeMask[1] = writeMask[2] = writeMask[3] = false; + if ((prefixSFlag & PREFIX_KNOWN) == 0 || prefixS != 0xE4) { + prefixSFlag = PREFIX_KNOWN_DIRTY; + prefixS = 0xE4; + } + if ((prefixTFlag & PREFIX_KNOWN) == 0 || prefixT != 0xE4) { + prefixTFlag = PREFIX_KNOWN_DIRTY; + prefixT = 0xE4; + } + if ((prefixDFlag & PREFIX_KNOWN) == 0 || prefixD != 0x0 || writeMask[0] || writeMask[1] || writeMask[2] || writeMask[3]) { + prefixDFlag = PREFIX_KNOWN_DIRTY; + prefixD = 0x0; + writeMask[0] = writeMask[1] = writeMask[2] = writeMask[3] = false; + } } }; @@ -140,7 +165,9 @@ public: void Comp_SVQ(u32 op); void Comp_VPFX(u32 op); void Comp_VDot(u32 op); + void Comp_VecDo3(u32 op); void Comp_Mftv(u32 op); + void Comp_Vmtvc(u32 op); void Comp_DoNothing(u32 op); @@ -154,6 +181,7 @@ public: void ClearCacheAt(u32 em_address); private: void FlushAll(); + void FlushPrefixV(); void WriteDowncount(int offset = 0); // See CompileDelaySlotFlags for flags. diff --git a/GPU/GLES/DisplayListInterpreter.cpp b/GPU/GLES/DisplayListInterpreter.cpp index d1a8f606db..039fc97910 100644 --- a/GPU/GLES/DisplayListInterpreter.cpp +++ b/GPU/GLES/DisplayListInterpreter.cpp @@ -542,22 +542,26 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { break; case GE_CMD_TEXTUREMAPENABLE: - gstate_c.textureChanged = true; + if (diff) + gstate_c.textureChanged = true; break; case GE_CMD_LIGHTINGENABLE: break; case GE_CMD_FOGCOLOR: - shaderManager_->DirtyUniform(DIRTY_FOGCOLOR); + if (diff) + shaderManager_->DirtyUniform(DIRTY_FOGCOLOR); break; case GE_CMD_FOG1: - shaderManager_->DirtyUniform(DIRTY_FOGCOEF); + if (diff) + shaderManager_->DirtyUniform(DIRTY_FOGCOEF); break; case GE_CMD_FOG2: - shaderManager_->DirtyUniform(DIRTY_FOGCOEF); + if (diff) + shaderManager_->DirtyUniform(DIRTY_FOGCOEF); break; case GE_CMD_FOGENABLE: @@ -618,6 +622,7 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_TEXADDR6: case GE_CMD_TEXADDR7: gstate_c.textureChanged = true; + shaderManager_->DirtyUniform(DIRTY_UVSCALEOFFSET); break; case GE_CMD_TEXBUFWIDTH0: @@ -667,7 +672,7 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_TEXSIZE0: gstate_c.curTextureWidth = 1 << (gstate.texsize[0] & 0xf); - gstate_c.curTextureHeight = 1 << ((gstate.texsize[0]>>8) & 0xf); + gstate_c.curTextureHeight = 1 << ((gstate.texsize[0] >> 8) & 0xf); shaderManager_->DirtyUniform(DIRTY_UVSCALEOFFSET); //fall thru - ignoring the mipmap sizes for now case GE_CMD_TEXSIZE1: diff --git a/GPU/GLES/ShaderManager.cpp b/GPU/GLES/ShaderManager.cpp index c3a91cebf4..6a985c8446 100644 --- a/GPU/GLES/ShaderManager.cpp +++ b/GPU/GLES/ShaderManager.cpp @@ -138,6 +138,7 @@ LinkedShader::LinkedShader(Shader *vs, Shader *fs) glUniform1i(u_tex, 0); // The rest, use the "dirty" mechanism. dirtyUniforms = DIRTY_ALL; + use(); } LinkedShader::~LinkedShader() { @@ -264,8 +265,10 @@ void LinkedShader::updateUniforms() { // Texturing if (u_uvscaleoffset != -1 && (dirtyUniforms & DIRTY_UVSCALEOFFSET)) { - float uvscaleoff[4] = { gstate_c.uScale, gstate_c.vScale, gstate_c.uOff, gstate_c.vOff}; + float uvscaleoff[4] = {gstate_c.uScale, gstate_c.vScale, gstate_c.uOff, gstate_c.vOff}; if (gstate.isModeThrough()) { + // We never get here because we don't use HW transform with through mode. + // Although - why don't we? uvscaleoff[0] /= gstate_c.curTextureWidth; uvscaleoff[1] /= gstate_c.curTextureHeight; uvscaleoff[2] /= gstate_c.curTextureWidth; diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index fdfb3f4257..4b964a274e 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -24,9 +24,20 @@ #include "TextureCache.h" #include "../Core/Config.h" -// If a texture hasn't been seen for 200 frames, get rid of it. +// If a texture hasn't been seen for this many frames, get rid of it. #define TEXTURE_KILL_AGE 200 -float maxAnisotropyLevel ; + +u32 RoundUpToPowerOf2(u32 v) +{ + v--; + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + v |= v >> 8; + v |= v >> 16; + v++; + return v; +} TextureCache::TextureCache() { lastBoundTexture = -1; @@ -681,22 +692,28 @@ void TextureCache::SetTexture() { TexCache::iterator iter = cache.find(cachekey); TexCacheEntry *entry = NULL; + gstate_c.flipTexture = false; + if (iter != cache.end()) { entry = &iter->second; // Check for FBO - slow! if (entry->fbo) { + int w = 1 << (gstate.texsize[0] & 0xf); + int h = 1 << ((gstate.texsize[0] >> 8) & 0xf); + fbo_bind_color_as_texture(entry->fbo, 0); UpdateSamplingParams(*entry, false); int fbow, fboh; fbo_get_dimensions(entry->fbo, &fbow, &fboh); - // Almost certain this isn't right. - gstate_c.curTextureWidth = fbow; - gstate_c.curTextureHeight = fboh; + // This isn't right. + gstate_c.curTextureWidth = w; //w; //RoundUpToPowerOf2(fbow); + gstate_c.curTextureHeight = h; // RoundUpToPowerOf2(fboh); + gstate_c.flipTexture = true; + entry->lastFrame = gpuStats.numFrames; return; } - //Validate the texture here (width, height etc) int dim = gstate.texsize[0] & 0xF0F; diff --git a/GPU/GLES/TextureCache.h b/GPU/GLES/TextureCache.h index 881e672902..bb1958c365 100644 --- a/GPU/GLES/TextureCache.h +++ b/GPU/GLES/TextureCache.h @@ -101,5 +101,6 @@ private: u16 *clutBuf16; int lastBoundTexture; + float maxAnisotropyLevel; }; diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 10aeb3ef2d..85fa40b631 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -223,7 +223,7 @@ Lighter::Lighter() { globalAmbient.GetFromRGB(gstate.ambientcolor); globalAmbient.GetFromA(gstate.ambientalpha); materialAmbient.GetFromRGB(gstate.materialambient); - materialAmbient.a = 1.0f; + materialAmbient.GetFromA(gstate.materialalpha); materialDiffuse.GetFromRGB(gstate.materialdiffuse); materialDiffuse.a = 1.0f; materialSpecular.GetFromRGB(gstate.materialspecular); @@ -283,8 +283,13 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ bool doSpecular = (comp != GE_LIGHTCOMP_ONLYDIFFUSE); bool poweredDiffuse = comp == GE_LIGHTCOMP_BOTHWITHPOWDIFFUSE; - float dot = toLight * norm; - + float distanceToLight = toLight.Length(); + float dot = 0.0f; + if (distanceToLight > 0.0f) + { + toLight /= distanceToLight; + dot = toLight * norm; + } // Clamp dot to zero. if (dot < 0.0f) dot = 0.0f; @@ -292,15 +297,14 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ dot = powf(dot, specCoef_); float lightScale = 1.0f; - float distance = toLight.Normalize(); if (type != GE_LIGHTTYPE_DIRECTIONAL) { - lightScale = 1.0f / (gstate_c.lightatt[l][0] + gstate_c.lightatt[l][1]*distance + gstate_c.lightatt[l][2]*distance*distance); + lightScale = 1.0f / (gstate_c.lightatt[l][0] + gstate_c.lightatt[l][1]*distanceToLight + gstate_c.lightatt[l][2]*distanceToLight*distanceToLight); if (lightScale > 1.0f) lightScale = 1.0f; } Color4 lightDiff(gstate_c.lightColor[1][l], 0.0f); - Color4 diff = (lightDiff * *diffuse) * (std::max(dot, 0.0f) * lightScale); + Color4 diff = (lightDiff * *diffuse) * (dot * lightScale); // Real PSP specular Vec3 toViewer(0,0,1); @@ -309,22 +313,21 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[ if (doSpecular) { - Vec3 halfVec = toLight; - halfVec += toViewer; + Vec3 halfVec = (toLight + toViewer); halfVec.Normalize(); dot = halfVec * norm; - if (dot > 0) + if (dot > 0.0f) { Color4 lightSpec(gstate_c.lightColor[2][l], 0.0f); - lightSum1 += (lightSpec * *specular * (powf(dot, specCoef_) * lightScale)); + lightSum1 += (lightSpec * *specular * (powf(dot, specCoef_) * (dot * lightScale))); } } dots[l] = dot; if (gstate.lightEnable[l] & 1) { - Color4 lightAmbient(gstate_c.lightColor[0][l], 1.0f); - lightSum0 += lightAmbient * *ambient + diff; + Color4 lightAmbient(gstate_c.lightColor[0][l], 0.0f); + lightSum0 += lightAmbient + diff; } } @@ -454,7 +457,7 @@ void TransformDrawEngine::SoftwareTransformAndDraw( float fog_end = getFloat24(gstate.fog1); float fog_slope = getFloat24(gstate.fog2); - VertexReader reader(decoded, decVtxFormat); + VertexReader reader(decoded, decVtxFormat, vertType); for (int index = 0; index < maxIndex; index++) { reader.Goto(index); @@ -547,14 +550,6 @@ void TransformDrawEngine::SoftwareTransformAndDraw( if (gstate.lightingEnable & 1) { // Don't ignore gstate.lmode - we should send two colors in that case - if (reader.hasColor0()) { - reader.ReadColor0(litColor0); - } else { - litColor0[0] = (gstate.materialambient & 0xFF) / 255.f; - litColor0[1] = ((gstate.materialambient >> 8) & 0xFF) / 255.f; - litColor0[2] = ((gstate.materialambient >> 16) & 0xFF) / 255.f; - litColor0[3] = (gstate.materialalpha & 0xFF) / 255.f; - } if (gstate.lmode & 1) { // Separate colors for (int j = 0; j < 4; j++) { @@ -642,6 +637,8 @@ void TransformDrawEngine::SoftwareTransformAndDraw( memcpy(&transformed[index].x, v, 3 * sizeof(float)); transformed[index].fog = fogCoef; memcpy(&transformed[index].u, uv, 2 * sizeof(float)); + if (gstate_c.flipTexture) + transformed[index].v = 1.0f - transformed[index].v * 2.0f; for (int i = 0; i < 4; i++) { transformed[index].color0[i] = c0[i] * 255.0f; } diff --git a/GPU/GLES/VertexDecoder.cpp b/GPU/GLES/VertexDecoder.cpp index 8bfc77a451..6e68bdec48 100644 --- a/GPU/GLES/VertexDecoder.cpp +++ b/GPU/GLES/VertexDecoder.cpp @@ -144,18 +144,16 @@ void VertexDecoder::Step_WeightsFloat() const void VertexDecoder::Step_TcU8() const { - u8 *uv = (u8*)(decoded_ + decFmt.uvoff); - const u8 *uvdata = (const u8*)(ptr_ + tcoff); - uv[0] = uvdata[0]; - uv[1] = uvdata[1]; + u16 *uv = (u16*)(decoded_ + decFmt.uvoff); + const u16 *uvdata = (const u16*)(ptr_ + tcoff); + *uv = *uvdata; } void VertexDecoder::Step_TcU16() const { - u16 *uv = (u16 *)(decoded_ + decFmt.uvoff); - const u16 *uvdata = (const u16*)(ptr_ + tcoff); - uv[0] = uvdata[0]; - uv[1] = uvdata[1]; + u32 *uv = (u32 *)(decoded_ + decFmt.uvoff); + const u32 *uvdata = (const u32*)(ptr_ + tcoff); + *uv = *uvdata; } void VertexDecoder::Step_TcU16Through() const @@ -305,7 +303,7 @@ void VertexDecoder::Step_NormalS16() const xorval = 0xFFFF; const s16 *sv = (const s16*)(ptr_ + nrmoff); for (int j = 0; j < 3; j++) - normal[j] = sv[j] ^ xorval ; + normal[j] = sv[j] ^ xorval; normal[3] = 0; } @@ -330,9 +328,10 @@ void VertexDecoder::Step_NormalS8Morph() const if (gstate.reversenormals & 1) { multiplier = -multiplier; } - const s8 *sv = (const s8*)(ptr_ + onesize_*n + nrmoff); + const s8 *bv = (const s8*)(ptr_ + onesize_*n + nrmoff); + multiplier *= (1.0f/127.0f); for (int j = 0; j < 3; j++) - normal[j] += (sv[j]/32767.0f) * multiplier; + normal[j] += bv[j] * multiplier; } } @@ -346,9 +345,10 @@ void VertexDecoder::Step_NormalS16Morph() const if (gstate.reversenormals & 1) { multiplier = -multiplier; } - const float *fv = (const float*)(ptr_ + onesize_*n + nrmoff); + const s16 *sv = (const s16 *)(ptr_ + onesize_*n + nrmoff); + multiplier *= (1.0f/32767.f); for (int j = 0; j < 3; j++) - normal[j] += fv[j] * multiplier; + normal[j] += sv[j] * multiplier; } } @@ -425,9 +425,10 @@ void VertexDecoder::Step_PosS8Morph() const float *v = (float *)(decoded_ + decFmt.posoff); memset(v, 0, sizeof(float) * 3); for (int n = 0; n < morphcount; n++) { + float multiplier = 1.0f / 127.0f; const s8 *sv = (const s8*)(ptr_ + onesize_*n + posoff); for (int j = 0; j < 3; j++) - v[j] += (sv[j] / 127.f) * gstate_c.morphWeights[n]; + v[j] += (float)sv[j] * (multiplier * gstate_c.morphWeights[n]); } } @@ -437,9 +438,9 @@ void VertexDecoder::Step_PosS16Morph() const memset(v, 0, sizeof(float) * 3); for (int n = 0; n < morphcount; n++) { float multiplier = 1.0f / 32767.0f; - const short *sv = (const short*)(ptr_ + onesize_*n + posoff); + const s16 *sv = (const s16*)(ptr_ + onesize_*n + posoff); for (int j = 0; j < 3; j++) - v[j] += (sv[j] * multiplier) * gstate_c.morphWeights[n]; + v[j] += (float)sv[j] * (multiplier * gstate_c.morphWeights[n]); } } diff --git a/GPU/GLES/VertexDecoder.h b/GPU/GLES/VertexDecoder.h index 6e006d7398..0be7140f13 100644 --- a/GPU/GLES/VertexDecoder.h +++ b/GPU/GLES/VertexDecoder.h @@ -186,7 +186,7 @@ public: class VertexReader { public: - VertexReader(u8 *base, const DecVtxFormat &decFmt) : base_(base), data_(base), decFmt_(decFmt) {} + VertexReader(u8 *base, const DecVtxFormat &decFmt, int vtype) : base_(base), data_(base), decFmt_(decFmt), vtype_(vtype) {} void ReadPos(float pos[3]) { switch (decFmt_.posfmt) { @@ -254,13 +254,8 @@ public: break; case DEC_FLOAT_2: - if (isThrough()) { - uv[0] = f[0]; - uv[1] = f[1]; - } else { - uv[0] = f[0] * 2.0f; - uv[1] = f[1] * 2.0f; - } + uv[0] = f[0] * 2.0f; + uv[1] = f[1] * 2.0f; break; case DEC_U16A_2: diff --git a/GPU/GLES/VertexShaderGenerator.cpp b/GPU/GLES/VertexShaderGenerator.cpp index f9da12ed74..d5cb6c1e2c 100644 --- a/GPU/GLES/VertexShaderGenerator.cpp +++ b/GPU/GLES/VertexShaderGenerator.cpp @@ -60,6 +60,9 @@ void ComputeVertexShaderID(VertexShaderID *id, int prim) id->d[0] |= ((int)enableFog) << 2; id->d[0] |= doTexture << 3; id->d[0] |= (hasColor & 1) << 4; + if (doTexture) + id->d[0] |= (gstate_c.flipTexture & 1) << 5; + if (CanUseHardwareTransform(prim)) { id->d[0] |= 1 << 8; id->d[0] |= (hasNormal & 1) << 9; @@ -139,6 +142,7 @@ void GenerateVertexShader(int prim, char *buffer) { bool hasColor = (gstate.vertType & GE_VTYPE_COL_MASK) != 0 || !hwXForm; bool hasNormal = (gstate.vertType & GE_VTYPE_NRM_MASK) != 0 && hwXForm; bool enableFog = gstate.isFogEnabled() && !gstate.isModeThrough() && !gstate.isModeClear(); + bool flipV = gstate_c.flipTexture; DoLightComputation doLight[4] = {LIGHT_OFF, LIGHT_OFF, LIGHT_OFF, LIGHT_OFF}; if (hwXForm) { @@ -396,6 +400,8 @@ void GenerateVertexShader(int prim, char *buffer) { // ILLEGAL break; } + if (flipV) + WRITE(p, " v_texcoord.y = 1.0 - v_texcoord.y;\n"); } // Compute fogdepth diff --git a/GPU/GPUState.h b/GPU/GPUState.h index 516042e892..ca036b2506 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -238,6 +238,8 @@ struct GPUStateCache float uScale,vScale; float uOff,vOff; + bool flipTexture; + float zMin, zMax; float lightpos[4][3]; float lightdir[4][3]; diff --git a/Qt/EmuThread.cpp b/Qt/EmuThread.cpp index 0246fb9fb4..44c3fc6366 100644 --- a/Qt/EmuThread.cpp +++ b/Qt/EmuThread.cpp @@ -189,8 +189,8 @@ void EmuThread::run() coreParameter.enableDebugging = true; coreParameter.printfEmuLog = false; coreParameter.headLess = false; - coreParameter.renderWidth = 480 * g_Config.iWindowZoom; - coreParameter.renderHeight = 272 * g_Config.iWindowZoom; + coreParameter.renderWidth = (480 * g_Config.iWindowZoom) * (g_Config.SSAntiAliasing + 1); + coreParameter.renderHeight = (272 * g_Config.iWindowZoom) * (g_Config.SSAntiAliasing + 1); coreParameter.outputWidth = dp_xres; coreParameter.outputHeight = dp_yres; coreParameter.pixelWidth = pixel_xres; diff --git a/Qt/Settings.pri b/Qt/Settings.pri index f6f24b6c87..953e138ec3 100644 --- a/Qt/Settings.pri +++ b/Qt/Settings.pri @@ -42,6 +42,7 @@ symbian: { MMP_RULES -= "ARMFPU softvfp+vfpv2" MMP_RULES += "ARMFPU vfpv2" QMAKE_CXXFLAGS += -marm -Wno-parentheses -Wno-comment + INCLUDEPATH += $$EPOCROOT/epoc32/include/stdapis/glib-2.0 DEFINES += __MARM_ARMV6__ CONFIG += 4.6.3 } diff --git a/Qt/languages/ppsspp_cn.ts b/Qt/languages/ppsspp_cn.ts index da1d206f1c..7e628dd6f7 100644 --- a/Qt/languages/ppsspp_cn.ts +++ b/Qt/languages/ppsspp_cn.ts @@ -3,10 +3,6 @@ Controls - - Controls - 控制器 - Controls @@ -71,10 +67,6 @@ New function name: - - New function name : - 新函数名称: - CtrlMemView @@ -126,17 +118,9 @@ Set new value: - - Set new value : - 设置新值: - Debugger_Disasm - - Dialog - 对话框 - Disassembler @@ -351,10 +335,6 @@ Debugger_VFPU - - Dialog - 对话框 - VFPU @@ -520,400 +500,425 @@ (&E)模拟 - + Debu&g (&G)调试 - + &Options (&O)选项 - &Log Levels - (&L)日志级别 - - - G3D - + HLE - + Default 默认 - - Zoom - 缩放 - - - - Language - 语言 - - - - Anisotropic filtering + + Lo&g Levels - + + &Language + + + + + &Video + + + + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help (&H)帮助 - + &Open... (&O)打开... - + &Close (&C)关闭 - + - - - + Quickload state 快速读档 - + F4 F4 - + Quicksave state 快速存档 - + F2 F2 - + &Load State File... (&L)读取存档... - + &Save State File... (&S)保存存档... - + E&xit (&X)退出 - + &Run (&R)运行 - + F7 F7 - + &Pause (&P)暂停 - + F8 F8 - + R&eset (&E)重置 - + &Interpreter (&I)解释器 - + &Slightly Faster Interpreter (&S)较快的解释器 - + &Dynarec (&D)动态重编译 - + Load &Map File... (&M)读取Map文件... - + &Save Map File... (&S)保存Map文件... - + &Reset Symbol Table (&R)重置符号表 - + &Disassembly (&D)汇编视图 - + Ctrl+D Ctrl+D - + &Log Console (&L)查看控制台日志 - + Ctrl+L Ctrl+L - + Memory &View... (&V)内存视图... - + Ctrl+M Ctrl+M - - Keyboard &Controls - (&C)键盘与控制 + + &Keyboard + - - &Toggle Full Screen - (&T)全屏幕 + + &Toggle fullscreen + - + + Show &debug statistics + + + + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + F12 F12 - + &Buffered Rendering (&B)渲染缓冲 - + F5 F5 - + &Hardware Transform (&H)硬件加速 - + F6 F6 - + &Linear Filtering (&L)线性过滤 - + &Wireframe (experimental) (&W)使用线框 (实验性选项) - + &Display Raw Framebuffer (&D)显示 Raw 原始缓冲 - - &Show Debug Statistics - (&S)显示调试统计 - - - + Screen &1x &1倍窗口 - + Ctrl+1 Ctrl+1 - + Screen &2x &2倍窗口 - + Ctrl+2 Ctrl+2 - + Screen &3x &3倍窗口 - + Ctrl+3 Ctrl+3 - + Screen &4x &4倍窗口 - + Ctrl+4 Ctrl+4 - + &Fast Memory (dynarec, unstable) (&F)高速闪存 (动态重编译,不稳定) - - &Ignore illegal reads/writes - (&I)忽略非法读取/写入 - - - + &Go to http://www.ppsspp.org/ (&G)转到 http://www.ppsspp.org/ - + &About PPSSPP... (&A)关于 PPSSPP... - + &Use VBO (&U)使用 VBO - - - + + + Debug 调试 - - - + + + Warning 警告 - - - + + + Error 错误 - - - + + + Info 信息 - - GamePad Controls - 手柄控制 - - - - &Run on load - (&R)加载后立即执行 - - - + D&ump next frame to log (&U)将下一帧转储至日志 - + &Vertex Cache (&V)顶点缓存 - + Memory View Texture... 内存纹理视图... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations 未翻译 diff --git a/Qt/languages/ppsspp_de.ts b/Qt/languages/ppsspp_de.ts index 9ae06e04b2..d079c15859 100644 --- a/Qt/languages/ppsspp_de.ts +++ b/Qt/languages/ppsspp_de.ts @@ -391,7 +391,7 @@ Select - + Select @@ -499,400 +499,425 @@ - + Debu&g - + &Options &Optionen - &Log Levels - - - - G3D - + HLE - + Default Standard - - Zoom + + Lo&g Levels - - Language - Sprache - - - - Anisotropic filtering + + &Language - + + &Video + + + + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help &Hilfe - + &Open... &Öffnen... - + &Close &Schließen - + - - + Quickload state Schnellladen - + F4 - + Quicksave state Schnellspeichern - + F2 - + &Load State File... &Lade Spielstand... - + &Save State File... &Speichere Spielstand... - + E&xit - + &Run &Starte - + F7 - + &Pause - + F8 - + R&eset - + &Interpreter - + &Slightly Faster Interpreter &etwas scnellerer Interpreter - + &Dynarec - + Load &Map File... Lade &Map Dateien... - + &Save Map File... &Speichere Map Dateien... - + &Reset Symbol Table &Setze Symboltabelle zurück - + &Disassembly - + Ctrl+D - + &Log Console &Log Konsole - + Ctrl+L - + Memory &View... - + Ctrl+M - - - Keyboard &Controls - Tastatur &Tastenbelegung - - - - &Toggle Full Screen - - - - - F12 - - - - - &Buffered Rendering - - - F5 + &Keyboard - - &Hardware Transform - - - - - F6 - - - - - &Linear Filtering - - - - - &Wireframe (experimental) - - - - - &Display Raw Framebuffer - - - - - &Show Debug Statistics - - - - - Screen &1x - - - - - Ctrl+1 + + &Toggle fullscreen - Screen &2x + Show &debug statistics - - Ctrl+2 + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + + F12 + + + + + &Buffered Rendering + + + + + F5 + + + + + &Hardware Transform + + + + + F6 + + + + + &Linear Filtering + + + + + &Wireframe (experimental) + + + + + &Display Raw Framebuffer + + + + + Screen &1x - Screen &3x + Ctrl+1 - - Ctrl+3 + + Screen &2x - Screen &4x + Ctrl+2 - - Ctrl+4 + + Screen &3x - &Fast Memory (dynarec, unstable) + Ctrl+3 - &Ignore illegal reads/writes + Screen &4x - + + Ctrl+4 + + + + + &Fast Memory (dynarec, unstable) + + + + &Go to http://www.ppsspp.org/ - + &About PPSSPP... - + &Use VBO - - - + + + Debug - - - + + + Warning - - - + + + Error - - - + + + Info - - GamePad Controls - - - - - &Run on load - - - - + D&ump next frame to log - + &Vertex Cache - + Memory View Texture... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations diff --git a/Qt/languages/ppsspp_en.ts b/Qt/languages/ppsspp_en.ts index 5d3846f784..47519c0180 100644 --- a/Qt/languages/ppsspp_en.ts +++ b/Qt/languages/ppsspp_en.ts @@ -499,400 +499,425 @@ - + Debu&g - + &Options - &Log Levels - - - - G3D - + HLE - + Default - - Zoom + + Lo&g Levels - - Language + + &Language - - Anisotropic filtering + + &Video - + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help - + &Open... - + &Close - + - - + Quickload state - + F4 - + Quicksave state - + F2 - + &Load State File... - + &Save State File... - + E&xit - + &Run - + F7 - + &Pause - + F8 - + R&eset - + &Interpreter - + &Slightly Faster Interpreter - + &Dynarec - + Load &Map File... - + &Save Map File... - + &Reset Symbol Table - + &Disassembly - + Ctrl+D - + &Log Console - + Ctrl+L - + Memory &View... - + Ctrl+M - - - Keyboard &Controls - - - - - &Toggle Full Screen - - - - - F12 - - - - - &Buffered Rendering - - - F5 + &Keyboard - - &Hardware Transform - - - - - F6 - - - - - &Linear Filtering - - - - - &Wireframe (experimental) - - - - - &Display Raw Framebuffer - - - - - &Show Debug Statistics - - - - - Screen &1x - - - - - Ctrl+1 + + &Toggle fullscreen - Screen &2x + Show &debug statistics - - Ctrl+2 + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + + F12 + + + + + &Buffered Rendering + + + + + F5 + + + + + &Hardware Transform + + + + + F6 + + + + + &Linear Filtering + + + + + &Wireframe (experimental) + + + + + &Display Raw Framebuffer + + + + + Screen &1x - Screen &3x + Ctrl+1 - - Ctrl+3 + + Screen &2x - Screen &4x + Ctrl+2 - - Ctrl+4 + + Screen &3x - &Fast Memory (dynarec, unstable) + Ctrl+3 - &Ignore illegal reads/writes + Screen &4x - + + Ctrl+4 + + + + + &Fast Memory (dynarec, unstable) + + + + &Go to http://www.ppsspp.org/ - + &About PPSSPP... - + &Use VBO - - - + + + Debug - - - + + + Warning - - - + + + Error - - - + + + Info - - GamePad Controls - - - - - &Run on load - - - - + D&ump next frame to log - + &Vertex Cache - + Memory View Texture... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations diff --git a/Qt/languages/ppsspp_fr.ts b/Qt/languages/ppsspp_fr.ts index 9b18ae76b0..ce5006357e 100644 --- a/Qt/languages/ppsspp_fr.ts +++ b/Qt/languages/ppsspp_fr.ts @@ -499,400 +499,425 @@ &Emulation - + Debu&g Debu&g - + &Options &Options - &Log Levels - Niveaux de &logs - - - G3D - + HLE - + Default Défaut - - Zoom + + Lo&g Levels - - Language - Langue - - - - Anisotropic filtering + + &Language - + + &Video + + + + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help &Aide - + &Open... &Ouvrir... - + &Close &Fermer - + - - + Quickload state - + F4 - + Quicksave state - + F2 - + &Load State File... - + &Save State File... - + E&xit &Quitter - + &Run - + F7 - + &Pause - + F8 - + R&eset - + &Interpreter - + &Slightly Faster Interpreter - + &Dynarec - + Load &Map File... - + &Save Map File... - + &Reset Symbol Table - + &Disassembly - + Ctrl+D - + &Log Console - + Ctrl+L - + Memory &View... - + Ctrl+M - - - Keyboard &Controls - - - - - &Toggle Full Screen - - - - - F12 - - - - - &Buffered Rendering - - - F5 + &Keyboard - - &Hardware Transform - - - - - F6 - - - - - &Linear Filtering - - - - - &Wireframe (experimental) - - - - - &Display Raw Framebuffer - - - - - &Show Debug Statistics - - - - - Screen &1x - - - - - Ctrl+1 + + &Toggle fullscreen - Screen &2x + Show &debug statistics - - Ctrl+2 + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + + F12 + + + + + &Buffered Rendering + + + + + F5 + + + + + &Hardware Transform + + + + + F6 + + + + + &Linear Filtering + + + + + &Wireframe (experimental) + + + + + &Display Raw Framebuffer + + + + + Screen &1x - Screen &3x + Ctrl+1 - - Ctrl+3 + + Screen &2x - Screen &4x + Ctrl+2 - - Ctrl+4 + + Screen &3x - &Fast Memory (dynarec, unstable) + Ctrl+3 - &Ignore illegal reads/writes + Screen &4x - + + Ctrl+4 + + + + + &Fast Memory (dynarec, unstable) + + + + &Go to http://www.ppsspp.org/ - + &About PPSSPP... - + &Use VBO - - - + + + Debug - - - + + + Warning - - - + + + Error - - - + + + Info - - GamePad Controls - - - - - &Run on load - - - - + D&ump next frame to log - + &Vertex Cache - + Memory View Texture... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations diff --git a/Qt/languages/ppsspp_pl.ts b/Qt/languages/ppsspp_pl.ts index d052a3702a..930d85663c 100644 --- a/Qt/languages/ppsspp_pl.ts +++ b/Qt/languages/ppsspp_pl.ts @@ -7,7 +7,7 @@ Controls Controls window title - Układ klawiszy + Układ klawiszy @@ -499,400 +499,425 @@ &Emulacja - + Debu&g &Debugger - + &Options &Opcje - &Log Levels - P&oziomy logowania - - - G3D G3D - + HLE HLE - + Default Domyślne - - Zoom - Zoom + + Lo&g Levels + &Poziomy logowania - - Language - Język + + &Language + &Język - - Anisotropic filtering - Filtrowanie anizotropowe + + &Video + &Wideo - + + &Anisotropic filtering + &Filtrowanie anizotropowe + + + + &Zoom + &Powiększenie + + + + Co&ntrols + S&terowanie + + + + &Core + Jądr&o + + + &Help Pomo&c - + &Open... &Otwórz... - + &Close &Zamknij - + - - + Quickload state Wczytaj stan - + F4 F4 - + Quicksave state Zapisz stan - + F2 F2 - + &Load State File... &Wczytaj plik stanu... - + &Save State File... &Zapisz plik stanu... - + E&xit Wyj&dź - + &Run &Uruchom - + F7 F7 - + &Pause &Pauza - + F8 F8 - + R&eset &Reset - + &Interpreter &Interpreter - + &Slightly Faster Interpreter &Szybszy interpreter - + &Dynarec R&ekompilacja (Dynarec) - + Load &Map File... &Wczytaj plik mapy... - + &Save Map File... &Zapisz plik mapy... - + &Reset Symbol Table Zresetuj &tablicę symboli - + &Disassembly &Deasembler - + Ctrl+D Ctrl+D - + &Log Console &Konsola logowania - + Ctrl+L Ctrl+L - + Memory &View... Widok &pamięci... - + Ctrl+M Ctrl+M - - Keyboard &Controls - Ustawienia &klawiatury + + &Keyboard + &Klawiatura - - &Toggle Full Screen - &Pełny ekran + + &Toggle fullscreen + Pełny &ekran - + + Show &debug statistics + Pokaż &statystyki + + + + I&gnore illegal reads/writes + I&gnoruj błędne odczyty/zapisy + + + + &Gamepad + &Pad + + + + Run on loa&d + Uruchom po &załadowaniu + + + + Show &FPS counter + Pokaż licznik &FPS + + + + S&tretch to display + &Rozciągnij obraz + + + + &Sound emulation + &Emulacja dźwięku + + + F12 F12 - + &Buffered Rendering &Buforowane renderowanie - + F5 F5 - + &Hardware Transform Sprzętowa &transformacja - + F6 F6 - + &Linear Filtering Filtrowanie &liniowe - + &Wireframe (experimental) &Widok siatki (eksperymentalny) - + &Display Raw Framebuffer Wyświetl &surowy framebuffer - - &Show Debug Statistics - Pokaż statystyki &emulacji - - - + Screen &1x &1x - + Ctrl+1 Ctrl+1 - + Screen &2x &2x - + Ctrl+2 Ctrl+2 - + Screen &3x &3x - + Ctrl+3 Ctrl+3 - + Screen &4x &4x - + Ctrl+4 Ctrl+4 - + &Fast Memory (dynarec, unstable) S&zybka pamięć (wymagany Dynarec, niestabilne) - - &Ignore illegal reads/writes - &Ignoruj nieprawidłowe odczyty/zapisy - - - + &Go to http://www.ppsspp.org/ &Idź do http://www.ppsspp.org - + &About PPSSPP... &O PPSSPP... - + &Use VBO Użyj &VBO - - - + + + Debug Debug - - - + + + Warning Ostrzeżenia - - - + + + Error Błędy - - - + + + Info Info - - GamePad Controls - Ustawienia pada - - - - &Run on load - Uruchom po &załadowaniu - - - + D&ump next frame to log Z&rzuć następną ramkę do logu - + &Vertex Cache &Cache wierzchołków - + Memory View Texture... - + Simple 2xAA Prosty antyaliasing 2x - + Off Wyłączone - + 2x 2x - + 4x 4x - + 8x 8x - + 16x 16x - - Show FPS counter - Pokaż licznik FPS - - - + No translations Brak tłumaczeń diff --git a/Qt/languages/ppsspp_tc.ts b/Qt/languages/ppsspp_tc.ts index 2b760daad7..a42937ece9 100644 --- a/Qt/languages/ppsspp_tc.ts +++ b/Qt/languages/ppsspp_tc.ts @@ -3,10 +3,6 @@ Controls - - Controls - 控制器 - Controls @@ -71,10 +67,6 @@ New function name: - - New function name : - 新函數名稱: - CtrlMemView @@ -126,17 +118,9 @@ Set new value: - - Set new value : - 設置新值: - Debugger_Disasm - - Dialog - 對話框 - Disassembler @@ -351,10 +335,6 @@ Debugger_VFPU - - Dialog - 對話框 - VFPU @@ -520,400 +500,425 @@ (&E)模擬 - + Debu&g (&G)除錯 - + &Options (&O)選項 - &Log Levels - (&L)日誌級別 - - - G3D - + HLE - + Default 默認 - - Zoom - 縮放 - - - - Language - 語言 - - - - Anisotropic filtering + + Lo&g Levels - + + &Language + + + + + &Video + + + + + &Anisotropic filtering + + + + + &Zoom + + + + + Co&ntrols + + + + + &Core + + + + &Help (&H)幫助 - + &Open... (&O)打開... - + &Close (&C)關閉 - + - - - + Quickload state 快速讀檔 - + F4 F4 - + Quicksave state 快速存檔 - + F2 F2 - + &Load State File... (&L)讀取存檔... - + &Save State File... (&S)保存存檔... - + E&xit (&X)退出 - + &Run (&R)運行 - + F7 F7 - + &Pause (&P)暫停 - + F8 F8 - + R&eset (&E)重置 - + &Interpreter (&I)解釋器 - + &Slightly Faster Interpreter (&S)較快的解釋器 - + &Dynarec (&D)動態解釋器 - + Load &Map File... (&M)讀取Map文件... - + &Save Map File... (&S)保存Map文件... - + &Reset Symbol Table (&R)重置符號表 - + &Disassembly (&D)反彙編器 - + Ctrl+D Ctrl+D - + &Log Console (&L)查看控制台日誌 - + Ctrl+L Ctrl+L - + Memory &View... (&V)內存視圖... - + Ctrl+M Ctrl+M - - Keyboard &Controls - (&C)鍵盤與控制 + + &Keyboard + - - &Toggle Full Screen - (&T)全屏幕 + + &Toggle fullscreen + - + + Show &debug statistics + + + + + I&gnore illegal reads/writes + + + + + &Gamepad + + + + + Run on loa&d + + + + + Show &FPS counter + + + + + S&tretch to display + + + + + &Sound emulation + + + + F12 F12 - + &Buffered Rendering (&B)渲染緩衝 - + F5 F5 - + &Hardware Transform (&H)硬件加速 - + F6 F6 - + &Linear Filtering (&L)線性過濾 - + &Wireframe (experimental) (&W)使用線框 (實驗性) - + &Display Raw Framebuffer (&D)顯示原始?緩衝 - - &Show Debug Statistics - (&S)顯示除錯資料 - - - + Screen &1x &1倍窗口 - + Ctrl+1 Ctrl+1 - + Screen &2x &2倍窗口 - + Ctrl+2 Ctrl+2 - + Screen &3x &3倍窗口 - + Ctrl+3 Ctrl+3 - + Screen &4x &4倍窗口 - + Ctrl+4 Ctrl+4 - + &Fast Memory (dynarec, unstable) (&F)高速閃存 (動態重編譯,不穩定) - - &Ignore illegal reads/writes - (&I)忽略非法讀取/寫入 - - - + &Go to http://www.ppsspp.org/ (&G)轉到 http://www.ppsspp.org/ - + &About PPSSPP... (&A)關於 PPSSPP... - + &Use VBO (&U)使用 VBO - - - + + + Debug 除錯 - - - + + + Warning 警告 - - - + + + Error 錯誤 - - - + + + Info 信息 - - GamePad Controls - 手柄控制 - - - - &Run on load - (&R)加載後立即執行 - - - + D&ump next frame to log (&U)將下一幀轉儲至日誌 - + &Vertex Cache (&V)頂點緩存 - + Memory View Texture... 內存紋理視圖... - + Simple 2xAA - + Off - + 2x - + 4x - + 8x - + 16x - - Show FPS counter - - - - + No translations 未翻譯 diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 66d3d194f1..c951d70f53 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -248,7 +248,10 @@ void MainWindow::UpdateMenus() ui->action_AF4x->setChecked(g_Config.iAnisotropyLevel == 4); ui->action_AF8x->setChecked(g_Config.iAnisotropyLevel == 8); ui->action_AF16x->setChecked(g_Config.iAnisotropyLevel == 16); + ui->action_Simple_2xAA->setChecked(g_Config.SSAntiAliasing); ui->action_Show_FPS_counter->setChecked(g_Config.bShowFPSCounter); + ui->action_Stretch_to_display->setChecked(g_Config.bStretchToDisplay); + ui->action_Sound->setChecked(g_Config.bEnableSound); bool enable = !Core_IsStepping() ? false : true; ui->action_EmulationRun->setEnabled(g_State.bEmuThreadStarted ? enable : false); @@ -311,6 +314,18 @@ void MainWindow::SetZoom(float zoom) { PSP_CoreParameter().pixelWidth = pixel_xres; PSP_CoreParameter().pixelHeight = pixel_yres; + PSP_CoreParameter().outputWidth = pixel_xres; + PSP_CoreParameter().outputHeight = pixel_yres; + + if (g_Config.SSAntiAliasing) + { + zoom *= 2; + PSP_CoreParameter().renderWidth = 480 * zoom; + PSP_CoreParameter().renderHeight = 272 * zoom; + } + + if (gpu) + gpu->Resized(); } void MainWindow::on_action_FileLoad_triggered() @@ -613,10 +628,14 @@ void MainWindow::on_action_OptionsFullScreen_triggered() int height = (int) QApplication::desktop()->screenGeometry().height(); PSP_CoreParameter().pixelWidth = width; PSP_CoreParameter().pixelHeight = height; - PSP_CoreParameter().renderWidth = width; - PSP_CoreParameter().renderHeight = height; PSP_CoreParameter().outputWidth = width; PSP_CoreParameter().outputHeight = height; + + int antialias = 1; + if (g_Config.SSAntiAliasing) antialias = 2; + PSP_CoreParameter().renderWidth = width * antialias; + PSP_CoreParameter().renderHeight = height * antialias; + pixel_xres = width; pixel_yres = height; dp_xres = pixel_xres; @@ -994,3 +1013,17 @@ void MainWindow::on_action_Show_FPS_counter_triggered() g_Config.bShowFPSCounter = !g_Config.bShowFPSCounter; UpdateMenus(); } + +void MainWindow::on_action_Stretch_to_display_triggered() +{ + g_Config.bStretchToDisplay = !g_Config.bStretchToDisplay; + UpdateMenus(); + if (gpu) + gpu->Resized(); +} + +void MainWindow::on_action_Sound_triggered() +{ + g_Config.bEnableSound = !g_Config.bEnableSound; + UpdateMenus(); +} diff --git a/Qt/mainwindow.h b/Qt/mainwindow.h index 81603a641f..9b83c867ae 100644 --- a/Qt/mainwindow.h +++ b/Qt/mainwindow.h @@ -167,6 +167,10 @@ private slots: void on_action_Show_FPS_counter_triggered(); + void on_action_Stretch_to_display_triggered(); + + void on_action_Sound_triggered(); + private: void loadLanguage(const QString &language); void createLanguageMenu(); diff --git a/Qt/mainwindow.ui b/Qt/mainwindow.ui index 78eeedfad9..a167aad884 100644 --- a/Qt/mainwindow.ui +++ b/Qt/mainwindow.ui @@ -71,10 +71,6 @@ - - - - @@ -96,7 +92,7 @@ - &Log Levels + Lo&g Levels @@ -130,54 +126,77 @@ - - - Zoom - - - - - - - Language + &Language - + - Anisotropic filtering + &Video - - - - - + + + &Anisotropic filtering + + + + + + + + + + &Zoom + + + + + + + + + + + + + + + + + + + - - + + + Co&ntrols + + + + + + + &Core + + + + + + + + + + + + - - - - - - - - - - - - - - - @@ -339,12 +358,12 @@ - Keyboard &Controls + &Keyboard - &Toggle Full Screen + &Toggle fullscreen F12 @@ -401,7 +420,7 @@ true - &Show Debug Statistics + Show &debug statistics @@ -461,7 +480,7 @@ true - &Ignore illegal reads/writes + I&gnore illegal reads/writes @@ -580,12 +599,12 @@ - GamePad Controls + &Gamepad - &Run on load + Run on loa&d @@ -659,7 +678,23 @@ true - Show FPS counter + Show &FPS counter + + + + + true + + + S&tretch to display + + + + + true + + + &Sound emulation diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 36ba9e8499..ae0ec17aca 100644 Binary files a/Windows/ppsspp.rc and b/Windows/ppsspp.rc differ diff --git a/native b/native index f5e7bd5a9c..3caced8524 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit f5e7bd5a9c3e4b39a4eac71b577f06ad54f2bc96 +Subproject commit 3caced8524c06cabcf968942a7780d80337de7bf