This page is a wiki. Please login or create an account to begin editing.
This is SDL2, an extremely popular library used for building multimedia apps and games. There was never official classic Mac support.
For classic MacOS 7/8/9 m68k and ppc, using Retro68. CodeWarrior support is broken and would take some work to fix.
Also includes partial AmigaOS 3 for m68k, and should work on related systems. (But don't use this for Amiga, there are better ones out there!)
https://github.com/laulandn/sdl2macos9
https://github.com/doctashay/sdl2macos9
(Obviously Mac Finder file creators and types and resource forks are lost there.)
Includes numerous tests, useful scripts, and "dummy" stub routines or implementations to make up for limitations of classic MacOS.
I discussed what I worked on and kept a running commentary over at System7Today for a while:
SDL2 for PPC MacOS 9 efforts...
Contains work by srp/doctashay, used for his MacOS 9 port of xash3d-fwgs (Half-Life).
Remaining limitations:
- OpenGL: Mac OS uses AGL and OpenGLLibrary; the Amiga backend is still unimplemented.
- Audio: Mac OS playback uses Sound Manager double buffers. Capture is not implemented.
- Joystick: Non-functional skeleton driver for MacOS (disabled SDL 1.2 driver source is in tree ready to be ported). No support on Amiga.
- Threads: Mac OS uses cooperative Thread Manager threads, so it cannot provide preemptive scheduling.
- Input: The Mac OS keyboard map and InputSprocket mouse path cover common game input, but need broader hardware testing.
- Misc: Loadso and some file functions have received little testing.
For SDL2_image, SDL2_mixer, SDL2_gfx, and SDL2_ttf:
Only provided as source, no binaries, because they are dependent on external libraries (such as libpng, flac, etc etc), which will differ on my system vs yours, sorry. For Retro68 only, assumes you have the toolchain installed in ~/Retro68-build/toolchain. Use "configurer68", "configurer68ppc" or "configureamigaos3", then "make". Can use "installr68" and "installr68ppc" to install in the correct places, or copy yourself. Support for file formats varies, but should work, minimum configured by default.
Building the Classic Mac OS PowerPC target
The PowerPC build requires a Retro68 toolchain in PATH. The AGL declarations needed by the OpenGL backend are included in the source tree.
make -C SDL-main -f Makefile.r68ppc
Makefile.r68ppc derives the Retro68 installation prefix from the compiler and includes its CursorDevicesGlue.o compatibility object automatically. Both paths remain overridable with RETRO68_ROOT and CURSOR_DEVICES_GLUE.
Implementation references
The Classic backend follows Apple's published interfaces and lifecycle:
- Processes (Inside Macintosh)
- Imaging With QuickDraw
- PixMap
- DrawSprocket Programming Guide
- DrawSprocket legacy reference
See Simple DirectMedia Layer (SDL) 1.2 and SDL 1.2 Add-On Libraries for the older, "supported" version.
Compatibility
Architecture: 68k PPC PPC (Carbonized) x86 (Intel:Mac) x64 (Intel:Mac)
MacOS 9 PPC (older also works, depends on your compiler).
MacOS 7.5+ M68k (but should work on 7.0 and probably even 6).
MacOS X is in progress.
AmigaOS 3 M68k (probably others). Use "make -fMakefile.amigaos3".
Some builds will require OpenGL, DrawSprocket, and InputSprocket.
CodeWarrior Pro 6/7/8. Carbon in CW8 only. (But currently broken).
Retro68, using included "Makefile.r68" and "Makefile.r68ppc" files (for each arch).
("make -fMakefile.r68 install" "make -fMakefile.r68ppc install" will install in Retro68 toolchain)
"Makefile.r68carb" for CFM and "Makefile.carbon" for Mach-O do Carbon builds.
Because this is just based on a copy of an older version of the main SDL2 tree, it still builds and works on pretty much any MacOS X, or Linux. (But you won't want to use it there because it is old).