notes.txt - RE9500's development notes, the readme.txt of the work up to version 1.0: what was
tried, measured and fixed, in the order it happened. Some of it is out of date where later
work changed things. readme.txt is the short version for players and builders.

RE9500 - Resident Evil (1997, PC) for the Nokia 9500. Work in progress: plays on the phone with
sound and movies. Package UID 0x01000A26.

The game is the decompilation at github.com/ecruells/resident-evil-pc-decomp (GPLv3, commit
0173055), built by modern ARM GCC on the PC. upstream\ is that source, untouched; game\src is
the working copy. All our changes are game\src\platform\epoc plus the edits in tools\port1.py.

  re9500.exe    SDK side, GCC 2.9. Window, framebuffer, keys, files. Loads the blob into a
                chunk, fixes its addresses, and gives it a table of the phone's services
                (hostapi.h). RE9500\stub.cpp
  re9500.rbl    The game, GCC 14: 1.2 MB of code, 8 MB of static data, and a heap of 6 to 12 MB,
                from what the phone has free. The log's first lines say how much it got.
  armemu        The same blob on the PC: an ARM emulator with the phone's strictness.


TO RUN IT ON THE PHONE
  1. On the memory card, make \RE9500\USA\ and copy into it everything from the game's
     HORR\USA folder except MOVIE, SOUND and VOICE: 170 MB. The folders are DATA, EFFSPR,
     ENEMY, ITEM_M1, ITEM_M2, OBJSPR, PLAYERS and STAGE1 to STAGE7. Then the sounds, as one
     53 MB file made on the PC from the game's SOUND and VOICE folders (184 MB of WAV):

       tools\sndpack\sndpack.exe "E:\Resident Evil\HORR\USA" card\USA\SOUND.PAK

     and copy card\USA\SOUND.PAK to \RE9500\USA\. Without it the game reads SOUND and VOICE
     as WAV files if they're there (slower, more memory), or runs silent. SOUND.PAK is the
     game's data: like the rest, it never goes into anything released.

     For the movies, shrink the game's MOVIE folder on the PC, with ffmpeg on the PATH (about
     15 minutes on 4 cores):

       python tools\movie\shrink.py "E:\Resident Evil\HORR\USA\MOVIE" card\USA\MOVIE

     and copy card\USA\MOVIE to \RE9500\USA\MOVIE: 27 AVIs, 95 MB instead of 245. The phone
     plays the originals as well, if they are copied as they are. A movie that isn't there is
     skipped, so they can be left out to save room: the endings and the staff roll are 60 MB
     of it (ED*, EU*, STAF_R and STF*_R). Shrunk, they are still the game's data, never
     released.

  2. On the PC first, the launcher's Desk icon: the zombie turning round at the end of DM3
     (the Windows game's icon is the same face at 32x32 in 16 colours), made from the game:

       python -I tools\make_icons.py "E:\Resident Evil\HORR\USA\MOVIE\DM3.AVI"

     It writes the four appicon_*.bmp files into GameLauncher; without it the icon is Duke's.
     Like SOUND.PAK, that's the game's picture: a SIS with it is for your own phone, and one
     to give out needs an icon of its own.

     On the VM, copy RE9500 and GameLauncher to \RE9500\ (not tools: tools\dl alone is 1.5 GB).

       cd \RE9500\RE9500\epoc
       bldmake bldfiles
       abld build armi urel

     (bldmake again whenever RE9500.mmp changes, as it did for sound and for epocpace.cpp.)

       cd \RE9500\GameLauncher
       bldmake bldfiles
       abld build armi urel

       cd \RE9500\RE9500\epoc
       makesis RE9500.pkg

  3. Install RE9500.SIS and start RE9500 from the Desk. Chr + Q ends the
     game. The log is re9500log.txt in the folder that has re9500.rbl: \RE9500\ on the card, or
     on C: if the SIS was installed there. The stub looks on D: first.

  A new blob needs no VM build: copy game\re9500.rbl to \RE9500\ on the card. The stub needs
  one when anything in RE9500\ changes (stub.cpp, hostapi.h, epocaudio.cpp, epocpace.cpp), as
  it did for the background (host table version 4) and for the audio thread's stop log.

  Background picture: background.bmp in \RE9500\ fills the screen around the game's picture,
  as in NES9500. 640x200 fits exactly, other sizes are stretched; uncompressed 24-bit, 32-bit,
  256-colour or 16-colour BMP (what Paint saves). A 5-pixel black edge parts it from the
  picture. The log says "background.bmp: on", or why it was refused. Without the file, or with
  an older stub, the screen around the picture stays black.

  Frame skip: when a scene takes longer than a tick (33 ms) to draw, the ticks already due are
  worked out without being drawn, so the game keeps its speed and the voices stay with the
  people saying them. A busy scene shows fewer frames instead of going slow. To have it slow
  down as before, put FrameSkip=0 under [Display] in \RE9500\config.ini. The log's "ms per
  frame" lines count ticks now, drawn or not, and end with how many of the 150 were skipped.

  Volume: A in the game opens OPTIONS, and its first page, SOUND, sets MUSIC and SOUND from 0
  to 100% in tens with left and right, heard at once. MUSIC is the game's Bgm_ and Ending files;
  SOUND is everything else: effects, voices, the rain and machinery loops, and the movies. They
  are kept in config.ini as [Sound] MusicVolume and SoundVolume, which can be edited there too.
  (The title screen has OPTIONS only with the decomp's TITLEFNT.BIN, which the game's data
  doesn't have.)

  Save and load anywhere: the same in-game OPTIONS has SAVE GAME and LOAD GAME, each a list of
  the 16 save slots with the character, the room and the play time. Saving takes no ink ribbon
  and asks before writing over a slot; loading asks, then fades out and starts the game again
  in the saved room, as the title's LOAD GAME does. They are the typewriter's own files,
  \RE9500\SAVE\savedat1.dat to savedat16.dat, so either way sees the other's saves. The code is
  the decomp's debug quick save (DebugSaveLoad.cpp). Save in free play: a load starts the room
  afresh, so a cutscene going on when you saved isn't where it was. Each save counts on the
  ending's save count, as a typewriter save does.

  If the phone's sound stops: in log 16 the stub's audio thread stopped asking for sound, most
  likely stuck in a call to the media server (after three stalls its pacing never changed
  again). Nothing played on after that: DM3 stayed on its first frame, its clock being its
  sound, and the dining room's cutscene waited for good for a voice that never ended, so Barry
  stood still. Chr+Q then restarted the phone. Now, after a second without the stream asking,
  the blob mixes the sound itself, unheard, so voices end and movies run on time, and the log
  says "audio: the phone's stream took nothing for a second ...". The sound itself stays gone
  until the stream comes back ("... takes sound again"). armemu --audio-stop S shows it: the
  hall's cutscene ends on the same tick with the stream stopped mid-way, and without this it
  never ends.
  The stub (RE9500\epocaudio.cpp, needs a VM build) now says where its audio thread stopped:
  the thread marks each call that can block (GetBytes, WriteL, Stop, the audio lock, the
  blob's mixer), and every 32 frames the game thread checks that its timer still ticks. No
  tick for 2 s gives "audio: the audio thread has stopped: inside GetBytes, the last call
  began at ... s", and a line again if it comes back. If it hasn't stopped by the end, the
  same line goes out before the stub kills it, ahead of whatever restarted the phone.

  The log starts with the check of the game's data, which is what to look at if nothing shows:
    D:/RE9500/USA/data/fontus.tim: 32832 bytes, read 4 into blob, first word 0x10   (and stack, heap)
    game folder: D:/RE9500
  An error number there is Symbian's: -1 no such file, -12 no such folder. With no data found the
  game ends at once, and the log says so.

  Keys, the game's own defaults: arrows or rocker to move; rocker middle, Enter, Space or C for
  action/confirm; X aim; V or Ctrl run/cancel; Z menu; A options (sound volume, save and
  load anywhere, keys).


ON THE PC
  tools\build_game.sh   Builds game\re9500.rbl with tools\dl\arm-gcc (Arm GNU Toolchain 14.2.Rel1).
                        CENSUS=1 logs who holds the heap and what is drawn per frame. A changed
                        .h or .inc rebuilds everything (.inc only since 2026-11-07).
  tools\armemu          The emulator (armemu.c says how to use it; build it with the host GCC):
                          armemu game\re9500.rbl tools\gameobj\re9500.elf --run run --frames 1250
                            --shot 1240 out.png --key 70 0x0D --profile
                        --screen F FILE saves the whole 640x200 screen, background and all
                        (background.bmp goes in the --run folder).
                        An unaligned access is listed by source line, or stops it with
                        --unaligned fatal, as exception 11 does on the 9500. Time is an estimate:
                        instructions x 1.5 cycles at 150 MHz, which came within 5-15% of the
                        phone's 271-329 ms in the hall.
                        To run as the phone does: --overlay card --hide SOUND --hide VOICE
                        (and --hide MOVIE for a card without movies), and --fill random:1
                        --clock 1582950, as its new memory isn't clean. --free 26292224 is what
                        the phone had in log 14; the default 19.6 MB runs out of heap in the
                        corridor past the dining room, which then draws black.
                        For a route into the game: --ticks counts the game's ticks rather than
                        drawn frames for --key, --shot and --every, so a key script stays in step
                        whatever the frame skip does (--tickmap FILE turns one count into the
                        other). --peek g_playerEntity 0x6C prints the player's x, z and angle
                        every 100 frames. --cpi 3 makes the clock about as slow as the phone's
                        in a busy scene, to see what the frame skip does there. --every-from F
                        starts --every's pictures at F. --profile-detail NAME lists one
                        function's samples by address, to line up with objdump -dl.
  SWEEP=1 sh tools\build_game.sh
                        game\re9500_sweep.rbl jumps through the rooms in armemu. sweep.txt in the
                        --run folder holds the first stage, the room to continue after (-1 for
                        none), the last stage and the frames per room, like: 0 -1 6 200
  tools\port1.py        The edits to the decompilation's own files. Safe to run again.
  tools\port2.py        Run after port1 on a fresh copy: makes the game's pointers to 16 and 32-bit
                        types safe at any address (unaligned.h), as the phone faults otherwise.
                        Costs 0.1% in the hall, as the hot rendering code is left out.
  tools\crashdump.py    Names the code in the stack dump a crash leaves in re9500log.txt:
                          python -I tools\crashdump.py re9500log.txt
                        It needs the ELF of the same build.
  tools\make_game_project.py
                        Makes RE9500.pkg, copies the blob and hostapi.h next to the stub, and makes
                        GameLauncher from Duke9500's launcher. Run it after building a new blob.
  tools\pacesim         Runs the stub's audio pacing (RE9500\epocpace.cpp) against model streams
                        and compares it with the old clock pacing; pacesim.cpp says how to build
                        it. pacesim N traces model N.
  tools\movie           shrink.py makes the movies smaller for the card (see MOVIES).
                        movietest.exe runs the phone's movie code (platform\epoc\movie.cpp) on
                        an AVI: every frame, all the sound, then seeking. compare.py holds its
                        output against ffmpeg's; avidump.py shows an AVI's headers and index.


STATE (2026-11-05)
  The game runs on the 9500. Stub, blob, screen and keys all worked the first time. The hall's
  cutscene took 271-329 ms per frame there, as armemu said it would (310), before the speed work
  below, which hasn't been on the phone yet.

  It crashed there at first with exception 11: the event script is a byte stream, and
  RoomEvents.cpp read it through 16-bit pointers at odd addresses. armemu reproduced it when run
  as the phone is, without the VOICE folder. port2.py fixes that whole kind, which is why it
  isn't a single edit. Struct pointers at odd addresses would still fault: nothing has shown one.

  A black screen and then EXCEPTION 12 means no game data (it was in \RE9500 and not \RE9500\USA):
  armemu with an empty --data gives the same log line for line.

  SPEED, on the phone                   before      integer 3D     limiter, less copying
    The hall, 3 characters              271-329 ms  72-86 ms       61-62 ms (3D is 42 of it)
    A room with the player alone        ~150 ms     47 ms          34-38 ms

  What memory costs there, measured: a frame's 107 KB takes 1.7 ms to fill, 4.4 ms to copy, and
  4.4 ms to put on the screen.

  The game's clock is 33 ms a tick, so 33 ms a frame is full speed. armemu said 40 and 15 ms for
  those two: its count of instructions leaves out moving memory, which the phone showed is about
  half the time now. A frame is 107 KB, and it went to memory four times per frame.

  Done, and on the phone in the last column:
    - The limiter counts from when a tick was due, not from when it came. The phone's clock moves
      every 15.625 ms, so 33 ms always came out as 47 and the game ran at 70%. armemu --tick 15625
      shows that clock: ticks now average 33 ms.
    - A frame only touches what the last one changed: Clear() waits to see whether the backdrop
      covers it, depth is cleared where triangles went, and the backdrop is put back only where
      the last frame drew. Room masks over nothing are left out, which needs each mask painted
      into the backdrop once per camera, as a mask isn't quite the same pixels as the background.
      1040 of 1051 frames from every room are identical to before, the rest within 4 pixels.
    - The log says what memory costs at the start ("a frame's 106800 bytes: ...") and, every 150
      frames, how the frame's time divides between clearing, 3D and presenting.

  SOUND (works on the phone since 2026-11-06): the stub runs Duke9500's audio thread
  (epocaudio.cpp, CMdaAudioOutputStream, 22050 Hz mono, 1024 frames a call) and calls the blob's
  mixer (platform\epoc\audio.cpp, the Linux port's DirectSound in integers) through host table
  version 3. A version 2 stub still runs this blob, silent. armemu --wav FILE records the mix;
  tools\sound_test.wav is the title, intro and hall.

  PACING (2026-11-07): sounds came half a second to a second late. The
  game starts them at once; the time was in the pipe. Duke9500's thread worked out what had been
  heard from the clock, which can't know when the stream really starts playing, so whatever went
  in before that stayed queued for good, up to what the slots and the stream hold. Mono made it
  worse: the stream's buffers hold bytes, and mono is half the bytes a second. Now epocpace.cpp
  asks the stream what it has played (GetBytes, once a tick) and keeps about 140 ms in the pipe,
  more only if the stream underflows. It checks the count first, after each start, against the
  clock: if it never moves, or goes at the wrong rate, the clock paces as before. tools\pacesim
  runs the same code against model streams (results.txt): with a slow start or big buffers, the
  old pacing held 300 to 500 ms and the new one 100 to 230, and where the count is no good it
  does what the old one did. The log says how it went: an "audio at" line when the pacing
  changes, and at the end what the pipe held and what GetBytes cost.

  On the phone (log 11): the count passed its check at 100% of the rate and paced the rest of
  the session; the pipe held 36 to 293 ms, 145 on average, with no underflows. The count moves in
  steps of up to 2690 frames (122 ms). But each GetBytes took 15 ms, and asked every tick it made
  the hall about 2.5% slower. It is now asked every other tick, the clock filling in between
  (halfway guesses for the coarse steps); in pacesim that costs 15 ms of latency at most, where
  every third tick let the pipe run low. The "audio at" lines were missing because the stub's
  struct isn't zeroed and their frame counter started as garbage; it is set now.

  Log 12, every other tick: sounds on time by ear. GetBytes 1975 times instead of 5072 (about
  12 a second; each call now 20 ms), the pipe 145 ms on average, no underflows. The hall's
  frames are about 1 ms over log 10's (log 11: about 2). The "audio at" lines show the check
  passing 0.7 s after the start. The pipe's minimum of 0 is the estimate, not the stream:
  nothing underflowed.

  SOUND.PAK (tools\sndpack): every sound as 22050 Hz mono IMA ADPCM, 4 bits a sample, in one
  file with a sorted index. The phone opened 3 files a sound at first, about 50 ms each, and a
  door's sounds took 2 to 2.7 s. The pack stays open, so a sound is one seek and one read of a
  quarter of the data, and stays compressed in memory: audio.cpp decodes as it plays, and the
  heap peaks at 6.7 MB as it did before sound, against 10.7 decoded. Quality: 23 to 36 dB
  signal to noise against the WAVs (tools\sndpack\sndcheck.py). The pack also answers "not
  there" for the voices the game looks for and the PC version never had. armemu --overlay card
  reads it with --hide SOUND --hide VOICE.

  MOVIES (2026-11-07, blob only, work on the phone): the game's 27 AVIs play from the card as
  they are: 320x240 Cinepak at 10 fps (the staff roll 15) with 22050 Hz 16-bit stereo sound, the
  Capcom logo's 44100 Hz 8-bit. Each has an index, a keyframe every 15 frames, and its sound
  0.8 s ahead of the picture in the file. platform\epoc\movie.cpp reads picture and sound through
  the index, each from its own place, and decodes Cinepak straight to RGB565: a codebook entry is
  converted when it arrives, so a block is 8 word stores. video.cpp is the plat_video_* backend
  the game's FMV state machine drives, as on Linux. It shows the frame the sound has got to,
  scaled to 267x200 (6 pixels to 5, the two in between blended), straight to Present. The sound
  goes through the mixer from a 1 s ring the game's thread tops up from the file; what the mixer
  has taken, less 140 ms for the stub's pipe, is the clock. Files, Present and the stream were
  already in the host table, so the stub is unchanged.
  On the PC: every frame of DM1, CAPCOM, OU and ED8 the same as ffmpeg's pixel for pixel, the
  sound sample for sample; all 27 decode with nothing damaged and seek the same. In armemu the
  logo plays at the start, Enter skips the opening, and Jill's prologue stops at frame 1620 and
  goes on from 1727, the decomp's cut for this 210.8 s PU.AVI: 2001 frames, none late, its sound
  in the recording sample for sample. Decode and scale take about 5 ms a frame, 6 with the sound,
  of the 100 a frame has; the phone adds Present (4.4 ms) and about 32 KB of reads. A table
  lookup a pixel in the scaler had made it 10. The log has a line as each movie opens and one as
  it closes: frames shown and late, decode time, present time.
  armemu mixes in Sleep now as well as at Present: a movie presents only when its sound has
  moved, so mixing only at Present stalled it.
  On the phone (log 13): the Capcom logo, the opening, Chris's whole prologue (2108 frames)
  and DM3 played with 1 frame late in all, in step with the sound. Decode and scale took
  19-28 ms a frame there, worst 62.5, and present 5-10: card reads and the sound thread run
  inside that time, and armemu counts neither. Plenty of the 100 ms is still left.
  Shrunk for the card (tools\movie\shrink.py, 2026-11-07): 245 MB was too much beside the other
  games. 106 MB of it was the sound, 16-bit stereo the phone only ever played as mono; as
  22050 Hz mono IMA ADPCM, SOUND.PAK's format, it is 13 MB, 25-28 dB signal to noise. The
  picture is Cinepak again from ffmpeg, scaled to 268x200 on the PC with its area filter: the
  game's 267 rounded up to whole blocks. That comes to 40-55% of the original picture, being 70%
  of the pixels, and looks as good, as the phone's own 6-to-5 scaling was cruder. The phone
  presents it as it is, its spare column blacked out to match the border, so there is no
  scaling and fewer blocks to decode. The staff roll at 15 fps came out bigger, its scrolling
  text costing ffmpeg's encoder more than the original's, so shrink.py keeps a movie's own
  picture when the new one doesn't save a tenth. All 27 come to 94.7 MB. movie.cpp decodes a
  sound chunk's ADPCM when it reads it. Picture and sound are the same as ffmpeg's decode of the
  shrunk files, every frame and sample, and the sound starts at the same sample as the
  original's. In armemu the shrunk logo, opening and Jill's prologue with its cut play with
  none late; a 268x200 frame takes 1.4-1.8 ms to decode where a 320x240 one took 5 with its
  scaling. Not yet tried on the phone.
  On the phone (log 14), shrunk: DM3 whole, 130 frames, none late, decode 3.6 ms a frame where
  the original took 19-28; OU 12.8. The Capcom logo keeps its own 320x240 picture, so 32 ms.

  FRAME SKIP AND FASTER 3D (2026-11-07, blob only, not yet on the phone). Log 14: the first
  action scene, Barry shooting the zombie in the dining room, took 87 ms a frame (3D 64 of it),
  and the hall's cutscene 68 (3D 47). The game works out one tick per frame, so those scenes ran
  at 38% and 49% of their speed. Now:
    - Frame skip (main.cpp): a tick that starts when the next one is already due goes through
      FrameRateGovernor's own way of dropping a frame (g_frameTargetTime over 100), which retail
      never used. At least 1 tick in 4 is drawn, and more than 200 ms behind it stops catching
      up. In armemu at --cpi 3, where the hall takes 68-70 ms a frame as on the phone, the hall
      runs at 33 ms a tick, full speed, drawing about 12 frames a second. Each frame it drew is
      the same as one from a run without frame skip, shown 0 to 3 ticks late: dropping frames
      doesn't change the game's logic or its picture.
    - Points (tmd_fixed.inc): the PC version gives each corner of each face its own vertex, so a
      model's points were transformed once per face around them. Each vertex buffer now gets a
      list of its distinct points, checked against the buffer as it's used.
    - TmdInverse normalises in steps of 8, 4, 2, 1 bits instead of one bit at a time; short edges
      divide in 32 bits by a constant; the triangles sort on packed 64-bit keys.
    All of that gives the same picture as before, pixel for pixel, over 240 frames of the hall
    and 240 of the dining room, Barry's blood scene and the corridor. Three frames in a fade
    differ, and differ the same way when the old build runs with a slower clock: that fade goes
    by time, not ticks. The hall: 2.99 to 2.56 M instructions a tick; at --cpi 3, 58 ms a frame
    without frame skip (3D 43) where it was 68-70 (3D 54), and about 14 frames a second with it.
    Barry's shooting scene itself hasn't been reproduced in armemu: the corridor beyond the dining
    room (room 104) had no zombie on the route tried, so the scene was never triggered there.

  Since then, not yet on the phone:
    - Files are read 32 KB at a time. newlib-nano's buffer is 1 KB whatever _fstat says, and each
      read is a trip to the file server: the first room took 2387 reads and 8 s, which was the
      pause on the "T" of the opening text. build_game.sh links fopen through __wrap_fopen in
      runtime.cpp, which calls setvbuf. Now 162 reads.
    - A short list of rectangles in place of one box round everything: each 3D object reports its
      area as its first triangle is drawn (NoteTmdArea), and pieces that touch merge. In the hall
      the background put back per frame falls from 53400 pixels to 20000-25000, and the depth
      cleared from 7700 to 3700. The hall's cutscene draws no room masks at all, so they weren't
      the cost there. CENSUS=1 builds log these counts.
    - The game's own log lines wait in memory and go out every 150 frames: each write to the log
      is the stub opening the file on the card, about 170 ms, and a room load prints a dozen of
      them. That was 2.4 s of every door and 0.35 s of every camera cut. Their timestamps say
      when each step of a room load happened.
    - LoadFile keeps its last four files of up to 96 KB: a room read its effect page 4 times.
    - The 3D path is integers: game\src\platform\epoc\tmd_fixed.inc replaces FlushTmdObjects, and
      tmd_vertex.h is what a vertex buffer holds now, 28 bytes for 44. No division per vertex.
    - RasterTmd draws its triangles. It also draws the ones under 2 pixels, which the first
      rasteriser dropped: that's most of a face at this size.
    - The room's background is drawn once per camera and then copied.
  Left to do, by share of a busy frame: DrawSprite 25% (the room's masks), FlushTmdObjects 21%,
  triangles 14%, memcpy 11%.

  tools\pngdiff.py compares the same frame from two builds, which is how to check all this. The
  memory timing at the start presents 64 frames, so armemu --uncounted 64 keeps frame numbers
  the same as a build without it.

  MEMORY: no leak: a room's textures take 2.3 to 4.5 MB and go when it does. With random keys and
  every room, the heap reached 9.8 MB of 11.5. At the 6.9 MB it gets with 19 MB free it runs out
  in the busiest rooms and the game crashes, so close other applications if the log's "heap:" line
  says under about 10 MB.

  COVERAGE: the sweep with --monkey at 23.7 MB free: all 7 stages, 108 room loads, no unaligned
  access, no fault. That's every room's loading and scripts, with enemies, but the keys are random:
  far from a playthrough.


THE COMPILER TEST (BlobTest)
  Whether code built by GCC 14 can run on the phone at all. It can, and everything passed on the
  9500 on 2026-11-04:

  An unaligned word read kills the thread: exception 11, panic BLOBTEST 11. It does not rotate as
  a plain ARM9 does, so any unaligned read left in the game is a crash.

                      GCC 14     GCC 2.9 -O2
    float vertex      7.8 us     28.1 us
    fixed vertex      1.41 us    1.56 us
    span pass         7.66 ms    7.97 ms
    background scale  8.9 ms     11.7 ms
    64 enemy updates  28 us      37.5 us
    background decode 95 ms      125 ms

  The phone's clock ticks every 15.625 ms, so these are averages over long runs. To build it:
  BlobTest\epoc and Launcher on the VM the same way as above, then BlobTest\epoc\makesis. On the PC:
  tools\build_blob.sh, tools\mkblob.py, tools\armsim.py (the slow Python ancestor of armemu) and
  tools\make_project.py.

  BlobTest\test.pak is STAGE1\RC1000.PAK from the game. The game's data must not go into anything
  released: players supply their own copy.
