From c04caeec8f9b93d6996f5d0fccff357253a1224a Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 29 Apr 2025 22:14:01 -0700 Subject: [PATCH] fusee/exo/ams: update with new keydata/version enums --- libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp | 1 + libexosphere/include/exosphere/pkg2.hpp | 2 +- libexosphere/source/fuse/fuse_api.cpp | 1 + libstratosphere/include/stratosphere/hos/hos_types.hpp | 2 ++ .../source/fs/impl/fs_id_string_impl.os.generic.cpp | 5 +++-- libvapours/include/vapours/ams/ams_api_version.h | 4 ++-- libvapours/include/vapours/ams/ams_target_firmware.h | 6 +++++- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp b/libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp index 92aea986..282c2332 100644 --- a/libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp +++ b/libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp @@ -39,6 +39,7 @@ namespace ams::pkg1 { KeyGeneration_17_0_0 = 0x10, KeyGeneration_18_0_0 = 0x11, KeyGeneration_19_0_0 = 0x12, + KeyGeneration_20_0_0 = 0x13, KeyGeneration_Count, diff --git a/libexosphere/include/exosphere/pkg2.hpp b/libexosphere/include/exosphere/pkg2.hpp index d72ce1f0..d6649d9d 100644 --- a/libexosphere/include/exosphere/pkg2.hpp +++ b/libexosphere/include/exosphere/pkg2.hpp @@ -24,7 +24,7 @@ namespace ams::pkg2 { constexpr inline int PayloadCount = 3; constexpr inline int MinimumValidDataVersion = 0; /* We allow older package2 to load; this value is currently 0x18 in Nintendo's code. */ - constexpr inline int CurrentBootloaderVersion = 0x16; + constexpr inline int CurrentBootloaderVersion = 0x17; struct Package2Meta { using Magic = util::FourCC<'P','K','2','1'>; diff --git a/libexosphere/source/fuse/fuse_api.cpp b/libexosphere/source/fuse/fuse_api.cpp index e20dddcc..837ad735 100644 --- a/libexosphere/source/fuse/fuse_api.cpp +++ b/libexosphere/source/fuse/fuse_api.cpp @@ -177,6 +177,7 @@ namespace ams::fuse { } constexpr const TargetFirmware FuseVersionIncrementFirmwares[] = { + TargetFirmware_20_0_0, TargetFirmware_19_0_0, TargetFirmware_17_0_0, TargetFirmware_16_0_0, diff --git a/libstratosphere/include/stratosphere/hos/hos_types.hpp b/libstratosphere/include/stratosphere/hos/hos_types.hpp index a096237a..cf455c81 100644 --- a/libstratosphere/include/stratosphere/hos/hos_types.hpp +++ b/libstratosphere/include/stratosphere/hos/hos_types.hpp @@ -85,6 +85,8 @@ namespace ams::hos { Version_18_0_0 = ::ams::TargetFirmware_18_0_0, Version_18_1_0 = ::ams::TargetFirmware_18_1_0, Version_19_0_0 = ::ams::TargetFirmware_19_0_0, + Version_19_0_1 = ::ams::TargetFirmware_19_0_1, + Version_20_0_0 = ::ams::TargetFirmware_20_0_0, Version_Current = ::ams::TargetFirmware_Current, diff --git a/libstratosphere/source/fs/impl/fs_id_string_impl.os.generic.cpp b/libstratosphere/source/fs/impl/fs_id_string_impl.os.generic.cpp index 5e2d9b60..15dc8c24 100644 --- a/libstratosphere/source/fs/impl/fs_id_string_impl.os.generic.cpp +++ b/libstratosphere/source/fs/impl/fs_id_string_impl.os.generic.cpp @@ -21,7 +21,7 @@ namespace ams::fs::impl { #define ADD_ENUM_CASE(v) case v: return #v template<> const char *IdString::ToString(pkg1::KeyGeneration id) { - static_assert(pkg1::KeyGeneration_Current == pkg1::KeyGeneration_19_0_0); + static_assert(pkg1::KeyGeneration_Current == pkg1::KeyGeneration_20_0_0); switch (id) { using enum pkg1::KeyGeneration; case KeyGeneration_1_0_0: return "1.0.0-2.3.0"; @@ -42,7 +42,8 @@ namespace ams::fs::impl { case KeyGeneration_16_0_0: return "16.0.0-16.0.3"; case KeyGeneration_17_0_0: return "17.0.0-17.0.1"; case KeyGeneration_18_0_0: return "18.0.0-18.1.0"; - case KeyGeneration_19_0_0: return "19.0.0-"; + case KeyGeneration_19_0_0: return "19.0.0-19.0.1"; + case KeyGeneration_20_0_0: return "20.0.0-"; default: return "Unknown"; } } diff --git a/libvapours/include/vapours/ams/ams_api_version.h b/libvapours/include/vapours/ams/ams_api_version.h index 978b1622..dbd4a2cf 100644 --- a/libvapours/include/vapours/ams/ams_api_version.h +++ b/libvapours/include/vapours/ams/ams_api_version.h @@ -16,11 +16,11 @@ #pragma once #define ATMOSPHERE_RELEASE_VERSION_MAJOR 1 -#define ATMOSPHERE_RELEASE_VERSION_MINOR 8 +#define ATMOSPHERE_RELEASE_VERSION_MINOR 9 #define ATMOSPHERE_RELEASE_VERSION_MICRO 0 #define ATMOSPHERE_RELEASE_VERSION ATMOSPHERE_RELEASE_VERSION_MAJOR, ATMOSPHERE_RELEASE_VERSION_MINOR, ATMOSPHERE_RELEASE_VERSION_MICRO -#define ATMOSPHERE_SUPPORTED_HOS_VERSION_MAJOR 19 +#define ATMOSPHERE_SUPPORTED_HOS_VERSION_MAJOR 20 #define ATMOSPHERE_SUPPORTED_HOS_VERSION_MINOR 0 #define ATMOSPHERE_SUPPORTED_HOS_VERSION_MICRO 0 diff --git a/libvapours/include/vapours/ams/ams_target_firmware.h b/libvapours/include/vapours/ams/ams_target_firmware.h index 484f76f8..0dcbac06 100644 --- a/libvapours/include/vapours/ams/ams_target_firmware.h +++ b/libvapours/include/vapours/ams/ams_target_firmware.h @@ -83,8 +83,10 @@ #define ATMOSPHERE_TARGET_FIRMWARE_18_0_0 ATMOSPHERE_TARGET_FIRMWARE(18, 0, 0) #define ATMOSPHERE_TARGET_FIRMWARE_18_1_0 ATMOSPHERE_TARGET_FIRMWARE(18, 1, 0) #define ATMOSPHERE_TARGET_FIRMWARE_19_0_0 ATMOSPHERE_TARGET_FIRMWARE(19, 0, 0) +#define ATMOSPHERE_TARGET_FIRMWARE_19_0_1 ATMOSPHERE_TARGET_FIRMWARE(19, 0, 1) +#define ATMOSPHERE_TARGET_FIRMWARE_20_0_0 ATMOSPHERE_TARGET_FIRMWARE(20, 0, 0) -#define ATMOSPHERE_TARGET_FIRMWARE_CURRENT ATMOSPHERE_TARGET_FIRMWARE_19_0_0 +#define ATMOSPHERE_TARGET_FIRMWARE_CURRENT ATMOSPHERE_TARGET_FIRMWARE_20_0_0 #define ATMOSPHERE_TARGET_FIRMWARE_MIN ATMOSPHERE_TARGET_FIRMWARE(0, 0, 0) #define ATMOSPHERE_TARGET_FIRMWARE_MAX ATMOSPHERE_TARGET_FIRMWARE_CURRENT @@ -160,6 +162,8 @@ namespace ams { TargetFirmware_18_0_0 = ATMOSPHERE_TARGET_FIRMWARE_18_0_0, TargetFirmware_18_1_0 = ATMOSPHERE_TARGET_FIRMWARE_18_1_0, TargetFirmware_19_0_0 = ATMOSPHERE_TARGET_FIRMWARE_19_0_0, + TargetFirmware_19_0_1 = ATMOSPHERE_TARGET_FIRMWARE_19_0_1, + TargetFirmware_20_0_0 = ATMOSPHERE_TARGET_FIRMWARE_20_0_0, TargetFirmware_Current = ATMOSPHERE_TARGET_FIRMWARE_CURRENT,