CommDoom - Doom for the Nokia 9210 Communicator (Series 80 v1.0)
Version 1.0, 2026-11-22. Package UID 0x01000A17.

id Software's Doom (1993) on the Nokia 9210, 9210c and 9210i: PrBoom 2.2.6 drawing a
real 640x200 picture (not a doubled 320x200), with sound effects, the screen melt and
an automatic detail level, in the 9210's 3.7 MB of free memory.

Port: Sami Vuori, written together with Claude (Anthropic). Working name: Doomunicator.
It doesn't run on the Nokia 9500 or 9300; for those, see Doom9500.


INSTALL
  1. Install CommDoom.sis (to the phone or the memory card). It puts CommDoom in Extras
     and installs the game and prboom.wad (PrBoom's own data, needed) next to it.
  2. Copy a Doom game file to D:\Doom\ on the memory card. Any of these works:
       doom1.wad   the shareware episode (free)
       doom.wad    The Ultimate Doom / registered Doom
       doom2.wad   Doom II
     The game files are id Software's and are not included. CommDoom also finds them
     next to the game, in \System\Apps\DoomLaunch\.
  3. Start CommDoom from Extras and press Enter.
  Restart the phone before playing if you can: Doom needs nearly all of its free
  memory, and it uses whatever is free (2 to 2.5 MB of game memory on a fresh phone).
  Turn the key click off in the phone's profile settings. The 9210 plays one sound at
  a time, so every click cuts a Doom sound off.


KEYS
  Arrows                move and turn
  Ctrl                  fire
  Space                 open doors, use switches
  Shift                 run
  Alt                   strafe
  1-7                   choose a weapon
  Esc                   menu
  Enter                 select in the menus
  Tab                   map
  =                     the heads-up numbers on/off
  Z                     detail: High / Low / Auto (Auto, the default, drops to half the
                        columns when frames get slow and goes back when they don't)
  J                     proportions: wide (the default) / correct (true shapes, but you
                        see much less up and down)
  Chr + Q W E R T Y U I A S D F = F1..F12 (F2 save, F3 load, F6 quicksave, F9 quickload)
  The cheats all work (Z and J were chosen because no cheat uses them).
  Settings (prboom.cfg) and saves are written next to the game.


OPTIONS (the launcher's Args button; words separated by spaces; any normal PrBoom
option works)
  -file a.wad         load an extra WAD from D:\Doom\ (a sound pack, maps)
  -warp 1 3           start E1M3 (Doom II: -warp 7)
  -skill 4            Ultra-Violence (1-5)
  -nomonsters         no monsters
  -nosound            no sound
  -hidetail           always High detail      -lowdetail  always Low detail
  The launcher keeps them in doomargs.txt in C:\ and D:\, where the game reads them.
  A sound pack such as the PlayStation sounds (psxsound.wad) works with -file, but
  its long sounds are cut at about 1.85 seconds to fit the players' buffers.


SOUND
  The 9210's ROM has no streaming audio, only a player that plays one sound file at a
  time. So each effect is a small WAV in memory with a player of its own, kept alive in
  a separate thread; the ten most common are made at start-up. A newer sound cuts the
  one playing, so there are priorities: your weapons first, then your other sounds,
  doors and items, then monsters. The chaingun is a pre-mixed loop of eight shots, since
  restarting a player takes longer than the gun's 114 ms between shots.
  There is no music: the 9210's media server has no MIDI codec.


NOT INCLUDED
  Music, multiplayer, more than one sound at a time, and the BOOM translucency effects
  (off to save 64 KB and start-up time).


WHERE IT COMES FROM
  Doomunicator\   the game: PrBoom 2.2.6 (GPL) on Hannu Viitala's SDL port for EPOC,
                  starting from Hannu Viitala and Markus Mertama's CDoom (2001).
    - Build variants (epoc\): DoomunicatorNS.mmp makes doomnosnd.exe, the one that
      runs on the phone and the one the SIS installs (as doomunicator.exe). The name is
      historical: it has sound, through MEDIACLIENTAUDIO.DLL. Doomunicator.mmp links
      SDL's streaming audio (MEDIACLIENTAUDIOSTREAM.DLL), which only the emulator has.
      DoomunicatorQ.mmp (doomquiet.exe) has no media libraries; it was a memory test.
    - epocsnd.cpp: the sound thread, the player cache, priorities and the chaingun loop.
      epocquiet.cpp: its empty stand-in for doomquiet.exe. epocend.cpp: the last step
      of the exit sequence.
    - r_drawasm.c: ARM assembly for the wall columns, floor spans, FixedMul, FixedDiv
      and SlopeDiv. Bit-exact, so the demos stay in sync.
    - r_segs.c: a faster wall loop (R_RenderSegLoopFast; PrBoom's own is kept).
    - 640x200 (doomdebug.h: DOOM_WIDE_640, DOOM_FULLSCREEN_VIEW), auto detail
      (d_main.c), the J proportions toggle and the sprite height clip fix (r_main.c,
      r_things.c), the bunny scroll cache (f_finale.c), the melt without zone
      allocations (f_wipe.c), the memory diet (MAX_SCREENWIDTH 640, zone sized from
      free RAM in z_zone.c, smaller tables).
    - No stdout or stderr on the phone (lprintf.c, i_main.c): the C library's first
      write opens a console, which kept the process and its memory alive for minutes
      after exit.
    - winsrt.c: compiler helpers for the emulator build (it has no C runtime).
      armrt.c: the 64-bit helpers this SDK's egcc.lib lacks.
    - epoc\o2.bat recompiles the renderer and game logic at -O2 (the SDK builds
      everything at -O0 and a .mmp can't set compiler flags).
    - doomdebug.h: DOOM_DEBUG adds a profile line per second to the log and the X key
      (compare the two wall loops).
  SDL\            Hannu Viitala's SDL 1.2.0 port for EPOC (LGPL, see SDL\COPYING),
                  as modified for CommDoom. The game links it statically.
    - video\Epoc\SDL_epocvideo.cpp: the window group stays always at the front (the
      Series 80 shell took the focus about five seconds after start and the game waited
      for it forever), ARM assembly for the 8-bit to 12-bit blit (plain at 640 wide,
      doubled at 320).
    - video\Epoc\SDL_epocevents.cpp: focus and window group logging (off in the
      sdlnosnd build, EPOC_MINIMAL).
    - main\epoc\SDL_main.cpp: the game runs at foreground priority (was Low).
    - thread\epoc\SDL_sysmutex.cpp: a local mutex with its errors checked (the global
      one failed silently); SDL_systhread.cpp: 64 KB thread stacks.
    - audio\epoc\SDL_epocaudio.cpp and SDL_audio.c: a CMdaAudioOutputStream backend,
      used only by the emulator build.
    - Epoc\SdlNoSnd.mmp: sdlnosnd.lib, the library without that backend, which the
      phone build links.
  Launcher\       DoomLaunch.app, caption CommDoom: starts the game and quits to give
                  its memory back, and edits the game's options (Args). bg.bmp, the
                  background, is lettered in Doom's own font.
  SysDump\        a small tool that lists every process, thread and memory chunk into
                  D:\sysdump.txt; it found the console that held the memory after exit.
  tools\          make_release.py packs the two zips.


BUILD (on a Windows 2000 VM with the Nokia 9210 SDK, Symbian 6.0 / Series 80 v1.0)
  Copy SDL\ to \SDL and the rest to \Doomunicator on the SDK's drive.
  1. SDL, from \SDL\Epoc:
       bldmake bldfiles
       abld build armi urel sdlnosnd
       abld build armi urel sdlmain
  2. The game, from \Doomunicator\Doomunicator\epoc:
       bldmake bldfiles
       abld build armi urel doomunicatorns
       o2
       abld build armi urel doomunicatorns
     The second build only relinks, with the objects o2 made at -O2. After any change
     to a source file, run all three again.
  3. The launcher, from \Doomunicator\Launcher:
       bldmake bldfiles
       abld build armi urel
  4. The SIS, from \Doomunicator\Launcher:
       makesis DoomLaunch.pkg
     (DoomLaunch.pkg is generated from DoomLaunch.pkg.txt, see its first lines.)
  The emulator build is abld build wins udeb in steps 1-3 (step 1: sdl, sdlmain);
  in the emulator the IWAD and prboom.wad go to C:\Doom\.
  Each run writes doomlog.txt (on the phone it has turned up in the root of D:).


LICENCE
  CommDoom is free software under the GNU General Public License, version 2 or later
  (see COPYING), like PrBoom, which it is built on. The SDL library in SDL\ is under
  the GNU Lesser General Public License (SDL\COPYING); its source, with the changes
  listed above, is in this package, so the game can be rebuilt against a changed SDL.
  If you pass the SIS on, pass the source on with it. Doom's game files (doom1.wad,
  doom.wad, doom2.wad) are id Software's and sound packs belong to their owners; none
  of them are covered by the GPL or included.

  Thanks: id Software (Doom, and its source), the PrBoom team, and Hannu Viitala (SDL
  for EPOC) and Markus Mertama (CDoom).
