You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.



#1 2011-08-30 23:52:08

btown
Member
Registered: 2011-08-30
Posts: 2

Help with compiling for Mac OS X

Hi all,

I've downloaded the 0.9.7 source for Mac to try to port new options to the UI (frameskipping, in particular), but I'm having trouble compiling in XCode on 10.7. I was able to ./configure and make the CLI (using Homebrew from http://mxcl.github.com/homebrew/ for dependencies) with a few slight changes (I'd be glad to write about them if anyone's interested), so it's either an issue with the XCode project itself being outdated, or with one of the Objective-C files. Specifically, there are a lot of issues with nds_control.mm  - does anyone know if this file is still being used and/or is it necessary for the Mac build? In that file, there seems to be an inconsistent usage of "struct GPU", and ARM9Mem is used as a global struct, but ARM9Mem isn't defined in _any_ file in the tarball - the word doesn't appear anywhere else. Any help would be great.

Brenton

Offline

#2 2011-08-31 00:48:48

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: Help with compiling for Mac OS X

the xcode in 0.9.7 project is outdated. dont use the 0.9.7 sources, use latest svn.

Offline

#3 2011-09-01 18:50:53

rogerman
Member
Registered: 2011-06-04
Posts: 380

Re: Help with compiling for Mac OS X

I wouldn't bother with the current XCode project, because the entire project will be completely replaced in the near future. The current project uses a lot of VERY old code that was supposed to be compatible with Mac OS X v10.4. Unfortunately, this same code doesn't play nice with the newer Mac OS dev tools and also the newer advancements in the DeSmuME core code base. I've been working these past few months to rectify this situation, and I'm getting close to releasing a much more modern XCode project back to the DeSmuME team.

Since you're on Lion, maybe you can help me with testing a prerelease build for Mac DeSmuME v0.9.8. I've been having trouble finding friends with Lion who are willing to test DeSmuME for me, so I sure could use the help! I need to keep Snow Leopard on my main dev machine, but I also need to know how well DeSmuME performs in Lion. E-mail me if you're interested.

Offline

#4 2011-09-03 01:36:41

btown
Member
Registered: 2011-08-30
Posts: 2

Re: Help with compiling for Mac OS X

@zeromus thanks! Latest SVN worked great, see below for the small number of changes I needed to make.

@rogerman I'd definitely be interested in testing the prerelease build. I'm set up to pull from SVN, and I was able to get rev 4091 to compile on Lion with a small number of changes, listed below. It's significantly more performant than the 0.9.7 binary online, FWIW... renders 3D at 40 FPS on a 2GHz processor, vs. less than 30 FPS with the binary! Anyways, PM me, or just respond to this post, when the new project is ready and checked in!

Changelist:

0. Change the SDK to XCode's default (10.7, it shows up in the diff as SDKROOT = macosx;). I'm not sure if this is a back-portable solution for other machines, but /Developer/SDKs/MacOSX10.5.sdk had been previously specified, and it's not guaranteed that that's where the SDKs live on every developer's machine. Deserves a thorough look.
1. Rename ADVANsCEne::check to _check because check seems to conflict with something in the current XCode project.
2. Add the TinyXML CPP files to the project to get it to compile (also required by the ADVANsCEne stuff AFAIK).
3. Apple now DOES provide strnlen, so made the #ifdef __APPLE__ into #if 0 in libfat/directory.cpp
4. size = [self windowWillResize:window toSize:size] in cocoa/main_window.mm doesn't compile; commenting it seems to be a valid fix.

Also, in general, should all code in SVN trunk compile? Because the omission of TinyXML as a dependency seems to be a big issue.

Hope this helps anyone who's trying to compile on Lion.

Offline

#5 2011-09-03 05:10:42

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: Help with compiling for Mac OS X

advanscene and tinyxml are brand new as of 2 days ago or so.

Offline

Board footer

Powered by FluxBB