mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-27 10:20:49 +00:00
JIT: add option to enable/disable jit of memory instructions. for crash safety.
This commit is contained in:
parent
df12802a5a
commit
f5efd6f2b1
@ -49,8 +49,10 @@ void CConfig::Load(const char *iniFileName)
|
|||||||
general->Get("IgnoreBadMemAccess", &bIgnoreBadMemAccess, true);
|
general->Get("IgnoreBadMemAccess", &bIgnoreBadMemAccess, true);
|
||||||
general->Get("CurrentDirectory", ¤tDirectory, "");
|
general->Get("CurrentDirectory", ¤tDirectory, "");
|
||||||
general->Get("ShowDebuggerOnLoad", &bShowDebuggerOnLoad, false);
|
general->Get("ShowDebuggerOnLoad", &bShowDebuggerOnLoad, false);
|
||||||
|
|
||||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||||
cpu->Get("Core", &iCpuCore, 0);
|
cpu->Get("Core", &iCpuCore, 0);
|
||||||
|
cpu->Get("FastMemory", &bFastMemory, false);
|
||||||
|
|
||||||
IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics");
|
IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics");
|
||||||
graphics->Get("ShowFPSCounter", &bShowFPSCounter, false);
|
graphics->Get("ShowFPSCounter", &bShowFPSCounter, false);
|
||||||
@ -88,6 +90,7 @@ void CConfig::Save()
|
|||||||
general->Set("ShowDebuggerOnLoad", bShowDebuggerOnLoad);
|
general->Set("ShowDebuggerOnLoad", bShowDebuggerOnLoad);
|
||||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||||
cpu->Set("Core", iCpuCore);
|
cpu->Set("Core", iCpuCore);
|
||||||
|
cpu->Set("FastMemory", bFastMemory);
|
||||||
|
|
||||||
IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics");
|
IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics");
|
||||||
graphics->Set("ShowFPSCounter", bShowFPSCounter);
|
graphics->Set("ShowFPSCounter", bShowFPSCounter);
|
||||||
|
@ -41,6 +41,7 @@ public:
|
|||||||
bool bSpeedLimit;
|
bool bSpeedLimit;
|
||||||
bool bConfirmOnQuit;
|
bool bConfirmOnQuit;
|
||||||
bool bIgnoreBadMemAccess;
|
bool bIgnoreBadMemAccess;
|
||||||
|
bool bFastMemory;
|
||||||
|
|
||||||
// GFX
|
// GFX
|
||||||
bool bDisplayFramebuffer;
|
bool bDisplayFramebuffer;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "../MIPS.h"
|
#include "../MIPS.h"
|
||||||
|
|
||||||
|
#include "../../Config.h"
|
||||||
#include "Common/Common.h"
|
#include "Common/Common.h"
|
||||||
#include "Jit.h"
|
#include "Jit.h"
|
||||||
#include "RegCache.h"
|
#include "RegCache.h"
|
||||||
@ -86,6 +87,10 @@ void Jit::Comp_FPU3op(u32 op)
|
|||||||
void Jit::Comp_FPULS(u32 op)
|
void Jit::Comp_FPULS(u32 op)
|
||||||
{
|
{
|
||||||
CONDITIONAL_DISABLE;
|
CONDITIONAL_DISABLE;
|
||||||
|
if (!g_Config.bFastMemory) {
|
||||||
|
DISABLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
s32 offset = (s16)(op&0xFFFF);
|
s32 offset = (s16)(op&0xFFFF);
|
||||||
int ft = ((op>>16)&0x1f);
|
int ft = ((op>>16)&0x1f);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "../../MemMap.h"
|
#include "../../MemMap.h"
|
||||||
#include "../MIPSAnalyst.h"
|
#include "../MIPSAnalyst.h"
|
||||||
|
#include "../../Config.h"
|
||||||
|
|
||||||
#include "Jit.h"
|
#include "Jit.h"
|
||||||
#include "RegCache.h"
|
#include "RegCache.h"
|
||||||
@ -42,7 +43,11 @@ namespace MIPSComp
|
|||||||
{
|
{
|
||||||
void Jit::Comp_ITypeMem(u32 op)
|
void Jit::Comp_ITypeMem(u32 op)
|
||||||
{
|
{
|
||||||
// OLDD
|
if (!g_Config.bFastMemory)
|
||||||
|
{
|
||||||
|
DISABLE;
|
||||||
|
}
|
||||||
|
|
||||||
int offset = (signed short)(op&0xFFFF);
|
int offset = (signed short)(op&0xFFFF);
|
||||||
int rt = _RT;
|
int rt = _RT;
|
||||||
int rs = _RS;
|
int rs = _RS;
|
||||||
|
@ -112,8 +112,9 @@ namespace MainWindow
|
|||||||
AdjustWindowRect(&rcOuter, WS_OVERLAPPEDWINDOW, TRUE);
|
AdjustWindowRect(&rcOuter, WS_OVERLAPPEDWINDOW, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetZoom(int zoom) {
|
void SetZoom(float zoom) {
|
||||||
g_Config.iWindowZoom = zoom;
|
if (zoom < 5)
|
||||||
|
g_Config.iWindowZoom = zoom;
|
||||||
RECT rc, rcOuter;
|
RECT rc, rcOuter;
|
||||||
GetWindowRectAtZoom(zoom, rc, rcOuter);
|
GetWindowRectAtZoom(zoom, rc, rcOuter);
|
||||||
MoveWindow(hwndMain, rcOuter.left, rcOuter.top, rcOuter.right - rcOuter.left, rcOuter.bottom - rcOuter.top, TRUE);
|
MoveWindow(hwndMain, rcOuter.left, rcOuter.top, rcOuter.right - rcOuter.left, rcOuter.bottom - rcOuter.top, TRUE);
|
||||||
@ -638,6 +639,7 @@ namespace MainWindow
|
|||||||
CHECKITEM(ID_OPTIONS_SHOWDEBUGSTATISTICS, g_Config.bShowDebugStats);
|
CHECKITEM(ID_OPTIONS_SHOWDEBUGSTATISTICS, g_Config.bShowDebugStats);
|
||||||
CHECKITEM(ID_OPTIONS_WIREFRAME, g_Config.bDrawWireframe);
|
CHECKITEM(ID_OPTIONS_WIREFRAME, g_Config.bDrawWireframe);
|
||||||
CHECKITEM(ID_OPTIONS_HARDWARETRANSFORM, g_Config.bHardwareTransform);
|
CHECKITEM(ID_OPTIONS_HARDWARETRANSFORM, g_Config.bHardwareTransform);
|
||||||
|
CHECKITEM(ID_OPTIONS_FASTMEMORY, g_Config.bFastMemory);
|
||||||
|
|
||||||
BOOL enable = !Core_IsStepping();
|
BOOL enable = !Core_IsStepping();
|
||||||
EnableMenuItem(menu,ID_EMULATION_RUN,enable);
|
EnableMenuItem(menu,ID_EMULATION_RUN,enable);
|
||||||
|
@ -215,6 +215,7 @@ BEGIN
|
|||||||
MENUITEM "&Display Raw Framebuffer", ID_OPTIONS_DISPLAYRAWFRAMEBUFFER
|
MENUITEM "&Display Raw Framebuffer", ID_OPTIONS_DISPLAYRAWFRAMEBUFFER
|
||||||
MENUITEM "&Buffered Rendering\tF5", ID_OPTIONS_BUFFEREDRENDERING
|
MENUITEM "&Buffered Rendering\tF5", ID_OPTIONS_BUFFEREDRENDERING
|
||||||
MENUITEM "&Hardware Transform", ID_OPTIONS_HARDWARETRANSFORM
|
MENUITEM "&Hardware Transform", ID_OPTIONS_HARDWARETRANSFORM
|
||||||
|
MENUITEM "&Fast Memory (dynarec, unstable)", ID_OPTIONS_FASTMEMORY
|
||||||
MENUITEM "&Wireframe (experimental)", ID_OPTIONS_WIREFRAME
|
MENUITEM "&Wireframe (experimental)", ID_OPTIONS_WIREFRAME
|
||||||
MENUITEM "&Show Debug Statistics", ID_OPTIONS_SHOWDEBUGSTATISTICS
|
MENUITEM "&Show Debug Statistics", ID_OPTIONS_SHOWDEBUGSTATISTICS
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
|
@ -245,13 +245,14 @@
|
|||||||
#define ID_OPTIONS_SHOWDEBUGSTATISTICS 40122
|
#define ID_OPTIONS_SHOWDEBUGSTATISTICS 40122
|
||||||
#define ID_OPTIONS_WIREFRAME 40123
|
#define ID_OPTIONS_WIREFRAME 40123
|
||||||
#define ID_OPTIONS_HARDWARETRANSFORM 40124
|
#define ID_OPTIONS_HARDWARETRANSFORM 40124
|
||||||
|
#define ID_OPTIONS_FASTMEMORY 40125
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 232
|
#define _APS_NEXT_RESOURCE_VALUE 232
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40125
|
#define _APS_NEXT_COMMAND_VALUE 40126
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1162
|
#define _APS_NEXT_CONTROL_VALUE 1162
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
|
@ -179,7 +179,6 @@ void EmuScreen::render()
|
|||||||
|
|
||||||
ui_draw2d.Begin(DBMODE_NORMAL);
|
ui_draw2d.Begin(DBMODE_NORMAL);
|
||||||
|
|
||||||
// Make this configurable.
|
|
||||||
if (g_Config.bShowTouchControls)
|
if (g_Config.bShowTouchControls)
|
||||||
DrawGamepad(ui_draw2d);
|
DrawGamepad(ui_draw2d);
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ void SettingsScreen::render() {
|
|||||||
// VLinear vlinear(10, 80, 10);
|
// VLinear vlinear(10, 80, 10);
|
||||||
int x = 30;
|
int x = 30;
|
||||||
int y = 50;
|
int y = 50;
|
||||||
UICheckBox(GEN_ID, x, y += 50, "Enable Sound Emulation", ALIGN_TOPLEFT, &g_Config.bEnableSound);
|
UICheckBox(GEN_ID, x, y += 50, "Sound Emulation", ALIGN_TOPLEFT, &g_Config.bEnableSound);
|
||||||
UICheckBox(GEN_ID, x, y += 50, "Buffered Rendering (may fix flicker)", ALIGN_TOPLEFT, &g_Config.bBufferedRendering);
|
UICheckBox(GEN_ID, x, y += 50, "Buffered Rendering (may fix flicker)", ALIGN_TOPLEFT, &g_Config.bBufferedRendering);
|
||||||
UICheckBox(GEN_ID, x, y += 50, "Hardware Transform (experimental)", ALIGN_TOPLEFT, &g_Config.bHardwareTransform);
|
UICheckBox(GEN_ID, x, y += 50, "Hardware Transform (experimental)", ALIGN_TOPLEFT, &g_Config.bHardwareTransform);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user