SDL + MacOS Version

As the migration to OS X will begin shortly, I think its a good idea to get
started on these problems now. What do you think?

I think a good place to start is to get all the functions fixed. Then we can
worry about directly accessing data structures and de-referencing handles.

FYI, here are all the functions in SDL we will have to find a workaround for
(to obtain Carbon compliance).

These are the link errors using CarbonLib 1.1d11:

Link Error : undefined ‘ISpDevices_Activate’ (code)
Referenced from ‘SDL_SYS_JoystickOpen’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpElementList_ExtractByKind’ (code)
Referenced from ‘SDL_SYS_JoystickOpen’ in SDL_sysjoystick.c

Link Error : undefined ‘GetToolTrapAddress’ (code)
Referenced from ‘__system7present’ in MSL C.PPC.Lib

Link Error : undefined ‘GetDCtlEntry’ (code)
Referenced from ‘SDL_SYS_CDInit’ in SDL_syscdrom.c

Link Error : undefined ‘LMGetUnitTableEntryCount’ (code)
Referenced from ‘SDL_SYS_CDInit’ in SDL_syscdrom.c

Link Error : undefined ‘Eject’ (code)
Referenced from ‘SDL_SYS_CDEject’ in SDL_syscdrom.c

Link Error : undefined ‘GetDrvQHdr’ (code)
Referenced from ‘SDL_SYS_CDEject’ in SDL_syscdrom.c
Referenced from ‘get_drivenum’ in SDL_syscdrom.c

Link Error : undefined ‘PBControlSync’ (code)
Referenced from ‘SDL_SYS_CDEject’ in SDL_syscdrom.c
Referenced from ‘SDL_SYS_CDStop’ in SDL_syscdrom.c
Referenced from ‘SDL_SYS_CDResume’ in SDL_syscdrom.c
Referenced from ‘SDL_SYS_CDPlay’ in SDL_syscdrom.c
Referenced from ‘SDL_SYS_CDPause’ in SDL_syscdrom.c
Referenced from ‘SDL_SYS_CDStatus’ in SDL_syscdrom.c
Referenced from ‘SDL_SYS_CDGetTOC’ in SDL_syscdrom.c

Link Error : undefined ‘ISpDevices_Deactivate’ (code)
Referenced from ‘SDL_SYS_JoystickClose’ in SDL_sysjoystick.c
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpDevice_GetElementList’ (code)
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpElementList_New’ (code)
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpDevice_GetDefinition’ (code)
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpDevices_Extract’ (code)
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpDevices_DeactivateClass’ (code)
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpStartup’ (code)
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpGetVersion’ (descriptor)
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘ISpStartup’ (descriptor)
Referenced from ‘SDL_SYS_JoystickInit’ in SDL_sysjoystick.c

Link Error : undefined ‘SndPlayDoubleBuffer’ (code)
Referenced from ‘Mac_OpenAudio’ in SDL_romaudio.c

Link Error : undefined ‘ISpElement_GetSimpleState’ (code)
Referenced from ‘SDL_SYS_JoystickUpdate’ in SDL_sysjoystick.c

Link Error : undefined ‘DIBadMount’ (code)
Referenced from ‘Mac_HandleEvents’ in SDL_macevents.c

Link Error : undefined ‘SystemClick’ (code)
Referenced from ‘Mac_HandleEvents’ in SDL_macevents.c

Link Error : undefined ‘OpenDeskAcc’ (code)
Referenced from ‘Mac_DoAppleMenu’ in SDL_macevents.c

Link Error : undefined ‘CursorDeviceMoveTo’ (code)
Referenced from ‘Mac_WarpWMCursor’ in SDL_macmouse.c

Link Error : undefined ‘CursorDeviceNextDevice’ (code)
Referenced from ‘Mac_WarpWMCursor’ in SDL_macmouse.c

Link Error : undefined ‘c2pstr’ (code)
Referenced from ‘Mac_SetCaption’ in SDL_macwm.c

Link Error : undefined ‘CallUniversalProc’ (code)
Referenced from ‘SBShowHideControlStrip’ in SDL_romvideo.c
Referenced from ‘SBIsControlStripVisible’ in SDL_romvideo.c

Link Error : undefined ‘LMSetMBarHeight’ (code)
Referenced from ‘ROM_HideMenuBar’ in SDL_romvideo.c
Referenced from ‘ROM_ShowMenuBar’ in SDL_romvideo.c

Link Error : undefined ‘GetWMgrPort’ (code)
Referenced from ‘ROM_ShowMenuBar’ in SDL_romvideo.c

Link Error : undefined ‘CloseWindow’ (code)
Referenced from ‘DSp_SetVideoMode’ in SDL_dspvideo.c
Referenced from ‘DSp_UnsetVideoMode’ in SDL_dspvideo.c
Referenced from ‘ROM_UnsetVideoMode’ in SDL_romvideo.c

Link Error : undefined ‘SystemTask’ (code)
Referenced from ‘DSpContext_CustomFadeGammaIn’ in SetupDSp.c

Link Error : undefined ‘NewRoutineDescriptor’ (code)
Referenced from ‘Mac_OpenAudio’ in SDL_romaudio.c
Referenced from ‘SDL_SYS_StartTimer’ in SDL_systimer.c

Link Error : undefined ‘LMGetTicks’ (code)
Referenced from ‘SDL_GetTicks’ in SDL_systimer.c

Link Error : undefined ‘ISpShutdown’ (code)
Referenced from ‘SDL_SYS_JoystickQuit’ in SDL_sysjoystick.c

Sam Lantinga wrote:

This isn’t #defined in the Universal Headers, so you can’t just check
with #ifndef.

Is there any way to write the code so it will work on older and newer
versions of MacOS?

I don’t think the LM calls work under Carbon…Do they? :o)

No, but the whole Device Manager isn’t available under Carbon anyway, so
there isn’t any reason to access the Unit Table. :wink:

Hmm, so how do you control the CD-ROM? :slight_smile:

/dev/cdrom? :slight_smile:

Derry Bryson

Darrell Walisser wrote:

As the migration to OS X will begin shortly, I think its a good idea to get
started on these problems now. What do you think?

BTW, I actually have SDL 1.1.3 working on OS X DP4 (sans audio and
mouse warping and joystick), used it to demo SDL Doom on OS X at
MacHack. The patches aren’t too large, but I did some heinous
things in the final hours of MacHack (as is traditional :slight_smile: ) and
am still working on conditionalizing the changes properly for both
X and 9, so that they go in smoothly.

Stan

I suppose the answer is QuickTime, which they are blam^H^H^H^H suggesting for
everything, but I don’t know if it supports red book audio – or even what the
real future is. For now, you’ll have to conditionalize it out for Carbon (or
OSX at least).

/dev/cdrom?

Very possibly, but that won’t work from a CFM Carbon app without lots of glue
(since the BSD calls all use a different format shared library). Since this is
all in flux, so I basically suggest “don’t worry about it yet”.

Matt–
/* Matt Slot, Bitwise Operator * One box, two box, yellow box, blue box *

Hello!

I would like those!!

THanks!

Eduardo.On Fri, 14 Jul 2000, Darrell Walisser wrote:

On Fri, 14 Jul 2000, Sam Lantinga wrote:

And I’ll be happy to help in any way I can. I’ll modify the source
to use the LMGetMBarHeight() function. (Anybody know any reason not
to do this? - Matt Slot?)

Not Carbon compliant, maybe?

BTW, by my recollection there are about 15 carbon link errors in SDL at
the moment (with the latest CarbonLib).

I have carbon projects for SDL, if anyone is interested.