CDoom (mobile)


 * This article is about the mobile phone Doom port. For other uses, see CDoom (disambiguation).

CDoom (short for Communicator Doom or Crystal Doom) is an open source mobile phone port of Doom published in 11th September 2001. It is the first Doom port for Symbian OS devices ever, and is intended to be used on Symbian OS v6.0, Series 80 v1.0, which includes the phone models Nokia 9210, 9210i and 9210c Communicators. CDoom's coding was done by Hannu Viitala and Markus Mertama who based it on Sam Lantinga's SDL Doom. Hannu had to port SDL (Simple DirectMedia Layer) first onto Symbian OS v6.0 before he could start porting CDoom.

Version and continuation
The developers of CDoom have published only one version of it, which is 1.00. It was published in Hannu Viitala's home page on 11th September in the year 2001, and has been there since.

Although the development of CDoom in its native form may have been stopped for good, it lives on with the C2Doom project which is maintained by Markus Mertama, as it uses CDoom as its basis.

Application parts
The CDoom application consists of two parts: the CDoom EXE file and the application which launches the EXE file and the launcher which is coded by Markus Mertama.

CDoom
CDoom.exe is the application part which plays the WAD file. It is under C:\CDoom or D:\CDoom, depending on the storage where the user installs the application (C: is the internal storage and D: is the memory card). The folder also contains
 * .doomrc - a resource file which holds the volume information, key bindings etc.
 * copying.epoc.txt - an information text file about SDL library license and Doom source code
 * install.epoc.txt - an information text file about installing and playing the game. Ends in a text saying "Happy killing!"
 * readme-sdl.txt - an information text file about the SDL library. This file must be distributed with the SDL runtime environment
 * readme.sdl - an information text file about the original SDL Doom port. Written by Sam Lantinga.

The Doom WAD file has to be in this directory also. If the user saves the game, the save file (doomsavX.dsg where the X is the save file number) will be created into this directory also.

Launcher
Launcher is a native Symbian OS application file (APP). When the "Launch" button is pressed, the application closes all running applications except the phone - which is a vital part of the operating system - and starts CDoom.exe. The launcher folder lies inside D:\System\Apps or C:\System\Apps accordingly. The folder holds six files which are
 * launcher.aif - the Symbian OS application information file (includes the application icon and unique identifier data)
 * launcher.app - the functional application file
 * launcher.mbm - a 1-bit, 2-colored (b&w) 400 x 144 pixel image which has CDoom written in it
 * launcher.rsc - a Symbian OS application resource file which, in some cases, contains some language specific text strings and such
 * launcher.txt - an information text about the Launcher application. Contains almost the same information as the install.epoc.txt file.
 * readme.sis.txt - an information text file about the Launcher application which contains some license text. It says that the Launcher application's sources and license reside in Hannu Viitala's home page, but still the Launcher application is of closed source.

Technical data
CDoom takes advantage of the whole Nokia 9210's big widescreen because its standard screen mode is 640 x 200 pixels, which is the resolution of the mobile phone's screen. Unfortunately the device's screen access or processing power forms a bottleneck which reduces the frame rate all the way down to about 3 fps. Normally it's quite high though; while walking forward the FPS count is relatively decent, only turning makes it lower, probably because the program has to draw and calculate a lot of new area to show.

This port uses almost all of the operating memory (RAM) of the target device because it needs about 3,3 MB to run. Nokia 9210 only has 4 MB free after a reboot, so the user has to close all running applications prior to playing this game.

Since CDoom readily hogs almost all of the operating memory, it doesn't have a sound or net game/ multiplayer support. Neither does it have the melting screen effect which is shown when the level is starting. These properties would elevate the need of RAM too high.

This port can't be used with custom WADs. The WADs allowed are DOOM1.WAD, DOOM.WAD, DOOM2.WAD, DOOMU.WAD, PLUTONIA.WAD and TNT.WAD.

Gameplay
Due to Nokia 9210's relatively bad directional pad (see the image above), the gameplay isn't a good experience. The d-pad is not designed for playing games because the phone is a business device. When pressing up (move forward in the game), the d-pad doesn't hold its position but rocks from left to right easily, making the player run in circles in the game.

The Nokia 9210's keypad is similar to PC's, so all of the buttons do the same thing on the phone as they would on PC. CTRL shoots, ALT strafes etc. Because the Nokia 9210 Communicator doesn't have the function buttons F1, F2 and so on, the functions can be accessed by pressing CHR + Q (F1), CHR + W (F2) and so on.

Controversy
Only a week after CDoom was published, a British software corporation WildPalm released another port of Doom onto Symbian OS v6.0, Doom 9210, which is of closed source. According to Hannu Viitala, Doom 9210 uses an identical launcher system as CDoom. If WildPalm had been using CDoom as a base of their program, they would've violated the license.

Modification

 * Since CDoom is of open source, it can be modified in any way the user likes. The project compiles well onto the target device (in Symbian OS programming terms it's ARMI) and the emulator (WINS). If the user wants to test CDoom on the emulator, he has to modify the doomwaddir variable in the file d_main.c so the program can look for the WAD file in the right place.
 * CDoom's closed source Launcher application which launches the cdoom.exe file, can also be modified on the graphics level: the file launcher.mbm in the program's home directory is a black & white bitmap which contains the pixels which are drawn in flames in the Launcher application. This file can be modified to show any image, as long as it's black and white and has the resolution of 400 x 200 max. The user has to be careful not to make an image with white pixels too dense because the application's flame will ruin it pretty well. Thus it is good to take out some white pixels with a black paint brush.
 * With a little work CDoom can be made to run on 320 x 200 with duplicated X pixels. This makes the game faster although it looks worse. Doom 9210 uses this method. In this mode the melting screen effect works well without requiring too much memory.