On Sat, Sep 25, 2010 at 03:40:14PM +1200, Ralph Versteegen wrote: > On 25 September 2010 15:00, James Paige <[email protected]> wrote: > > On Sat, Sep 25, 2010 at 02:27:21PM +1200, Ralph Versteegen wrote: > >> Surprise! My secret project this week has been to port FB and the OHR > >> to Mac OS X. (And it did take all week.) > > > > This is absolutely freaking ridiculawesome! > > > > I just tested it on my work mac, and (after figuring out how to install > > the SDL frameworks) it worked beautifully! > > What did that involve? Was this a problem because you didn't have root access?
Nah, it was a problem with me needing to read the README that comes with SDL instead of flinging files around randomly :) > > Since you said game had recieved the least testing, that is all I did. I > > played hamstermath, bellchaos, and baconthulhu and I did not encounter a > > single problem that cannot be blamed on SDL_Mixer > > Excellent! > > I'm most worried about whether I am aligning the stack correctly in > all necessary cases. The OSX ABI specifies that all calls to > dynamically linked functions must be 16-byte aligned. This was the > bulk of the work of porting FB. I decided to minimise overhead by only > aligning CDECL function calls, which turned out to enormously > complicate things because FB handles calling conventions in such a > crappy all-over-the-place way. I didn't have time to actually check > that only aligning CDECL calls is correct (depends on whether gcc > automatically aligns the stack when STDCALL functions (in the fb > rtlib) are called, which I assume it does). Wouldn't it crash messily if you had done this wrong? > > SDL_Mixer Issues > > * Midi music does not seem to loop (but sounds way better than with > > timidity!) Ogg music seems to loop just fine. > > I read about some problems with MIDI and SDL_Mixer on OSX. I saw > someone mentioned looping; I think they said (can't find it back) that > they got around the problem by replaying the file manually, but that's > fairly undesirable. > > Also, what version of OS X did you test on? In the SDL_mixer changelog > I see (a couple versions ago) "Updated native MIDI support on Mac OS X > for 10.6" I used 10.6 > > * Sound effects have "scratchyness" that I do not notice when I play on > > Ubuntu. > > This could probably be fixed just by changing the audio buffer size. Seems to me that and older version of Ubuntu had exactly this problem with exactly that solution. > > Fantastic work. You are amazing! > > > > --- > > James > > I forgot to mention: the only change I made to the OHR source was to > comment out the fbgfx dependent code in display_help_string (--help > option). The engine thinks it's running on linux (because the FB build > I used didn't know it was cross-compiling). On the other hand, I made > lots of changes to Makefile (probably better than Scons for this kind > of experimenting), but once I switch to a native build of FB, it > should handle all that automatically. Groovy! > Would you be able to do nightly OS X builds in future? Yes indeed. I have a Mac at work that I never turn off at night anyway I am also interested in figuring out how to create a .app bundle. Have you looked into that yet? If not, I don't mind trying. --- James _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
