CodeWarrior SDL2 for classic MacOS "rough draft"

lauland

Tinkerer
Dec 12, 2023
41
31
18
Updates:
Enough key and mouse events now for really basic games.
Have switched primarily to Retro68 from Codewarrior and loving it.
Split stuff only CodeWarrior needs just for it.
All tests build, but, of course, many still fail due to missing drivers.
Created skeleton audio and joystick drivers, will be trying to move over parts of SDL 1.2 drivers.
timer and loadso drivers from SDL 1.2 converted, but need testing.
Now have SDL_main() based on SDL 1.2's, needs testing.
Uses resources from SDL 1.2 since they were good enough.
Refined SDL_config_macosclassic.h, everything possible now included.
OpenGL support and renderer now building, but nothing in driver but stubs so far.
Fixed lots of memory and cleanup issues/bugs.
Did basic what was needed and created simple video driver for m68k Amiga and it works.
Tons of cleaning and refining.
 
  • Like
Reactions: ClassicHasClass

lauland

Tinkerer
Dec 12, 2023
41
31
18
Now have SDL2_image, SDL2_mixer, SDL2_ttf and SDL2_gfx.
SDL2_image and SDL2_mixer aren't using ANY external libraries yet, as I haven't built them, so file formats limited.
 

lauland

Tinkerer
Dec 12, 2023
41
31
18
A lot has happened since the last post.

srp/doctashay added full screen DrawSprockets, OpenGL and audio. He redid the event handling and finished keyboard decoding. He also fixed dozens of tiny bugs in threads and timers and main(), etc.

He used it for a port of Half-Life for MacOS 9. (Still a bit buggy and parts may need to be finished, but an amazing proof of concept).

I rolled his work in, and used it to successfully build a few games which previously had been crashy or didn't work.

Made InputSprocket, DrawSprocket and OpenGL optional again, which were made required for Half-Life. Fixed m68k support.

Added m68k OpenGL support via a super hacked Mesa, where I "fixed" its AGL to be mostly source compatible with Apple's real one for ppc macs. I tweaked it a bit, so it has SOME added OpenGL 1.2 features and functions. (I went back and did the same for SDL 1.2). It is very slow, but fully functional, as far as I can tell.

(The mesa work is available in a separate github repo).

I've since been able to build all the "add-ons" like SDL2_image, SDL2_mixer, etc, with (pretty much) full external libraries and supported formats.

Made countless tiny fixes and improvements in general, especially with the build process.

Created "dummy" InputSprockets and DrawSprockets which can be used for m68k or ppc systems that might not have them. May one day implement basic functionality. They return errors, or ignore most things.

Created "macos8addons" which are some functions which Apple included for ppc 8.5 and higher, but not for 8 or lower (even on ppc).

You can follow my progress via my github commits.
 
  • Like
  • Love
Reactions: bakkus and eric