Merge branch 'master' into feature/savestates-2

This commit is contained in:
Hamish Milne 2020-03-07 21:23:08 +00:00
commit da3ab3d56e
80 changed files with 7297 additions and 2608 deletions

View file

@ -10,6 +10,7 @@
#include "common/common_types.h"
#include "core/arm/skyeye_common/arm_regformat.h"
#include "core/arm/skyeye_common/vfp/asm_vfp.h"
#include "core/core_timing.h"
namespace Memory {
struct PageTable;
@ -18,6 +19,8 @@ struct PageTable;
/// Generic ARM11 CPU interface
class ARM_Interface : NonCopyable {
public:
explicit ARM_Interface(u32 id, std::shared_ptr<Core::Timing::Timer> timer)
: timer(timer), id(id){};
virtual ~ARM_Interface() {}
class ThreadContext {
@ -222,11 +225,26 @@ public:
virtual void PurgeState() = 0;
std::shared_ptr<Core::Timing::Timer> GetTimer() {
return timer;
}
u32 GetID() const {
return id;
}
protected:
std::shared_ptr<Core::Timing::Timer> timer;
private:
u32 id;
friend class boost::serialization::access;
template <class Archive>
void save(Archive& ar, const unsigned int file_version) const {
ar << timer;
ar << id;
auto page_table = GetPageTable();
ar << page_table;
for (auto i = 0; i < 15; i++) {
@ -254,6 +272,8 @@ private:
template <class Archive>
void load(Archive& ar, const unsigned int file_version) {
PurgeState();
ar >> timer;
ar >> id;
std::shared_ptr<Memory::PageTable> page_table = nullptr;
ar >> page_table;
SetPageTable(page_table);