Merge pull request #4908 from hamish-milne/feature/savestates-2
Save states
This commit is contained in:
commit
c605bb42db
354 changed files with 6100 additions and 604 deletions
|
@ -472,14 +472,7 @@ inline void Write(u32 addr, const T data) {
|
|||
if (config.trigger & 1) {
|
||||
MICROPROFILE_SCOPE(GPU_CmdlistProcessing);
|
||||
|
||||
u32* buffer = (u32*)g_memory->GetPhysicalPointer(config.GetPhysicalAddress());
|
||||
|
||||
if (Pica::g_debug_context && Pica::g_debug_context->recorder) {
|
||||
Pica::g_debug_context->recorder->MemoryAccessed((u8*)buffer, config.size,
|
||||
config.GetPhysicalAddress());
|
||||
}
|
||||
|
||||
Pica::CommandProcessor::ProcessCommandList(buffer, config.size);
|
||||
Pica::CommandProcessor::ProcessCommandList(config.GetPhysicalAddress(), config.size);
|
||||
|
||||
g_regs.command_processor_config.trigger = 0;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/binary_object.hpp>
|
||||
#include "common/assert.h"
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_funcs.h"
|
||||
|
@ -270,6 +272,12 @@ private:
|
|||
static inline u32 DecodeAddressRegister(u32 register_value) {
|
||||
return register_value * 8;
|
||||
}
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::make_binary_object(this, sizeof(Regs));
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
static_assert(std::is_standard_layout<Regs>::value, "Structure does not use standard layout");
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
|
@ -50,6 +51,16 @@ struct Regs {
|
|||
u32* content = reinterpret_cast<u32*>(this);
|
||||
return content[index];
|
||||
}
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& color_fill_top.raw;
|
||||
ar& backlight_top;
|
||||
ar& color_fill_bottom.raw;
|
||||
ar& backlight_bottom;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
static_assert(std::is_standard_layout<Regs>::value, "Structure does not use standard layout");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue