11 ms·
Apple CPU Architecture Through the Ages
- spandextwins 3y agoThe 68k was a great little chip series. Really miss coding in assembler on that thing.
- sroussey 3y agoI cut my (very young) teeth on 6502. I did like all the Motorola series cpus.
- jakey_bakey 3y agoI actually got the idea for this article when somebody commented on my Apple Animation APIs piece with the same sentiment :)
- gumby 3y agoThis is the history of Mac CPUs. The Apple I, II, and variants were 6502. The Lisa used the 68000.
- cameroncooper 3y agoFun fact, the Apple 1 could also use a Motorola 6800 CPU
- gumby 3y agoIn this case that fact really is fun!
- PopePompus 3y agoI thought litigation or the threat of litigation resulted in the 6502 not being pin compatible with the 6800. How did the Apple 1 get around that?
- duskwuff 3y agoThe 6800 wasn't a drop-in replacement on the Apple 1. Installing one required some hardware modifications to the board. (It's unclear if anyone who owned one ever did this.)
- cameroncooper 3y agoThe 6501 was pin compatible with the 6800, but had its own instruction set. After the lawsuit, the pins changed and we got the 6502. This meant that if you enabled 6800 support on the Apple 1 you could drop in a 6501 and use it with software made for the 6502. If you were really ambitious you could use a 6800 but then you'd have to write a new monitor ROM. There's no evidence that this was done at the time, but about 10 years ago someone did it: https://www.youtube.com/watch?v=ag6pWUhps7U https://www.youtube.com/watch?v=ag6pWUhps7U
- runjake 3y agoOne must not forget the IIgs and it's 65C816 processor -- a bizarro 16-bit variant of the 6502. :)
- monocasa 3y agoSame processor as the SNES.
- jakey_bakey 3y agoThat's cool!
- jakey_bakey 3y agoYou're extremely correct. Regrettably, I did this intentionally because "Apple CPU Architecture" is more clickable than "Mac CPU Architecture".
- gumby 3y agoAlso Apple has used lots of CPU architectures over the years in various devices (e.g. time capsules, various dongles, etc). Surely they must have RISC V deeply embedded in various locations invisible to the end user, both for cost and experience. They could possibly even be used deeply in the bowels of the M and A devices doing some random housekeeping in the storage system or who knows what. In a funny way the term “CPU” is returning to its mainframe roots with so many functional units harnessed into a system, yet at the same time having strayed so far from its original usage (with multicore, non-linear systems) as to have become meaningless.
- klelatti 3y agoBy complete coincidence, I also wrote a post about Mac transitions a few days ago - with perhaps a bit more emphasis on the architectures that almost made it into the Mac - which may be of interest. https://thechipletter.substack.com/p/apple-transitions-68k-to-powerpc https://thechipletter.substack.com/p/apple-transitions-68k-t...
- jakey_bakey 3y agoHi, Babbage! I actually commented on your post a few days ago, with the same sentiment - this is a repost from the Medium article I showed you, but I'm trying to build up my audience on Substack :) Can I be very cheeky and ask if you'd be interested in recommending each other's publications? It seems like we have similar niche audience (albeit my work is a little more iOS-centric)
- klelatti 3y agoHi Jacob, Apologies, for some reason my memory failed me and I didn't make the connection between your Medium post and the Substack update! Of course on the recommendations, delighted to. Added just now. Best of luck.
- jakey_bakey 3y agoThat's wonderful, thank you so much :)
- deleted 3y ago[deleted]
- xnx 3y agoAmazing willingness on Apple's part to switch architectures significantly 4 times and leave behind so much code. I know Apple has done some clever stuff with translation and emulation, but this is so different than the Microsoft Windows approach to backward compatibility where you can upgrade from Windows 1.0 all the way to Windows 11: https://www.youtube.com/watch?v=nW4rk3gFOxM https://www.youtube.com/watch?v=nW4rk3gFOxM
- jasonwatkinspdx 3y agoThe big difference is that Apple has, throughout most of its, been vertically integrated in a way where they control the whole stack. MS on the other hand has to deal with a bazillion IHVs that are lazy as all heck about updating their drivers.
- lotsofpulp 3y agoI feel like Microsoft chooses to deal with a bazillion IHVs. Surely they have and had the resources to go vertical, but they do not seem to want to get their hands as dirty as Apple’s in hardware business.
- katbyte 3y agosurprisingly thou they have made some rather good hardware over the years
- The_Colonel 3y agoThey choose to do this, because they understand this relative openness and dedication to backwards compatibility is their major selling point for many well paying (institutional) customers. Yes, they could choose to go the Apple way, but ... they would likely lose the customers mentioned above, and would likely still not be as good as Apple in Apple's game.
- The_Colonel 3y agoThe drivers are the smaller problem IMHO. Companies use 20 years old software which is a) difficult to port to a different arch b) is no longer developed c) the source code is lost.
- dmitrygr 3y agoLost me two paragraphs in, due to gross inaccuracy: > Intel 8088 : 8/16-bit microprocessor — 8-bit registers with a 16-bit data bus. Uhh...8088 is 16-bit CPU. Its external bus is 8-bits wide to save on pins... It does not get better further in: > 20-bit memory addressing range — supports 640kB of RAM. It supports 1MB of addressable space, which the system integrator may allocate as they desire. 640kB is something that PCs did, but apple was in no way tied to..
- userbinator 3y agoIndeed. That description of 8-bit/16-bit is applicable to the 8080/8085/Z80 family.
- johnklos 3y ago> Intel 8088 : 8/16-bit microprocessor — 8-bit registers with a 16-bit data bus. > Uhh...8088 is 16-bit CPU The 8086 / 8088 have eight registers, four general ones (AX, BX, CX, DX) which are made up of two 8 bit registers (AL, AH, BL, BH, CL, CH, DL, DH), so it's both not completely incorrect about 8 bit registers (although I'd agree that it's misleading to say that) but definitely incorrect about the 16 bit data bus.
- dmitrygr 3y agoBy that logic, go ahead and call your 64-core AMD threadripper an eight bit processor too. Cause it still does that…
- w10-1 3y agoProbably the most significant rewrite was from the original 68K assembly, not surprisingly championed by Jean-Louis Gassee who also opened up the hardware side. Once code was in C (which was being standardized), they could work on porting across CPU's. The huge mistakes of Copland and Taligent were largely due to trying to also jump into some variant of C++ and object-oriented language at the OS level. Of course, that was at the same time Linus stuck with C for Linux and made much more relative headway. This also gave Apple a lot more leverage in the application space. They spun applications out to Claris originally because the apps were such a pain point, but once C and MPW settled they could duck MS O$$ice leverage/fees with their own more integrated approach (and sell Works + round pink blobs to creatives et al). That made it feasible for Steve to ink the deal with Bill to keep Microsoft apps relevant on Mac's, when most of the other vendors were giving up on that 10% of PC share.
- hedgehog 3y agoWith the rise of networking and multimedia this was also an incredibly chaotic time and I suspect some of the problems with the big OS rewrites stem from that. Microsoft did a better job getting something useful shipped. I don't know if it ever got documented but I'm curious whether there was any serious push to build on the nanokernel work incrementally rather than do the big rewrite.
- Shawnj2 3y agoI’m curious, why is C bad at the OS level? It seems like having stuff like classes as improved structs would be helpful as long as you avoid pitfalls like virtual functions/STL containers. C++ compiled without the STL and specific features like virtual seems like entirely an improvement for writing an OS
- remexre 3y agoAfter you knock out those and exceptions, what's left in (C++98 - C99)? Destructors and templates? 98 won't have moves, so I'd imagine you'd end up boxing most of your structures to avoid needing to copy construct then all over the place. You still have to manually delete things but now there's extra indirection. Templates might be nice, but having STLy containers is where the kernel would need them most, but then above boxing issues start to exist.
- mrdoornbos 3y agoWhat happened to the 1977-1993 run with the 6502? It was the real first era and the longest. Without it this reads like a “top 100 movies of all time” that doesn’t have a movie title older than 2007 in it.
- duskwuff 3y agoFor all intents and purposes, the Apple II was an entirely separate product family. There was very little software compatibility between the two, and the II existed alongside Macintosh for nearly a decade.
- jakey_bakey 3y agoYou're entirely right - the article really should read "Mac CPU Architecture", but then nobody would have clicked on it
- JKCalhoun 3y agoMinor nit: author keeps referring to the CPU as the Motorola 68k. It was always formally known as the Motorola 68000. (And if you insist on using k it should be capitalized.)
- taspeotis 3y ago> The Motorola 68000 series (also known as 680x0, m68000, m68k, or 68k) c/o Wikipedia
- jakey_bakey 3y agoMuch appreciated, I wasn't alive at the time so missed the WWDC memo :) (You won't believe how I pronounce OS X)
- einr 3y ago"k" as in "kilo" is never capitalized.
- jasoneckert 3y agoI remember each of the architecture transitions (M68k->PPC, PPC->x86, x86->ARM), and perhaps the most vivid recollection I have of each one is that it made perfect sense at the time. In other words, it wasn't a surprise move by Apple, and I remember widespread speculation for years beforehand in the broader community (Apple users and otherwise). PPC offered tremendous promise in the early 1990s at the same time Motorola's evolution of M68k was lackluster at best - so it made perfect sense that Apple would need to migrate away from M68k, and PPC was the optimal choice so as not to compete directly with hardware used by the PC market. And when Intel/AMD were innovating tremendously in the early 2000s while IBM was lagging with bringing out aggressive updates to their PPC line, the switch to Intel seemed inevitable. Even the idea that Apple should heavily develop their ARM mobile chips for future Apple products was discussed heavily in my circles since about 2016 (around the same time Intel started to stagnate their offerings). The earliest I remember was this blog from 2011: https://www.mattrichman.net/apple-and-arm-sitting-in-a-tree/ https://www.mattrichman.net/apple-and-arm-sitting-in-a-tree/.
- RetroTechie 3y ago> PPC offered tremendous promise in the early 1990s at the same time Motorola's evolution of M68k was lackluster at best Apple entered into a trio with IBM & Motorola to develop the PowerPC in early 90's. But at that time, there already was MIPS around. Anyone know why this PowerPC project was started despite that? Especially if -per the article- the main goal was to move from CISC to RISC? Even if MIPS cpus around at the time had performance/W issues (I've no idea yes or no), then improving technology for existing ISA would be easier than inventing entire new architecture, no? (+ all the software tools) And there was also SPARC then. So why invent new wheel, vs. improve MIPS (or SPARC) & use that? Not-invented-here syndrome? Licensing issues?
- datadeft 3y agoApple at the time of the x86 switch was roughly 3% of the PPC chip market.
- 3y ago
- johnklos 3y agoI appreciate articles like these because they're useful for people who don't know the background and details and aren't interested in a deep dive, but it'd be nice if the author spent a little more energy on details and correctness. For instance, 20 bits of address space support 1 megabyte. The 640K limit in the IBM PC was due to the IBM PC's design. Also, Apple would've considered the 8086 over the 8088, considering the need for memory throughput to have a responsive, fully bitmapped display. The addressing of the 68000 wasn't critical for the Mac like the article says; the Mac's designers took shortcuts that made 4 megs the limit for the first generation 68000 because it was easy and they had lots of space, although it really wasn't the limit because the Mac Portable can have up to 9 megabytes with the original 68000 with 24 bits of address. The Pentium didn't compete with the m68040. The Pentium came out after the PowerPC 601. The 80486, which made it to 100 MHz from Intel (higher from other vendors), competed with the m68040. I think some steps were missed between the power-hungry and heat-generating PowerPC and the MacBook Air. I don't remember any history showing the Air as something that Apple was trying to, but couldn't, make. The issue was that the G4 was good for its time, but there was never a proper G4 successor because the G5 was too power hungry and too hot. If there was some MacBook Air project that never got off the ground during the PowerPC years, I'd love to hear about it. The comment about performance-per-watt of x86 versus PowerPC was only true of the G5, it's worth noting. "Superscalar Architecture" is in the section of the article talking about, "What made Intel x86 CPUs so much better?", even though Motorola, Intel and PowerPC had been superscalar since the '90s. Intel definitely improved their superscalar implementations, but they certainly weren't unique ("to get superscalar architecture working effectively" is not how I'd put it). The author wrote, "I had to know what actually caused Intel’s x86 architecture to be so far ahead of its competition.", but never mentions AMD anywhere in the article. If AMD hadn't seriously outperformed Intel and forced Intel to actually compete, and if AMD hadn't forced the creation of 64 bit x86, then Intel certainly would not have been an option for Intel. The Pentium 4 had the same heat and power issues as the PowerPC G5. Intel ended up cancelling the Pentium 5 and instead going ahead with a much modernized Pentium III core for their Core release which made up the initial release of Intel Macs because AMD were eating their lunch. There are some other things, but they're mostly minor. It's a well written collection of information.
- The_Colonel 3y ago
- xpressvideoz 3y agoI used to tease the sudden change of Apple's stance on Intel CPUs at the time of the transition. Before the transition, Apple mocked x86 and insisted that PowerPC was indeed much faster than x86. There were even proponents of Apple who said the same thing. All of a sudden, Apple changed its mind and praised x86 as a superior one.
- jakey_bakey 3y agoApple fanboys's gonna apple fanboy
- clausecker 3y agoIt was for quite a while. Then Intel pulled ahead by going out of order and solving many hard engineering challenges that PowerPC processors did not solve as well.
- seec 3y agoNot much has changed. We are now hearing the praise of Apple Silicon even though in practice it is nowhere near as good as they want you to believe. If you have a workload that will never extend beyond what Apple has planned and are willing to eat the insane markup on options, yes, it is ok for the efficiency. But otherwise, this is a waste of time on an unstable software platform. I was an Apple user in the PowerPC era, and I remember very well how bad it got. And I have been burned too many times by software deprecation and unnecessary change that make things worse. I am still salty about Aperture that I regularly recommended to friends/clients; iWork got destroyed from an UI standpoint and did not even improve on anything (still perform like shit for big files and documents formatting preservation are even less reliable than Word across versions); Apple Music is so bad that I would rather use Spotify (if I really have to use a Frankenstein web client application, I would rather use the performant one). I am still an Apple user in a way, got Mac Mini, iPhone, Apple Watch, and previously had an iPad who got stolen but nether bothered to renew (the pricing is ridiculous, the low end has non laminated display that make it annoying to read on, which was my primary activity on it). But considering the strategy that's pretty much the last things I'll have from Apple. Apple only cares about itself, it is unhealthy to get in a long term relationship with them. Especially as innovation slowdown, stability and longevity are more important than ever. But I guess we will keep hearing about how awesome Apple Silicon is. I'll wait for open market competitive version thank you very much (provided there is any advantage at all, which I sincerely doubt).
- flyaway123 3y ago> 1984 -> 1994 -> 2006 -> 2020 Next architecture transition will be happening in 2036?
- EthicalSimilar 3y agoQuick, you can dub it flyaway123’s law.
- fanf2 3y agoThey omitted the 6502 in 1976, which adds another point on your line
- sillywalk 3y agoIn accordance with The Prophecy.
- Carioca 3y ago> such as the (in)famous evaluate polynomial instruction, POLY. What CPU has this instruction and where can I learn more about it?
- cmg 3y agoLooks like a VAX 11 thing: https://documentation.help/VAX11/op_POLY.htm https://documentation.help/VAX11/op_POLY.htm See also http://simh.trailing-edge.com/docs/vax_poly.pdf# http://simh.trailing-edge.com/docs/vax_poly.pdf# and some HN discussion from 2015: http://simh.trailing-edge.com/docs/vax_poly.pdf# http://simh.trailing-edge.com/docs/vax_poly.pdf#
- nxobject 3y agoMy other favorite instructions on the VAX: the CRC instruction, the CASE dispatch table operations, and, glory of all glories, the _3-parameter_ operand + operand + destination instructions.
- jakey_bakey 3y agoFrankly, I tried to go into depth on this because it was really interesting. I am embarrassed to say it was tough to find sources outside Quora and Reddit. It's possible this HackerNews comment parent might become the canonical source :)
- Carioca 3y agoThere are a few answers to my question now, if you're still curious
- clausecker 3y agoThis one is as infamous as it is useful. Modern CPUs have the same instruction, but without the built-in loop (fused multiply-add). Likewise, modern CPUs have dedicated CRC instructions, ARM Thumb 2 famously has an instruction for case statements (jump tables, instructions TBB/TBH), and many more. The VAX was way ahead of its time, but failed to deliver on performance due to not having a pipelined or out-of-order architecture as is industry standard today.
- kllrnohj 3y ago> The M1 chips have a unified memory architecture shared between GPU and CPUs. This is a masterstroke for performance. No it isn't. It's a nice optimization to have, but it doesn't radically change performance. If unified memory was that drastic AMD's APUs from 2012 to 2015 wouldn't have been so forgettable which is where heterogenous compute with unified GPU/CPU memory was pioneered. Also every phone SoC has unified memory, and yet only Apple's can compete with Intel/AMD x86 on performance. M1's performance ain't from unified memory (especially since mixed CPU/GPU compute on the same data is very rare)
- zeusk 3y agoAMD's APUs or the Windows Display Driver Model did not support USM until very recently. They would explicitly carve out memory at boot for graphics use and physical pages could not be shared between GPU and CPU. They'd still make use of apertures to copy data in/out of respective memory ranges.
- kllrnohj 3y agoThat is simply not true. Kavari (2014) had pointer passing between CPU & GPU. I don't know where you're getting that pages couldn't be shared from but it's not accurate. https://images.anandtech.com/doci/7677/03%20-%20HSA%20Features.jpg https://images.anandtech.com/doci/7677/03%20-%20HSA%20Featur... https://images.anandtech.com/doci/7677/17%20-%20hUMA%20Benefit.JPG https://images.anandtech.com/doci/7677/17%20-%20hUMA%20Benef... https://www.anandtech.com/show/7677/amd-kaveri-review-a8-7600-a10-7850k/6 https://www.anandtech.com/show/7677/amd-kaveri-review-a8-760...
- zeusk 3y agofor compute only (restricted to openCL), not graphics workloads.
- irusensei 3y ago(Not so) Secret project Aquarius was their first attempt to create their own chip: https://thechipletter.substack.com/p/the-first-apple-silicon-the-aquarius-7cb https://thechipletter.substack.com/p/the-first-apple-silicon... Retrobytes has a very entertaining video about the whole story: https://www.youtube.com/watch?v=v7dNorB47Qw https://www.youtube.com/watch?v=v7dNorB47Qw