Experimental save state support
This commit is contained in:
@@ -55,4 +55,18 @@ int Interpreter::Step() {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::vector<u8> Interpreter::Serialize() {
|
||||
std::vector<u8> res{};
|
||||
|
||||
res.resize(sizeof(Registers));
|
||||
|
||||
memcpy(res.data(), ®s, sizeof(Registers));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void Interpreter::Deserialize(const std::vector<u8> &data) {
|
||||
memcpy(®s, data.data(), sizeof(Registers));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user