Originally posted by Brian Kendig:
Thanks! But when I try to compile the latest MAME sources, I get lots of errors with the CPU files.
I assume this is with XCode?
For example, src/cpu/adsp2100/2100ops.c fails with hundreds of parse errors and undeclared identifiers (some of which, like "ADSPCORE", I can't find declared anywhere). Are these CPU files not supposed to be included in the project at all?
If you're getting hundreds of errors, odds are that the first few errors are causing a cascading effect on the rest of the file.
That particular CPU core should be included, so if I were to guess, I'd say that one of the first errors you are seeing has to do with "ppc". It's a reserved word in OSX's gcc compiler, so you have to do some magic to get those files to work. I use a file called "mach_fixup.h" in the CodeWarrior build and include it globally for each file. I assume the XCode project has something similar going for it. if not, I'd just do a search/replace in that CPU core, changing ppc to _ppc.
What determines whether a CPU file should be in the project or not?
Simple answer - if it's in the makefile for the Win32 build. Amost-as-simple answer - if a MAME driver references it. The "easy" way to check for the latter is to add all the new driver files for a MAME build, compile and then see what linker errors you get at the end. This assumes you've got lots time to kill and are really lazy.
I usually don't have lots of time, so I compare "mame.mak" with MacMAME.h and add/change any CPU cores and sound cores as appropriate for each new build.