The iPhone Doom port is knowingly destined never to hit the App Store, so one important question is asked:
Should I use only official (read SDK/NDA) APIs, or should I branch out into other APIs to make the game run faster?
I can't honestly answer that. I enjoy having the preference in my code, and I intend to let other have said preference when the code hits the GoogleCode project site.
So, built into the code is an #if switch, allowing you to choose whether to use the UIKit (and completely App Store-allowed) API or the private CoreSurface screen buffer API (being private, the only documentation comes from the iPhone Open Toolchain and is not covered by non-disclosure).
CoreSurface is a direct and insanely fast screen buffer, allowing you to draw graphics as fast as the hardware permits and without having to go through the CoreGraphics layers directly. Similar to the iPhone OS 1.0 code, the game can render into a CoreSurface buffer which is then displayed inside a Core Animation layer. Why would I bother doing this? For a software-rendered game like Doom, it's an order of magnitude faster than what I must do for UIKit (rendering the buffer directly into a CGImageRef and blitting that to the screen). CoreSurface is what many of the unofficial emulators and game ports use, including Zodttd's brilliant Quake 1 port to iPhone.
With CoreSurface enabled in Doom, the framerate is super-smooth and the colours are as they should be. So I will leave the option in the code for budding developers to play around with. And here's hoping Apple are given some impetus to make CoreSurface available through the public SDK, as I think the benefits would be very welcome.