Now Reading
How Microsoft tried to make the Xbox 360 dashboard load sooner

How Microsoft tried to make the Xbox 360 dashboard load sooner

2023-01-10 10:56:09


Eaton



Since 2005, the Xbox 360 dashboard has resided on the flash chip soldered onto the motherboard. In most consoles it’s a 16 MB flash chip (Hynix HY27US08281A). Some consoles have a bigger flash of 256 MB or 512 MB players can use as further space for storing. All the important system recordsdata are on the nand file system, that means the console can boot to sprint efficiently with out a hard-drive. The Xbox 360 hard-drive has all the time been an elective accent, however because the console technology progressed, having a hard-drive turned more and more needed because the variety of video games and downloadable content material elevated.

On November 19, 2008, Microsoft launched the NXE (New Xbox Expertise) replace (v7357). It was an enormous replace that introduced avatars, a redesigned sprint UI, and much more. Particularly, it introduced help for two new partitions on the hard-drive. They’re referred to as the System Auxiliary and System Prolonged partitions. The NXE replace introduced so many options that they might not all match on the 16 MB nand file system. The two new partitions gave Microsoft 350 MB more room to play with – greater than sufficient for the preliminary NXE replace, and future growth. This has a caveat the place the hard-drive is required to get the total expertise. For instance, if the hard-drive shouldn’t be related, the console will nonetheless perform since all of the important system recordsdata are nonetheless on the nand, however all the additional goodies, equivalent to avatars, won’t work, since these recordsdata are on the hard-drive.

October 2012 Replace

4 years later, somebody at Microsoft realized they can velocity up the sprint by transferring it to one of many new hard-drive partitions. The v16197 replace introduced a lot of features, however one small function no seen was how the sprint executable was moved to the hard-drive’s System Prolonged partition. A brand new perform was added to the Xbox Utility Supervisor (xam) named CXamTitleLoader::GetFastestDashLoadPath. Right here’s what it seems to be like in IDA:

The decompiled model:

What it does is examine if “quick prolonged storage” is related (this implies a hard-drive is related with a legitimate System Prolonged partition), and can override the sprint load path, which by default is the sprint that’s on the nand. The sprint remains to be on the nand as a fallback in case a hard-drive shouldn’t be related.

One other change was made to the sprint executable itself: it’s now uncompressed. Xbox 360 executables will be LZX-compressed and/or AES-encrypted. The sprint being uncompressed means the system gained’t have as a lot to do when the information is loaded into reminiscence from disk. This may make the sprint load sooner, so long as the disk learn completes in the identical time (or much less) because the nand flash learn.

Efficiency Testing

The hard-drive put in in my console is a WD Black 2.5″ 7200rpm HDD, Model WD5000LPLX (500 GB).

Primarily based on the perform identify “GetFastestDashLoadPath” and what it does, it’s clear that Microsoft builders imagine the hard-drive is quicker than the nand flash. Are they proper? To get a normal thought, I used the stopwatch app on my cellphone to check loading the newest sprint (v17559) on the nand vs hard-drive. I couldn’t discover any noticeable distinction. Each load in about 2.3 seconds. Time was measured from the moment the sprint began being loaded (black display) to when the black display began to fade. This take a look at reveals the efficiency advantages aren’t as noticeable as anticipated, however that doesn’t imply they’re nonexistent.

For the second take a look at, I wrote a rudimentary benchmark in C++ to run on the console itself:


//https://eaton-works.com/2023/01/09/how-microsoft-attempted-to-make-the-xbox-360-dashboard-load-faster/
DbgPrint([Benchmark] Benchmark start.n);
//Use a 1 MB buffer. This leads to one of the best efficiency for each units.
DWORD readBufferSize = 1048576;
//FLASH symbolically linked to: MachineFlash
HANDLE hFlash = CreateFile(FLASH:sprint.xex, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
//HDDSYSEXT symbolically linked to: MachineHarddisk0SystemExtPartition
HANDLE hExt = CreateFile(HDDSYSEXT:20449700sprint.xex, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFlash == INVALID_HANDLE_VALUE || hExt == INVALID_HANDLE_VALUE)
{
DbgPrint([Benchmark] A CreateFile failed with error %d.n, GetLastError());
return;
}
LARGE_INTEGER flashDashSize;
LARGE_INTEGER extDashSize;
if (!GetFileSizeEx(hFlash, &flashDashSize) || !GetFileSizeEx(hExt, &extDashSize))
{
DbgPrint([Benchmark] A GetFileSizeEx failed with error %d.n, GetLastError());
return;
}
PVOID readBuffer = malloc(readBufferSize);
if (readBuffer == NULL)
{
DbgPrint([Benchmark] No reminiscence out there for learn buffer.n);
return;
}
LARGE_INTEGER counterFreq;
LARGE_INTEGER counterStart;
LARGE_INTEGER counterEnd;
//Let’s be fancy and use these APIs. Be aware that utilizing GetTickCount additionally produces the identical finish outcomes.
QueryPerformanceFrequency(&counterFreq);
QueryPerformanceCounter(&counterStart);
DWORD numRead;
whereas (flashDashSize.QuadPart > 0)
{
if (!ReadFile(hFlash, readBuffer, readBufferSize, &numRead, NULL))
{
DbgPrint([Benchmark] ReadFile (flash) failed with error %d.n, GetLastError());
return;
}
flashDashSize.QuadPart -= numRead;
}
QueryPerformanceCounter(&counterEnd);
DWORD flashTimeMs = ((counterEnd.QuadPart – counterStart.QuadPart) * 1000) / counterFreq.QuadPart;
QueryPerformanceCounter(&counterStart);
whereas (extDashSize.QuadPart > 0)
{
if (!ReadFile(hExt, readBuffer, readBufferSize, &numRead, NULL))
{
DbgPrint([Benchmark] ReadFile (ext) failed with error %d.n, GetLastError());
return;
}
extDashSize.QuadPart -= numRead;
}
QueryPerformanceCounter(&counterEnd);
DWORD extTimeMs = ((counterEnd.QuadPart – counterStart.QuadPart) * 1000) / counterFreq.QuadPart;
DbgPrint([Benchmark] Benchmark concluded. Outcomes with buffer measurement of %d: Nand=%dms, HDD=%dmsn, readBufferSize, flashTimeMs, extTimeMs);
return;
See Also

Listed here are the outcomes:

There’s certainly a efficiency profit to loading the sprint from the hard-drive, but it surely’s measured in milliseconds. That’s higher than nothing, and concludes that transferring the sprint to the hard-drive is (barely) useful to the consumer expertise. Given how essential and broadly used the sprint is, any velocity enhance is appreciated by players.

August 2013 Replace

On August 26, 2013, Microsoft launched the v16537 update. CXamTitleLoader::GetFastestDashLoadPath was renamed to CXamTitleLoader::GetDefaultTitleImage. The perform works the identical, however has new “information heart” performance. When the console is in information heart mode, it’ll obtain a “information heart dashboard” from Xbox Reside to make use of as an alternative. Information heart mode is a thriller and is presumably an inner service, maybe associated to an early experiment with cloud gaming.

Subscribe to new posts

Get an e mail notification each time one thing new is revealed.

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top