Well, this you certainly don’t see every day.
This is a “rough draft” of SDL2 for MacOS 9, using CodeWarrior Pro 6 and 7. Enough was done to get it building in CW, and the start of a “macosclassic” video driver was created. It DOES seem to basically work, but much still needs to be done. Event handling is just enough to handling Command-Q, there is no audio, etc etc etc.
↫ A cast of thousands
The hardest part was a video driver for the classic Mac OS, which had to be created mostly from scratch using the QNX driver as a “skeleton” because it happened to be the smallest one. It works on both m68k and PowerPC as well as on SheepShaver and Basilisk II, and there’s already a few screenshots of it up and running at the link, too. Amazing work, and it opens the door for a whole bunch of especially games to be made available on classic Mac OS.
I can’t help but wonder if it would not have been better to port SDL3 instead and then use the SDL2 compatibility layer. It sounds like that would have been more future proof and better chances of upstreaming.
That’s neat, but I was under an impression that you code in Pascal for any non-OSX MacOS version and that C has barely any support at all.
No, macOS was exclusively programmed in Pascal only for a few years. Think C and MPW added C support in just a couple of years.
Of course you had to work with Pascal strings and not everything felt “native”, but lots of dsoftware for classic MacOS was written in C.
They are targeting System 9 for a reason; the Carbon API, which was C-based and had a lot of portability facilities for unux-like stuffs from OSC, which is why the port was possible to begin with.