# TFX configuration and display modes

These notes describe the September 1994 **TFX 2.05** installation. `CONFIG.EXE` sets hardware and startup defaults; the in-flight configuration menu, opened with the backtick/accent key, adds simulation and display preferences. Both use the same `TFX.CFG`. The game’s [reader](code/index.html#a664c) and [writer](code/index.html#a6808) establish that the flight menu persists `REALISM`, `DETAIL`, `JOYSCALE` and `HUDCOL` while preserving the other lines.

## HUD intensity: HUDCOL

```ini
HUDCOL=125
```

`HUDCOL` controls the **green component of HUD palette entry 6**. Native `0x73f1b` writes its low byte to palette offset `0xf99b`, then `0xc770c` uploads the bytes unchanged. The six-bit VGA DAC ignores the upper two bits: the compiled default **125** becomes green level **61**. The flight input routine clamps the word to **90–127**, corresponding to DAC levels **26–63**. Larger values within that range give a brighter HUD. The configuration reader itself accepts an integer into a 16-bit field; the clamp happens during flight.

This corrects the earlier interpretation as a palette-index selector. The C++ reconstruction checks the original complete palette generation and differential uploader separately, retaining raw bytes until DAC presentation rather than relaxing palette-file validation.

The [native adjustment routine](code/index.html#86820) checks raw scan codes **0x15** and **0x16**, corresponding to **Y** and **U** on a QWERTY keyboard. Holding Y increments the component and brightens the HUD; holding U decrements it and dims the HUD. No Shift modifier is required. Starting at 125, Y has only two remaining steps before reaching the brightest setting, which can make a brief adjustment difficult to notice.

The [scanned English manual](../literature/TFX%20Tactical%20Fighter%20Experiment%20Manual%20(Ocean)(1994)_text.pdf) agrees in its HUD section: Y decreases intensity and U increases it. Its laser-designator section specifies **Z**. The [keyboard initialiser](code/index.html#839d0) likewise binds scan code **0x2c**, QWERTY Z, to [the designator handler](code/index.html#8445c).

The unofficial [tfxkeys.txt](../literature/floppy_bundle/tfxkeys.txt) instead lists Y for the designator. Its German distribution markings and keyboard-specific symbols suggest a **QWERTZ** layout, whose Y/Z keycaps occupy the opposite physical positions. That is a likely explanation for the discrepancy, rather than evidence for an alternate binding decoded from this executable.

The game’s [HUD setting reader](code/index.html#a6184) and [writer](code/index.html#a61c8) preserve this value. `HUDCOL` need not appear in the initial file: the flight menu’s save routine adds it.

Other retained flight shortcuts, aliases and cheat combinations are mapped separately in [keyboard bindings](keyboard.md).

## REALISM field order

The [native reader](code/index.html#a6490) accepts **seven comma-separated integers**, and the [writer](code/index.html#a6560) writes them in this order:

| Position | Setting | Values | Native data offset |
| ---: | --- | --- | --- |
| 1 | G effects | 0: none; 1: reduced; 2: realistic | `0x5954` |
| 2 | Precipitation | 0: off; 1: on | `0x8f31` |
| 3 | Crashing | 0: off; 1: on | `0x8e22` |
| 4 | Gear damage | 0: off; 1: on | `0x8e23` |
| 5 | Wind | 0: off; 1: on | `0x8e25` |
| 6 | Temperature | 0: off; 1: on | `0x8f30` |
| 7 | Auto recovery | 0: off; 1: on | `0x8867` |

The five on/off controls in the [realism menu](code/index.html#9407c) follow G effects, which has three choices. **Auto recovery is in the main configuration menu**, but its value is stored at the end of `REALISM`.

For example:

```ini
REALISM=2,1,1,1,1,1,0
```

This selects realistic G effects, enables all five realism switches, and disables auto recovery. The reader zero-initialises all seven temporary values before conversion, so an older six-value line leaves auto recovery **off**. The flight menu subsequently writes the complete seven-value form.

The scanned manual describes a separate “loss of control” item; the decoded 2.05 menu instead labels its second field **precipitation**. The field names above come from the actual menu label table and the reader/writer assignments, rather than assuming that the manual’s prose order describes this version.

## Recognised keywords and memory flags

The game’s configuration dispatch table recognises:

`CONTROL`, `DETAIL`, `MODEL`, `SOUNDFX`, `MUSIC`, `STICK`, `JOYSTICK`, `LANG`, `LOWMEM`, `BLASTER`, `ULTRASND`, `IRQBASE`, `REALISM`, `JOYSCALE`, `HUDCOL`.

`START.EXE` separately recognises:

`SWAP`, `SOUNDFX`, `MUSIC`, `IRQBASE`, `BLASTER`, `ULTRASND`.

The [game dispatch routine](code/index.html#a65f0) and launcher both ignore unknown keywords. There is no cockpit, resolution or colour-depth keyword hidden behind the existing defaults. `HUDCOL` is recognised by the game although the standalone setup program does not offer it.

**LOADLOW** survives as a field in `CONFIG.EXE`, but neither the launcher nor the game recognises it in any of the five retained installations. In the reference setup executable, its save path at file **0x2fe79** computes `LOADLOW = (SOUNDFX == 0)`: sound effects disabled gives 1, enabled gives 0. Its name suggests an older low-memory loading arrangement, but its intended historical use remains unestablished. Changing it has no active effect in the reference launcher/game, and it does not enable or disable HIMEM.

**LOWMEM** is a separate, active game setting. Its consumers include camera/view handling at [0x85348](code/index.html#85348) and [0x855ec](code/index.html#855ec), which select restricted view paths for the low-memory arrangement. It is not a screen-resolution setting. The supplied [installation notes](../literature/cd_1994_09/TFX/README.TXT) explicitly say that HIMEM/EMM386 are not required, although the game can operate with them; the DOS extender’s memory interfaces are separate from these game preferences.

## Graphics modes

The game’s [video initialiser](code/index.html#d59b0) sets BIOS mode **0x12**, then **0x13**, then programs the VGA sequencer/CRTC/graphics controller for unchained planar drawing. The first mode is an intermediate setup step; the active game display is **320×200 with 256 palette colours**. Each pixel stores an 8-bit palette index; VGA DAC colour components have six-bit precision.

There is no selectable higher-resolution, 16-colour or true-colour path in the reference game’s configuration or video setup. The manual’s VGA/SVGA compatibility means that an SVGA card can display this VGA mode, rather than providing an SVGA-resolution option. Cockpit, virtual cockpit, full view and smaller flight windows change the viewport within the same framebuffer. `DETAIL` changes world detail, while `MODEL` chooses the flight model; neither selects a different display mode.

## Verification

[check_configuration.py](../tools/check_configuration.py) loads and relocates the original executables in Unicorn. Its [report](configuration-checks.json) records native configuration dispatch, 15 Y/U/clamp cases, the Z callback binding, the exact VGA mode/register sequence and five `CONFIG.EXE` LOADLOW cases. REALISM ordering is checked against the original store instructions and menu label pointers. These are isolated native checks, not a claim that a full mission has been emulated.
