Building classic Mac OS apps in OS X

We live in a modern era of Mac development, but behind that there's 30 years of legacy dating back to the original Mac in 1984. It's easy to ignore the millions upon millions of lines of code that have been written for Mac operating systems from System 1.0 forward, but you do so at the peril of forgetting just how flexible and elegant a framework Apple had developed over the years.

Recently Steven Troughton-Smith — who's best known for his iOS development work — decided to delve into the process of making "classic" Mac OS apps in a modern programming environment. He found some a cool tool along the way:

There has never been a good way to compile Classic Mac OS apps on modern OS X - for the most part, you were stuck using ancient tools, either Apple's MPW or CodeWarrior, running in a VM of some sort. CodeWarrior, of course, is not free, and MPW only runs on Classic Mac OS, which is unstable at the best of times and downright nightmarish when trying to use it for development in an emulator like SheepShaver.Enter 'mpw' (which I will refer to in lowercase throughout as something distinct from Apple's MPW toolset).

In the course of his discovery and experimentation, Troughton-Smith learned a lot of valuable lessons about Classic Mac OS, Apple's Carbon API, and about mpw itself, which he's now a big fan of. If you're interested in the nuts and bolts of how the Mac works, or if you're a programmer who has an interest in the old days of Mac software development, Troughton-Smith's blog entry is worth a read.

Source: High Caffeine Content

  • Kids with their fancy 68000 based systems and GUIs. What if I want to create software for an Apple // with a 6502 but all I have is XCode? The good news is that you are good to write your Apple // code in XCode and even build and run: It is very cool to be able to run mpw and target the classic Mac. But, it is definitely cooler to use more modern tools like XCode and still target old hardware. And it doesn't get much older for Apple gear than the Apple //.
  • It would be awesome to see a new era of classic software come out of this as devs cut their teeth. Think about what learning to keep software tiny and lean will also do for modern applications. It's quite refreshing to boot up my old G4 and see OS 9, all office apps, and Photoshop 7 all running and there's still 850MB of free RAM. With no VM! My 2012 Mac mini idles around 2500/4096MB used and doesn't really feel any faster in day to day use. Or my Debian Linux system that's never gotten over 500/6144MB used. Will these spoiled 21st century devs learnig about Classic Macintosh development mean no more 500MB music players? Probably still a pipe dream. (Mr. Troughton-Smith has never struck me as spoiled, but then he isn't responsible for the debacle that is iTunes.)
  • Wheee! This is fascinating! Maybe I can still get some use out of my old 'Nasty Knaster' Mac programming books. They were my faves back in the day. I was so excited to get into the 68000 and Mac Toolbox. I'll be watching this project. Thanks Peter!!
  • If someone could build Carmen's world, that would be... Amazing. First computer game I really got into. Sent from the iMore App