diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index f789c0c0f6..7b295e2d0e 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -335,17 +335,7 @@ public: [[maybe_unused]] const s32 version = GET_OR_USE_SERIALIZATION_VERSION(ar.is_writing(), cellGem); ar(attribute, vc_attribute, status_flags, enable_pitch_correction, inertial_counter, controllers - , connected_controllers, update_started, camera_frame, memory_ptr); - - if (version == 1 && !ar.is_writing()) - { - u32 ts = ar; - start_timestamp_us = ts; - } - else - { - ar(start_timestamp_us); - } + , connected_controllers, update_started, camera_frame, memory_ptr, start_timestamp_us); } gem_config_data(utils::serial& ar) diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index b86cde77b9..b7e5fa0dde 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -2030,21 +2030,7 @@ void ppu_thread::serialize_common(utils::serial& ar) { [[maybe_unused]] const s32 version = GET_OR_USE_SERIALIZATION_VERSION(ar.is_writing(), ppu); - ar(gpr, fpr, cr, fpscr.bits, lr, ctr, vrsave, cia, xer, sat, nj); - - if (ar.is_writing()) - { - ar(prio.load().all); - } - else if (version < 2) - { - prio.raw().all = 0; - prio.raw().prio = ar.operator s32(); - } - else - { - ar(prio.raw().all); - } + ar(gpr, fpr, cr, fpscr.bits, lr, ctr, vrsave, cia, xer, sat, nj, prio.raw().all); ar(optional_savestate_state, vr); diff --git a/rpcs3/Emu/Cell/lv2/sys_net.cpp b/rpcs3/Emu/Cell/lv2/sys_net.cpp index 9a547a7a0a..387cb3f623 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net.cpp @@ -259,10 +259,7 @@ lv2_socket::lv2_socket(utils::serial& ar, lv2_socket_type _type) const s32 version = GET_SERIALIZATION_VERSION(lv2_net); - if (version >= 2) - { - ar(so_rcvtimeo, so_sendtimeo); - } + ar(so_rcvtimeo, so_sendtimeo); lv2_id = idm::last_id(); diff --git a/rpcs3/Emu/Cell/lv2/sys_prx.cpp b/rpcs3/Emu/Cell/lv2/sys_prx.cpp index bfbf8c5fa1..4cde5d52e9 100644 --- a/rpcs3/Emu/Cell/lv2/sys_prx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_prx.cpp @@ -312,11 +312,7 @@ std::shared_ptr lv2_prx::load(utils::serial& ar) { std::basic_string loaded_flags, external_flags; - if (version >= 4) - { - ar(loaded_flags); - ar(external_flags); - } + ar(loaded_flags, external_flags); fs::file file{path.substr(0, path.size() - (offset ? fmt::format("_x%x", offset).size() : 0))}; @@ -328,21 +324,11 @@ std::shared_ptr lv2_prx::load(utils::serial& ar) prx->m_loaded_flags = std::move(loaded_flags); prx->m_external_loaded_flags = std::move(external_flags); - if (version == 2 && (state == PRX_STATE_STARTED || state == PRX_STATE_STARTING)) - { - prx->load_exports(); - } - - if (version >= 4 && state <= PRX_STATE_STARTED) + if (state <= PRX_STATE_STARTED) { prx->restore_exports(); } - if (version == 1) - { - prx->load_exports(); - } - ensure(prx); } else diff --git a/rpcs3/Emu/Cell/lv2/sys_spu.cpp b/rpcs3/Emu/Cell/lv2/sys_spu.cpp index d3cb822239..0ff409e1ae 100644 --- a/rpcs3/Emu/Cell/lv2/sys_spu.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_spu.cpp @@ -215,14 +215,7 @@ lv2_spu_group::lv2_spu_group(utils::serial& ar) noexcept { std::common_type_t prio{}; - if (GET_SERIALIZATION_VERSION(spu) < 3) - { - prio.prio = ar.operator s32(); - } - else - { - ar(prio.all); - } + ar(prio.all); return prio; }()) @@ -387,10 +380,7 @@ struct spu_limits_t spu_limits_t(utils::serial& ar) noexcept { - if (GET_SERIALIZATION_VERSION(spu) >= 2) - { - ar(max_raw, max_spu); - } + ar(max_raw, max_spu); } void save(utils::serial& ar) diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 0b6b8efe9b..6f82e38a39 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -506,13 +506,10 @@ namespace rsx ar(u32{0}); } } - else if (version > 1) + else if (u32 count = ar) { - if (u32 count = ar) - { - restore_fifo_count = count; - ar(restore_fifo_cmd); - } + restore_fifo_count = count; + ar(restore_fifo_cmd); } } diff --git a/rpcs3/Emu/savestate_utils.cpp b/rpcs3/Emu/savestate_utils.cpp index 54175aba6a..370fa57bf9 100644 --- a/rpcs3/Emu/savestate_utils.cpp +++ b/rpcs3/Emu/savestate_utils.cpp @@ -35,20 +35,20 @@ static std::array s_serial_versions; return ::s_serial_versions[identifier].current_version;\ } -SERIALIZATION_VER(global_version, 0, 12) // For stuff not listed here -SERIALIZATION_VER(ppu, 1, 1, 2 /*thread sleep queue order*/) -SERIALIZATION_VER(spu, 2, 1, 2 /*spu_limits_t ctor*/, 3 /*thread sleep queue order*/) +SERIALIZATION_VER(global_version, 0, 13) // For stuff not listed here +SERIALIZATION_VER(ppu, 1, 1) +SERIALIZATION_VER(spu, 2, 1) SERIALIZATION_VER(lv2_sync, 3, 1) SERIALIZATION_VER(lv2_vm, 4, 1) -SERIALIZATION_VER(lv2_net, 5, 1, 2/*RECV/SEND timeout*/) +SERIALIZATION_VER(lv2_net, 5, 1) SERIALIZATION_VER(lv2_fs, 6, 1) -SERIALIZATION_VER(lv2_prx_overlay, 7, 1, 2/*PRX dynamic exports*/, 4/*Conditionally Loaded Local Exports*/) +SERIALIZATION_VER(lv2_prx_overlay, 7, 1) SERIALIZATION_VER(lv2_memory, 8, 1) SERIALIZATION_VER(lv2_config, 9, 1) namespace rsx { - SERIALIZATION_VER(rsx, 10, 1, 2) + SERIALIZATION_VER(rsx, 10, 1) } namespace np @@ -65,7 +65,7 @@ SERIALIZATION_VER(sceNp, 11) SERIALIZATION_VER(cellVdec, 12, 1) SERIALIZATION_VER(cellAudio, 13, 1) SERIALIZATION_VER(cellCamera, 14, 1) -SERIALIZATION_VER(cellGem, 15, 1, 2/*frame_timestamp u32->u64*/) +SERIALIZATION_VER(cellGem, 15, 1) SERIALIZATION_VER(sceNpTrophy, 16, 1) SERIALIZATION_VER(cellMusic, 17, 1) SERIALIZATION_VER(cellVoice, 18, 1)