OXYGENHUB
◆ main openmsx / src / memory / TrackedRam.cc
621 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#include "TrackedRam.hh"
2
3
#include "serialize.hh"
4
5
namespace openmsx {
6
7
template<typename Archive>
8
void TrackedRam::serialize(Archive& ar, unsigned /*version*/)
9
{
10
	// Note: This is the exact same serialization format as the Ram class.
11
	//  This allows to change from Ram to TrackedRam without having to
12
	//  increase the class serialization version (of the user).
13
	bool diff = writeSinceLastReverseSnapshot || !ar.isReverseSnapshot();
14
	ar.serialize_blob("ram", std::span{ram}, diff);
15
	if (ar.isReverseSnapshot()) writeSinceLastReverseSnapshot = false;
16
}
17
INSTANTIATE_SERIALIZE_METHODS(TrackedRam);
18
19
} // namespace openmsx