From aa635b3715c93ce4e02ed699375544643b286bcf Mon Sep 17 00:00:00 2001 From: Luke Arntson Date: Tue, 7 Jan 2025 23:00:36 -0500 Subject: [PATCH] Testing Xbox One randomization for serial ID --- headers/drivers/xbone/XBOneDescriptors.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/headers/drivers/xbone/XBOneDescriptors.h b/headers/drivers/xbone/XBOneDescriptors.h index 99fa63fcf..d48f541b0 100644 --- a/headers/drivers/xbone/XBOneDescriptors.h +++ b/headers/drivers/xbone/XBOneDescriptors.h @@ -38,7 +38,9 @@ static const uint8_t * xbone_get_string_descriptor(int index) { // Generate a serial number from the pico's unique ID pico_unique_board_id_t id; pico_get_unique_board_id(&id); - memcpy(uniqueSerial, (uint8_t*)&id, PICO_UNIQUE_BOARD_ID_SIZE_BYTES); + for(int i = 0; i < PICO_UNIQUE_BOARD_ID_SIZE_BYTES; i++) { + uniqueSerial[i] = 'A' + (id.id[i]%25); // some alphanumeric from 'A' to 'Z' + } return uniqueSerial; } else if ( index == 4 ) { // security method used return xboxSecurityMethod;