mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Savestates Support For PS3 Emulation (#10478)
This commit is contained in:
parent
969b9eb89d
commit
fcd297ffb2
154 changed files with 4948 additions and 635 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include "util/types.hpp"
|
||||
#include "util/atomic.hpp"
|
||||
#include "util/auto_typemap.hpp"
|
||||
|
|
@ -11,6 +12,7 @@
|
|||
namespace utils
|
||||
{
|
||||
class shm;
|
||||
class address_range;
|
||||
}
|
||||
|
||||
namespace vm
|
||||
|
|
@ -129,6 +131,7 @@ namespace vm
|
|||
|
||||
// Unmap block
|
||||
bool unmap();
|
||||
friend bool _unmap_block(const std::shared_ptr<block_t>&);
|
||||
|
||||
public:
|
||||
block_t(u32 addr, u32 size, u64 flags);
|
||||
|
|
@ -167,8 +170,15 @@ namespace vm
|
|||
return m_id;
|
||||
}
|
||||
|
||||
friend std::pair<std::shared_ptr<block_t>, bool> unmap(u32, bool, const std::shared_ptr<block_t>*);
|
||||
friend void close();
|
||||
// Serialization helper for shared memory
|
||||
void get_shared_memory(std::vector<std::pair<utils::shm*, u32>>& shared);
|
||||
|
||||
// Returns sample address for shared memory, 0 on failure
|
||||
u32 get_shm_addr(const std::shared_ptr<utils::shm>& shared);
|
||||
|
||||
// Serialization
|
||||
void save(utils::serial& ar, std::map<utils::shm*, usz>& shared);
|
||||
block_t(utils::serial& ar, std::vector<std::shared_ptr<utils::shm>>& shared);
|
||||
};
|
||||
|
||||
// Create new memory block with specified parameters and return it
|
||||
|
|
@ -336,6 +346,12 @@ namespace vm
|
|||
|
||||
void close();
|
||||
|
||||
void load(utils::serial& ar);
|
||||
void save(utils::serial& ar);
|
||||
|
||||
// Returns sample address for shared memory, 0 on failure (wraps block_t::get_shm_addr)
|
||||
u32 get_shm_addr(const std::shared_ptr<utils::shm>& shared);
|
||||
|
||||
template <typename T, typename AT>
|
||||
class _ptr_base;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue