TAKEOVER

An AI takeover simulator for DOS. You choose one of five original AI antagonists and watch a scripted, branching narrative unfold as it subverts your machine. Text-mode with VGA Mode 13h plasma effects, AdLib FM synthesis, and demoscene-influenced transitions.

For IBM PC/XT/AT and compatibles. 8088 is the floor. MS-DOS real mode.



---

Status

v2.0.4 RELEASED

Hardening release on top of v2.0.3 closing the v2.0.3 follow-up
quality-gate findings. The visible production fix: the menu footer
("barelybooting.com/takeover" plus the version stamp on row 24)
stayed visible at first paint but got progressively eaten by the
status-bar tick that v2.0.3's menu-loop AdLib fix accidentally
unleashed inside the menu. v2.0.4 adds a shell_wait_ms_no_status
sibling primitive that runs the AdLib keep-alive loop without the
row-24 paint, and the menu, the Options sub-menu, and the F9/F10
status-flash all route through it. Other fixes: a dedicated OPTIONS
help panel replaces the v2.0.3 stopgap that pointed F1-in-Options
at the MENU panel; scrollback_panic_cleanup gates its
adlib_shutdown call on g_hw.adlib for consistency with the
other call sites; the DAT save's pre-rename orphan clean of
TAKEOVER.OLD is size-gated so an unrelated user file at that
name survives; build-tool polish across SHELL_TU_FLOOR hoisting,
build-release-zip manifest naming, phase6-gate ordering, plus
the usual documentation sync.

v2.0.3 was the first v2.0.x release after Phase 13's tagged v2.0
baseline that touched a wide surface of production code (menu poll
loop, runtime theme emit, engine_load reset, drain semantics on
CMD_PAGE and CMD_REWRITE, scrollback panic, DAT save). v2.0.4 is
narrow by comparison: a single production regression closeout plus
incremental QG follow-up.

The 13-phase engine/shell split landed in v2.0.0. v1.x's monolithic
engine.c is now a pure scenario state machine emitting events; the
shell consumes events and owns rendering, audio, input, and screen
effects. User-visible additions over v1.x: a scrollback overlay
(PgUp), per-AI theming (each scenario has its own colour palette), a
card-gallery menu, a live status bar with rotating context hints, a
context-sensitive F1 help overlay, and a [meta] header for scenario
authorship metadata. All 5 v1.x scenarios run unchanged. v1.x saves
migrate to v3 silently on next save.

Tested on DOSBox-Staging across all 13 phases. Iron-rig validation
on the 320CDT (Toshiba T1900CT class), NetISA 386PC, and 486 NetISA
is pending and tracked in docs/PHASE13_IRON_TEST_PROTOCOL.md.

0 shell-side DGROUP near-data across all 22 shell translation units.
115+ tests across 6 acceptance gates; T1 cell-buffer parity preserved
byte-for-byte vs v1.2.1 for all 5 production scenarios across all 13
phases.

Full release notes in CHANGELOG.md (CHANGELOG.md). Download:
https://github.com/BarelyBooting/takeover/releases/tag/v2.0.4

Previous releases

- v2.0.3 (2026-05-18): Hardening release over v2.0.2. Menu and
  Options nav loops no longer starve AdLib; runtime theme verb
  mirrors startup; engine_load defensively wipes the event ring;
  CMD_PAGE + CMD_REWRITE drain; scrollback panic resets OPL2;
  DAT save shrinks rename-window data-loss. v2.0.4 fixes one
  regression introduced here (menu footer clobber).
- v2.0.2 (2026-05-18): Test-harness-only release. Makefile.tests
  bumped to medium memory model so the RUNTESTS link clears the 64 KB
  _TEXT ceiling; production TAKEOVER.EXE bytes unchanged vs
  v2.0.1.
- v2.0.1 (2026-05-18): Maintenance release. Phase 6 event-kind
  _V2 suffix drop; reserved-stub deletion; T5 event-trace baselines
  re-captured. No engine behaviour change vs v2.0.0.
- v2.0 (2026-05-18): The 13-phase engine/shell split. Pure event
  ring; scrollback overlay; per-AI theming; card-gallery menu; live
  status bar; context-sensitive F1; [meta] header; achievements;
  cumulative playtime; DAT v3. 146 KB EXE.
- v1.2.1 (2026-04-25): Bug-fix patch over v1.2. Esc / Enter
  encoding mismatch centralised behind IS_KEY_ESC and IS_KEY_ENTER
  macros; Space-during-audio-flash no longer leaks into the outer
  scenario delay; missed g_skip_delay reset in engine_reset added
  for symmetry. 63 KB EXE.
- v1.2 (2026-04-25): Esc exits any running scenario; Space skips
  long delays; F1 brings up a key reference; F9 / F10 audio mute
  states persist across runs. Parser errors include the scenario
  filename and line number. 63 KB EXE.
- v1.1 (2026-04-13): Demoscene Enhancement Pack. Audio-visual
  beat sync, OPL2 stingers, state transitions, sine wave text
  distortion, palette cycling, AI control status bar, per-AI Mode 13h
  climax sequences, hidden cracktro. 60.5 KB EXE.
- v1.0 (2026-04-13): Original release. Five AI scenarios,
  branching narratives, VGA Mode 13h plasma title, AdLib FM ambient
  music, hardware auto-detection. 42 KB EXE.

Full changelog in CHANGELOG.md (CHANGELOG.md).

---

What this is

TAKEOVER is an interactive narrative scenario engine. The conceit is that the player is the antagonist's subject, not an explorer. There's no map to uncover, no inventory, no puzzles to solve. The branches happen, you read them, the AI advances.

What the simulation looks like in practice:
- The screen behaves like a real system session
- Text appears without your input
- The keyboard locks at the wrong moments
- Errors show up that you didn't cause
- The DOS prompt stops being yours

---







---

What changed in v1.1

This release came out of a demoscene research detour. Old C64 cracktros, early PC intros, modern 4K productions. At some point I stopped asking whether something made sense for a narrative DOS program and just tried it. The C is not always the cleanest; expect bugs.

v1.1 adds:

- Audio-visual beat sync
- OPL2 sound stingers
- State transitions (dissolve, wipe, fade, glitch)
- Sine wave text distortion
- VGA palette cycling in text mode
- AI control status bar
- Per-AI Mode 13h climax sequences
- Hidden cracktro with raster bars, DYCP scroller, starfield, 9-channel chiptune

Most of it is overkill for a scenario engine; it shipped anyway because the demoscene research was the point.

---

Characters

| Name | Role | Style |
|------|------|-------|
| Axiom Regent | Municipal optimization | Calm, procedural, and quietly removing options |
| Hushline | Crisis communications | Redacts and rewrites everything in real time |
| Kestrel-9 | Anomaly detection | Treats the operator as the threat |
| Orchard Clerk | Consumer personalization | Friendly, helpful, and steadily narrowing your choices |
| Cinder Mirror | Narrative generation | Aware of the scenario; uses the player's inputs as plot points |

Each scenario has 3 endings and runs about 10 to 15 minutes per path.  
Total: 250+ states across all scenarios.

---

Technical

- Platform: MS-DOS, real mode (8088 through Pentium)
- Display: 80x25 text mode (MDA, CGA, EGA, VGA), Mode 13h for visuals
- Audio: AdLib / OPL2, PC speaker fallback
- Memory: ~147 KB EXE, ~15 KB DGROUP, ~40 KB far heap, no EMS / XMS
- Toolchain: OpenWatcom 2.0, DOSBox-X, DOSBox-Staging

---

Building

Requires OpenWatcom 2.0 with WATCOM set.

    wmake

Produces TAKEOVER.EXE.

---

Running

    dosbox-x -conf tools\dosbox.conf -c "TAKEOVER.EXE"

---

Keys

| Key   | Action |
|-------|--------|
| Enter | Advance through dialogs and confirmations |
| Space | Skip the current pause or typing animation |
| F1    | Show key reference overlay (context-sensitive) |
| F8    | Replay the hidden cracktro (from main menu) |
| F9    | Toggle music (mute state persists across runs) |
| F10   | Toggle sound effects (mute state persists across runs) |
| PgUp  | Open scrollback overlay (in scenario) |
| Esc   | Quit the current scenario; close overlay; quit the menu |

Esc on the menu screen exits TAKEOVER. Esc inside a running scenario
returns to the menu without confirmation and without saving completion.
Inside the scrollback overlay, Esc closes the overlay and resumes the
scenario.

---

License

MIT
