[Paper], 19 Oct 2025 Applications wanting to interact with OMS must first call into Gestalt with the first parameter being the magic bytes " OMS" (0x204F3D53) and the second parameter being a pointer to a 32-bit variable that receives the magic pointer.
From here, applications must retrieve an array of functions through calling that magic pointer. Note that users cannot simply call this pointer directly, unless they are specifically only targeting 68k. You must use the CallUniversalProc function to safely call into 68k code.
At this point, you can now call into any of the pointers in oms_table, provided that you know what the parameters are. The easiest way I've found to find the parameters is to open an OMS-capable program in a reverse-engineering tool, search for uses of CallUniversalProc that look roughly like the initialization code above, and mark the offset they are copied to as the OMS table with the correct size and type. You can then find other uses of CallUniversalProc that use the pointers in the OMS table, and mark down the procedure type (the second parameter to CallUniversalProc). To decode the procedure type, I've written a simple utility to do the heavy lifting here. Do take note that it does not support register-based calling yet. Feel free to send me any patches if you add support for it ;) Now playing: The Radio Dept. - Brobygatan