NO EXECUTE!

(c) 2024 by Darek Mihocka, founder, Emulators.com.

January 16 2024

[Part 44]  [Table Of Contents]  [Return to Emulators.com]

Happy 2024!

2024 will mark 45 years since I began using personal computers.  I started coding in Toronto at age 13 on my high school's 6502-based Commodore PET during the 1979-1980 school year.  By the time I was in first year engineer I was earning my first real paychecks using other 6502 machines such as the Atari 400 (my first paid computer magazine article Graphics Utility Package), the Commodore 64 (my first paid game port), and the Apple II (my first college summer internship in 1986).  This led to almost 40 additional years of interesting work on virtual machines and emulators at companies like Microsoft starting in 1987, at Intel, at Amazon (AWS), and finally this past year 2023 at Qualcomm.  I spent additional years in the late 1990's on my emulators.com projects such as Xformer, Gemulator, SoftMac; plus writing this blog series to promote and educate about non-native code execution (i.e. binary translation and emulation).  I left the corporate world again last month at the end of 2023 (my 5th time I think? 1997, 2007, with a couple of short breaks in 2010 and 2015) so this is a perfect time to follow up on last summer's IPC Race post to catch you all up on all the tech topics near and dear to me: ARM64, TTD, software performance, and Windows on ARM.

Last August also marked the end of my long residency in the Seattle / Redmond / Bellevue area.  I packed up my house of 29 years which was located just off I-90 on Mercer Island and drove my car and computers through a dozen states to the other end of I-90 to now live the semi-retired life back on the east coast where it all began.  Please note my new address for all mail correspondence:

Darek Mihocka
139 Charles Street, Suite 133
Boston, MA  02114

With all this free time I've been busy preparing slides, demo videos, and several blogs and tutorials that I am calling ARM64 Boot Camp.

My mission is to educate you all about this new market of CPUs and computers - why you should care, where to buy them, how to use them, how to write software for them.  As I always like to do, I am putting in as many hyperlinks to reference material or other web sites to help explain the concepts I am presenting so that you the reader hopefully go down some interesting rabbit holes.


We're Going Full Circle Back to RISC

The 8-bit 6502 was one of the world's first RISC (reduced instruction set) processors and dominated the early years of personal computing with home computers such as the Apple II, Commodore 64, the BBC Micro, and my favorite the Atari 800.  Intel came along with the 16-bit 8086 and 8088 CISC (complex instruction set) processors, and along with Microsoft and IBM birthed what we now think of as the mainstream "PC" in the 1980's.  Atari and Commodore chose the competing Motorola 68000 processor for their 1990's 32-bit computers (the ST and TT, the Amiga).  Apple resisted Intel, initially going with the 68000 for the Macintosh then using RISC-based PowerPC processors right until 2006 - before too jumping on the Intel bandwagon, allowing for Windows XP to run on the Apple Macintosh.  PowerPC also lost its grip on gaming a few years later, as Xbox One and Playstation 4 veered back to custom AMD variants of x86 after a single generation on PowerPC. Since then AMD and Intel's x86 processors dominated personal computing, console gaming, and cloud computing for much of the next decade.

As I've been saying for years in this blog series the x86 architecture has been getting too complex, buggy, and fragmented. Bugs and design flaws are getting fixed not by _removing_ bad features (as Motorola did as it iterated the 680x0 processors, and ARM similarly did by deprecating old ARM32 and Thumb instructions) but rather by _adding_ even more layers of complexity so as not to break backward compatibility (with... MS-DOS?). In 2010, as others were also pointing out this troubling trend and calling for simpler hardware designs, I posted a claim that a wave of ARM based devices using emulation for backward compatibility could solve this problem by introducing new hardware which uses emulation to support the older MS-DOS and Windows application.  I qualified that by saying that emulation technology could be made faster and emulation needed to be more accurate (I'd pointed out a number of glaring flaws in QEMU and VirtualPC at the time).

ARM designs have in fact been doing their part, doubling in performance every two to three years.  At the same time, x86 emulation technology in the form of Apple's Rosetta 2 and Microsoft's XTA series of emulators are achieving high backward compatibility running older Intel binaries. The emulation performance is still lagging, but 14 years later now we are very close to having ARM based computers reaching parity with x86 hardware and becoming indistinguishable from their AMD and Intel based counterparts.  The ARM wave has indeed arrived with 2023 seeing really great devices hitting the market.  2024 could prove to be (and I hope it is!) a pivotal year in the CPU race.  Most people may not realize that major PC manufacturers such as Dell, ASUS, HP, Lenovo, Samsung and Microsoft began been shipping ARM64 based Windows laptops and tablets since 2018!  I personally demonstrated the first such tablets and laptops at both at the 2018 and 2019 Vintage Computer Festivals held in Seattle, showing off freshly ported native ARM64 builds of Xformer 10 and Hatari.

While Microsoft offers its customers "Silicon Diversity" in delivering hardware and software which support both Intel and ARM devices, Apple most famously transitioned all of its hardware products and software to ARM64 (which they brand as "Apple Silicon") between 2020 and 2023.  ARM processors (and other interesting RISC architectures such as RISC-V) are not going away.


My Personal Mission

This latest focus towards ARM has been a very intentional and personal mission for me over the past 10 years.  When I look back, I can very clearly mark three distinct phases in my career:

1980-1995 - my pre-Windows years.  Those early high school and college days when I had easy access to Commodore PET, Apple II, Atari 800, IBM PC's running MS-DOS, OS/2, and Xenix/386, Atari ST, and Apple Macintosh (both 68k and PowerPC). It's really too bad that kids today don't get exposure to such a broad spectrum of hardware and operating systems.  All the hobby code I'd shipped and was earning money with until that point - including Quick ST, G.U.P., Xformer, and the original Gemulator - was written for everything _but_ Windows.  Crazy huh?  I'd been programming for 15 years before I wrote I ever wrote my first 32-bit Windows "hello world" app!!

1995-2013 - my "Wintel" years. My work on "WIN32" apps started with my transfer to the Microsoft Office team in early 1995 to work on the 32-bit Windows port of Word and Excel.  I was fully thrust into the Windows 95 / Windows NT world and continued my career working on x86 code optimizations for the Visual C/C++ compiler, the early beginnings of .NET for x86, then developing the concept of time-travel tracing for x86, contributing to x86 emulators such as Bochs, a gig at Intel simulating Windows performance on new architectures, a gig at Amazon working with other Microsoft alumni to bring up 64-bit Windows Server "cc1" and "cg1" instances in the AWS cloud, and finally went back to Microsoft in 2012 to work on new compiler optimizations for x86 and x64.  The world had pretty much gone x86-only despite all the problems with power consumption, security flaws, and the complexity of developing code for x86.  Credit where credit is due, Intel's last great crowning achievement was the 2013 release of their 4th generation "Haswell" Core i7 processor, which was a masterpiece of micro-architecture and instruction set architecture pushing CISC designs to the limit and setting a new high water mark for both IPC _and_ clock speed.  I'd like to think the two years I put in at Intel contributed to that, but honestly I was surrounded by a ton of smart people who were already on the right path; I just provided them with data.

2013-present - my ARM years.  How does the saying go, "Create the future you want"?  Microsoft had shipped the ARM-based Surface RT tablet (marking the beginnings of "Windows on ARM" as we know it today) and I was offered a role on "ProjectN", what is now called .NET Native. You see, the .NET jitter was very slow and especially so on Surface RT devices.  Our team was tasked to develop an ahead-of-time (AOT) .NET native compiler based on the Visual C/C++ optimizer so that C# app launch could skip the JIT and launch almost as fast as native C or C++.  There was an existing AOT technology in .NET called "ngen" but it still relied on loading up the JIT engine on startup; ProjectN a.k.a. .NET Native was intended to eliminate that JIT dependency entirely.  This is how many Windows Store apps are shipped today for both x86 and ARM, and even Android apps have moved away from a JIT model to an AOT model. After short detour back to AWS it was back to the Windows Debugger team in 2015 to continue my work on TTD (time travel debugging) to add support for ARM (both Thumb2 and ARM64).  And it was on this project where I go to get my hands on the first prototypes of Qualcomm's ARM64 hardware for Windows in early 2016.

These last 8 years since 2016 have been an incredible journey working with the Windows OS team, the Visual C/C++ compiler team, the Windows Debugger team, and with Qualcomm engineers to bring this whole ecosystem to life (after people thought Windows RT was dead and buried and that was the end of ARM!).  When I look at something like the original press reports from early 2017 announcing the port of Windows to 64-bit ARM, it was a very ambitious plan and certainly I had no idea at the time what I was signing up for or just how much work would be involved to get to where we are today in 2024.

As an engineer who has been directly involved in developing the emulation and the tools for Windows on ARM for 10 years now, it's been fantastic to see this evolution from the Windows RT science experiment to the mature Windows 11 for ARM landscape of today.  That's why I am excited by what 2024 will bring, as even faster new ARM64 CPU releases and a new release of Windows will bring all of this together for consumers in a very polished manner.  I have seen the future, and it is _not_ going to be dominated by Intel.


(Mis-)Understanding Windows on ARM

While many of your know that Microsoft's Surface Pro X and Apple's Macbook M1 are somehow _different_ - they don't have cooling fans and instead run silent, they are smaller and lighter than typical laptops, they have ridiculously good (10 hours or more) battery life, and they run on some CPU architecture called ARM.  Yet as much publicity as ARM-based devices such as Macbook M1 and Surface Pro X received - even some great headlines and recent new promises of even greater things to come - I am still surprised at how little understanding average Windows software developers have about ARM64 and why it should matter to them.

In hindsight, some of these early Windows 10 on ARM devices that launched from 2018 through 2020 were nothing more than cell phones with keyboards and large screens; they literally used the same Qualcomm Snapdragon ARM CPUs as popular cell phones.  The performance and experience did not quite live up to the expectation that these devices were "just a PC", and they were met with confusion and skepticism.  That all began to change in 2021 with the release of Windows 11 on ARM, as well as Apple's widespread migration away from Intel processors to their own custom ARM64 processors M1 and M2. 

But it seems that this is still under the radar for a lot of people, including fellow software developers.  Just in the past year, I've had fellow engineers from various organizations ask me questions along the lines of:

- is Windows on ARM just Windows RT all over again?
- Apple Silicon is ARM64?
- where do I buy a Windows on ARM tablet?
- can I install Windows on the Macbook M1?
- what is ARM64EC and how is it different from ARM64?
- how do I develop for ARM? do I need a cross-compiler?
- where do I find a debugger for ARM?
- does emulation really work? how slow it is?
- is Rosetta really as fast as they say it is?
- what is TTD you keep talking about?
- I didn't know Surface 9 is ARM based. I thought it was Intel based.
- what is that dual-screen phone you're holding?

As I've documented before, I myself stopped travelling with any AMD or Intel devices after 2018 - I only started taking my Windows on ARM based devices on vacations and trips, and do most of my code development directly on the ARM64 devices that I develop for.  Yet I personally know two people who purchased a Surface Pro X on my advice in 2020, only to return them and purchase a Macbook M1 instead, for reasons that the Pro X felt sluggish couldn't run the 64-bit software they expected to run, i.e. Photoshop.  Absolutely valid issues at the time which required many more years of development and polish.  There are much better devices out today four years later, and the compatibility is much higher now in 2024 than it was 4 years ago as I will demo shortly.  Hopefully I can disabuse you of any lasting scars you may have from your own similar Windows RT or the Surface Pro X experiences. :-)

To quickly answer that last phone question: the two cell phones I travel with are also Microsoft ARM64 devices - a Surface Duo and a Surface Duo 2 - which I think are fantastic cell phones and yet most people are completely unaware of them. I was in Las Vegas last month to see U2 at The Sphere, and people would stop to ask me what dual-screen phone I was holding.  And when I told them it was a "Surface Duo" they looked at me confused and glassy eyed and had no clue these existed; which is funny, as they make great sci-fi props!  As recently seen in the Hulu series "The Murder At The End Of the World" and in the latest Doctor Who specials - the "tablets" featured in those shows were very obviously Microsoft Surface Duo phones.  And yes, in true Microsoft fashion, they are taking a fantastic product and killing the Surface Duo before it had a chance to take off. :-(  Which is why for Christmas, Santa gave me a new Google Pixel 8 Pro phone, doh.

But bottom line: if fellow engineers are confused about all things ARM64, then certainly I wouldn't expect the public to jump on the bandwagon.  Walk into any Best Buy or Staples and what you are presented with are rows of AMD and Intel based laptops in the middle, ARM based Chromebooks off to one side, and ARM based Apple Macbooks (which most people don't realize are even ARM) on the other side. I've even asked salespeople at those stores "do you have any Windows on ARM devices such as Surface Pro X on display?" and they have _no_ idea what I'm talking about.  Maybe these same salespeople didn't realize the Surface Duo existed??

Therefore, I feel compelled to write a series of tutorials to start at the beginning and explain the basic of ARM64 and Windows on ARM to you my readers.  Let's first start with the low-level ARM64 architecture itself and then move to higher concepts like Windows on ARM, TTD, Visual Studio, Snapdragon, Apple M1, etc.  Let me introduce you to the basic concepts that make ARM (and specifically ARM64) different from x86, where it has similarities to x86, and why compared to previous RISC architectures it is as close to genius as it gets.


ARM64 Boot Camp: The Windows on ARM Tutorials

Over the next few weeks I will present to you a series of tutorials on various "under the hood" aspects of Windows on ARM.  Read these in any order at your convenience as I light up the links to the topics.  I will also be filming companion videos to further explain the concepts and give you some cool demos.

By the time you've read them all and watched them all, you should not only understand the fundamental concepts related to ARM64, but you should be able to answer any of those questions listed above if someone asks you.  Spread the knowledge!

    A brief history of Windows on ARM

    The genius of ARM64

    Installing ARM64 developer tools

    ARM64EC explained

    Understanding x86/x64 emulation in Windows on ARM
 

Videos:

    $250 Laptop Bake-off (video)

    A tour of ARM64 devices (480p video) 

    A tour of ARM64 devices (720p video)


I trust you will find these tutorials enlightening!  Drop me a line at emulators@outlook.com with your comments and suggestions.  If there is something you'd like me to explain or demo (whether Atari related or ARM related or you want me to demo a particular piece of hardware) let me know!


[Part 44]  [Table Of Contents] [Return to Emulators.com]