TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Morrowind rebooted the original Xbox

240 pointsby pmarinabout 4 years ago

30 comments

thomasfromcdnjsabout 4 years ago
Great to see Morrowind on HN, just sharing my personal story;<p>I was in highschool living in a trailer park with my mother. My ma ended up getting a pay out from the government for a work related injury. She bought me a PC and we set it up in the caravan and I was able to run Morrowind. It was a great escape from the conditions at the time and I kept learning programming when I wasn&#x27;t hunting Daedra&#x27;s.
评论 #26827397 未加载
评论 #26829069 未加载
munk-aabout 4 years ago
A MUD I worked (uh volunteered, as a total newbie) on had a soft-reboot implementation for deploys that blew my mind when I first saw it in action. Open telnet connections were all sent keep alives before the MUD launched a new instance of itself from the executable (which may have been a different version from the currently running copy) and then killed itself. To users on the other end a message appeared saying &quot;Relaunching the server&quot; and was followed up shortly by &quot;You may now resume play&quot;. Since this engine was designed to constantly fall over due to instabilities and OOMs it stored the current game state in a persistent state (originally on-disk files - most of it was migrated to MySQL) so the only things that really needed hacking were re-acquiring the right sockets and remembering which user is which.<p>This included, FYI, under development new game elements which were mostly written and launched using a mix of things called RPROGs, OPROGs, CPROGs and Descs (among other things) all of which were written in a custom domain language input into the MUD itself - devs like myself worked only on underlying mechanics and had no need to wander into the specifics of all those triggers.<p>This probably opened up a number of security holes but, given that the game only ever checked the first six characters of a password (and checked them one by one against a plaintext copy - that was patched) there were lower fruit available to criticize.<p>If you want to check it out an older copy is available open-sourced[1] - it&#x27;s a DIKU variant MUD.<p>1. <a href="https:&#x2F;&#x2F;github.com&#x2F;webbj74&#x2F;RPI-Engine" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;webbj74&#x2F;RPI-Engine</a>
评论 #26827834 未加载
评论 #26828576 未加载
flohofwoeabout 4 years ago
As far as I remember, this wasn&#x27;t a &quot;hack&quot;, but &quot;booting into a new map&quot; was a recommended technique in the SDK documentation to reduce loading times, simplify memory management and reduce the memory needed for code (e.g. you&#x27;d compile different &quot;executables&quot; for different parts of the game, like main menu vs singleplayer-mode vs multiplayer-mode).
评论 #26831146 未加载
评论 #26831231 未加载
kabdibabout 4 years ago
I was surprised to see that (at least on the 360) there was no way for a title to terminate itself; the game process ran until it was killed by something else (e.g., the user launching another title, or shutting the console down).<p>Another surprise was the utter lack of a date-and-time clock chip. Without a network (and I&#x27;m guessing, without actually connecting to XBox Live), the 360 had no idea what time it was. That saved a bunch of money on hardware, and removed headaches involving coin cells (such as shipping policies).
评论 #26827418 未加载
评论 #26827703 未加载
评论 #26827621 未加载
评论 #26831993 未加载
评论 #26829909 未加载
trashfaceabout 4 years ago
The original Xbox was a huge pain in terms of memory. I&#x27;m amazed they got Morrowind to run on it at all. I worked on an Xbox game, and me and another programmer (much more skilled) spent a couple weeks trying to get memory usage down so that it would fit - and to eliminate almost all leaks.<p>There was a TCR that required the game to be able to run for an extended period, don&#x27;t remember how long. But to prepare for it, I&#x27;d set it up to run in a loop overnight on the dev kit, and if it was locked up in the morning when I came in, I knew I still had work to do.
CyberRabbiabout 4 years ago
Interesting article but I just have to say that XLaunchNewImage is basically execve or kexec. Calling it “rebooting” makes it seem like the game developers put in some dirty&#x2F;crazy hacks when in reality all they did was call a public API that was explicitly designed to accommodate this use case (e.g. not resetting video state).
jbluepolarbearabout 4 years ago
Morrowind for Xbox is the reason I’m a game developer today. I loved the game so much, but the Xbox version was really, really slow and wasn’t able to use mods. I convinced my parents to split the difference with me on a pc barely capable to play the PC version. My brother and I made countless mods and quests.
geuisabout 4 years ago
Video from Modern Vintage Gamer walking through the process of how this worked along with a demonstration <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=x0TKwPnHc-M" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=x0TKwPnHc-M</a>
评论 #26826997 未加载
pseudosavantabout 4 years ago
It is funny they say the Xbox was known for only having 64mb of RAM. The PS2 only had 32mb. The GameCube only had 27mb.
评论 #26827760 未加载
评论 #26830868 未加载
hinkleyabout 4 years ago
Presumably then if the game was glitching on you and you did a save&#x2F;load then the problem would magically fix itself.<p>(have you tried turning it off and back on again?)
1MachineElfabout 4 years ago
Today you can run Morrowind quite well on the Xbox One (not to be confused with the 1st gen Xbox.)<p>I highly recommend running it on PC with OpenMW, especially with the Tamriel Rebuilt mod installed.
chewsabout 4 years ago
that was a great post, typical fun exploitation to rid yourself of the problem of memory management. There was a way to force garbage collection in Flash as well that was used by the clever pros at the time.
yroc92about 4 years ago
It blew my mind to hear that the Xbox ran on 64mb of RAM.
评论 #26827357 未加载
评论 #26827618 未加载
评论 #26827333 未加载
corysamaabout 4 years ago
Yep. The function would reboot into a new executable without disrupting what was on the screen.<p>I don’t recall which one, but this was used by an FPS to switch between single-player vs. multi-player exes that were developed by two completely different studios.
评论 #26827270 未加载
评论 #26829800 未加载
shmerlabout 4 years ago
Good to mention OpenMW: <a href="https:&#x2F;&#x2F;openmw.org" rel="nofollow">https:&#x2F;&#x2F;openmw.org</a>
thomondabout 4 years ago
Skip the blogspam: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=x0TKwPnHc-M" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=x0TKwPnHc-M</a>
flatironabout 4 years ago
His video on Monday was great about this. I like that they checked first if they were running low on memory and then just rebooted the darn thing if it was.
varsketizabout 4 years ago
Wow, that&#x27;s a cool hack. I wonder if they did more stuff like that to go around Xbox limitations. Reminds me of Crash Bandicoot hacks for ps1 :))
评论 #26826860 未加载
MayeulCabout 4 years ago
It&#x27;s indeed a bit like a kexec.<p>On system initialization, kernel routines are copied into RAM by the bootloader[1]. Executables run in ring 0, and have a jump table to call kernel routines in their own address space (IIRC) [2].<p>As such, loading any executable counts as a soft reboot.<p>Also, there is a functioning open source emulator, Xqemu [3] (and its sibling&#x2F;fork focused on speed and compatibility more than accuracy, xemu [4])<p>I recommend reading &quot;17 mistakes Microsoft made in the Xbox security system&quot;, which is very informative [5].<p>[1]: <a href="https:&#x2F;&#x2F;xboxdevwiki.net&#x2F;Boot_Process" rel="nofollow">https:&#x2F;&#x2F;xboxdevwiki.net&#x2F;Boot_Process</a><p>[2]: <a href="https:&#x2F;&#x2F;xboxdevwiki.net&#x2F;Kernel" rel="nofollow">https:&#x2F;&#x2F;xboxdevwiki.net&#x2F;Kernel</a><p>[3]: <a href="https:&#x2F;&#x2F;xqemu.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xqemu.com&#x2F;</a><p>[4]: <a href="https:&#x2F;&#x2F;xemu.app&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xemu.app&#x2F;</a><p>[5]: <a href="https:&#x2F;&#x2F;xboxdevwiki.net&#x2F;17_Mistakes_Microsoft_Made_in_the_Xbox_Security_System" rel="nofollow">https:&#x2F;&#x2F;xboxdevwiki.net&#x2F;17_Mistakes_Microsoft_Made_in_the_Xb...</a>
lunaticlabsabout 4 years ago
I’ve been working in games since before then, and it’s a common trick. It’s often portrayed as if it would occur because of poor memory management (I.e. memory not being freed), but even with perfect memory management it can happen in constrained memory environments (like consoles).<p>What happens is you would are allocating large memory chunks at level loading time, and potentially a number of smaller allocations during the a user playing that need to be persistent (for example, player save data). You would inevitably end up with a small block of memory allocated in the middle of a large free chunk, and would unable to allocate a large chunk that spanned the small allocated chunk. This was manageable up to point, you would try and pre allocate as much of the persistent memory as possible so that it would end up at similar addresses and contiguous, but it was difficult to guarantee.<p>Theoretically, of course, you can develop without allocating persistent memory in game, but it becomes difficult to maintain, and limits you in other areas. If you used any 3rd party libraries that allocated memory, or certain template functions or standard library functions that allocated memory, you had to work around that. If your game wasn’t linear and players can move around dynamically, this becomes exponentially difficult.<p>On consoles, we also had to pass “soak” tests, where the game has to run in a demo mode for 24-48 hours or longer, continuously without crashing or errors.<p>Inevitably the only solution was to force all your memory to get remapped, but the only way to do that was to reallocate everything in a relatively predictable order, and the only way to do that was to save your state, force a reboot, and reload. Hence the “hack”, except that this was so common, facilities existed that helped you do it. Normally, there was a chunk of memory that persisted between soft reboots, so you could store your state here. You could also pass flags to the rebooted executable, to tell it where or how to load.
geerlingguyabout 4 years ago
It took me a few minutes, after reading both the article <i>and</i> the first few comments here, before I realized Morrowind was a game (in the Elder Scrolls series, it seems), and not the code name for some early Xbox firmware (what I presumed at first).
bitwizeabout 4 years ago
There was a Sega Genesis game (I think it was X-Men) where it prompted you to &quot;reset the master computer&quot; or summat. There was no button on the controller that would reset the computer. Instead you had to mash RESET on the console itself! Somehow, it saved a bit of state that would detect a soft reboot at that point and resume the game from before you hit reset.<p>Too bad later Genesis models lacked a RESET button...
Impossibleabout 4 years ago
This was common in console games and console SDKs had special APIs to support this. It&#x27;s a decent solution to memory leak and fragmentation issues
MaxBarracloughabout 4 years ago
&gt; Presumably, the reason for this behaviour was that it was simpler to boot the game fresh when loading a save, rather than trying to unload all the game assets in memory from the current game.<p>So, &#x27;arena&#x27;&#x2F;&#x27;region-based&#x27; memory management, of a sort. Figures. Wonder if any other games used the same trick.
laurensrabout 4 years ago
Nice write-up! The Nintendo Wii did more or less the same thing. It would (re-load) various IOSes [1] when opening a game or applet.<p>[1]: <a href="https:&#x2F;&#x2F;wiibrew.org&#x2F;wiki&#x2F;IOS" rel="nofollow">https:&#x2F;&#x2F;wiibrew.org&#x2F;wiki&#x2F;IOS</a>
Cthulhu_about 4 years ago
I think that&#x27;s a pretty clever hack, and a strong case to make startup and reboot times as fast as possible, especially for a single purpose device (or operating mode, e.g. boot straight to the game in this case).
ruskabout 4 years ago
Interesting parallel to the “nightly reboot”, the Java community’s dirty little secret ... memory management is hard.
评论 #26832798 未加载
评论 #26831452 未加载
pvorbabout 4 years ago
Well, that&#x27;s what I call thinking outside the (X)box to work around a limitation.
kashanjunaidabout 4 years ago
great hack! thanks for share
celestiabout 4 years ago
Soft Reboot, is that like Sudo Purge?