Did Morrowind on the Original XBOX really reboot itself to free memory ? | MVG

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
last year in 2020 when microsoft had announced its intention to acquire xenomax media for 7.5 billion dollars during an official xbox podcast with microsoft and bethesda director of bethesda game studios todd howard explained that the game morrowind used a trick to reboot the original xbox without the user even knowing my favorite one of morrowind is you can actually if you're running low in memory you can reboot the original xbox and the user can't tell you can throw like a screen up though when morrowind loads sometimes you get a very long load that's us rebooting the xbox it's called memory man hail mary someone there said well you know you could do this ability so this got me thinking how would this even work soft rebooting a game console would still essentially reset the memory graphics api cpu registers cache stack pointer and pretty much everything else but i know the original xbox well enough to understand the ins and outs and keep in mind everything that runs on the original xbox did so with kernel level permissions so programmers could certainly get creative and perhaps dump the state of the game somewhere in memory or hard disk and when the game rebooted it would simply load it back in essentially like a save state in emulation [Music] and with that i thought it would be a cool idea to dive into this head first and see if we can find some real evidence of this so what we're going to do is use three things a copy of the game an xbox development kit and a decompiler and for that i'm going to use ida pro which should do the job nicely hopefully with these three things we'll get some insights as to what's going on during the loading process of a morrowind save file so first off let's get the game on the dev kit and launch it as you can see it loads and plays just fine now i'll grab a save file from the internet that should reboot itself during a loading screen now the difficult part here is that we don't really know if the system has rebooted itself todd howard himself mentioned that he just popped up a image during the time the reboot occurred so it's very difficult to know if there's actually anything going on behind the scenes but if i simply use my xbox neighborhood to soft reset the xbox we can see that the game does reboot itself but it reboots back into the loading screen so the question now is how does this even work but then i remembered back in the og xbox homebrew scene days there was a particular command that could launch an xbox executable from an existing one and pass arguments to that new executable this is essentially how xbox dashboards worked if you take a look at a custom xbox dashboard like evolution x it's launching directly into that new executable but it's also performing a soft reboot many many homebrew games would also utilize this approach as well for example i ported quake 2 to the original xbox as a homebrew release and i utilized a launcher that will launch into the game with certain mods and this was essentially doing the same thing but only passing in the name of the mod as an argument the game itself would then pick up the argument that was passed to the executable and then load it and launch into the game and that particular command is x launch new image the documentation says it reboots the xbox console to launch a different xpe from the dvd drive and then goes on to say the path specified by lp image path should be the path to a valid xbe file located on the dvd drive data is passed across the reboot in the launch data structure the newly executed title can receive the launch data with x get launch info it also goes on to say when calling x launch new image the title should be performing as little activity as possible it should not be performing activity in other threads or have any asynchronous tasks pending be written to the hard disk performing audio or graphics in another thread submixing or performing i o to the dvd hard disk or the memory units okay so we have some pretty solid evidence to suggest that yes morrowind is rebooting itself somehow maintaining its state and then loading back into the save game pretty clever stuff but now i'm really curious as to how this works so we've got our xbox development kit all up and running and recall that we said that x launched new image will reboot the xbox console into a different xpe file from the dvd drive now what i'm going to do is we're going to load a save game that's currently on this particular hard drive but before i do that i'm going to utilize a tool known as the xbox file event viewer and essentially what this will do it will trace it will display anytime a file is created read to or written to and we're going to filter on morrowind.xpe so essentially what this is telling us is if morrowind.xpe is being accessed then there's a pretty good chance it's not it's not 100 but it's a pretty good chance that it's being called from xbox new image which we said is doing a reboot of the xbox console to launch a different xpe file from the dvd drive so let's go ahead and set up that trace right now and see if it actually works so we we have to press start here to start our trace and then we will load our morrowind save file and hopefully we'll see if you can see right there that it's actually you know accessing morrowind.xbe now this is not a 100 percent surefire way of saying that the game is rebooting itself but it is pointing to the fact that the x launch is actually being referenced now before we conclude that x launch new image is indeed responsible for this particular method the last thing that i want to do is utilize a reverse engineering tool to decompile the executable which hopefully will provide some more secrets and insight as to what's going on okay so we've loaded our morrowind.xbe into ida pro and this is our disassembler our reverse engineering tool so let's go ahead and poke around and do some snooping now the first thing i'm going to do is search for some text i'm going to search for morrowind.xbe so let's go ahead and search for that now hopefully we'll find something that is important or useful that we can then utilize so we can already tell that we're looking at this particular assembly call which is a basically it's accessing this d column morrowind.xpe so let's go ahead and press f5 to decompile that block of code and you can already tell that it's doing what appears to be and i'm almost positive that this sub underscore 2 3 a b 9 d is essentially doing a x launching image because if you take a look it's taking two parameters one is the string for the xpe and the second is some launch data and that is pretty much correlating one to one with this particular sub function now what i'm going to do is i'm going to rename this and call it x launch new image now before we say that we've cracked the case and everything has been figured out let's take a closer look at this block of code now it's not really that important that we understand what's going on here but if we go up above we can see that we have this particular condition so if this byte is true then all this code gets accessed otherwise all this code gets accessed and ultimately it ends up with this x launch new image which launches into morrowind.xbc effectively rebooting itself as what todd howard had alluded to so what i'm going to do is let's take a look at this variable and see what this is doing because this is the condition that's telling us we're either rebooting into the xbox or we're not so let's jump and take a look at the cross references for it and the one that i'm interested in is the one that actually gets written to these other variables are being read from or being accessed so let's go to this one here and you can already tell that i i think we've found it guys because there's two byte variables here right so the first one is saying if the value no reboot on new game is set to one in the morrowind dot any file then this byte variable is set to true and the one that we were just looking at this one here is no reboot on load game if the value is set to one in the morrowind dot any and on further investigation when i opened up the morrowind dot ini file i could find the no reboot on new game and the no reboot on load game as you can see both are set to zero indicating that the game will reboot itself on a retail xbox but on a debug xbox when the game was being developed by bethesda game studios on development kits back in the day most likely these values were set to one because they were utilizing 128 megabyte xbox development kits so this is definitely telling us that the game is rebooting itself on load and todd how its information was correct but one other part that we've kind of discovered here is that it's not only on load it's also on a new game there's also a scenario where the game will basically reload itself when a new game is started which is also quite interesting so if we jump to that we can also take a look at that condition so if no reboot on new game is set to true then it runs this function and just returns otherwise there's even a a message here that says new game from inside morrowind itself and it also has this same address location and at the bottom of this code you can see it's launching into morrowind.xpe essentially rebooting itself now todd did mention that the xbox would only reboot itself if memory was low now most likely what's happening in here is there could be some memory checks that are going on we're not really too concerned about that and the other thing is it's setting up those temporary states those temporary files that get saved to the t partition that get picked up later at this point here and this particular launch parameter is essentially telling morrowind to pick up that data and i think what's likely happening there is it's just loading back the state that the game was in before it had saved and restarted itself and it's kind of like a save state in emulators you know if you're familiar with something like that it's effectively just picking up the game from where it left off very very clever and very ingenious and this is not something that i have ever heard about and when he actually mentioned this in the podcast i was very very bemused by and i also wanted to know more details on how this worked and i think we've we've solved it guys i think we've cracked the case here that yes todd howard is 100 accurate on his words the xbox does reboot itself when memory is low in morrowind but i guess the other part that he didn't mention and he may have forgotten about is it also occurs if a new game is started which i think is is quite interesting as well well guys i hope you enjoyed this episode and hopefully it wasn't too geeky or technical and you could follow along with but it was something that's been on my mind for pretty much since todd howard mentioned it i was very curious as to how bethesda actually pulled this off but in the end it's a pretty simple trick and one that is quite effective as far as memory management is concerned so you know props to bethesda for coming up with some ingenious ways to get around the memory limitations of the original xbox which was only at 64 megabytes at the time but that will do it for this episode thank you so much for watching if you liked it don't forget to leave me a thumbs up and i'll catch you guys in the next video bye for now [Music] you
Info
Channel: Modern Vintage Gamer
Views: 227,782
Rating: undefined out of 5
Keywords: morrowind, The Elder Scrolls, bethesda, xbox, todd howard, reboot xbox, mvg, modern vintage gamer, reverse engineering, devkit, elder scrolls, elder scrolls 3 morrowind xbox, bethesda game studios, microsoft, og xbox, original xbox, video games, action rpg, open world, memory management, dashboard, ida pro, decompiler, debugger
Id: x0TKwPnHc-M
Channel Id: undefined
Length: 13min 5sec (785 seconds)
Published: Mon Apr 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.