In 1986, Apple introduced their last major Apple II computer, the Apple IIgs. Built on almost a decade of 8-bit legacy, the IIgs featured a 16-bit microprocessor, advanced graphics, improved sound capabilities, and built-in peripherals. It also featured near-100% backward compatibility with the previous 8-bit Apple IIs. Most documents attribute this backward compatibility to an application specific circuit (ASIC) called the Mega-II. It condenses about 80 devices worth of 7400-series digital logic into a single integrated chip. Some sources go so far as to call it an "Apple IIe on a chip." This description got me thinking, is it possible to build an Apple IIe-compatible computer from it? So, in this element14 Presents project video, I managed to Build (and Boot) the World's First "Single-Chip" Apple II.
The element14 video shows my progress while building three printed boards containing a modern WDC 65c02 microcontroller, a 512 kilobyte electrically erasable ROM, 128 kilobytes DRAM arranged in two 64 kilobyte banks, a video circuit, and the Mega-II. Using this minimal hardware, I discovered some details about the Mega-II.
Mega-II combines the memory controller, IO controller, clock generation, glue logic, and an "80 column card" from the Apple IIe into a single 84-pin chip. If you compare the name of the pins to an Apple IIe schematic, you'll find many similarities. However, there are also several significant differences!
For example, the Mega-II has a signal called "Mega-II Select (M2SEL)." The IIgs memory controller (CYA/FPI) uses it to disable the Mega-II's decode logic. In other words, regardless of legacy 8-bit or newer 16-bit software is running, the IIgs's chipset handles all RAM, ROM, IO, and soft switches, not the Mega-II! Another example is that Mega-II has no IOSEL signals. Therefore, it is not able to directly access an individual expansion slot. Instead, Mega-II has to talk to another IIgs ASIC called Slotmaker over a dedicated bus to talk to IO devices.
I do not have definitive proof, but I think this is what happened. Apple's engineers intended the Mega-II to go into a standalone Apple II computer. However, its design changed to accommodate the changing computer world. As a result, Mega got relegated to being an IO controller and Apple II video generator. The IIgs's chipset and ROM handle all of the legacy code compatibility! Mega-II shadows memory from the IIgs fast side to reproduce the unique Apple II video modes. Mega uses its own RAM bank to generate a video bitstream that the IIgs's more advanced Video Graphics Controller ASIC converts to RGB values.
The video modes are the only "backward compatibility" that the IIgs design uses! (To be clear, the Mega-II has other functions, but they are not "Apple IIe" related.) In other words, despite having all of the II, II+, and IIe logic built into it, the IIgs design only uses a small fraction of the Mega-II.
So I started to wonder then could this single-chip even become an Apple IIe?
As any astute person would point out, the Mega-II is not actually a single-chip anything! At a minimum, you need to add RAM, ROM, and a CPU to use it. In addition, as I mentioned, the Mega needs the Slotmaker, or a bunch of glue logic, for card IO. Furthermore, you need *something* for video output and something else for keyboard input. So then why is it ever called a "Single-Chip?"
The description is historic. In the 1980s, many designers considered their custom logic design to be "the computer." They attached their "computer" to an off-the-shelf CPU. For example, while Commodore, Atari, and Apple all used a 6502 processor, very little software is compatible. That incompatibility is the custom chips built around the CPU (and ROM.)
Sadly, because the Mega-II needs at least one other ASIC or a bunch of glue logic, I would agree it is not a "Single-Chip Apple IIe." When I realized this, I started to worry, could the Apple IIe even run standalone? What else is missing?
After at least 80 hours of effort and many failures, I started to question if the Mega-II could even boot as a computer. There were no documents or examples to suggest engineers finished the IIe logic. The only hint was a related chip called Gemini. It powers the Apple IIe compatibility card for the Macintosh LC line.
However, I do not have a document listing the difference between Mega-II and Gemini. For all I knew, the engineering team named the new chip Gemini because it fixed known issues with the Mega-II. (Or maybe the name symbolized the complementary Yin and Yang of 8-bit Apple II and 32-bit Macintosh technology.)
Not to spoil the video's climax, but the chip eventually boots. There is a small diagnostic routine built into the Apple IIe ROM. When no keyboard is attached, it runs automatically. Since I had no keyboard, the test ran and then concluded my pile of wires was a functional Apple IIe.
But, how much functionality does it have? Well, that is the next phase of the project.
The goal of Rev 2 is to fill out the rest of the primary I/O devices: keyboard, joystick, disk, and digital video. Then, Rev 3's focus is making a miniature version of the hardware with the humble Mega-II at its core.
If you are interested to learn more or want to follow along, there are a couple of sources for more information. First is this GitHub repo. It contains all of the KiCad design files for the Rev 1 prototype I showed in the video and the Rev 2 prototype I designed since achieving the first milestone.
Last, almost the entire project has been streamed and archived on Twitch. There are well over 100 hours of content available now for virtually every aspect of the project!