Return of the Mac
Developer Jarosław Mazurkiewicz explains the creative process behind MacintoshPi and why he wanted to bring a classic Mac back to life
When Raspberry Pi went on general sale ten years ago, the bare bones, low-cost computer harked back to the past while looking towards the future. The idea was that large numbers of users would learn how to program computers once more, evoking memories of the era of the BBC Micro, ZX Spectrum and a myriad other machines on which millions of people cut their coding teeth.
But while many Raspberry Pi users have done just that, the computer has proven fruitful in other ways. The various versions of the small single-board computers have formed the heart of many projects, from magic mirrors and weather stations to robots and orreries. But an ability to emulate vintage computers and consoles has arguably caught users' imaginations the most.
The free software library RetroPie, for example, lets people relive the Amstrad CPC, Dragon 32, Commodore 64, Master System, Neo Geo, Oric, TRS-80 and Vectrex among many, many other machines. Raspberry Pi has also effectively become a near-perfect Amiga thanks to the distro Amibian.
Raspberry Pi: Top projects to try yourself
Recently, however, our heads were turned by a new tool created by Jarosław “Jaromaz” Mazurkiewicz called MacintoshPi. This open-source project allows users to run full-screen versions of Apple's Mac OS 7, Mac OS 8 and Mac OS 9 (operating systems released between 1991 and 2001) and it does so complete with sound, an active internet connection and modem emulation.
A growing love
Jaromaz is an IT team leader for EuroLinux, a company building a Polish clone of the Red Hat Enterprise Linux distribution. Hailing from Poland, he first came across Apple's computers in 1998. By that time, the company had only been selling its wares in the country for seven years. “Before 1992, Eastern Bloc laws restricted the flow of Western technology so, during my childhood, we only had access to ZX81, ZX Spectrum, Atari and Commodore computers,” he tells IT Pro’s sister publication, PC Pro.
Although some Polish schools snapped up Macintosh Classic computers when they became available, Windows PCs dominated. “My youthful memories are associated with Windows 3.1/95/98/ME and Red Hat Linux,” says Jaromaz.
Yet when working in the Polish editorial office of PC Magazine, he was able to see Macintosh computers close up. “Mac OS systems were being used for the typesetting of newspaper titles and I used to watch these people working,” he says. “Sometimes they provided me with Apple computers for testing.”
Get the ITPro. daily newsletter
Receive our latest news, industry updates, featured resources and more. Sign up today to receive our FREE report on AI cyber crime & security - newly updated for 2024.
It was a while before he reacquainted himself with Macs, however. “In 2015, I built a hackintosh with OS X Yosemite for testing purposes because I'd seen the Retina screens in Polish Apple Reseller showrooms and the resolution and readability of the fonts fascinated me,” Jaromaz explains.
“The hackintosh convinced me of the Apple system itself – its attention to detail, cleanliness and visual perfection. Shortly after that, I purchased my first MacBook Pro with Retina screen and I also installed the Basilisk II emulator to begin serious, long tests of Mac OS 7.5.5.
“I was surprised at how many programs and games worked seamlessly with the emulator and I knew many of them from the PC I owned in my youth, although some were brand new to me. This gave me the chance to explore the most interesting Mac OS titles retroactively.”
It was then that he fell in love with Mac OS 7.5.5. “It's so friendly, intuitive, elegant and easy to use,” Jaromaz says. He dreamed of running the operating system with the original Macintosh Classic case.
“But as a software, not hardware specialist, I didn't want to buy older and expensive hardware only to worry that it would have a short lifespan,” he explains. “I believed a system emulated on a modern ARM board would successfully replace the original hardware and create a solution.”
Introducing MacintoshPi
At first, Jaromaz looked to run the early Macintosh emulator collection Mini vMac on an iPad before finding that it didn't allow the use of internet resources and handled the keyboard incorrectly. He then compiled Basilisk II in Xcode on his MacBook (“a version of the macemu/iOS branch by user Jesús A. Álvarez”) and found that it worked on his iPad mini.
When he bought a Macintosh Classic II case on eBay, though, he discovered that the iPad mini's screen was too small, while standard iPads were too large and wouldn't fit in the case. “Apple also requires self-made software to be signed once a week which makes it very difficult to use.” The MacintoshPi project duly began.
Some six years on and it's finally available. What's more, it's already attracting a lot of attention. MacintoshPi builds on top of the Basilisk II emulator, allowing Mac OS 7 and 8 to run. It also uses the open-source SheepShaver emulator that dates back to 1998 to run Mac OS 9, making for a rather versatile retro Macintosh package.
To install it, users need either a Raspberry Pi 2, Raspberry Pi 3 or Raspberry Pi Zero 2 W (it won't work on the original model and it's not compatible with Raspberry Pi 4 Model B at the moment). “Right from the beginning, the goal was Raspberry Pi 3B+,” Jaromaz says. That's because he was able to draw inspiration from another project called BMC64.
Transforming the employee experience for a hybrid work world
How a single PC vendor can help you get ahead
“Raspberry Pi 3B+ is the best board for BMC64 – the fastest, low-level, bare-metal Commodore 64 emulator for Raspberry Pi,” he explains. Created by Randy Rossi and based on another Commodore 64 emulator called VICE, BMC64 offers true 50Hz/60Hz smooth scrolling and low latency between input and video/audio. “Randy optimised it for Raspberry Pi and omitted Linux entirely, hence the bare-metal,” says Jaromaz, adding that he wanted to follow the same path.
“It contains minimal and imperceptible latency and joysticks can be connected directly to the Raspberry Pi's GPIO, eliminating the additional latency of the USB interface.” It became a model for how Jaromaz wanted MacintoshPi to work. For good measure, he ended up including a dual-boot option that supports the Commodore emulator. It can mimic a Commodore 128 and Commodore PET too.
Hard work
To get MacintoshPi up and running, you simply need to compile and run a single script atop the legacy version of Raspberry Pi OS Lite. If you use the full legacy version of Raspberry Pi OS, you'd need to switch to the command line or set system start to CLI, but the process is neatly explained on Jaromaz's GitHub.
Getting the packages compiled and installed takes about two hours but the results are stunning. MacintoshPi bypasses the X.org manager and background tasks are reduced to a bare minimum (“the full resources of Raspberry Pi can be used,” Jaromaz enthuses).
MacintoshPi therefore boots and runs very quickly – if you put a Raspberry Pi running MacintoshPi next to a vintage Mac running the operating system, you'd be hard pressed to notice any difference. But the task has not been an easy one, as you can imagine, especially given the scope of the developer's ambition.
“After compiling emulators under the Raspberry Pi, I encountered a number of problems,” he says. “I was able to solve some of them after my experiences with these emulators acquired on MacBook and on iPads, but some required more work – searching for answers on forums or on non-existent sites using the Internet Archive.”
The work was complex. “I had problems with building the correct images, with configuring system images for internet support, with appropriate configs for emulators, the correct options for compiling emulators and, separately, SDL2, because SDL2 from a package won't work in emulation,” he continues.
“There were problems with performance, with the correct compilation of NetDriver, with versions of libraries (because they have to be legacy), with mouse movement delay and with sound.” You sense he could go on, but he has managed to go into battle and beat each and every issue. Indeed, you could replace a broken vintage Macintosh motherboard with MacintoshPi (connected to a replacement display) and carry on as before.
And that's what Jaromaz has done. After restoring the yellowing case of his Macintosh Classic II using a solution that's 18% hydrogen peroxide, and appropriate light exposure, he fitted a 10.1in Waveshare 11870 1,024 x 600 LCD display designed to support Raspberry Pi. With the screen turned upside down so that the wires were out of the way, he added a Logitech MK295 Silent Wireless keyboard/mouse combo, which proved attractive because they use a single Bluetooth dongle. He also added a couple of speakers to the Raspberry Pi's analog audio/jack input and a splitter, then popped them inside the case.
Up and running
But what happens at startup? “A very important part of the project is the MacintoshPi Launcher, which overwrites configuration files for the emulator and Raspberry Pi itself, reboots the Raspberry Pi already at a resolution equal to that of the emulated system, and launches the actual emulator with Mac OS, as soon as the Raspberry Pi OS boots,” Jaromaz explains.
“When starting Mac OS, the launcher – based on the resolution and selected system version – matches the appropriate startup chime (guessing, as it were, which Macintosh version the sound should come from) and plays that sound.”
When Mac OS is launched at the same resolution as a Linux system, there is no need for resolution translation and no associated mouse lag. “For example, in the emulation of Macintosh Classic at its standard 512x342 resolution, mouse lag does not occur at all, which would unfortunately be the case if the resolution on the Raspberry Pi OS was set to, for example, 1,920 x 1080,” he added.
“When you turn off the Raspberry Pi and restart it, it will still automatically boot the emulated Apple system. Only by exiting Mac OS and running a command such as **mac pios** or **mac cmd** would the Raspberry Pi OS (graphical or CLI version) be restored to automatic startup upon power-up.”
While that means it's possible to flick between operating systems, the main attraction is the vintage Mac OSes. MacintoshPi is perfectly capable of running games such as Lemmings, Age of Empires, Chessmaster 6000, Panzer General, Tetris and more across the three Mac operating systems. It will also fire up Netscape Navigator and Outlook Express and allow users to enjoy Telnet, Internet Relay Chat and Bulletin Board Systems via the Virtual Modem. Steve Jobs would be proud!
“Modem emulation is an interesting feature of this project,” says Jaromaz. “I applied the tcpser software used previously to Telnet BBSes within the VICE emulator, but the method of use seemed too complicated. Since I wanted modem emulation to work on emulated Mac OS systems as well, I decided to redirect the **tcpser** input to virtual device **/dev/tnt0**. Then the data can be read from another virtual device **/dev/tnt1**, which becomes a virtual serial port in the system.”
It's also possible to connect a real CD-ROM drive – a matter of specifying a path to the drive in the configuration file. CDEmu software allows any CD/DVD image to be plugged in and they'll be handled automatically.
“After connecting the image with **cdload image.toast** command, a virtual CD drive will appear on the desktop of the emulated Mac OS,”Jaromaz says. “Basilisk II and SheepShaver let you connect a floppy drive too, but I'm not sure how it would be mounted on Raspberry Pi.
“A workaround is to use the **dd** command and create an **disk.img** image of the floppy drive. Such an image can be plugged directly into MacintoshPi with a command such as **mac os7 disk.img**. After booting, a virtual floppy drive with the contents of **disk.img** image will appear on the desktop of the emulated Mac OS.”
Tapping into nostalgia
Flexible IT models drive efficiency and innovation
A modern approach to infrastructure management
Of course, going to such lengths isn't for everyone. Some people merely want a quick burst of nostalgia or to get old software to run in the fastest possible time. If you're among this group, you can go to https://system7.app or https://macos8.app in a browser to enjoy another, recent Mac-related project called Infinite Mac which is also based on Basilisk II. As its creator, Mihai Parparita says: “It's a golden age of emulation.” And, if you're keen to relive the days of retro computing, the scene has never been so well supported.
“Nostalgia does play a big part in this – the opportunity to go back to the days of our youth,” says Jaromaz. “It's a chance to recall the software we used in our childhood and bring back those memories. But it also taps into curiosity. It's much better to read and understand biographies of famous figures associated with Apple Computer Inc, for example, knowing how the systems worked and looked at the time. Oh, and it's really great fun.”
And that, we have to say, is more than enough for us.