mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Delete CPU.cpp/h , cleanup
This commit is contained in:
parent
87f203a5b8
commit
ce378b231f
@ -916,8 +916,6 @@ endif()
|
||||
# SHARED on ANDROID, STATIC everywhere else
|
||||
add_library(${CoreLibName} ${CoreLinkType}
|
||||
${CoreExtra}
|
||||
Core/CPU.cpp
|
||||
Core/CPU.h
|
||||
Core/Config.cpp
|
||||
Core/Config.h
|
||||
Core/Core.cpp
|
||||
|
25
Core/CPU.cpp
25
Core/CPU.cpp
@ -1,25 +0,0 @@
|
||||
// Copyright (c) 2012- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
|
||||
#include "CPU.h"
|
||||
|
||||
// See the MIPS folder, the real stuff is there.
|
||||
|
||||
MIPSState *currentCPU = 0;
|
||||
|
||||
int numCPUs;
|
36
Core/CPU.h
36
Core/CPU.h
@ -1,36 +0,0 @@
|
||||
// Copyright (c) 2012- PPSSPP Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0 or later versions.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../Globals.h"
|
||||
|
||||
#include "MemMap.h"
|
||||
#include "Core.h"
|
||||
|
||||
enum
|
||||
{
|
||||
GPR_SIZE_32=0,
|
||||
GPR_SIZE_64=1
|
||||
};
|
||||
|
||||
#define MAX_NUM_CPU 2
|
||||
|
||||
class MIPSState;
|
||||
|
||||
extern MIPSState *currentCPU;
|
||||
extern int numCPUs;
|
@ -29,6 +29,7 @@
|
||||
#include "Core/SaveState.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Windows/OpenGLBase.h"
|
||||
#include "Windows/InputDevice.h"
|
||||
@ -258,7 +259,6 @@ reswitch:
|
||||
goto reswitch;
|
||||
}
|
||||
|
||||
currentCPU = &mipsr4k;
|
||||
Core_SingleStep();
|
||||
// update disasm dialog
|
||||
#if defined(USING_QT_UI) || defined(_DEBUG)
|
||||
|
@ -168,7 +168,6 @@
|
||||
<ClCompile Include="Config.cpp" />
|
||||
<ClCompile Include="Core.cpp" />
|
||||
<ClCompile Include="CoreTiming.cpp" />
|
||||
<ClCompile Include="CPU.cpp" />
|
||||
<ClCompile Include="Cwcheat.cpp" />
|
||||
<ClCompile Include="Debugger\Breakpoints.cpp" />
|
||||
<ClCompile Include="Debugger\DisassemblyManager.cpp" />
|
||||
@ -437,7 +436,6 @@
|
||||
<ClInclude Include="Core.h" />
|
||||
<ClInclude Include="CoreParameter.h" />
|
||||
<ClInclude Include="CoreTiming.h" />
|
||||
<ClInclude Include="CPU.h" />
|
||||
<ClInclude Include="Cwcheat.h" />
|
||||
<ClInclude Include="Debugger\Breakpoints.h" />
|
||||
<ClInclude Include="Debugger\DebugInterface.h" />
|
||||
|
@ -249,9 +249,6 @@
|
||||
<ClCompile Include="CoreTiming.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CPU.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Host.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
@ -714,9 +711,6 @@
|
||||
<ClInclude Include="CoreTiming.h">
|
||||
<Filter>Core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CPU.h">
|
||||
<Filter>Core</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Host.h">
|
||||
<Filter>Core</Filter>
|
||||
</ClInclude>
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include "Core/CwCheat.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
static int CheatEvent = -1;
|
||||
std::string gameTitle;
|
||||
|
@ -22,6 +22,11 @@
|
||||
|
||||
struct MemMap;
|
||||
|
||||
enum {
|
||||
GPR_SIZE_32,
|
||||
GPR_SIZE_64,
|
||||
};
|
||||
|
||||
class DebugInterface
|
||||
{
|
||||
public:
|
||||
|
@ -539,15 +539,15 @@ size_t MetaFileSystem::SeekFile(u32 handle, s32 position, FileMove type)
|
||||
|
||||
int MetaFileSystem::ReadEntireFile(const std::string &filename, std::vector<u8> &data) {
|
||||
int error = 0;
|
||||
u32 handle = pspFileSystem.OpenWithError(error, filename, FILEACCESS_READ);
|
||||
u32 handle = OpenWithError(error, filename, FILEACCESS_READ);
|
||||
if (handle == 0)
|
||||
return error;
|
||||
|
||||
size_t dataSize = (size_t)pspFileSystem.GetFileInfo(filename).size;
|
||||
size_t dataSize = (size_t)GetFileInfo(filename).size;
|
||||
data.resize(dataSize);
|
||||
|
||||
size_t result = pspFileSystem.ReadFile(handle, (u8 *)&data[0], dataSize);
|
||||
pspFileSystem.CloseFile(handle);
|
||||
size_t result = ReadFile(handle, (u8 *)&data[0], dataSize);
|
||||
CloseFile(handle);
|
||||
|
||||
if (result != dataSize)
|
||||
return SCE_KERNEL_ERROR_ERROR;
|
||||
@ -557,7 +557,7 @@ int MetaFileSystem::ReadEntireFile(const std::string &filename, std::vector<u8>
|
||||
void MetaFileSystem::DoState(PointerWrap &p)
|
||||
{
|
||||
lock_guard guard(lock);
|
||||
|
||||
|
||||
auto s = p.Section("MetaFileSystem", 1);
|
||||
if (!s)
|
||||
return;
|
||||
|
@ -15,26 +15,30 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "base/timeutil.h"
|
||||
#include "HLE.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "../MemMap.h"
|
||||
#include "../Config.h"
|
||||
|
||||
#include "base/timeutil.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
#include "HLETables.h"
|
||||
#include "../System.h"
|
||||
#include "sceDisplay.h"
|
||||
#include "sceIo.h"
|
||||
#include "sceAudio.h"
|
||||
#include "sceKernelMemory.h"
|
||||
#include "sceKernelThread.h"
|
||||
#include "sceKernelInterrupt.h"
|
||||
#include "../MIPS/MIPSCodeUtils.h"
|
||||
#include "../Host.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSCodeUtils.h"
|
||||
#include "Core/HLE/HLETables.h"
|
||||
#include "Core/HLE/sceDisplay.h"
|
||||
#include "Core/HLE/sceIo.h"
|
||||
#include "Core/HLE/sceAudio.h"
|
||||
#include "Core/HLE/sceKernelMemory.h"
|
||||
#include "Core/HLE/sceKernelThread.h"
|
||||
#include "Core/HLE/sceKernelInterrupt.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -17,8 +17,10 @@
|
||||
|
||||
#include <cstdlib>
|
||||
#include <set>
|
||||
|
||||
#include "native/thread/thread.h"
|
||||
#include "native/thread/threadutil.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Host.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/CwCheat.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
@ -33,8 +34,6 @@
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "GPU/GPUState.h"
|
||||
|
||||
#include "util/random/rng.h"
|
||||
|
||||
#include "__sceAudio.h"
|
||||
#include "sceAtrac.h"
|
||||
#include "sceAudio.h"
|
||||
@ -947,4 +946,4 @@ void Register_ThreadManForKernel()
|
||||
{
|
||||
RegisterModule("ThreadManForKernel", ARRAY_SIZE(ThreadManForKernel), ThreadManForKernel);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
#include "Core/System.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
#include "Core/HLE/scePauth.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
#include "Core/System.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
#include "Core/HLE/scePsmf.h"
|
||||
#include "Core/HLE/sceMpeg.h"
|
||||
|
@ -15,11 +15,16 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "file/file_util.h"
|
||||
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/sceUmd.h"
|
||||
#include "Core/HLE/sceKernelThread.h"
|
||||
#include "Core/HLE/sceKernelInterrupt.h"
|
||||
@ -30,8 +35,6 @@
|
||||
#include "Core/FileSystems/ISOFileSystem.h"
|
||||
#include "Core/FileSystems/VirtualDiscFileSystem.h"
|
||||
|
||||
#include "file/file_util.h"
|
||||
|
||||
const u64 MICRO_DELAY_ACTIVATE = 4000;
|
||||
|
||||
static u8 umdActivated = 1;
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
|
||||
#include "file/ini_file.h"
|
||||
|
@ -17,6 +17,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
// Valid values for PSP_SYSTEMPARAM_ID_INT_LANGUAGE
|
||||
|
@ -17,10 +17,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/CPU.h"
|
||||
#include "util/random/rng.h"
|
||||
#include "Core/MemMap.h"
|
||||
|
||||
typedef Memory::Opcode MIPSOpcode;
|
||||
|
||||
@ -164,7 +162,7 @@ public:
|
||||
bool inDelaySlot;
|
||||
int llBit; // ll/sc
|
||||
u32 temp; // can be used to save temporaries during calculations when we need more than R0 and R1
|
||||
|
||||
|
||||
GMRng rng; // VFPU hardware random number generator. Probably not the right type.
|
||||
|
||||
// Debug stuff
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "ext/cityhash/city.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSTables.h"
|
||||
#include "Core/MIPS/MIPSAnalyst.h"
|
||||
@ -42,13 +43,13 @@ static std::vector<MIPSAnalyst::AnalyzedFunction> functions;
|
||||
static std::map<u64, std::vector<MIPSAnalyst::AnalyzedFunction*>> hashToFunction;
|
||||
|
||||
struct HashMapFunc {
|
||||
char name[64];
|
||||
u64 hash;
|
||||
u32 size; //number of bytes
|
||||
char name[64];
|
||||
u64 hash;
|
||||
u32 size; //number of bytes
|
||||
|
||||
bool operator < (const HashMapFunc &other) const {
|
||||
return hash < other.hash || (hash == other.hash && size < other.size);
|
||||
}
|
||||
bool operator < (const HashMapFunc &other) const {
|
||||
return hash < other.hash || (hash == other.hash && size < other.size);
|
||||
}
|
||||
};
|
||||
|
||||
static std::set<HashMapFunc> hashMap;
|
||||
@ -233,7 +234,7 @@ namespace MIPSAnalyst {
|
||||
f.hasHash = false;
|
||||
goto skip;
|
||||
}
|
||||
|
||||
|
||||
MIPSInfo flags = MIPSGetInfo(instr);
|
||||
if (flags & IN_IMM16)
|
||||
validbits &= ~0xFFFF;
|
||||
|
@ -175,19 +175,16 @@ private:
|
||||
|
||||
|
||||
|
||||
const char *MIPSDebugInterface::disasm(unsigned int address, unsigned int align)
|
||||
const char *MIPSDebugInterface::disasm(unsigned int address, unsigned int align)
|
||||
{
|
||||
MIPSState *x = currentCPU;
|
||||
currentCPU = cpu;
|
||||
|
||||
static char mojs[256];
|
||||
static char mojs[256];
|
||||
if (Memory::IsValidAddress(address))
|
||||
MIPSDisAsm(Memory::Read_Opcode_JIT(address), address, mojs);
|
||||
else
|
||||
strcpy(mojs, "-");
|
||||
currentCPU = x;
|
||||
return mojs;
|
||||
}
|
||||
|
||||
unsigned int MIPSDebugInterface::readMemory(unsigned int address)
|
||||
{
|
||||
return Memory::Read_Instruction(address).encoding;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "MIPS.h"
|
||||
#include "../Debugger/DebugInterface.h"
|
||||
#include "Core/Debugger/DebugInterface.h"
|
||||
|
||||
class MIPSDebugInterface : public DebugInterface
|
||||
{
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Core/Core.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSDis.h"
|
||||
|
@ -15,7 +15,6 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Core/CPU.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSVFPUUtils.h"
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "MIPS/JitCommon/JitCommon.h"
|
||||
#include "HLE/HLE.h"
|
||||
|
||||
#include "Core/CPU.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Debugger/SymbolMap.h"
|
||||
#include "Core/Debugger/Breakpoints.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "Common/Common.h"
|
||||
#include "Common/Atomics.h"
|
||||
|
||||
#include "Core/Core.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Host.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "Core/System.h"
|
||||
#include "Core/HLE/sceDisplay.h"
|
||||
#include "Core/HLE/sceKernelMemory.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "GPU/GPUState.h"
|
||||
#include "GPU/GLES/Framebuffer.h"
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "Core/Host.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/sceKernel.h"
|
||||
#include "Core/MemMap.h"
|
||||
|
@ -159,8 +159,7 @@ void CPU_Shutdown();
|
||||
|
||||
void CPU_Init() {
|
||||
coreState = CORE_POWERUP;
|
||||
currentCPU = &mipsr4k;
|
||||
numCPUs = 1;
|
||||
currentMIPS = &mipsr4k;
|
||||
|
||||
// Default memory settings
|
||||
// Seems to be the safest place currently..
|
||||
@ -237,7 +236,6 @@ void CPU_Shutdown() {
|
||||
}
|
||||
pspFileSystem.Shutdown();
|
||||
Memory::Shutdown();
|
||||
currentCPU = 0;
|
||||
}
|
||||
|
||||
void CPU_RunLoop() {
|
||||
@ -331,7 +329,7 @@ bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {
|
||||
}
|
||||
|
||||
bool PSP_IsInited() {
|
||||
return currentCPU != 0;
|
||||
return currentMIPS != 0;
|
||||
}
|
||||
|
||||
void PSP_Shutdown() {
|
||||
@ -354,6 +352,7 @@ void PSP_Shutdown() {
|
||||
}
|
||||
GPU_Shutdown();
|
||||
host->SetWindowTitle(0);
|
||||
currentMIPS = 0;
|
||||
}
|
||||
|
||||
void PSP_RunLoopUntil(u64 globalticks) {
|
||||
|
@ -17,10 +17,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
|
||||
class MetaFileSystem;
|
||||
class ParamSFOData;
|
||||
|
||||
extern MetaFileSystem pspFileSystem;
|
||||
extern ParamSFOData g_paramSFO;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "Common/LogManager.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/MIPS/MIPSTables.h"
|
||||
#include "Core/MIPS/JitCommon/JitCommon.h"
|
||||
|
@ -57,12 +57,12 @@
|
||||
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/LogManager.h"
|
||||
#include "Core/PSPMixer.h"
|
||||
#include "Core/CPU.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/PSPMixer.h"
|
||||
#include "Core/SaveState.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
#include "Core/Util/GameManager.h"
|
||||
#include "Common/MemArena.h"
|
||||
|
||||
|
@ -169,7 +169,6 @@ EXEC_AND_LIB_FILES := \
|
||||
$(SRC)/Core/Core.cpp \
|
||||
$(SRC)/Core/Config.cpp \
|
||||
$(SRC)/Core/CoreTiming.cpp \
|
||||
$(SRC)/Core/CPU.cpp \
|
||||
$(SRC)/Core/CwCheat.cpp \
|
||||
$(SRC)/Core/HDRemaster.cpp \
|
||||
$(SRC)/Core/Host.cpp \
|
||||
|
Loading…
Reference in New Issue
Block a user