core: Add configuration option for CPU JIT.
This commit is contained in:
parent
1976a2d773
commit
14085ec670
@ -65,6 +65,7 @@ void Config::ReadValues() {
|
|||||||
Settings::values.pad_circle_modifier_scale = (float)sdl2_config->GetReal("Controls", "pad_circle_modifier_scale", 0.5);
|
Settings::values.pad_circle_modifier_scale = (float)sdl2_config->GetReal("Controls", "pad_circle_modifier_scale", 0.5);
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
|
Settings::values.use_cpu_jit = sdl2_config->GetBoolean("Core", "use_cpu_jit", true);
|
||||||
Settings::values.frame_skip = sdl2_config->GetInteger("Core", "frame_skip", 0);
|
Settings::values.frame_skip = sdl2_config->GetInteger("Core", "frame_skip", 0);
|
||||||
|
|
||||||
// Renderer
|
// Renderer
|
||||||
|
@ -38,6 +38,10 @@ pad_circle_modifier =
|
|||||||
pad_circle_modifier_scale =
|
pad_circle_modifier_scale =
|
||||||
|
|
||||||
[Core]
|
[Core]
|
||||||
|
# Whether to use the Just-In-Time (JIT) compiler for CPU emulation
|
||||||
|
# 0: Interpreter (slow), 1 (default): JIT (fast)
|
||||||
|
use_cpu_jit =
|
||||||
|
|
||||||
# The applied frameskip amount. Must be a power of two.
|
# The applied frameskip amount. Must be a power of two.
|
||||||
# 0 (default): No frameskip, 1: x2 frameskip, 2: x4 frameskip, 3: x8 frameskip, etc.
|
# 0 (default): No frameskip, 1: x2 frameskip, 2: x4 frameskip, 3: x8 frameskip, etc.
|
||||||
frame_skip =
|
frame_skip =
|
||||||
|
@ -41,6 +41,7 @@ void Config::ReadValues() {
|
|||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
|
||||||
qt_config->beginGroup("Core");
|
qt_config->beginGroup("Core");
|
||||||
|
Settings::values.use_cpu_jit = qt_config->value("use_cpu_jit", true).toBool();
|
||||||
Settings::values.frame_skip = qt_config->value("frame_skip", 0).toInt();
|
Settings::values.frame_skip = qt_config->value("frame_skip", 0).toInt();
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
|
||||||
@ -134,6 +135,7 @@ void Config::SaveValues() {
|
|||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
|
||||||
qt_config->beginGroup("Core");
|
qt_config->beginGroup("Core");
|
||||||
|
qt_config->setValue("use_cpu_jit", Settings::values.use_cpu_jit);
|
||||||
qt_config->setValue("frame_skip", Settings::values.frame_skip);
|
qt_config->setValue("frame_skip", Settings::values.frame_skip);
|
||||||
qt_config->endGroup();
|
qt_config->endGroup();
|
||||||
|
|
||||||
|
@ -6,16 +6,16 @@
|
|||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
|
#include "core/arm/arm_interface.h"
|
||||||
|
#include "core/arm/dynarmic/arm_dynarmic.h"
|
||||||
|
#include "core/arm/dyncom/arm_dyncom.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
|
#include "core/gdbstub/gdbstub.h"
|
||||||
#include "core/arm/arm_interface.h"
|
|
||||||
#include "core/arm/dyncom/arm_dyncom.h"
|
|
||||||
#include "core/hle/hle.h"
|
#include "core/hle/hle.h"
|
||||||
#include "core/hle/kernel/thread.h"
|
#include "core/hle/kernel/thread.h"
|
||||||
#include "core/hw/hw.h"
|
#include "core/hw/hw.h"
|
||||||
|
#include "core/settings.h"
|
||||||
#include "core/gdbstub/gdbstub.h"
|
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
@ -73,8 +73,13 @@ void Stop() {
|
|||||||
|
|
||||||
/// Initialize the core
|
/// Initialize the core
|
||||||
void Init() {
|
void Init() {
|
||||||
|
if (Settings::values.use_cpu_jit) {
|
||||||
|
g_sys_core = std::make_unique<ARM_Dynarmic>(USER32MODE);
|
||||||
|
g_app_core = std::make_unique<ARM_Dynarmic>(USER32MODE);
|
||||||
|
} else {
|
||||||
g_sys_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
g_sys_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
||||||
g_app_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
g_app_core = std::make_unique<ARM_DynCom>(USER32MODE);
|
||||||
|
}
|
||||||
|
|
||||||
LOG_DEBUG(Core, "Initialized OK");
|
LOG_DEBUG(Core, "Initialized OK");
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ struct Values {
|
|||||||
float pad_circle_modifier_scale;
|
float pad_circle_modifier_scale;
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
|
bool use_cpu_jit;
|
||||||
int frame_skip;
|
int frame_skip;
|
||||||
|
|
||||||
// Data Storage
|
// Data Storage
|
||||||
|
Loading…
Reference in New Issue
Block a user