mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-31 13:52:21 +00:00
Replace "Core" with "Jit" in ini. Don't show Open dialog by default (use Ctrl+A or Ctrl+O to open it).
Delete "Slightly Faster Interpreter".
This commit is contained in:
parent
159f423135
commit
37f998407b
@ -55,8 +55,8 @@ void CConfig::Load(const char *iniFileName)
|
||||
general->Get("ShowDebuggerOnLoad", &bShowDebuggerOnLoad, false);
|
||||
|
||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||
cpu->Get("Core", &iCpuCore, 2);
|
||||
cpu->Get("FastMemory", &bFastMemory, false);
|
||||
cpu->Get("Jit", &bJit, true);
|
||||
cpu->Get("FastMemory", &bFastMemory, true);
|
||||
|
||||
IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics");
|
||||
graphics->Get("ShowFPSCounter", &bShowFPSCounter, false);
|
||||
@ -117,7 +117,7 @@ void CConfig::Save()
|
||||
general->Set("CurrentDirectory", currentDirectory);
|
||||
general->Set("ShowDebuggerOnLoad", bShowDebuggerOnLoad);
|
||||
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
|
||||
cpu->Set("Core", iCpuCore);
|
||||
cpu->Set("Jit", bJit);
|
||||
cpu->Set("FastMemory", bFastMemory);
|
||||
|
||||
IniFile::Section *graphics = iniFile.GetOrCreateSection("Graphics");
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
// Core
|
||||
bool bIgnoreBadMemAccess;
|
||||
bool bFastMemory;
|
||||
int iCpuCore;
|
||||
bool bJit;
|
||||
|
||||
// GFX
|
||||
bool bDisplayFramebuffer;
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
enum CPUCore {
|
||||
CPU_INTERPRETER,
|
||||
CPU_FASTINTERPRETER, // unsafe, a bit faster than INTERPRETER
|
||||
CPU_JIT,
|
||||
};
|
||||
|
||||
|
@ -143,11 +143,7 @@ int MIPSState::RunLoopUntil(u64 globalTicks)
|
||||
MIPSComp::jit->RunLoopUntil(globalTicks);
|
||||
break;
|
||||
|
||||
case CPU_FASTINTERPRETER: // For jit-less platforms. Crashier than INTERPRETER.
|
||||
return MIPSInterpret_RunFastUntil(globalTicks);
|
||||
|
||||
case CPU_INTERPRETER:
|
||||
// INFO_LOG(CPU, "Entering run loop for %i ticks, pc=%08x", (int)globalTicks, mipsr4k.pc);
|
||||
return MIPSInterpret_RunUntil(globalTicks);
|
||||
}
|
||||
return 1;
|
||||
|
@ -1016,124 +1016,6 @@ static inline void DelayBranchTo(MIPSState *curMips, u32 where)
|
||||
curMips->inDelaySlot = true;
|
||||
}
|
||||
|
||||
// Optimized interpreter loop that shortcuts the most common instructions.
|
||||
// For slow platforms without JITs.
|
||||
#define SIMM16 (s32)(s16)(op & 0xFFFF)
|
||||
#define UIMM16 (u32)(u16)(op & 0xFFFF)
|
||||
#define SUIMM16 (u32)(s32)(s16)(op & 0xFFFF)
|
||||
int MIPSInterpret_RunFastUntil(u64 globalTicks)
|
||||
{
|
||||
MIPSState *curMips = currentMIPS;
|
||||
while (coreState == CORE_RUNNING)
|
||||
{
|
||||
CoreTiming::Advance();
|
||||
|
||||
while (curMips->downcount >= 0 && coreState == CORE_RUNNING) // TODO: Try to get rid of the latter check
|
||||
{
|
||||
again:
|
||||
bool wasInDelaySlot = curMips->inDelaySlot;
|
||||
u32 op = Memory::ReadUnchecked_U32(curMips->pc);
|
||||
switch (op >> 29)
|
||||
{
|
||||
case 0x0:
|
||||
{
|
||||
int imm = (s16)(op&0xFFFF) << 2;
|
||||
int rs = _RS;
|
||||
int rt = _RT;
|
||||
u32 addr = curMips->pc + imm + 4;
|
||||
switch (op >> 26)
|
||||
{
|
||||
case 4: if (R(rt) == R(rs)) DelayBranchTo(curMips, addr); else curMips->pc += 4; break; //beq
|
||||
case 5: if (R(rt) != R(rs)) DelayBranchTo(curMips, addr); else curMips->pc += 4; break; //bne
|
||||
case 6: if ((s32)R(rs) <= 0) DelayBranchTo(curMips, addr); else curMips->pc += 4; break; //blez
|
||||
case 7: if ((s32)R(rs) > 0) DelayBranchTo(curMips, addr); else curMips->pc += 4; break; //bgtz
|
||||
default:
|
||||
goto interpret;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x1:
|
||||
{
|
||||
int rt = _RT;
|
||||
int rs = _RS;
|
||||
switch (op >> 26)
|
||||
{
|
||||
case 8: R(rt) = R(rs) + SIMM16; break; //addi
|
||||
case 9: R(rt) = R(rs) + SIMM16; break; //addiu
|
||||
case 10: R(rt) = (s32)R(rs) < SIMM16; break; //slti
|
||||
case 11: R(rt) = R(rs) < SUIMM16; break; //sltiu
|
||||
case 12: R(rt) = R(rs) & UIMM16; break; //andi
|
||||
case 13: R(rt) = R(rs) | UIMM16; break; //ori
|
||||
case 14: R(rt) = R(rs) ^ UIMM16; break; //xori
|
||||
case 15: R(rt) = UIMM16 << 16; break; //lui
|
||||
default:
|
||||
goto interpret;
|
||||
}
|
||||
currentMIPS->pc += 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4:
|
||||
{
|
||||
int rt = _RT;
|
||||
int rs = _RS;
|
||||
int imm = (s16)(op & 0xFFFF);
|
||||
u32 addr = R(rs) + imm;
|
||||
switch (op >> 26)
|
||||
{
|
||||
case 32: R(rt) = (u32)(s32)(s8) Memory::ReadUnchecked_U8(addr); break; //lb
|
||||
case 33: R(rt) = (u32)(s32)(s16)Memory::ReadUnchecked_U16(addr); break; //lh
|
||||
case 35: R(rt) = Memory::ReadUnchecked_U32(addr); break; //lw
|
||||
case 36: R(rt) = Memory::ReadUnchecked_U8(addr); break; //lbu
|
||||
case 37: R(rt) = Memory::ReadUnchecked_U16(addr); break; //lhu
|
||||
default:
|
||||
goto interpret;
|
||||
}
|
||||
currentMIPS->pc += 4;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x5:
|
||||
{
|
||||
int rt = _RT;
|
||||
int rs = _RS;
|
||||
int imm = (s16)(op & 0xFFFF);
|
||||
u32 addr = R(rs) + imm;
|
||||
switch (op >> 26)
|
||||
{
|
||||
case 40: Memory::WriteUnchecked_U8(R(rt), addr); break; //sb
|
||||
case 41: Memory::WriteUnchecked_U16(R(rt), addr); break; //sh
|
||||
case 43: Memory::WriteUnchecked_U32(R(rt), addr); break; //sw
|
||||
default:
|
||||
goto interpret;
|
||||
}
|
||||
currentMIPS->pc += 4;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
interpret:
|
||||
MIPSInterpret(op);
|
||||
}
|
||||
|
||||
if (curMips->inDelaySlot)
|
||||
{
|
||||
// The reason we have to check this is the delay slot hack in Int_Syscall.
|
||||
if (wasInDelaySlot)
|
||||
{
|
||||
curMips->pc = curMips->nextPC;
|
||||
curMips->inDelaySlot = false;
|
||||
}
|
||||
curMips->downcount -= 1;
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
const char *MIPSGetName(u32 op)
|
||||
{
|
||||
static const char *noname = "unk";
|
||||
|
@ -57,7 +57,6 @@ void MIPSCompileOp(u32 op);
|
||||
void MIPSDisAsm(u32 op, u32 pc, char *out, bool tabsToSpaces = false);
|
||||
u32 MIPSGetInfo(u32 op);
|
||||
void MIPSInterpret(u32 op); //only for those rare ones
|
||||
int MIPSInterpret_RunFastUntil(u64 globalTicks);
|
||||
int MIPSInterpret_RunUntil(u64 globalTicks);
|
||||
MIPSInterpretFunc MIPSGetInterpretFunc(u32 op);
|
||||
|
||||
|
@ -83,7 +83,7 @@ inline void ReadFromHardware(T &var, const u32 address)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_Config.iCpuCore == CPU_JIT) {
|
||||
if (g_Config.bJit) {
|
||||
WARN_LOG(MEMMAP, "ReadFromHardware: Invalid address %08x", address);
|
||||
} else {
|
||||
WARN_LOG(MEMMAP, "ReadFromHardware: Invalid address %08x PC %08x LR %08x", address, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
||||
@ -115,7 +115,7 @@ inline void WriteToHardware(u32 address, const T data)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_Config.iCpuCore == CPU_JIT) {
|
||||
if (g_Config.bJit) {
|
||||
WARN_LOG(MEMMAP, "WriteToHardware: Invalid address %08x", address);
|
||||
} else {
|
||||
WARN_LOG(MEMMAP, "WriteToHardware: Invalid address %08x PC %08x LR %08x", address, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
||||
|
@ -68,7 +68,7 @@ DWORD TheThread(LPVOID x)
|
||||
coreParameter.fileToStart = fileToStart;
|
||||
coreParameter.enableSound = true;
|
||||
coreParameter.gpuCore = GPU_GLES;
|
||||
coreParameter.cpuCore = (CPUCore)g_Config.iCpuCore;
|
||||
coreParameter.cpuCore = g_Config.bJit ? CPU_JIT : CPU_INTERPRETER;
|
||||
coreParameter.enableDebugging = true;
|
||||
coreParameter.printfEmuLog = false;
|
||||
coreParameter.headLess = false;
|
||||
|
@ -452,15 +452,11 @@ namespace MainWindow
|
||||
break;
|
||||
|
||||
case ID_CPU_DYNAREC:
|
||||
g_Config.iCpuCore = CPU_JIT;
|
||||
g_Config.bJit = true;
|
||||
UpdateMenus();
|
||||
break;
|
||||
case ID_CPU_INTERPRETER:
|
||||
g_Config.iCpuCore = CPU_INTERPRETER;
|
||||
UpdateMenus();
|
||||
break;
|
||||
case ID_CPU_FASTINTERPRETER:
|
||||
g_Config.iCpuCore = CPU_FASTINTERPRETER;
|
||||
g_Config.bJit = false;
|
||||
UpdateMenus();
|
||||
break;
|
||||
|
||||
@ -701,9 +697,8 @@ namespace MainWindow
|
||||
// CHECK(ID_OPTIONS_EMULATESYSCALL,g_bEmulateSyscall);
|
||||
CHECKITEM(ID_OPTIONS_DISPLAYRAWFRAMEBUFFER, g_Config.bDisplayFramebuffer);
|
||||
CHECKITEM(ID_OPTIONS_IGNOREILLEGALREADS,g_Config.bIgnoreBadMemAccess);
|
||||
CHECKITEM(ID_CPU_INTERPRETER,g_Config.iCpuCore == CPU_INTERPRETER);
|
||||
CHECKITEM(ID_CPU_FASTINTERPRETER,g_Config.iCpuCore == CPU_FASTINTERPRETER);
|
||||
CHECKITEM(ID_CPU_DYNAREC,g_Config.iCpuCore == CPU_JIT);
|
||||
CHECKITEM(ID_CPU_INTERPRETER,g_Config.bJit == true);
|
||||
CHECKITEM(ID_CPU_DYNAREC,g_Config.bJit == false);
|
||||
CHECKITEM(ID_OPTIONS_BUFFEREDRENDERING, g_Config.bBufferedRendering);
|
||||
CHECKITEM(ID_OPTIONS_SHOWDEBUGSTATISTICS, g_Config.bShowDebugStats);
|
||||
CHECKITEM(ID_OPTIONS_WIREFRAME, g_Config.bDrawWireframe);
|
||||
@ -731,7 +726,6 @@ namespace MainWindow
|
||||
EnableMenuItem(menu,ID_FILE_QUICKLOADSTATE,!enable);
|
||||
EnableMenuItem(menu,ID_CPU_DYNAREC,enable);
|
||||
EnableMenuItem(menu,ID_CPU_INTERPRETER,enable);
|
||||
EnableMenuItem(menu,ID_CPU_FASTINTERPRETER,enable);
|
||||
EnableMenuItem(menu,ID_DVD_INSERTISO,enable);
|
||||
EnableMenuItem(menu,ID_FILE_BOOTBIOS,enable);
|
||||
EnableMenuItem(menu,ID_EMULATION_STOP,!enable);
|
||||
|
@ -76,15 +76,11 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
switch (__argv[i][1])
|
||||
{
|
||||
case 'j':
|
||||
g_Config.iCpuCore = CPU_JIT;
|
||||
g_Config.bJit = true;
|
||||
g_Config.bSaveSettings = false;
|
||||
break;
|
||||
case 'i':
|
||||
g_Config.iCpuCore = CPU_INTERPRETER;
|
||||
g_Config.bSaveSettings = false;
|
||||
break;
|
||||
case 'f':
|
||||
g_Config.iCpuCore = CPU_FASTINTERPRETER;
|
||||
g_Config.bJit = false;
|
||||
g_Config.bSaveSettings = false;
|
||||
break;
|
||||
case 'l':
|
||||
@ -163,8 +159,8 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
|
||||
EmuThread_Start(fileToStart);
|
||||
}
|
||||
else
|
||||
MainWindow::BrowseAndBoot();
|
||||
// else
|
||||
// MainWindow::BrowseAndBoot();
|
||||
|
||||
if (fileToStart != NULL && stateToLoad != NULL)
|
||||
SaveState::Load(stateToLoad);
|
||||
|
Binary file not shown.
@ -47,7 +47,7 @@ EmuScreen::EmuScreen(const std::string &filename) : invalid_(true)
|
||||
INFO_LOG(BOOT, "Starting up hardware.");
|
||||
|
||||
CoreParameter coreParam;
|
||||
coreParam.cpuCore = (CPUCore)g_Config.iCpuCore;
|
||||
coreParam.cpuCore = g_Config.bJit ? CPU_JIT : CPU_INTERPRETER;
|
||||
coreParam.gpuCore = GPU_GLES;
|
||||
coreParam.enableSound = g_Config.bEnableSound;
|
||||
coreParam.fileToStart = fileToStart;
|
||||
|
@ -314,11 +314,9 @@ void SettingsScreen::render() {
|
||||
UICheckBox(GEN_ID, x, y += stride, "Draw using Stream VBO", ALIGN_TOPLEFT, &g_Config.bUseVBO);
|
||||
UICheckBox(GEN_ID, x, y += stride, "Vertex Cache", ALIGN_TOPLEFT, &g_Config.bVertexCache);
|
||||
|
||||
bool useJit = g_Config.iCpuCore == CPU_JIT;
|
||||
UICheckBox(GEN_ID, x, y += stride, "JIT (Dynarec)", ALIGN_TOPLEFT, &useJit);
|
||||
if (g_Config.iCpuCore == CPU_JIT)
|
||||
UICheckBox(GEN_ID, x + 450, y, "Fastmem (may crash)", ALIGN_TOPLEFT, &g_Config.bFastMemory);
|
||||
g_Config.iCpuCore = useJit ? CPU_JIT : CPU_INTERPRETER;
|
||||
UICheckBox(GEN_ID, x, y += stride, "JIT (Dynarec)", ALIGN_TOPLEFT, &g_Config.bJit);
|
||||
if (g_Config.bJit)
|
||||
UICheckBox(GEN_ID, x + 450, y, "Fastmem (may be unstable)", ALIGN_TOPLEFT, &g_Config.bFastMemory);
|
||||
// ui_draw2d.DrawText(UBUNTU48, "much faster JIT coming later", x, y+=50, 0xcFFFFFFF, ALIGN_LEFT);
|
||||
UICheckBox(GEN_ID, x, y += stride, "On-screen Touch Controls", ALIGN_TOPLEFT, &g_Config.bShowTouchControls);
|
||||
if (g_Config.bShowTouchControls) {
|
||||
|
@ -201,15 +201,11 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co
|
||||
gfxLog = true;
|
||||
break;
|
||||
case 'j':
|
||||
g_Config.iCpuCore = CPU_JIT;
|
||||
g_Config.bSaveSettings = false;
|
||||
break;
|
||||
case 'f':
|
||||
g_Config.iCpuCore = CPU_FASTINTERPRETER;
|
||||
g_Config.bJit = true;
|
||||
g_Config.bSaveSettings = false;
|
||||
break;
|
||||
case 'i':
|
||||
g_Config.iCpuCore = CPU_INTERPRETER;
|
||||
g_Config.bJit = false;
|
||||
g_Config.bSaveSettings = false;
|
||||
break;
|
||||
case '-':
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 3caced8524c06cabcf968942a7780d80337de7bf
|
||||
Subproject commit f5e7bd5a9c3e4b39a4eac71b577f06ad54f2bc96
|
Loading…
x
Reference in New Issue
Block a user