From 94b9616b3a32b5a56f6bc26103ed77e3f65d95c7 Mon Sep 17 00:00:00 2001 From: Cancerous Date: Thu, 5 Nov 2020 18:17:16 -0500 Subject: [PATCH] [XAM] Raise the size of the dummy HDD to 20GB. - [XAM] Raise the size of the dummy HDD to 20GB. - [XAM] Rename unknown field to device_type in X_CONTENT_DEVICE_DATA. --- src/xenia/kernel/xam/xam_content.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/xenia/kernel/xam/xam_content.cc b/src/xenia/kernel/xam/xam_content.cc index d47dd0575..0e74c4dd8 100644 --- a/src/xenia/kernel/xam/xam_content.cc +++ b/src/xenia/kernel/xam/xam_content.cc @@ -46,14 +46,12 @@ struct DeviceInfo { // they incorrectly only look at the lower 32-bits of free_bytes, // when it is a 64-bit value. Which means any size above ~4GB // will not be recognized properly. -// -// NOTE(randprint): you can use 120 GB and 42 GB 'fullness' -// with the proper deviceID feel free to change at your discression #define ONE_GB (1024ull * 1024ull * 1024ull) static const DeviceInfo dummy_device_info_ = { - 0x00000001, 1, // found from debugging / reversing UE3 engine titles - 4ull * ONE_GB, // 4GB - 3ull * ONE_GB, // 3GB, so it looks a little used. + 0x00000001, // id + 1, // 1=HDD + 20ull * ONE_GB, // 20GB + 3ull * ONE_GB, // 3GB, so it looks a little used. u"Dummy HDD", }; #undef ONE_GB @@ -118,7 +116,7 @@ DECLARE_XAM_EXPORT1(XamContentGetDeviceState, kContent, kStub); typedef struct { xe::be device_id; - xe::be unknown; + xe::be device_type; xe::be total_bytes; xe::be free_bytes; xe::be name[28]; @@ -135,7 +133,7 @@ dword_result_t XamContentGetDeviceData( device_data.Zero(); const auto& device_info = dummy_device_info_; device_data->device_id = device_info.device_id; - device_data->unknown = device_id & 0xFFFF; // Fake it. + device_data->device_type = device_info.device_type; device_data->total_bytes = device_info.total_bytes; device_data->free_bytes = device_info.free_bytes; xe::store_and_swap(&device_data->name[0], device_info.name);