From bab60d8ade6975d8a8bac4d7f98335f855d02d14 Mon Sep 17 00:00:00 2001 From: hexkyz Date: Tue, 10 Nov 2026 20:42:30 +0000 Subject: [PATCH] ams: add enum recognition for 23.5.0 --- fusee/program/source/fusee_setup_horizon.cpp | 2 ++ fusee/program/source/fusee_stratosphere.cpp | 16 ++++++++++++++++ .../libexosphere/include/exosphere/pkg2.hpp | 2 +- libraries/libexosphere/source/fuse/fuse_api.cpp | 1 + .../include/stratosphere/hos/hos_types.hpp | 1 + .../include/vapours/ams/ams_api_version.h | 6 +++--- .../include/vapours/ams/ams_target_firmware.h | 4 +++- 7 files changed, 27 insertions(+), 5 deletions(-) diff --git a/fusee/program/source/fusee_setup_horizon.cpp b/fusee/program/source/fusee_setup_horizon.cpp index b978e513b..7936abde5 100644 --- a/fusee/program/source/fusee_setup_horizon.cpp +++ b/fusee/program/source/fusee_setup_horizon.cpp @@ -271,6 +271,8 @@ namespace ams::nxboot { return ams::TargetFirmware_22_0_0; } else if (std::memcmp(package1 + 0x10, "20260730", 8) == 0) { return ams::TargetFirmware_23_0_0; + } else if (std::memcmp(package1 + 0x10, "20260930", 8) == 0) { + return ams::TargetFirmware_23_5_0; } break; default: diff --git a/fusee/program/source/fusee_stratosphere.cpp b/fusee/program/source/fusee_stratosphere.cpp index 884d691a5..a93f6244b 100644 --- a/fusee/program/source/fusee_stratosphere.cpp +++ b/fusee/program/source/fusee_stratosphere.cpp @@ -200,6 +200,9 @@ namespace ams::nxboot { FsVersion_23_0_0, FsVersion_23_0_0_Exfat, + + FsVersion_23_5_0, + FsVersion_23_5_0_Exfat, FsVersion_Count, }; @@ -314,6 +317,9 @@ namespace ams::nxboot { { 0x34, 0x38, 0x3E, 0xE7, 0x99, 0x92, 0x63, 0x40 }, /* FsVersion_23_0_0 */ { 0xFD, 0xAF, 0x16, 0x32, 0x88, 0xE1, 0x08, 0x05 }, /* FsVersion_23_0_0_Exfat */ + + { 0x01, 0xED, 0x6B, 0x87, 0x4C, 0x1F, 0xEF, 0x41 }, /* FsVersion_23_5_0 */ + { 0x7B, 0x90, 0x28, 0x37, 0xF2, 0x00, 0x27, 0x49 }, /* FsVersion_23_5_0_Exfat */ }; const InitialProcessBinaryHeader *FindInitialProcessBinary(const pkg2::Package2Header *header, const u8 *data, ams::TargetFirmware target_firmware) { @@ -749,6 +755,16 @@ namespace ams::nxboot { AddPatch(fs_meta, 0x1BE8D5, NogcPatch0, sizeof(NogcPatch0)); AddPatch(fs_meta, 0x191540, NogcPatch1, sizeof(NogcPatch1)); break; + case FsVersion_23_5_0: + AddPatch(fs_meta, 0x1BE8CD, NogcPatch0, sizeof(NogcPatch0)); + AddPatch(fs_meta, 0x1B36E5, NogcPatch0, sizeof(NogcPatch0)); + AddPatch(fs_meta, 0x186350, NogcPatch1, sizeof(NogcPatch1)); + break; + case FsVersion_23_5_0_Exfat: + AddPatch(fs_meta, 0x1BE8CD, NogcPatch0, sizeof(NogcPatch0)); + AddPatch(fs_meta, 0x1BE8E5, NogcPatch0, sizeof(NogcPatch0)); + AddPatch(fs_meta, 0x191550, NogcPatch1, sizeof(NogcPatch1)); + break; default: break; } diff --git a/libraries/libexosphere/include/exosphere/pkg2.hpp b/libraries/libexosphere/include/exosphere/pkg2.hpp index be84a6ae7..bda1b3eb5 100644 --- a/libraries/libexosphere/include/exosphere/pkg2.hpp +++ b/libraries/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 = 0x18; + constexpr inline int CurrentBootloaderVersion = 0x19; struct Package2Meta { using Magic = util::FourCC<'P','K','2','1'>; diff --git a/libraries/libexosphere/source/fuse/fuse_api.cpp b/libraries/libexosphere/source/fuse/fuse_api.cpp index 2c0eb1f14..090ab14db 100644 --- a/libraries/libexosphere/source/fuse/fuse_api.cpp +++ b/libraries/libexosphere/source/fuse/fuse_api.cpp @@ -177,6 +177,7 @@ namespace ams::fuse { } constexpr const TargetFirmware FuseVersionIncrementFirmwares[] = { + TargetFirmware_23_5_0, TargetFirmware_23_0_0, TargetFirmware_22_0_0, TargetFirmware_21_0_0, diff --git a/libraries/libstratosphere/include/stratosphere/hos/hos_types.hpp b/libraries/libstratosphere/include/stratosphere/hos/hos_types.hpp index 9c90970a5..eb3f079c2 100644 --- a/libraries/libstratosphere/include/stratosphere/hos/hos_types.hpp +++ b/libraries/libstratosphere/include/stratosphere/hos/hos_types.hpp @@ -105,6 +105,7 @@ namespace ams::hos { Version_22_5_0 = ::ams::TargetFirmware_22_5_0, Version_23_0_0 = ::ams::TargetFirmware_23_0_0, Version_23_0_1 = ::ams::TargetFirmware_23_0_1, + Version_23_5_0 = ::ams::TargetFirmware_23_5_0, Version_Current = ::ams::TargetFirmware_Current, diff --git a/libraries/libvapours/include/vapours/ams/ams_api_version.h b/libraries/libvapours/include/vapours/ams/ams_api_version.h index dd2b85fc4..492de4d05 100644 --- a/libraries/libvapours/include/vapours/ams/ams_api_version.h +++ b/libraries/libvapours/include/vapours/ams/ams_api_version.h @@ -17,10 +17,10 @@ #define ATMOSPHERE_RELEASE_VERSION_MAJOR 1 #define ATMOSPHERE_RELEASE_VERSION_MINOR 12 -#define ATMOSPHERE_RELEASE_VERSION_MICRO 1 +#define ATMOSPHERE_RELEASE_VERSION_MICRO 2 #define ATMOSPHERE_RELEASE_VERSION ATMOSPHERE_RELEASE_VERSION_MAJOR, ATMOSPHERE_RELEASE_VERSION_MINOR, ATMOSPHERE_RELEASE_VERSION_MICRO #define ATMOSPHERE_SUPPORTED_HOS_VERSION_MAJOR 23 -#define ATMOSPHERE_SUPPORTED_HOS_VERSION_MINOR 0 -#define ATMOSPHERE_SUPPORTED_HOS_VERSION_MICRO 1 +#define ATMOSPHERE_SUPPORTED_HOS_VERSION_MINOR 5 +#define ATMOSPHERE_SUPPORTED_HOS_VERSION_MICRO 0 diff --git a/libraries/libvapours/include/vapours/ams/ams_target_firmware.h b/libraries/libvapours/include/vapours/ams/ams_target_firmware.h index d16f94e70..bf5bbdabd 100644 --- a/libraries/libvapours/include/vapours/ams/ams_target_firmware.h +++ b/libraries/libvapours/include/vapours/ams/ams_target_firmware.h @@ -103,8 +103,9 @@ #define ATMOSPHERE_TARGET_FIRMWARE_22_5_0 ATMOSPHERE_TARGET_FIRMWARE(22, 5, 0) #define ATMOSPHERE_TARGET_FIRMWARE_23_0_0 ATMOSPHERE_TARGET_FIRMWARE(23, 0, 0) #define ATMOSPHERE_TARGET_FIRMWARE_23_0_1 ATMOSPHERE_TARGET_FIRMWARE(23, 0, 1) +#define ATMOSPHERE_TARGET_FIRMWARE_23_5_0 ATMOSPHERE_TARGET_FIRMWARE(23, 5, 0) -#define ATMOSPHERE_TARGET_FIRMWARE_CURRENT ATMOSPHERE_TARGET_FIRMWARE_23_0_1 +#define ATMOSPHERE_TARGET_FIRMWARE_CURRENT ATMOSPHERE_TARGET_FIRMWARE_23_5_0 #define ATMOSPHERE_TARGET_FIRMWARE_MIN ATMOSPHERE_TARGET_FIRMWARE(0, 0, 0) #define ATMOSPHERE_TARGET_FIRMWARE_MAX ATMOSPHERE_TARGET_FIRMWARE_CURRENT @@ -200,6 +201,7 @@ namespace ams { TargetFirmware_22_5_0 = ATMOSPHERE_TARGET_FIRMWARE_22_5_0, TargetFirmware_23_0_0 = ATMOSPHERE_TARGET_FIRMWARE_23_0_0, TargetFirmware_23_0_1 = ATMOSPHERE_TARGET_FIRMWARE_23_0_1, + TargetFirmware_23_5_0 = ATMOSPHERE_TARGET_FIRMWARE_23_5_0, TargetFirmware_Current = ATMOSPHERE_TARGET_FIRMWARE_CURRENT,