Merge remote-tracking branch 'emoose/dashboard'
This commit is contained in:
commit
134ea59e9a
|
@ -609,6 +609,10 @@ int InstrEmit_mfspr(PPCHIRBuilder& f, const InstrData& i) {
|
|||
// TBU
|
||||
v = f.Shr(f.LoadClock(), 32);
|
||||
break;
|
||||
case 287:
|
||||
// PVR
|
||||
v = f.LoadConstantUint64(0x710800);
|
||||
break;
|
||||
default:
|
||||
XEINSTRNOTIMPLEMENTED();
|
||||
return 1;
|
||||
|
|
|
@ -270,24 +270,32 @@ X_STATUS Emulator::LaunchXexFile(std::wstring path) {
|
|||
// and then get that symlinked to game:\, so
|
||||
// -> game:\foo.xex
|
||||
|
||||
auto mount_path = "\\Device\\Harddisk0\\Partition0";
|
||||
// Register local directory as some commonly used mount paths
|
||||
std::string mount_paths[] = {
|
||||
"\\Device\\Harddisk0\\Partition0",
|
||||
"\\Device\\Harddisk0\\Partition1",
|
||||
"\\Device\\Harddisk0\\Partition1\\DEVKIT",
|
||||
"\\Device\\LauncherData",
|
||||
"\\SystemRoot",
|
||||
};
|
||||
|
||||
// Register the local directory in the virtual filesystem.
|
||||
auto parent_path = xe::find_base_path(path);
|
||||
auto device =
|
||||
std::make_unique<vfs::HostPathDevice>(mount_path, parent_path, true);
|
||||
if (!device->Initialize()) {
|
||||
XELOGE("Unable to scan host path");
|
||||
return X_STATUS_NO_SUCH_FILE;
|
||||
}
|
||||
if (!file_system_->RegisterDevice(std::move(device))) {
|
||||
XELOGE("Unable to register host path");
|
||||
return X_STATUS_NO_SUCH_FILE;
|
||||
for (auto path : mount_paths) {
|
||||
auto device =
|
||||
std::make_unique<vfs::HostPathDevice>(path, parent_path, true);
|
||||
if (!device->Initialize()) {
|
||||
XELOGE("Unable to scan host path");
|
||||
return X_STATUS_NO_SUCH_FILE;
|
||||
}
|
||||
if (!file_system_->RegisterDevice(std::move(device))) {
|
||||
XELOGE("Unable to register host path as %s", path.c_str());
|
||||
return X_STATUS_NO_SUCH_FILE;
|
||||
}
|
||||
}
|
||||
|
||||
// Create symlinks to the device.
|
||||
file_system_->RegisterSymbolicLink("game:", mount_path);
|
||||
file_system_->RegisterSymbolicLink("d:", mount_path);
|
||||
file_system_->RegisterSymbolicLink("game:", mount_paths[0]);
|
||||
file_system_->RegisterSymbolicLink("d:", mount_paths[0]);
|
||||
|
||||
// Get just the filename (foo.xex).
|
||||
auto file_name = xe::find_name_from_path(path);
|
||||
|
|
|
@ -20,6 +20,9 @@ DEFINE_int32(game_language, 1,
|
|||
"5=ES / 6=IT / 7=KR / 8=CN",
|
||||
"General");
|
||||
|
||||
DEFINE_bool(xconfig_initial_setup, false,
|
||||
"Enable the dashboard initial setup/OOBE", "Kernel");
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
namespace xboxkrnl {
|
||||
|
@ -37,7 +40,10 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
case 0x0002:
|
||||
// XCONFIG_SECURED_CATEGORY
|
||||
switch (setting) {
|
||||
case 0x0002: // XCONFIG_SECURED_AV_REGION
|
||||
case 0x0001: // XCONFIG_SECURED_MAC_ADDRESS (6 bytes)
|
||||
return X_STATUS_SUCCESS; // Just return, easier than setting up code
|
||||
// for different size configs
|
||||
case 0x0002: // XCONFIG_SECURED_AV_REGION
|
||||
setting_size = 4;
|
||||
xe::store_and_swap<uint32_t>(value, 0x00001000); // USA/Canada
|
||||
break;
|
||||
|
@ -71,7 +77,10 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
case 0x000C: // XCONFIG_USER_RETAIL_FLAGS
|
||||
setting_size = 4;
|
||||
// TODO(benvanik): get this value.
|
||||
xe::store_and_swap<uint32_t>(value, 0);
|
||||
|
||||
// 0x40 = dashboard initial setup complete
|
||||
xe::store_and_swap<uint32_t>(value,
|
||||
cvars::xconfig_initial_setup ? 0 : 0x40);
|
||||
break;
|
||||
case 0x000E: // XCONFIG_USER_COUNTRY
|
||||
// Halo: Reach sub_82804888 - min 0x5, max 0x6E.
|
||||
|
@ -79,6 +88,16 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
// TODO(benvanik): get this value.
|
||||
value[0] = 5;
|
||||
break;
|
||||
case 0x000F: // XCONFIG_USER_PC_FLAGS (parental control?)
|
||||
setting_size = 1;
|
||||
value[0] = 0;
|
||||
break;
|
||||
case 0x0010: // XCONFIG_USER_SMB_CONFIG (0x100 byte string)
|
||||
// Just set the start of the buffer to 0 so that callers
|
||||
// don't error from an un-inited buffer
|
||||
setting_size = 4;
|
||||
xe::store_and_swap<uint32_t>(value, 0);
|
||||
break;
|
||||
default:
|
||||
assert_unhandled_case(setting);
|
||||
return X_STATUS_INVALID_PARAMETER_2;
|
||||
|
|
Loading…
Reference in New Issue