https://devblogs.microsoft.com/oldnewthing/20220106-00/?p=106122 Skip to main content [RE1Mu3b] Microsoft The Old New Thing The Old New Thing The Old New Thing * Home * DevBlogs * Developer + Visual Studio + Visual Studio Code + Visual Studio for Mac + DevOps + Developer support + CSE Developer + Engineering@Microsoft + Azure SDK + IoT + Command Line + Perf and Diagnostics + Dr. International + Notification Hubs + Math in Office * Technology + DirectX + PIX + SurfaceDuo + Startups + Sustainable Engineering + Windows AI Platform * Languages + C++ + C# + F# + Visual Basic + TypeScript + PowerShell Community + PowerShell Team + Python + Q# + JavaScript + Java + Java Blog in Chinese * .NET + .NET + .NET MAUI + Blazor + ASP.NET + NuGet + Xamarin * Platform Development + #ifdef Windows + Apps for Windows + Azure Depth Platform + Azure Government + Bing Dev Center + Microsoft Edge Dev + Microsoft Azure + Microsoft 365 Developer + Old New Thing + Windows MIDI and Music dev + Windows Search Platform * Data Development + Azure Cosmos DB + Azure Data Studio + Azure SQL + OData + Revolutions R + SQL Server Data Tools * More [ ] Search Search Cancel Filling in some gaps in the story of Space Cadet Pinball on 64-bit Windows [png] Raymond January 6th, 2022 Space Cadet Pinball has a special place in the hearts of many Windows enthusiasts. A customer used their support contract to ask how to change among the three levels of play in Space Cadet Pinball. My proudest achievement of Windows XP was fixing the game so it didn't consume 100% CPU. People keep asking if it can be brought back. One point of contention is over my claim that I removed Pinball from Windows because I couldn't get the 64-bit version to work. Retrocomputing enthusiast NCommander even undertook a Zapruder-level analysis of all of the 64-bit versions of Windows he could find to prove or disprove my story. I was amazed at the level of thoroughness (and the fortitude it required to get those Itanium systems up and running, much less debug them), but there's one version of 64-bit Windows that NCommander didn't try out, and that's the one that's relevant to the story. When the 64-bit Windows project started, there was no Itanium hardware yet. The only way you could run any Itanium code was to run it in a simulator. Booting Windows on an Itanium simulator took forever. Clearly not the development environment you wanted when porting millions of lines of code. On the other hand, the Windows team did have access to a lot of copies of another 64-bit processor: The Alpha AXP. In 1999, Compaq announced that it would no longer support Windows on the Alpha AXP, which left a lot of Windows team members with cumbersome paperweights on their desks. Let's see what we've got here. * A lot of Alpha AXP machines sitting around with nothing to do. * A bunch of developers who have experience with the Alpha AXP. * A 32-bit version of Windows that runs on the Alpha AXP. * No Itanium hardware on the immediate horizon. * A ticking clock. The Alpha AXP is internally a 64-bit processor. It's just that 32-bit Windows used only the 32-bit subset. Solution: Port the Alpha AXP version of 32-bit Windows to 64-bit Windows. Now, 64-bit Windows on the Alpha AXP would never ship. But the Alpha AXP did have the advantage of existing in physical form, so the system could finish booting before the heat death of the universe. The assumption is that most of the effort in porting Windows to the Itanium is in the 32-bit to 64-bit transition, and not in dealing with quirks of the specific 64-bit processor you are porting to. The assumption was somewhat validated by experience: The 32-bit Windows code base had been ported to many 32-bit processors, with relatively few architecture-specific issues. Once you got a 64-bit version of Windows working for the Alpha AXP, it should be a comparatively small amount of additional work to port it to Itanium. The hard part was going from 32-bit to 64-bit. The team set to work, and we had 64-bit Windows running on physical Alpha AXP hardware long before we had any physical Itanium hardware. I could test my 64-bit port on a physical Alpha AXP system to validate that it was successful. And that's the system that had the broken collision detector. NCommander did find a collision detection bug on the Itanium, although that bug was nowhere as severe as the one that existed on the Alpha AXP. My guess is that it had to do with the default rounding mode established by the C runtime library. My theory as to what happened is that some time after I removed Pinball from the product, the C runtime team realized that they had a compatibility bug in the way they set the default rounding mode, and they fixed it. Or maybe there was a compiler bug, and the compiler team fixed that. Whatever the problem was, somebody fixed it, and then they went back and re-tested Pinball with this fix, and everything worked great, so they put Pinball back. I'm just guessing about what happened afterward because nobody informed me that they had gotten Pinball working and added it back. I just assumed that it was gone forever. [png] Raymond Chen Follow Tagged History Read next A rejected attempt to inject pseudo-physics into Windows 8 toast notifications Like a mischievous rubber band flung across the screen. [png] Raymond Chen December 28, 2021 10 comments The Thanksgiving to Christmas sales nationwide of the VIS could be tabulated in an unsigned char One of the great duds of console gaming history. [png] Raymond Chen December 24, 2021 3 comments 15 comments Leave a commentCancel reply Log in to join the discussion. * [png] MGetz January 6, 2022 7:16 am collapse this comment While I understand the economics of why the Alpha situation happened (and would always have happened for the same reason MIPs and PPC went away) there will always be a part of me that wonders "what could have been" if the 64bit version of NT had hit the market instead of the 32bit version and the benchmarks really did justify the expense. That said MIPS, PPC, Alpha AXP, and even to an extent ARM/ARM64 all face the same issue: cost (and compatibility). Because there is no off the shelf solution for any of these things with a competitive second source they will always struggle to gain market share because the costs will always be higher for the performance than the x86-64 world is. Intel probably doesn't realize just how lucky they are that IBM insisted on a second source and they licensed the architecture. Without that who knows what we'd be running? x86 doesn't have to be the best, it just has to be the cheapest for the performance. That was what ultimately killed MIPS, PPC, and Alpha despite all of them having some advantages. Log in to Reply + [png] Sunil Joshi January 6, 2022 8:14 am collapse this comment ARM64 has multiple sources - which is part of why I think it might be a runner. In addition to ARM's designs, Apple and others have invested heavily. At the same time, the low power background of ARM is really proving to be an advantage for performance on these new process nodes. ARM is also the dominant offering in a mass market sector of mobile devices while PPC never really had that given it was used either in IBM etc. servers or in the much smaller Apple market. Log in to Reply o [png] MGetz January 6, 2022 8:26 am collapse this comment Not in the same way x86 did at the start. I don't think x86 could get going today with the way hardware works as easily. The fact that AMD/Intel/Cyrix/IBM CPUs were all relatively interchangeable until the death of Socket 7 was a huge boon to market penetration. Whereas far as I know there is no socketed ARM64 solution much less one with a compatible UEFI that I can just install Windows on. Every single ARM64 board is different and has to be qualified because they all do different things. If you notice ARM64 is succeeding only in closed ecosystems where the entire experience is managed it's not really making inroads into the larger market. Apple M1 is the only performance competitive ARM64 CPU on the market and its single vendor single source closed system. It's really no different than the Commodore 64 in that regard. The only thing it has going for it over the C64 is that MacOS abstracts all the hardware so it can remain 'compatible' when Apple changes things going forward. But as far as I know there is no readily available multi sourced option anymore. Technically even x86 doesn't have multi-source beyond compatible ecosystems anymore. I can't run an AMD Socket 1200 CPU or a Intel Socket AM4. That means that the costs of those ecosystems is far greater than it should be because of the lack of competition. I remember when Nvidia chipsets were the best overall, intel was just OK, and VIA was the budget option. Sadly those days are long past. Log in to Reply # [png] Sunil Joshi January 6, 2022 8:42 am collapse this comment The economics of a lot of things are different now. AWS has a custom ARM chip available now. There are ARM servers available from various companies. In many markets that didn't really exist in the 1980s like web applications etc. recompiling isn't really that much of a burden if that's even necessary given that most will be targeting a runtime like JVM, CLR or Node, which only needs to be ported once. Even computational applications written in native code can take advantage of reduced costs from cloud vendors or even on prem due to reduced cooling requirements etc. Log in to Reply + [png] John Dallman January 9, 2022 12:17 pm collapse this comment IA-64 had no second source: that was part of the reason for its existence. That meant AMD had to create a new architecture, did a decent job, and that's where x86-64 came from. Intel could use it because of their cross-licensing agreement on x86, and they did. According to an AMD senior engineer who visited my employer, Intel originally wanted to make their version of x86-64 deliberately and thoroughly incompatible with AMD's, hoping to crush AMD with marketing. Dave Cutler at Microsoft killed that idea, by telling Intel that Windows would not support such an architecture. It was a silly idea anyway: network effects create huge benefits from software compatibility. Compaq killed Alpha because they believed Intel and HP's marketing about IA-64, and wanted to stop investing in Alpha. Log in to Reply * [png] Brian Boorman January 6, 2022 9:43 am collapse this comment Dave Plummer's popular Youtube channel (Dave's Garage) has a video "Windows 11 Pinball: by the original Microsoft programmer of the XP Game" where he give a lot of the history and attempts to get it running on Windows 11 (watch the video to see if he succeeds or not). On a related note - when is Raymond going to do a livestream with Dave? It could be an AMA. Log in to Reply * [png] Yuhong Bao January 6, 2022 12:53 pm collapse this comment I believe Windows NT 4.0 for Alpha had Pinball. Do you know why that version did not have the same problem? Log in to Reply + [png] Chris Iverson January 6, 2022 1:57 pm collapse this comment Unless I'm misunderstanding, I think this is the answer: "Now, 64-bit Windows on the Alpha AXP would never ship." They created the 64-bit port of Windows to Alpha AXP to just have something to test on, but it was never publicly shipped. The 32-bit version(which I'm assuming is what was publicly released, based on what's said in this post) never had that problem in the first place, and Raymond's first post on the issue specifically made it clear that it was when it was being ported to 64-bit that the issue started occurring. If you're asking why the 32-bit didn't have that problem when the 64-bit did, well, I don't know enough about the processor to know, and Raymond even highlights in this post that it was likely platform decisions or issues(whether with the runtime library, or the compiler), but the exact cause is, presumably, lost to time. Log in to Reply * [png] Yuhong Bao January 6, 2022 12:58 pm collapse this comment This reminds me of when Jet 4.0 updates for Windows 7 were compiled with /arch:sse2. Log in to Reply * [png] Yuhong Bao January 6, 2022 2:49 pm collapse this comment I wonder if there is any chance DEC/Compaq/HP can pull off what Apple is doing with the M1 today back then. Log in to Reply * [png] Michael Casadevall January 6, 2022 4:41 pm collapse this comment So, I didn't expect to ever see a follow-up to my video from Raymond himself, and honestly, I apologize for not reaching out to you directly. I want to write a quick note before this gets buried, so I apologize if this is more stream of consciousness. There were some points I actually left out of my research because the video was getting extensively long, but I'll try to summarize my notes here. I have probably at least 10 or so copies of Pinball sitting in my projects folder which is a testament to the madness I undertook. In the process of reaching through Pinball versions, I actually ended up going back to NT4, and validating that all four ports had working Pinball, and seeing FPU before on DEC Alpha was 32-bit precision vs. the 53-bit precision of x86 (and played correctly. I actually had suspected the collision bug you talked about had been introduced in the AXP64 port, and then carried forward to Itanium, because the Windows 2000 DDK seems to suggest that _M_AXP64 used a 64-bit precision mode like Itanium. I left AXP64 out of the video because I suspect talking about Itanium was going to cause a lot of people's eyes to glaze over as is, and then I need to explain that a never shipped port of Windows exists and ... yeah ... I actually did spend more effort than I care to admit to fix the CtD bug on the XP RTM IA64 pinball.exe, but between WinDBG randomly crashing, and Itanium assembling being madness inducing, I didn't get too far with it. It doesn't help that I don't have IDA, and Ghidra doesn't understand IA64 either. From what I could tell, I think its choking on a data size mismatch with trying to load the collision elements from pinball.dat, since I see a lot of magic numbers which seem to assume 32-bit behavior which were cleaned up for XP 2003, but I won't pretend to be an expert in reverse engineering. For quite a long time, I had actually suspected that what had happened was the bug got fixed on the svr2003 branch sometime after Longhorn had forked off, and had gotten lost in the post-reset builds, which is why XP x64 and Server 2003 had a working Pinball game. My notes page goes into rather insane detail tracking how version numbers and builds were, to figure out what versions did and didn't work. Looking back, I question my sanity on how deeply I dove. I actually did try multiple versions of the IA64 compiler to see if I could find a regression, but failed. The fix seems to have introduced sometime before Server 2003 was branched off, because that's when the installer bug was introduced which was when Pinball was re-added to AMD64 builds, and that mistake was present in build 5001, which was the first post-reset build going back to the svr2003 base. I may actually do a follow-up at some point, incorporating this, and larger details on what happened, as a few other people have pointed me at things I didn't know. If nothing, I would love to put a more definitive story up on what happened, and perhaps cover those elements more in-depth (especially since I've since obtained DEC Alpha hardware). Log in to Reply * [png] Brian Boorman January 6, 2022 5:00 pm collapse this comment A little bonus treat if you go to the comments section of the linked NCommander's video, two of the original authors of Space Cadet Pinball show up and talk about what/how it was given to Microsoft. Log in to Reply * [png] Jeffrey4 Home January 6, 2022 9:53 pm collapse this comment Raymond, I noticed that, at least for the past few weeks, about half of the DevBlogs are your blogs. If you remembered, I notified you a few months ago that one of your blog has nothing to do with development. You said it was some kind of routing error that make the blog appear in DevBlogs. I think the same thing might have happened. My guess is that most of your blogs meant to appear in a Tab call "The Old New Things", Not "DevBlog". If not, then please forgive my comment Log in to Reply + [png] Raymond ChenMicrosoft employee January 7, 2022 7:04 am collapse this comment I have to manually flag posts as "do not show on the DevBlogs main page". Sometimes I forget. Sorry. Log in to Reply * [png] Marcus Johnson January 8, 2022 2:07 pm collapse this comment "Sadly, the license agreement does not permit releasing the game as an independent entity. The agreement was for including Space Cadet Pinball in Windows 95, with options to include it in the Microsoft Plus! pack for Windows 95, as well as extending the distribution rights to successor products of Windows and the Plus! pack.Your 2018 post about Pinball" The solution is obvious, release the Plus! pack on the Windows Store including a new, 64 bit version of Pinball. if you actually do this, please credit me Log in to Reply Archive January 2022 December 2021 November 2021 October 2021 September 2021 August 2021 July 2021 June 2021 May 2021 April 2021 March 2021 February 2021 January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 Relevant Links I wrote a book Ground rules Disclaimers and such My necktie's Twitter Categories Code History Tips/Support Other Non-Computer Stay informed Login Insert/edit link Close Enter the destination URL URL [ ] Link Text [ ] [ ] Open link in a new tab Or link to existing content Search [ ] No search term specified. Showing recent items. Search or use up and down arrow keys to select an item. Cancel [Add Link] Code Block x Paste your code snippet [ ] Cancel Ok What's new * Surface Pro 8 * Surface Laptop Studio * Surface Pro X * Surface Go 3 * Surface Duo 2 * Surface Pro 7+ * Windows 11 apps * HoloLens 2 Microsoft Store * Account profile * Download Center * Microsoft Store support * Returns * Order tracking * Virtual workshops and training * Microsoft Store Promise * Flexible Payments Education * Microsoft in education * Office for students * Office 365 for schools * Deals for students & parents * Microsoft Azure in education Enterprise * Azure * AppSource * Automotive * Government * Healthcare * Manufacturing * Financial services * Retail Developer * Microsoft Visual Studio * Windows Dev Center * Developer Center * Microsoft developer program * Channel 9 * Microsoft 365 Dev Center * Microsoft 365 Developer Program * Microsoft Garage Company * Careers * About Microsoft * Company news * Privacy at Microsoft * Investors * Diversity and inclusion * Accessibility * Security English (United States) * Sitemap * Contact Microsoft * Privacy * Manage cookies * Terms of use * Trademarks * Safety & eco * About our ads * (c) Microsoft 2022