mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[XboxKrnl/xconfig.cc] - Fixes and logging changes
- Adding more information in logs for easier debugging - XamSetDashContext correction - XCONFIG_USER_VIDEO_FLAGS reports widescreen when set in config by user - XCONFIG_SECURED_AV_REGION reports proper values when set in config by user - Added missing \n
This commit is contained in:
parent
bb20ada9bf
commit
b5d319834e
|
|
@ -35,7 +35,7 @@ DEFINE_uint32(internal_display_resolution, 8,
|
||||||
"Allow games that support different resolutions to render "
|
"Allow games that support different resolutions to render "
|
||||||
"in a specific resolution.\n"
|
"in a specific resolution.\n"
|
||||||
"This is not guaranteed to work with all games or improve "
|
"This is not guaranteed to work with all games or improve "
|
||||||
"performance."
|
"performance.\n"
|
||||||
" 0=640x480\n"
|
" 0=640x480\n"
|
||||||
" 1=640x576\n"
|
" 1=640x576\n"
|
||||||
" 2=720x480\n"
|
" 2=720x480\n"
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,8 @@ void UserProfile::LoadSetting(UserSetting* setting) {
|
||||||
} else {
|
} else {
|
||||||
// Unsupported for now. Other settings aren't per-game and need to be
|
// Unsupported for now. Other settings aren't per-game and need to be
|
||||||
// stored some other way.
|
// stored some other way.
|
||||||
XELOGW("Attempting to load unsupported profile setting from disk");
|
XELOGW("Attempting to load unsupported profile setting 0x{:08X} from disk",
|
||||||
|
setting->GetSettingId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -204,7 +205,8 @@ void UserProfile::SaveSetting(UserSetting* setting) {
|
||||||
} else {
|
} else {
|
||||||
// Unsupported for now. Other settings aren't per-game and need to be
|
// Unsupported for now. Other settings aren't per-game and need to be
|
||||||
// stored some other way.
|
// stored some other way.
|
||||||
XELOGW("Attempting to save unsupported profile setting to disk");
|
XELOGW("Attempting to save unsupported profile setting 0x{:08X} from disk",
|
||||||
|
setting->GetSettingId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1255,6 +1255,8 @@ DECLARE_XAM_EXPORT1(XamShowCommunitySessionsUI, kNone, kStub);
|
||||||
dword_result_t XamSetDashContext_entry(dword_t value,
|
dword_result_t XamSetDashContext_entry(dword_t value,
|
||||||
const ppc_context_t& ctx) {
|
const ppc_context_t& ctx) {
|
||||||
ctx->kernel_state->dash_context_ = value;
|
ctx->kernel_state->dash_context_ = value;
|
||||||
|
kernel_state()->BroadcastNotification(
|
||||||
|
kXNotificationDvdDriveUnknownDashContext, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@ DEFINE_int32(user_country, 103,
|
||||||
" 102=UA 103=US 104=UY 105=UZ 106=VE 107=VN 108=YE 109=ZA\n",
|
" 102=UA 103=US 104=UY 105=UZ 106=VE 107=VN 108=YE 109=ZA\n",
|
||||||
"XConfig");
|
"XConfig");
|
||||||
|
|
||||||
|
DECLARE_bool(widescreen);
|
||||||
|
DECLARE_bool(use_50Hz_mode);
|
||||||
|
DECLARE_int32(video_standard);
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace kernel {
|
namespace kernel {
|
||||||
namespace xboxkrnl {
|
namespace xboxkrnl {
|
||||||
|
|
@ -56,9 +60,26 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
||||||
switch (setting) {
|
switch (setting) {
|
||||||
case 0x0002: // XCONFIG_SECURED_AV_REGION
|
case 0x0002: // XCONFIG_SECURED_AV_REGION
|
||||||
setting_size = 4;
|
setting_size = 4;
|
||||||
xe::store_and_swap<uint32_t>(value, 0x00001000); // USA/Canada
|
switch (cvars::video_standard) {
|
||||||
|
case 1: // NTSCM
|
||||||
|
xe::store_and_swap<uint32_t>(value, 0x00400100);
|
||||||
|
break;
|
||||||
|
case 2: // NTSCJ
|
||||||
|
xe::store_and_swap<uint32_t>(value, 0x00400200);
|
||||||
|
break;
|
||||||
|
case 3: // PAL
|
||||||
|
xe::store_and_swap<uint32_t>(
|
||||||
|
value, cvars::use_50Hz_mode ? 0x00800300 : 0x00400400);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
xe::store_and_swap<uint32_t>(value, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
XELOGW(
|
||||||
|
"An unimplemented setting 0x{:04X} in XCONFIG SECURED CATEGORY",
|
||||||
|
static_cast<uint16_t>(setting));
|
||||||
assert_unhandled_case(setting);
|
assert_unhandled_case(setting);
|
||||||
return X_STATUS_INVALID_PARAMETER_2;
|
return X_STATUS_INVALID_PARAMETER_2;
|
||||||
}
|
}
|
||||||
|
|
@ -83,7 +104,10 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
||||||
break;
|
break;
|
||||||
case 0x000A: // XCONFIG_USER_VIDEO_FLAGS
|
case 0x000A: // XCONFIG_USER_VIDEO_FLAGS
|
||||||
setting_size = 4;
|
setting_size = 4;
|
||||||
xe::store_and_swap<uint32_t>(value, 0x00040000);
|
// 0x00040000 normal
|
||||||
|
// 0x00050000 widescreen
|
||||||
|
xe::store_and_swap<uint32_t>(
|
||||||
|
value, cvars::widescreen ? 0x00050000 : 0x00040000);
|
||||||
break;
|
break;
|
||||||
case 0x000C: // XCONFIG_USER_RETAIL_FLAGS
|
case 0x000C: // XCONFIG_USER_RETAIL_FLAGS
|
||||||
setting_size = 4;
|
setting_size = 4;
|
||||||
|
|
@ -95,11 +119,15 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
||||||
value[0] = static_cast<uint8_t>(cvars::user_country);
|
value[0] = static_cast<uint8_t>(cvars::user_country);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
XELOGW("An unimplemented setting 0x{:04X} in XCONFIG USER CATEGORY",
|
||||||
|
static_cast<uint16_t>(setting));
|
||||||
assert_unhandled_case(setting);
|
assert_unhandled_case(setting);
|
||||||
return X_STATUS_INVALID_PARAMETER_2;
|
return X_STATUS_INVALID_PARAMETER_2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
XELOGW("An unimplemented category 0x{:04X}",
|
||||||
|
static_cast<uint16_t>(category));
|
||||||
assert_unhandled_case(category);
|
assert_unhandled_case(category);
|
||||||
return X_STATUS_INVALID_PARAMETER_1;
|
return X_STATUS_INVALID_PARAMETER_1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -272,13 +272,6 @@ constexpr uint8_t XUserIndexAny = 0xFF;
|
||||||
// https://github.com/ThirteenAG/Ultimate-ASI-Loader/blob/master/source/xlive/xliveless.h
|
// https://github.com/ThirteenAG/Ultimate-ASI-Loader/blob/master/source/xlive/xliveless.h
|
||||||
typedef uint32_t XNotificationID;
|
typedef uint32_t XNotificationID;
|
||||||
enum : XNotificationID {
|
enum : XNotificationID {
|
||||||
/* Notes:
|
|
||||||
- kXNotificationSystemUnknown, kXNotificationLiveUnknown,
|
|
||||||
kXNotificationCustomGamercard, kXNotificationDvdDriveUnknown,
|
|
||||||
kXNotificationXmpUnknown, kXNotificationFriendsUnknown, and
|
|
||||||
kXNotificationMsgrUnknown are all called together by XNotifyBroadcast
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Notification Areas
|
// Notification Areas
|
||||||
kXNotifySystem = 0x00000001,
|
kXNotifySystem = 0x00000001,
|
||||||
kXNotifyLive = 0x00000002,
|
kXNotifyLive = 0x00000002,
|
||||||
|
|
@ -333,6 +326,7 @@ enum : XNotificationID {
|
||||||
|
|
||||||
// XNotification Dvd ?
|
// XNotification Dvd ?
|
||||||
kXNotificationDvdDriveUnknown = 0x80000003,
|
kXNotificationDvdDriveUnknown = 0x80000003,
|
||||||
|
kXNotificationDvdDriveUnknownDashContext = 0x8000000C,
|
||||||
kXNotificationDvdDriveTrayStateChanged = 0x8000000D,
|
kXNotificationDvdDriveTrayStateChanged = 0x8000000D,
|
||||||
|
|
||||||
// XNotification XMP (13 total)
|
// XNotification XMP (13 total)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue