Karma
I think karma has come around and bit me. After ranting about the sorry state of Mac development tools, I took some time out this evening to work on a MacMAME update using CodeWarrior 9.
It did not go well.
First off, the new preprocessor in CWDS 9 totally chokes on inlined assembly that includes macros. It simply fails to resolve the macro at all. The weird thing is you can "preprocess" the file and use that, and it all works fine.
But that was just a minor bump compared to the next bug. MacMAME has a huge number of global variables, and it's a Mach-O app. This worked fine for Pro 8, but in Pro 9 all kinds of hell breaks loose. If you have lines of code like so:
Machine->uifont->colortable[0] = Machine->uifont->colortable[3] = total_colors_with_ui++;
CodeWarrior 9 will screw up the first assignment (in this case, colortable[0]), even at optimization level 0, if there are enough global variables in the app. It'll do the right thing if you split the lines up:
Machine->uifont->colortable[0] = total_colors_with_ui;
Machine->uifont->colortable[3] = total_colors_with_ui++;
The MAME code is completely littered with the former. It would be a Herculean effort to change the code to work around CodeWarrior 9's bug, so the only feasible solution is to go back to using Pro 8.
Please XCode, don't let me down.
Comments
I hear ya. I've been reluctant to really move into the X domain because of all the issues and nastiness. I'm still on CW Pro 7, so it's basically a CFM app or death. PB just doesn't cut it for me either. I sincerely hope Xcode will be the saviour of us all, but there are still a lot of uncertainties.
On the other hand, at one time I decided to port a graphics effect to 9.. Within an hour I had had to reboot 2 times because of a simple bug somewhere. You can't test it, because your machine just dies.
So I'm torn between the luring "settled-down" qualities of 9 and the shiny, protective features of X. When o when, will X feel nice again? 10.3?
Very soon, though, code will flow once again from my hands into X... Big plans.. Whuhahahah
Speaking about secrets and plans, where's the October 8 update? I am dying to hear about your news, Brad!
Regards, Arthur
Posted by: Arthur Langereis | October 8, 2003 12:58 AM
CWP8 is starting to drive me crazy, because the debugger occasionally starts showing garbage data in place of actual variable values. And yet, if I open the raw registers window, I can see the values are correct. :(
I was forced to use Project Builder for a project a while ago, and I was surprised at how much it grew on me. The key was changing the PB prefs to use BBEdit at the default text editor. I'm hoping XCode is the "Mac OS X 10.1" of Apple's development tools. (10.1 was the point of no-return to OS 9 for me.)
I'm guessing they renamed it "XCode" largerly to get people to try it after being turned off by PB, which gives me hope that they fixed a lot of PB's weirdness.
- Gerrit
Posted by: Gerrit | October 8, 2003 10:47 AM