Duke9500 - Duke Nukem 3D for the Nokia 9500 / 9300 (Series 80 v2.0)
Version 1.0, 2026-11-03. Package UID 0x01000A23.

3D Realms' Duke Nukem 3D (1996) on the Nokia 9500 Communicator: software rendered on its
150 MHz ARM9, with sound effects and the music played by a software FM synth.

Port: Sami Vuori, written together with Claude (Anthropic).


INSTALL
  1. Install Duke9500.sis (to the phone or the memory card).
  2. Copy the game's data, which is not included: duke3d.grp (the name must start with
     duke3d) to \Duke3D\ on the memory card (D: on the 9500) or to C:\Duke3D\. The game
     uses only the first of E:\Duke3D, C:\Duke3D and D:\Duke3D that exists, so keep just
     one of them.
  3. Start Duke9500 from the Desk. If the game or a GRP can't be found, it says so.
  duke3d.cfg, saves and dukelog.txt are written to the same folder. Arguments go in
  dukeargs.txt there. The log starts afresh at every start.

  Tested on a Nokia 9500 with the Plutonium 1.4 GRP. Other GRPs, the 9300, and saving and
  loading have not been tested.


KEYS
  Arrows, rocker   move and turn
  Rocker middle    fire in the game, Enter in menus
  Ctrl             fire
  Space            open
  Shift            run
  Alt              strafe while held      Chr  strafe on/off
  , and .          strafe left and right
  1..9, 0          weapons
  Tab              map
  - and =          screen size
  /                turn around
  Esc              menu
  A jump, Z crouch, PgUp/PgDn look, Home/End aim, Enter use item, [ ] choose item,
  H holoduke, J jetpack, N night vision, M medkit, R steroids, Q kick, C centre view
  Chr+Q..F         F1..F12
  Chr+Z            console
  These are the defaults for a new duke3d.cfg: delete that file to get them back. The
  menu's key setup can change them.


SOURCE
  Duke9500\     The port, in one flat folder. Build files in Duke9500\epoc.
  Launcher\     Duke9500.app, the Desk icon. It starts duke9500.exe and quits. Its icons
                come from make_icons.py.
  tools\        check.sh (host GCC syntax check), mathtest.c, fxtest.c, fmtest.c, hostshot\
                (the real game built for the PC, for screenshots), the one-off port*.py edits
                and make_release.py.

  Based on Rockbox's Duke3D (apps/plugins/sdl/progs/duke3d, commit 46c888e), which is
  Chocolate Duke3D: 3D Realms' GPL game code on Ken Silverman's Build engine. The unmodified
  copy, upstream\, is on the development machine only: it is not in the source zip.

  What changed from upstream:
  display_epoc.c, sys_epoc.c   replace the SDL driver and Rockbox's start-up
  epocsys.cpp, epocaudio.cpp   Quake9500's native layer
  fx_epoc.c                    sound effects: 22050 Hz stereo, 16 voices, replaces Multivoc
  midi_epoc.c, fm_tables.h     music: sequencer and voice rules after midi.c and al_midi.c,
                               own 2-operator FM synth, 18 voices. Not chip-exact
  null_audio.c                 what's left of the audio library's interface
  fixedPoint_math.h            mulscale family uses smull/smlal on the phone
  armrt.c                      64-bit divide starts at the top bit, one-word remainder path
  build.h, duke3d.h            pack(1) removed, so map data uses word loads; the sizes are
                               checked at compile time and the build stops if one is wrong
  filesystem.c                 the GRP is identified by size; upstream read the whole file
                               for a CRC at every start
  tiles.c                      art cache capped at 12 MB (DUKE_CACHE_BYTES)
  engine.c, menues.c, player.c helpers that keep GCC 2.9's cc1 from overflowing its stack
  _functio.h, config.c         the keys above and the sound defaults


BUILD, on the Win2000 VM with the S80 v2.0 SDK
  The project must sit on the SDK drive at \Duke9500 (o2.bat assumes it).
  Game, from \Duke9500\Duke9500\epoc:
    bldmake bldfiles
    abld build armi urel duke9500
    o2                       (recompiles with -O2; run it again after changing engine.c)
    abld build armi urel duke9500
  Launcher, from \Duke9500\Launcher:
    bldmake bldfiles
    abld build armi urel
  SIS, from \Duke9500\Duke9500\epoc:
    makesis Duke9500.pkg     (Duke9500.pkg is generated from Duke9500.pkg.txt)
  Before a build, sh tools/check.sh on the PC catches much of what GCC 2.9 would reject.


LICENCE
  The game code is free software under the GNU General Public License, version 2 (see
  COPYING). The Build engine has Ken Silverman's own licence (see BUILDLIC.TXT):

  // "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
  // Ken Silverman's official web site: "http://www.advsys.net/ken"
  // See the included license file "BUILDLIC.TXT" for license info.

  Under that licence Duke9500 may be passed on only over the internet and completely free of
  charge, with both licence files. If you pass the SIS on, pass this source on with it.
  The game's data (duke3d.grp) is 3D Realms' and is not covered by either licence. The Desk
  icon is made from that data's art (Duke's face, tile 2452, and the sky of tile 2493).

  Thanks: Ken Silverman (Build), 3D Realms (the game and its source), James R. Dose (the
  audio library this port learned from), Fabien Sanglard (Chocolate Duke3D), the Rockbox
  project's port, and Doom9500 and Quake9500 for the Symbian layer.
