mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-27 03:35:24 +00:00
Some std include moved
This commit is contained in:
parent
b37f3e1b93
commit
693e7a38fa
@ -1,10 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using std::min;
|
||||
using std::max;
|
||||
|
||||
#define re16(val) _byteswap_ushort(val)
|
||||
#define re32(val) _byteswap_ulong(val)
|
||||
#define re64(val) _byteswap_uint64(val)
|
||||
|
@ -3,15 +3,7 @@
|
||||
#include "Log.h"
|
||||
#include "rMsgBox.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
#include <thread>
|
||||
#include <set>
|
||||
#include <array>
|
||||
#include "Thread.h"
|
||||
#include "rFile.h"
|
||||
|
||||
|
@ -1,11 +1,4 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
#include <set>
|
||||
#include <array>
|
||||
#include "Utilities/MTRingbuffer.h"
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
#pragma once
|
||||
#include <thread>
|
||||
#include <array>
|
||||
#include <mutex>
|
||||
#include <algorithm>
|
||||
|
||||
//Simple non-resizable FIFO Ringbuffer that can be simultaneously be read from and written to
|
||||
//if we ever get to use boost please replace this with boost::circular_buffer, there's no reason
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <stdafx.h>
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/CPU/CPUThread.h"
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
|
||||
bool SM_IsAborted();
|
||||
void SM_Sleep();
|
||||
size_t SM_GetCurrentThreadId();
|
||||
|
@ -1,8 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
||||
class SSemaphore
|
||||
{
|
||||
const u32 m_max;
|
||||
|
@ -1,10 +1,4 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <cstdio>
|
||||
#include <functional>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define snprintf _snprintf
|
||||
|
@ -1,9 +1,4 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
|
||||
static std::thread::id main_thread;
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
struct FileInfo {
|
||||
std::string name;
|
||||
std::string fullName;
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
struct rPlatform
|
||||
{
|
||||
|
@ -1,7 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Utilities/rXml.h"
|
||||
#include <wx/xml/xml.h>
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <algorithm>
|
||||
#include "CPUInstrTable.h"
|
||||
#pragma warning( disable : 4800 )
|
||||
|
||||
|
@ -286,8 +286,6 @@ void _se_translator(unsigned int u, EXCEPTION_POINTERS* pExp)
|
||||
if (u == EXCEPTION_ACCESS_VIOLATION && addr < 0x100000000)
|
||||
{
|
||||
// TODO: allow recovering from a page fault
|
||||
//GetCurrentPPUThread().Stop();
|
||||
Emu.Pause();
|
||||
throw fmt::Format("Access violation: addr = 0x%x (last_syscall=0x%llx (%s))",
|
||||
(u32)addr, (u64)GetCurrentCPUThread()->m_last_syscall, SysCalls::GetHLEFuncName((u64)GetCurrentCPUThread()->m_last_syscall).c_str());
|
||||
}
|
||||
@ -364,10 +362,12 @@ void CPUThread::Task()
|
||||
catch (const std::string& e)
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Exception: %s", e.c_str());
|
||||
Emu.Pause();
|
||||
}
|
||||
catch (const char* e)
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Exception: %s", e);
|
||||
Emu.Pause();
|
||||
}
|
||||
|
||||
for (auto& v : trace) LOG_NOTICE(PPU, "PC = 0x%llx", v);
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
|
||||
class CPUThread;
|
||||
class RawSPUThread;
|
||||
enum CPUThreadType : unsigned char;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "PPUInstrTable.h"
|
||||
#include "Loader/ELF64.h"
|
||||
|
||||
|
@ -10,11 +10,6 @@
|
||||
#include "Emu/Cell/PPUDecoder.h"
|
||||
#include "Emu/Cell/PPUInterpreter.h"
|
||||
|
||||
#include <thread>
|
||||
#include <cmath>
|
||||
|
||||
//extern gcmInfo gcm_info;
|
||||
|
||||
PPUThread& GetCurrentPPUThread()
|
||||
{
|
||||
PPCThread* thread = GetCurrentPPCThread();
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "Emu/Cell/PPCThread.h"
|
||||
#include <cmath>
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include "PPCThread.h"
|
||||
#include "Emu/Event.h"
|
||||
#include "MFC.h"
|
||||
#include <mutex>
|
||||
|
||||
enum SPUchannels
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include <memory>
|
||||
|
||||
#include "VFS.h"
|
||||
#include "vfsDirBase.h"
|
||||
#include "Emu/HDD/HDD.h"
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include <algorithm>
|
||||
#include "vfsDevice.h"
|
||||
#include "Utilities/rFile.h"
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <mutex>
|
||||
|
||||
struct vfsFileBase;
|
||||
class vfsDirBase;
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include "vfsDirBase.h"
|
||||
|
||||
class vfsDir : public vfsDirBase
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include "vfsFileBase.h"
|
||||
|
||||
class vfsFile : public vfsFileBase
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <algorithm>
|
||||
#include "Emu/FS/vfsDevice.h"
|
||||
#include "Emu/FS/vfsLocalFile.h"
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
#include <set>
|
||||
|
||||
#define rID_ANY -1 // was wxID_ANY
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "KeyboardHandler.h"
|
||||
|
||||
class KeyboardManager
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
extern u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode); // (TODO: Can it be problematic to place SysCalls in middle of nowhere?)
|
||||
|
||||
enum KbPortStatus
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "MouseHandler.h"
|
||||
|
||||
class MouseManager
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
enum MousePortStatus
|
||||
{
|
||||
CELL_MOUSE_STATUS_DISCONNECTED = 0x00000000,
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "PadHandler.h"
|
||||
|
||||
class PadManager
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
enum PortStatus
|
||||
{
|
||||
CELL_PAD_STATUS_DISCONNECTED = 0x00000000,
|
||||
|
@ -1,7 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include "Emu/Io/KeyboardHandler.h"
|
||||
|
||||
class WindowsKeyboardHandler final
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include "Emu/Io/MouseHandler.h"
|
||||
|
||||
class WindowsMouseHandler final
|
||||
|
@ -1,6 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include "Emu/Io/PadHandler.h"
|
||||
|
||||
class WindowsPadHandler final
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#if defined (_WIN32)
|
||||
#include <algorithm>
|
||||
#include "Utilities/Log.h"
|
||||
#include "XInputPadHandler.h"
|
||||
#include <cstring>
|
||||
|
||||
namespace {
|
||||
const DWORD THREAD_TIMEOUT = 1000;
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include <atomic>
|
||||
|
||||
#include "Utilities/Log.h"
|
||||
#include "Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Memory.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/mman.h>
|
||||
@ -36,6 +34,7 @@ void MemoryBase::RegisterPages(u64 addr, u32 size)
|
||||
if (m_pages[i])
|
||||
{
|
||||
LOG_ERROR(MEMORY, "Page already registered (addr=0x%llx)", i * 4096);
|
||||
Emu.Pause();
|
||||
}
|
||||
m_pages[i] = 1; // TODO: define page parameters
|
||||
}
|
||||
@ -56,6 +55,7 @@ void MemoryBase::UnregisterPages(u64 addr, u32 size)
|
||||
if (!m_pages[i])
|
||||
{
|
||||
LOG_ERROR(MEMORY, "Page not registered (addr=0x%llx)", i * 4096);
|
||||
Emu.Pause();
|
||||
}
|
||||
m_pages[i] = 0; // TODO: define page parameters
|
||||
}
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
#define PAGE_4K(x) (x + 4095) & ~(4095)
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <emmintrin.h>
|
||||
|
||||
struct MemInfo
|
||||
|
@ -2155,7 +2155,7 @@ void RSXThread::Task()
|
||||
});
|
||||
vblank.detach();
|
||||
|
||||
while(!TestDestroy())
|
||||
while(!TestDestroy()) try
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
{
|
||||
@ -2246,6 +2246,16 @@ void RSXThread::Task()
|
||||
m_ctrl->get = get + (count + 1) * 4;
|
||||
//memset(Memory.GetMemFromAddr(p.m_ioAddress + get), 0, (count + 1) * 4);
|
||||
}
|
||||
catch (const std::string& e)
|
||||
{
|
||||
LOG_ERROR(RSX, "Exception: %s", e.c_str());
|
||||
Emu.Pause();
|
||||
}
|
||||
catch (const char* e)
|
||||
{
|
||||
LOG_ERROR(RSX, "Exception: %s", e);
|
||||
Emu.Pause();
|
||||
}
|
||||
|
||||
while (!is_vblank_stopped)
|
||||
{
|
||||
@ -2278,11 +2288,17 @@ void RSXThread::Init(const u32 ioAddress, const u32 ioSize, const u32 ctrlAddres
|
||||
u32 RSXThread::ReadIO32(u32 addr)
|
||||
{
|
||||
u32 value;
|
||||
Memory.RSXIOMem.Read32(Memory.RSXIOMem.GetStartAddr() + addr, &value);
|
||||
if (!Memory.RSXIOMem.Read32(Memory.RSXIOMem.GetStartAddr() + addr, &value))
|
||||
{
|
||||
throw fmt::Format("%s(rsxio_addr=0x%x): RSXIO memory not mapped", __FUNCTION__, addr);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
void RSXThread::WriteIO32(u32 addr, u32 value)
|
||||
{
|
||||
Memory.RSXIOMem.Write32(Memory.RSXIOMem.GetStartAddr() + addr, value);
|
||||
if (!Memory.RSXIOMem.Write32(Memory.RSXIOMem.GetStartAddr() + addr, value))
|
||||
{
|
||||
throw fmt::Format("%s(rsxio_addr=0x%x): RSXIO memory not mapped", __FUNCTION__, addr);
|
||||
}
|
||||
}
|
@ -6,7 +6,6 @@
|
||||
#include "Emu/SysCalls/Callback.h"
|
||||
|
||||
#include <stack>
|
||||
#include <set> // For tracking a list of used gcm commands
|
||||
#include "Utilities/SSemaphore.h"
|
||||
#include "Utilities/Thread.h"
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
#include "Emu/SysCalls/Static.h"
|
||||
#include "Crypto/sha1.h"
|
||||
#include <mutex>
|
||||
#include "ModuleManager.h"
|
||||
|
||||
u32 getFunctionId(const char* name)
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "Emu/FS/vfsDir.h"
|
||||
#include "Loader/PSF.h"
|
||||
#include "cellSysutil_SaveData.h"
|
||||
#include <algorithm>
|
||||
|
||||
extern Module *cellSysutil;
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
#include "Emu/SysCalls/lv2/sys_time.h"
|
||||
#include "sceNp.h"
|
||||
#include "sceNpTrophy.h"
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
//void sceNpTrophy_unload();
|
||||
//void sceNpTrophy_init();
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/SysCalls/SysCalls.h"
|
||||
|
||||
#include <thread>
|
||||
#include "sys_spinlock.h"
|
||||
|
||||
SysCallBase sys_spinlock("sys_spinlock");
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
|
||||
// SysCalls
|
||||
void sys_spinlock_initialize(mem_ptr_t<std::atomic<be_t<u32>>> lock);
|
||||
void sys_spinlock_lock(mem_ptr_t<std::atomic<be_t<u32>>> lock);
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "Emu/FS/vfsFile.h"
|
||||
#include "Loader/ELF.h"
|
||||
#include "sys_spu.h"
|
||||
#include <atomic>
|
||||
|
||||
static SysCallBase sys_spu("sys_spu");
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
|
||||
enum
|
||||
{
|
||||
SYS_SPU_THREAD_GROUP_TYPE_NORMAL = 0x00,
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include "Emu/SysCalls/SysCalls.h"
|
||||
|
||||
#include "Emu/Event.h"
|
||||
#include <thread>
|
||||
#include "sys_timer.h"
|
||||
|
||||
SysCallBase sys_timer("sys_timer");
|
||||
|
@ -1,8 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "Loader/Loader.h"
|
||||
|
||||
enum Status
|
||||
@ -90,6 +86,8 @@ class Emulator
|
||||
std::vector<u64> m_break_points;
|
||||
std::vector<u64> m_marked_points;
|
||||
|
||||
std::recursive_mutex m_core_mutex;
|
||||
|
||||
CPUThreadManager* m_thread_manager;
|
||||
PadManager* m_pad_manager;
|
||||
KeyboardManager* m_keyboard_manager;
|
||||
@ -120,6 +118,8 @@ public:
|
||||
void SetPath(const std::string& path, const std::string& elf_path = "");
|
||||
void SetTitleID(const std::string& id);
|
||||
|
||||
std::recursive_mutex& GetCoreMutex() { return m_core_mutex; }
|
||||
|
||||
CPUThreadManager& GetCPU() { return *m_thread_manager; }
|
||||
PadManager& GetPadManager() { return *m_pad_manager; }
|
||||
KeyboardManager& GetKeyboardManager() { return *m_keyboard_manager; }
|
||||
@ -175,6 +175,8 @@ public:
|
||||
__forceinline bool IsReady() const { return m_status == Ready; }
|
||||
};
|
||||
|
||||
#define LV2_LOCK(x) std::lock_guard<std::recursive_mutex> x(Emu.GetCoreMutex())
|
||||
|
||||
extern Emulator Emu;
|
||||
|
||||
typedef void(*CallAfterCbType)(std::function<void()> func);
|
||||
|
@ -3,9 +3,6 @@
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
|
||||
#include "Ini.h"
|
||||
#include "Utilities/Log.h"
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include <wx/dataobj.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Log
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <wx/dnd.h>
|
||||
#include "Emu/HDD/HDD.h"
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "Utilities/StrFmt.h"
|
||||
|
||||
#include "Ini.h"
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <regex>
|
||||
|
||||
|
@ -42,6 +42,19 @@
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <cmath>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <condition_variable>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
#include "Utilities/GNU.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user