diff --git a/ares/n64/CMakeLists.txt b/ares/n64/CMakeLists.txt index 5009e9303..5f5957ad4 100644 --- a/ares/n64/CMakeLists.txt +++ b/ares/n64/CMakeLists.txt @@ -62,6 +62,7 @@ ares_add_sources( aleck64/aleck64.hpp aleck64/controls.cpp aleck64/debugger.cpp + aleck64/serialization.cpp aleck64/io.cpp aleck64/vdp.cpp aleck64/game-config/11beat.hpp diff --git a/ares/n64/aleck64/aleck64.cpp b/ares/n64/aleck64/aleck64.cpp index 37d16f0d6..ea7c3d3ff 100644 --- a/ares/n64/aleck64/aleck64.cpp +++ b/ares/n64/aleck64/aleck64.cpp @@ -7,6 +7,7 @@ namespace ares::Nintendo64 { #include "controls.cpp" #include "debugger.cpp" #include "vdp.cpp" + #include "serialization.cpp" #include "game-config/11beat.hpp" #include "game-config/starsldr.hpp" diff --git a/ares/n64/aleck64/aleck64.hpp b/ares/n64/aleck64/aleck64.hpp index d2384c77f..cf2e5e35e 100644 --- a/ares/n64/aleck64/aleck64.hpp +++ b/ares/n64/aleck64/aleck64.hpp @@ -154,6 +154,9 @@ struct Aleck64 { auto writePort3(n32 data) -> void; auto writePort4(n32 data) -> void; + //serialization.cpp + auto serialize(serializer&) -> void; + struct Controls { Aleck64& self; Node::Object node; @@ -223,7 +226,6 @@ struct Aleck64 { n8 dipSwitch[2]; - struct GameConfig { virtual ~GameConfig() = default; virtual auto type() -> BoardType { return BoardType::E92; } diff --git a/ares/n64/aleck64/serialization.cpp b/ares/n64/aleck64/serialization.cpp new file mode 100644 index 000000000..c4e7ca90e --- /dev/null +++ b/ares/n64/aleck64/serialization.cpp @@ -0,0 +1,9 @@ +auto Aleck64::serialize(serializer& s) -> void { + s(sdram); + s(vram); + s(pram); + + s(vdp.io.enable); + s(dipSwitch[0]); + s(dipSwitch[1]); +} diff --git a/ares/n64/system/serialization.cpp b/ares/n64/system/serialization.cpp index d06abdf46..beb3d211c 100644 --- a/ares/n64/system/serialization.cpp +++ b/ares/n64/system/serialization.cpp @@ -1,4 +1,4 @@ -static const string SerializerVersion = "v141.1"; +static const string SerializerVersion = "v141.2"; auto System::serialize(bool synchronize) -> serializer { serializer s; @@ -56,4 +56,5 @@ auto System::serialize(serializer& s, bool synchronize) -> void { s(rdp); s(rsp); s(dd); + s(aleck64); }