# TLOTR_TTA_Recomp
**A native PC port of *The Lord of the Rings: The Third Age* (NTSC-U, `SLUS-21027`), made by statically recompiling the game's PlayStation 2 code to C++. Windows and Linux now; macOS later.**
Built on [BozoEngine](https://github.com/TheBozos/BozoEngine), The Bozos' own toolchain: the game's EE code recompiled to C++, every library and kernel call it makes answered by native code. No PS2 hardware model at any level: no GS, VU, VIF/GIF, DMA, IOP or SPU2.
-1b8cff)



> [!IMPORTANT]
> No game files are included: no ELF, IRX modules, data archives, or code generated from them.
> You need **your own copy** of the North American release, PS2 ID **`SLUS-21027`**. The port is built against that disc's executable:
>
> | File | SHA-1 |
> |---|---|
> | `SLUS_210.27` | `d88ded370592114169fa18f0ff73b9f610a94bd0` |
## Status
**On BozoEngine (since 2026-11-09): the game plays natively in a window, at 60 frames a second.** On the PS2Recomp
fork the game played from the boot to the first battle (the older screenshots below), but its graphics went through a
PS2 emulation layer (VU1 sandbox, GS state machine, GS memory). BozoEngine has none of it: everything the game draws,
the movies, the 2D, the text, the 3D and its effects, comes from native draw hooks written from the game's own data.
Every region loads and its battles play (Eregion to the Pelennor Fields, through the debug warps), and the last
battle, against the Eye of Sauron, ends in the game's closing films and back to the title. What is left is a few
effects, a playthrough from the intro to the end of the campaign, and the macOS build. Beyond the
console: widescreen, higher resolutions, anti-aliasing, texture upscaling, frames between the game's, fast forward,
save states and cheats.
| Milestone on BozoEngine | |
|---|:---:|
| Symbol map of the stripped ELF (BozoEngine's matcher against reference executables, then names read from the code) | ✅ |
| Recompile with `bozo-recomp`, a headless runner on the engine's free host | ✅ |
| SDK init, SIF, CD/DVD, memory card, IOP reboot and module loads answered natively | ✅ |
| EA's sound driver (AUDIOPF.IRX) and LIBSD statically compiled from the disc, its SIF handshake with the game | ✅ |
| Pads through a native libpad2 (BozoEngine PR #81) | ✅ |
| VU0 microprograms translated to C++ from the ELF; movies through a native libmpeg (BozoEngine PR #82) | ✅ |
| Native frame: the chain built but never sent, the swap publishing to the engine's renderer; the movies drawn | ✅ |
| Textures converted offline from the disc (tools/tta_textures.py); the 2D of LLPrims drawn natively: the loading screen | ✅ |
| The UI (EA Apt: title, menus, battle HUD) and its text drawn natively; the boot reaches the first battle | ✅ |
| 3D: terrain, trees, objects and animated characters from meshes converted offline, the game's matrices and skeletons | ✅ |
| Effects, water, render targets (blur, glows), the battle menu's details | 🔧 |
| Window, sound output, pad from the PC, save states (F5 / F7) | ✅ |
| The game playable again: the first battle, the forest, Eregion and on (played in the window, saves on disk) | ✅ |
| Every region loads and its battles play: Moria, the Gullies, Rohan, Helm's Deep, Osgiliath, Minas Tirith, the Pelennor | ✅ |
| PC options: widescreen, render scale, MSAA, texture upscaling and smoothing, interpolated frames, fast forward, gamepad menus, cheats | ✅ |
| The last battle (the Eye of Sauron) won and the ending played, reached through the debug warp and the cheats | ✅ |
| The whole campaign played through, from the intro to the end | ⏳ |
| Linux build: the launcher builds from the disc and the game plays (WSL Ubuntu 26.04, Mesa) | 🧪 |
| macOS build | ⏳ |
TTA builds on a [BozoEngine](https://github.com/TheBozos/BozoEngine) release, pinned by version and SHA-256 in
`cmake/bozo_engine.json` and fetched into `BozoEngine/` when configuring (`cmake/bozo_engine_fetch.cmake`; a player's
release carries it in `source\BozoEngine`, so its build stays offline). Engine work that is not released yet is built
with `-DBOZO_ENGINE_DIR=` (or `tools/tta_build.py --engine`); an engine bump changes the pin.
✅ works · 🔧 in progress · ⏳ not reached yet
[docs/RECOMP_NOTES.md](docs/RECOMP_NOTES.md) records how the port is brought up, every fix and how it was found, and
what remains open.
## Screenshots
**2026-11-23.** From one region to the next, native: the Watcher in the Water beaten, its films play and Gimli
joins the party in Western Moria (left); after the Balrog, the company comes out of Moria into the light (right).
Checked with the new Win this battle cheat from each region's last fight.
**2026-11-23.** The ending, native: Gandalf crowns Aragorn in the closing films, after the Eye of Sauron is beaten
on the Pelennor Fields. Reached from the debug warp with the cheats; the Eye's Wrath of Sauron fells the party
outright (an instant-death effect marked in the battle's action, which the winner check reads before the HP), so
infinite HP now keeps them standing through it.
**2026-11-23.** The Cheats tab (F2): infinite HP and AP (a knocked-out member gets up again), one-hit kills, an
experience multiplier, and any of the game's ~390 items into the bag, found by name. HP, AP and experience were found
in the game's own code (its Lua functions' C side, its full heal, its experience award); the items come from its
entity database and its string table.
**2026-11-23.** Anti-aliasing (the Video tab, 2x to 8x MSAA): Helm's Deep's battle, the console's edges on the
left, 8x on the right; the blades, the arm and the braid without their steps. Everything the game draws from the
frame (its glows, blurs, shadows) reads the smoothed picture.
**2026-11-22.** Berethor's sword slash in the first battle, now drawn in the 3D scene: depth-tested at its place and
taken by the screen filters' glow, as the console sends it, where it used to lie flat over the finished picture with
the HUD.
**2026-11-21.** Widescreen (`--widescreen`): the forest after the first battle at 16:9, the trees and the path a
third wider on each side than the console shows, the minimap keeping its shape. The game's own matrices are squeezed
after their projection, so nothing of the game is patched; the game draws what lies just outside its 4:3 view.
**2026-11-21.** The Balrog in Eastern Moria's in-engine film, its fire drawn at last: shader type 4, a sheet of flames
(Cobj 19-21) whose colour the game animates through a fourth vertex array and a flickering weight per frame. The
port drew it with no alpha before, so the Balrog arrived without fire. Found by surveying what the game puts in its GS
chain while exploring each region.
**2026-11-21.** Helm's Deep's Deeping Wall battle, started from the debug tool: Berethor, Legolas, Idrial and Morwen
on foot on the wall's walkway, among the stakes. Asked for during the map's opening films, these battles used to start
inside them: the film's riders on their horses, its camera and its valley in half the shots, no ground under the
rest. The debug tool now waits for the films to end.
**2026-11-20.** The first battle's Nazgul Scream with its lens flare: the discs strung from the light on the
Ringwraith's blade through the middle of the screen (shader type 11, an effect render found missing by a survey of what
the game puts in its GS chain), built from the same unit-circle strips as set 2's VU1 program.
**2026-11-20.** Rohan, reached through the debug warp: the river's flowing surface (shader type 5, the only static
scenery that was still missing in the later regions) drawn over its sky reflection, its texture drifting with the
current as set 1's VU1 program animates it.
**2026-11-12, early.** Past the first battle, all native: Berethor falls to the Black Riders as scripted, Idrial's
light drives them off, she heals him, and the game hands over the controls in the forest (minimap, tutorial box)
before Gandalf's first Epic Scene film. Boot to here with nothing but CROSS presses.
**2026-11-11, late night.** The battle menu as on the console: the selection ring glows (it blends with the
game's additive mode in force, not over a black square), the white sheet at the left is gone (a water layer had
picked up a UI texture from the shared VRAM slot), the waterfall falls bright again (its particles had been hiding
each other: the game draws them without writing depth), and the hint reads "Attack a single target." once the
cursor moves, which is when the game sends it.
**2026-11-11, night.** The first battle opens on Berethor's turn again, as on the PS2: the game's initiative jitter
draws on its own C library rand, which the engine had been answering with another generator.
**2026-11-11, evening.** The screen filters' bloom at the console's strength. The game adds its blurred frame back
at GS alpha 0xff (twice the image), which a GPU stops at 1, so ours was half as bright; the blur chain also drifted
half a pixel per pass and left a halo up-left of faces. The Berethor close-up now averages 63 / 62 / 54 against the
console's 61 / 58 / 50.
**2026-11-11, later.** The mist's real textures: the glows had been drawn with the UI's text canvas (it shares the
mist texture's place in GS memory), which washed the intro out in green. Each effect now takes its texture from its
own record, so the forest's mist is soft and wispy.
**2026-11-11.** TTA's Glows, native: the effects' particle billboards (VU1 microcode 0x620 rewritten in C++). They
are the console's mist veils in the forest and the haze and light shafts over the battle.
**2026-11-10, evening.** The console's look: the screen filters (the frame blurred through an off-screen target and
graded back) and the forest's mist, native; shadows at the game's strength.
**2026-11-10, later.** The battle's ground: the bridge and the forest floor under the Black Riders (scene depth writes
and near-plane clipping fixed).
**2026-11-10.** Past the first battle: exploring the forest, the HUD's minimap and dialogs (EA Apt's depth masks
done natively).
**2026-11-10.** The first battle again, all native, at 60 frames/s: the Black Riders' Nazgul Scream and Wraith
attacks, Berethor falling to the scripted critical hit.
**2026-11-10.** The intro cinematic in 3D again, with no PS2 hardware model: the forest, the sky and the characters
from meshes converted offline from the disc, skinned on the CPU from the game's own animation, with its camera.
**2026-11-10.** The title screen (EA Apt's background, logo and menu, its text rasterised by the game's own fonts)
and the first battle reached again: its HUD is native, the 3D (forest, Berethor, the Black Riders) comes next.
**2026-11-10.** The loading screen drawn natively: the game's own primitive calls and draw state, with its
textures converted once from the disc and found by the game's texture records. No GS packet is read.
**2026-11-10.** The first pictures on BozoEngine: the intro movies, decoded by the engine's native libmpeg and shown
by its renderer, at 60 frames/s. The game builds its frame's DMA chain as before; nothing of it is sent anywhere.
From the PS2Recomp build, until 2026-11-09.
**2026-10-29.** The Black Riders' cinematic with the VU1 sandbox (now the default): no VU1 program runs on the
emulated VU1 unit, the native adapter runs each one in a sandbox and hands what it draws to the OpenGL renderer in GS
order, replaying each packet's GS register writes. That is still emulation (VU1 microcode, GS state machine), see
above. The first battle, its scene unlock and the film clip after it match the VU1 path, at the same
frame rates (19.5 in battle).
**2026-10-29.** The first battle played to its end with the Cross button alone (a pad script): the Black Riders'
cinematic, the scene it unlocks (Nazgul Agenda, 2/109) and the film clip that follows, in one 11-minute run.
**2026-10-29.** The first battle (Berethor against two Black Riders), reached with the defaults only: the native
OpenGL renderer, the IOP modules recompiled, the game on the PC's clock. What crashed the intro cinematic in most runs
was CD reads completing at once; they now take drive-like time.
**2026-10-29.** After New Game: the in-engine intro cinematic, the game's own 3D drawn by the native OpenGL renderer.
**2026-10-28.** The title screen, after the EA GAMES and New Line Cinema movies; the attract movie plays and returns
to it. The movies end the way the game signals it (its no-data callback returns 0), fork `tlotr/mpeg-nodata-end`.
**2026-10-27.** The loading screen, the memory card check, the legal screen and the first boot movie, drawn by the
recompiled code. The disc is read
through the game's own IOP sound and streaming module, and the VU1 microprograms run AOT-compiled (with exact
MAC/status flags for now). The white band on the right is outside the 516-pixel-wide area the game draws in this
build.
2026-10-26: first frames
The ring of the loading screen turned, but its text was garbled and the game never read the disc.
## Playing
**The release (Windows):** `TLOTR_TTA_Recomp--bozo.zip` from the
[releases](https://github.com/TheBozos/TLOTR_TTA_Recomp/releases), the same launcher as TMB's and Dark Cloud's. Unzip
it anywhere but Program Files (about 15 GB free), run **TTA Launcher.exe**, select your USA disc image (SLUS-21027,
.iso or .bin / .cue) and **Prepare the game**: the zip holds no game data, only the code, the launcher and an offline
build kit (compiler, Python, FFmpeg), and the game is built on your PC from your disc (about half an hour, once; it
can be stopped and resumed). Then **Play**. The launcher also sets the display, checks for updates and rebuilds after
one. `tools/tta_build.py` is what it runs (also usable alone: `python tools/tta_build.py --disc --out `);
`tools/make_release.py` makes the zip (docs/RELEASE_CHECKLIST.md).
**Linux:** `TLOTR_TTA_Recomp--linux.tar.gz` (check it with `sha256sum`). It holds the same launcher
(`tta-launcher`), our code and the SDL3 and Dear ImGui sources, but no compiler: the game is built with your system's.
Install GCC 13 or newer, CMake, Ninja, pkg-config, Python 3 and the FFmpeg (`libavcodec`, `libavutil`), X11 or
Wayland, OpenGL and audio development files; on Debian or Ubuntu:
```bash
sudo apt install build-essential cmake ninja-build pkg-config python3 libavcodec-dev libavutil-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxtst-dev libxfixes-dev libxkbcommon-dev libwayland-dev libdecor-0-dev libegl-dev libgl-dev libpipewire-0.3-dev libpulse-dev libasound2-dev libudev-dev
```
On Fedora, Arch or openSUSE, **Prepare the game** names the packages when one is missing. Then `tar xzf` it anywhere
with about 15 GB free, run `TLOTR_TTA_Recomp_Bozo/tta-launcher`, select your disc image, **Prepare the game** and
**Play**. The disc picker is your desktop's file dialog (xdg-desktop-portal) or zenity. The cards are in
`~/.local/share/TheBozos/The Third Age/cards`, the settings in `~/.local/share/tlotr-tta-recomp`; Update installs the
next Linux release. RecompLauncher installs the Linux download too.
From a checkout: `build/bozo/tta.exe` (after the build below; it needs your disc image, see "Build and run").
| PS2 pad | Keyboard (default) |
|---|---|
| D-pad / left stick | Arrow keys or W A S D |
| Right stick | I J K L |
| ✕ (confirm) | X or Space |
| ○ (back) | C or Escape |
| □ / △ | Z / V |
| L1 / R1 | Q / E |
| L2 / R2 | Left Shift / Right Shift |
| L3 / R3 | F / G |
| START / SELECT | Enter / Tab |
A gamepad (Xbox, PlayStation, Switch Pro ...) works as a PS2 pad when plugged in. Keys and buttons are changed in the
Controls tab of the settings window, where each player's rumble strength is set too (0 turns it off; Test shakes the
gamepad). On a gamepad the middle button (PS, Xbox, Home) opens and closes the settings window, steered with the D-pad
and Cross / Circle meanwhile; save and load state can be bound to buttons in the Controls tab. The mouse pointer hides
over the game after two seconds without moving
(`PS2X_KEEP_CURSOR=1` keeps it).
| Key | |
|---|---|
| F2 | The settings window: Video (window size, full screen, render scale, texture upscaling and smoothing, anti-aliasing, frame rate, fast forward's speed, pause in the background), Game (widescreen, skippable logos, volume), Controls, Save states, Debug (warps and battles), Cheats, Special thanks (the players who test and report) |
| F3 | Frame rate counter |
| F11 or Alt+Enter | Window / full screen |
| F5 / F7 | Save / load a save state; F6 and Shift+F6 pick the slot (0-9); the Save states tab shows each slot's picture |
| F12 | A screenshot (PNG in `%APPDATA%\TLOTR_TTA_Recomp\screenshots`) |
| ` (held, the key left of 1) | Fast forward: 3x by default, 2x to 4x or unlimited in the Video tab; the music keeps its pace. On a DualShock 4 / DualSense the touchpad click; rebind it in the Controls tab |
| F8 | Capture a sequence of pictures |
| F10 | A bug report of this moment (the RAM and one frame of draw state) |
The game's own saves (its two memory cards) are in `%APPDATA%\TheBozos\The Third Age\cards`; the settings
(`video.ini`, `input.ini`, `tta.ini`) in `%APPDATA%\TLOTR_TTA_Recomp`.
**RecompLauncher.** Releases carry a [`recomplauncher.json`](recomplauncher.json), so
[RecompLauncher](https://recomplauncher.com) can install TLOTR_TTA_Recomp, check your disc, prepare the game with the
same build (its setup step), show the video settings and widescreen on the game's page and back up the memory cards. A
game set up there keeps its cards, settings and logs in its own `recompdata` folder (the cards in `recompdata\cards`),
not in `%APPDATA%`: copy `mc0` from `%APPDATA%\TheBozos\The Third Age\cards` to bring saves from TTA Launcher.
**Cheats:** the Cheats tab of the settings window (F2):
- **Infinite HP and AP:** battle damage to the party is ignored, instant kills (the Eye of Sauron's Wrath of Sauron)
fell no one, and health and Action Points are kept full. Anyone knocked out anyway gets up again half a second later. Turn it off for a battle the story means you to lose, such
as the first one against the Nazgul.
- **One-hit kills:** enemies are held at 1 HP in battle, so any blow that lands fells them (a miss still misses).
- **Win this battle:** a button that downs every enemy at once; the battle ends with its rewards as usual.
- **Experience:** every battle's experience multiplied by 2, 3, 5 or 10.
- **Items:** any of the game's ~390 items (potions, weapons, armour, rings...) added to the party's bag in any amount
up to 99. A search box finds them by name or by their four-letter id.
They last until the game closes. For scripted runs, `TTA_CHEATS=hp,ap,kill,xp=300,item=Pot8x5` does the same
(`win` wins every battle).
## Goal
A fully playable *The Third Age* as a native executable on Windows, Linux and macOS, from the intro to the end of the
campaign. Accuracy first: the console's picture by default, the PC's options (widescreen, resolution, anti-aliasing,
frame rate) on top, each off or as the console unless chosen.
## How it works
```
disc (your ISO) ──► scripts/extract_iso.sh ──► game/ (SLUS_210.27, MODULES/*.IRX)
│
recomp/tta_symbols.txt (names for the stripped ELF: scripts/symbols.sh) + runtime/ overrides
│
bozo-externals ──► the externals list bozo-recomp ──► C++ (build/bozo/tta_gen/)
tools/tta_bozo_audio.py ──► AUDIOPF.IRX and LIBSD.IRX as C++ (BozoEngine tools/native_irx)
│
CMakeLists.txt ──► BozoEngine runtime + generated code + runtime/ ──► tta (window), tta-headless
```
- The retail executable is stripped. `recomp/tta_symbols.txt` names its library and kernel functions:
BozoEngine's `bozo_symbolmap.py` matches them against executables that keep their symbols, and
`recomp/tta_symbols_reviewed.txt` adds the ones read from the code, each with its evidence
(`tools/tta_rpc_names.py` pairs SIF RPC clients with their server and function number to help).
Every named function BozoEngine knows is answered natively.
- `runtime/tta_port.cpp` registers the port's overrides by address; `runtime/tta_audio.cpp` runs EA's sound driver
in the engine's compiled-library host and connects it to the game (SIF commands, software registers).
- Nothing derived from the disc is committed: the generated code and the compiled IRX are in `build/`.
## Requirements
- Windows 10/11 with [MSYS2](https://www.msys2.org/) (UCRT64), or a 64-bit Linux with X11 or Wayland; macOS is the
goal, not built yet
- CMake 3.21+, Ninja, GCC 13+ or Clang with C++20
- GNU make and curl (the movies' minimal FFmpeg is built from its source once: scripts/build_ffmpeg.sh); or FFmpeg
development libraries (`libavcodec`, `libavutil`) through `pkg-config` with `TTA_SYSTEM_FFMPEG=1`
- `bsdtar` (libarchive) to extract the disc, Python 3
- To regenerate the symbol map: reference executables that keep their symbols (scripts/symbols.sh)
- A CPU with AVX2 (the runtime is built for `x86-64-v3`)
- Your own copy of `SLUS-21027` (check the hash above)
## Build and run
```bash
git clone https://github.com/TheBozos/TLOTR_TTA_Recomp.git # BozoEngine is fetched when configuring
cd TLOTR_TTA_Recomp
scripts/extract_iso.sh "/path/to/Lord of the Rings, The - The Third Age (USA).iso" # disc files -> game/
scripts/build_runtime.sh # recompile + sound driver + runtime -> build/bozo
scripts/run.sh --frames 600 # tta-headless: runs and reports what is not native yet
```
`build/bozo/tta.exe` is the playable window build. It reads the disc image at the repository's root under its
No-Intro name (`Lord of the Rings, The - The Third Age (USA).iso`); give another place with `--iso FILE` or configure
with `-DTTA_ISO=FILE`. Without it the game stops at once and says where it looked. The movies' decoder is a minimal
FFmpeg (9.0.2, LGPL, only its MPEG-2 video decoder) that `scripts/build_runtime.sh` downloads (checked against its
SHA-256) and builds once into `build/ffmpeg` (`scripts/build_ffmpeg.sh`, ~2 minutes), linked static: the executables
need no DLL beyond Windows' own, and `tta.exe` starts from Explorer. `TTA_SYSTEM_FFMPEG=1` uses the system's FFmpeg
through pkg-config instead (on Windows its DLLs are then copied next to the executables). Its saves (the two memory cards) live in `%APPDATA%\TheBozos\The Third Age\cards`; `--card-dir DIR` puts them
elsewhere.
**Widescreen:** the Game tab of the settings window (F2), kept for the next game (`tta.ini` in the same folder as
`video.ini`), or `tta.exe --widescreen` (or `TTA_WIDESCREEN=1`) for one run, shows a 16:9 picture: the 3D scene a third wider than
the console's 4:3 view, the HUD, the menus and the movies keeping their shape in the middle, and full-screen effects
(tints, fades) across the whole width.
**Skippable logos:** the EA, THX and New Line logos at boot (one movie, about 28 seconds) cannot be skipped on
the console; the Game tab's "Skippable logos" (kept in `tta.ini`, or `TTA_SKIP_LOGOS=1` for one run) lets START end
them, as the developers' own option `skipallmovies` did.
**Volume:** the Game tab's slider (kept in `tta.ini`, or `TTA_VOLUME=0..100` for one run) sets the sound's volume,
music, voices and effects together; the console left it to the TV.
**Video settings:** the Video tab of the settings window (F2) sets the window's size, windowed / full screen /
borderless (F11 or Alt+Enter switch), the 3D's render scale, texture upscaling, texture smoothing (off as the console,
trilinear, or anisotropic up to 16x: distant ground without the shimmer), anti-aliasing (off as the console, or 2x,
4x, 8x MSAA: the 3D's edges smoothed) and the frame rate, saved in
`%APPDATA%\TLOTR_TTA_Recomp\video.ini`. `--fullscreen` starts borderless full screen. Scripted and `TTA_DETERMINISTIC`
runs ignore the file, so their captures stay the same. Above the game's 60 frames a second (120, 144, the monitor's
refresh), the pictures between the game's frames are drawn interpolated: the scenery and the characters move between
their two frames' places, the HUD and effects show the newest frame. `TTA_FRAME_RATE=` sets it for any run.
"Pause in the background" (off by default; `pause_in_background` in `video.ini`, `PS2X_PAUSE_IN_BACKGROUND=on`) holds
the game while another window has the focus or this one is minimised.
`scripts/regress.sh` is the visual regression check: fourteen scenes (the boot films and title, the logos skipped with START, the first battle and
the same in widescreen, the outpost, the forest, the pause menu, Idrial's film, the Balrog's film, and battles in
Western Moria, Rohan, Helm's Deep, Osgiliath and Minas Tirith) captured from local save states and compared with a local baseline (`--update` makes it), ~5 minutes. Its runs are reproducible to the pixel.
Save states: F5 saves, F7 loads, F6 / Shift+F6 pick the slot (0-9), and the F2 window has a Save states tab. From the
command line: `--save-state FILE --save-state-at N` and `--load-state FILE [--load-state-at N]`. A save waits while a
movie plays. F10 writes a bug report of the moment (the RAM and one frame of draw state) for the developers.
Debug tools (the F2 window's **Debug** tab, built on the game's own level-script functions):
- **Warp**: loads any map from its start (its films, then its start position): Eregion, Western Moria, Eastern Moria,
Eastemnet Gullies, Rohan, Helm's Deep, Osgiliath, Minas Tirith, Pelennor Fields.
- **Encounters**: every battle the current map defines, its story battles (Eregion: the Nazgul, the orc ambushes and
warbands, the warg camps, the Watcher...) and its random ones (`Rnd..`), started on the spot.
- **Enemy groups**: any enemy group of the current map in a battle: the random battles' groups (`Rnd_Easy / Med /
Hard`, each with its 1-, 2- or 3-enemy layout) or a story battle's (the Watcher as an ordinary fight).
Start them while walking freely, not during another battle (an id the map does not have prints the map's list); a battle asked for during a film or a prompt waits for it
to end (two minutes at most). Enemies of another region: warp there first.
From the command line: `--warp MAP[@FRAME]` (a region such as `"helms deep"`, a path such as `e02c05`, or an index)
`--encounter ID[@FRAME]` and `--group ID[@FRAME]` (frames are the game's), for example from a saved state:
`tta --load-state build/states/forest_14900.state --encounter 2118@14940` starts Eregion's first warg camp.
`--game-option NAME[=VALUE]` passes the developers' own options to the game (`encounters_only`).
### Windows
The same scripts run in an MSYS2 **UCRT64** shell, with MSYS2's GCC (MSVC is not supported for this port).
```bash
pacman -S --needed mingw-w64-ucrt-x86_64-{gcc,cmake,ninja,pkgconf,libarchive,python} make git
```
## Sharing the machine with other ports
The Bozos' ports share a two-slot bench lock (BozoEngine's `tools/bench_lock.sh`): a game run takes one slot, a build
or a timed run both, in arrival order.
```bash
scripts/bench_run.sh 5 "headless boot" scripts/run.sh --frames 600
scripts/bench_run.sh --alone 30 "full rebuild" scripts/build_runtime.sh
```
## Legal
This project contains no code or data from the game. You must own the game to use it. *The Lord of the Rings: The
Third Age* is a trademark of its respective owners; this project is not affiliated with or endorsed by them.
The executables link FFmpeg (LGPL-2.1-or-later), built from its unmodified source by `scripts/build_ffmpeg.sh`; its
licence is copied to `build/ffmpeg/COPYING.LGPLv2.1`.