# Direct executable launches

Verified against Personal Companion retail 3.42, using isolated copies of
`installs/deluxe_dnk/` in DOSBox 0.74-3. The original installation was unchanged.

## Flight without the menu

Run from the game installation directory:

```dos
3 -s -k
```

This reached the cockpit and runway without first running the menu, even after
removing `3.CMD`, `3D.CFG`, `MOAG.CFG`, `PILOT.HSC` and `TOWERS.DAT` from the test
copy. It provides a direct route into the default training flight. This was a
startup check, not a completed-flight/progression test.

`3 -s` also started flight with the existing menu-generated `3.CMD`. Without that
file, the same command reached joystick calibration instead. Adding `-k` avoided
that calibration. Bare `3`, `3 -i` and `3 -iy{k` all printed the refusal to run
directly. The `-s` argument therefore permits independent startup; there is no
requirement for an actual menu parent process. Its entry guard and the option dispatch are now traced; useful flags are listed below.

The normal batch returns from flight through `MOAG -_- -r`, which processes the
result and returns to the menu. Launching the engine alone omits that return
stage. For ordinary campaign play, `CORNCOB.BAT` remains the intended entry point.

## Flight-engine option dispatch

The normal 3.42 executable's table is at DS:`f48c`; its handlers occupy file
`0xd78e..0xd877`. The original `CMDLINE.ASM` supplies names, while the table and
consumers were checked in the retained executable. Flags are lowercase and can
be combined after one dash. `3.CMD` is read **after** the command line, so saved
numeric settings can override values supplied directly.

| Flag | Meaning |
| --- | --- |
| `-s` | Satisfies the direct-engine entry guard; normal batch uses this too. |
| `-k` | Disable joystick flight input/calibration and use keyboard. |
| `-i` | Start invulnerable. |
| `-f` | Grant experimental-aircraft throttle and ending permission. |
| `-r` | Read current world state from `3UNIV.DAT`. |
| `-h` | Request a reserve aircraft. |
| `-a` | Generate the airfields-only world rather than the normal training defences. |
| `-e` | Enable the developer world-copy key (release Right Shift); also initialise the AAA/KLA counts to zero. |
| `-b` | Other Worlds recording playback from `3DEMO.DAT`; recorder/playback code is absent from normal 3.42. |
| `-nN`, `-lN`, `-mN` | Training AAA, KLA-site and vehicle-site counts. |
| `-vN`, `-tN`, `-wN` | Their corresponding training qualities; `-uN` aliases `-tN`, `-xN` aliases `-wN`. |
| `-y` | Beginner flight assistance. |
| `-{` | Enable instructional/radio message boxes. |
| `-qN` | Force the pre-shift timing value instead of measuring the normal frame interval. |
| `-o` | Echo the command-file settings and pause during startup. |
| `-j`, `-g` | Joystick recenter/automatic-detection control bits. |
| `-d` | Set the diagnostic flag; many of its consumers are compile-time diagnostic branches. |
| `-cN` | Set the internal registration-code words. |

For example, `3 -skif` starts the default training flight with keyboard controls,
invulnerability and experimental-flight permission. Direct launch does not itself
supply a particular campaign world or process career results afterward.
`MOAG -_- -i` also accepts a front-end-wide invulnerability override; `-r` is its
normal post-flight return mode. The initial `-_-` is only a literal guard string,
not evidence that the program checks which parent process launched it.

## Other executables

| Invocation | Observed behaviour |
| --- | --- |
| `CCTITLE` | Runs the opening title/story sequence independently. Escape returns to DOS. |
| `MOAG -_-` | Runs the front end, including its initial title sequence. Bare `MOAG` refuses to start. |
| `JVCC input.jpg output.vga` | Converts an image independently. Converting the supplied `CAP1CJ.JPG` produced a byte-identical copy of the reference `CAP1CJ.VGA`. |
| `TOWER -_- 4 [filename]` | Opens airfield four from the supplied briefing file, defaulting to TOWERS.DAT. `-1` instead selects the boss screen. See [the complete helper contract](tower.md). |
| `ISCORE` | Bare invocation refuses to start. It expects shared reporting state, including references to `MOAG.CFG` and `3.RES`. |
| `RIMG`, `SRATS` | Both can run independently after BIOS video mode 10h has been selected. They draw into an existing graphics context; they do not initialise a complete application. |
| `SOADL` | Direct invocation has not been tested. |

To run the starfield independently from the project directory, use
`./run_srats_dosbox.sh`. It uses the same cycle setting as the normal launcher
and preserves the user's global DOSBox configuration. The ten-byte
`tools/MODE10.COM` helper selects BIOS video mode 10h before launching `SRATS`;
no additional configuration file is required. Press Enter for the portal
sequence or Escape to exit.

Audio was disabled during these tests, so standalone title/music-driver behaviour
was not verified.

## Evidence

The launch records include commands, removed state files, console output and
screenshots:

- [Initial direct launches](direct-launch-tests/results.json).
- [Argument/state and converter checks](direct-launch-tests-extra/results.json).
- [Fresh-state flight checks](direct-launch-tests-fresh/results.json).
- [Direct flight screenshot](direct-launch-tests-fresh/engine-standalone-k.png).
- [Cockpit helper capture](install-file-previews/rimg.png).
- [Starfield helper capture](install-file-previews/srats.png).
