CydandClaude Fable 5 d8aea8d871 BT410 5.3.91: the gait transition machine -- two channels, one table, and a reverse cycle that has been misread twice
mech2.cpp exists. Six of its twelve functions are reconstructed: the two
Set*Animation binders, the two *Transition tails, and both *ClipFinished jump
tables (@0x4a69aa leg / @0x4a6e0a body). Compile-verified, BT 51/51, links
clean.

TWO CHANNELS, DELIBERATELY NEAR-DUPLICATE.  A mech runs two clip channels over
the same states and the same clips; only the speed they consult differs:

  LEG  reads the LIVE mapper GetSpeedDemand() -- responds to the stick at once
  BODY reads bodyTargetSpeed, a snapshot -- which is what lets a dead-reckoned
       or networked mech walk with no controls mapper of its own

So LegClipFinished and BodyClipFinished are twins rather than one shared
routine, exactly as the binary has them.  Kept that way on purpose: where the
two jump tables agree, a divergence in this file is a bug, and that mutual
check is worth more than the duplication costs.

EVERY CLIP IS ONE STRIDE, which is why every state is handed -- a walk is
Right, Left, Right, and each entry to and exit from a cycle has its own handed
pair so the mech always leaves on the correct foot.  The 29-state enum is
VERBATIM from the 0x3c-stride name table at .data:0050cfe8, the table the
"Unsupported mech animation" assert indexes, so the names and their order are
the original's rather than inferred from behaviour.

THE COMMIT TEST.  Both exits that leave a walk cycle test the demand AND the
current cycle speed slewed by one carryover:

    if (demand < standSpeed && (cycle - rate*carryover) < standSpeed) -> stop
    if (demand > walkStride && (cycle + rate*carryover) > walkStride) -> run

Requiring both is what stops a momentary flick of the stick yanking the mech
out of a stride it has already committed to.  Drop either conjunct and you get
a mech that stutters between gaits on noisy input.

TWO THINGS THAT READ WRONG AND ARE NOT:

  gimpStrideLength is authored NEGATIVE.  The cycle time from it comes out
  negative and is folded positive before being spent (@0x4a6c6e / @0x4a6d3d).
  That fold is not defensive coding -- remove it and the limp plays backwards.

  States 16-19 on the body channel are the REVERSE gait, not a limp, despite
  sharing the gimp caps.  BT411 records misreading these as "gimp, fall back to
  standing" TWICE; that makes the body loop stand -> reverse-entry forever, a
  slow reverse with a wrong-footed exit.  Read here by structural symmetry with
  the leg table, where every previously-decoded body case mirrors its leg twin.

DEFERRED, and named in the sidecar: the four Advance* per-frame entry points
and the two Gimp*ClipFinished limp machines -- with them the gimp-level branch
at the top of both *ClipFinished, so a limping mech currently runs the normal
machine.  That branch needs a TU-safe read of the graphic alarm level (BT411
routes it through a mechdmg bridge to dodge an AlarmIndicator ODR split), worth
reproducing carefully rather than reaching for the alarm directly.

NOTHING CALLS ANY OF THIS YET.  The Advance* functions are the entry points and
they are the deferred half, so no gait state is ever selected and a run behaves
exactly as before.  Same caveat as 5.3.90: a blocker removed, not a behaviour
delivered.

HEADER: MECH.HPP gains the enum, six declarations, and the channel state --
legStateAlarm/bodyStateAlarm (read via GetLevel; the binary's +0x3b0/+0x728 are
mirrors of the alarm level, so no separate int is kept), legCycleSpeed,
bodyCycleSpeed, forwardCycleRate, gimpCycleRate, standSpeed, gimpSpeedMax,
gimpStrideLength, globalTimeScale, animationClips[0x1d].  41 ints carved from
reservedState, 191 -> 150.  walkStrideLength/reverseStrideLength/
reverseSpeedMax/bodyTargetSpeed already existed from the Phase 5.3 locomotion
work and are reused.

STILL UNSOURCED: animationClips[] is declared but nothing fills it.  The clip
handles come from the mech's model resource and must be resolved before the
Advance* increment, or SetLegAnimation hands SelectSequence a garbage ID.  It
fails soft (SelectSequence tolerates a missing resource with an inert
controller) but it is a hard prerequisite for the gait doing anything.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 01:14:02 -05:00

Tesla Release 4.10 — Tesla:BattleTech & Tesla:Red Planet

Source code and game content for Tesla:BattleTech and Tesla:Red Planet, the two games that ran on the Tesla-generation simulator cockpits built by Virtual World Entertainment, Inc. (VWE). Source file headers are dated 19941996; this tree corresponds to release 4.10 of the Tesla software.

This repository is an archival snapshot. The tree is preserved byte-for-byte as found (see .gitattributes — no line-ending conversion is applied).

See emulator/PLAN.md for the implementation plan to run these games on the surviving cockpits' Windows 10 computers via a VPX-board HLE device in DOSBox-X, with the cockpit RIO (COM1) and plasma display (COM2) passed through to the game's original drivers.

See HISTORY.md for findings from a recovered VWE developer hard drive that accompanies this tree (excluded from the repo), including Division renderer source, runnable game builds, unreleased prototypes (Star Trek, Hull Pressure, Renegade Legion, and the Starship Troopers pitch that became DisneyQuest's "Invasion!"), and an analysis of whether these games can be rebuilt from the sources in this repository (summary: the engine can, the games cannot — most game-logic sources are absent from this cut).

Target hardware

Each Tesla cockpit was driven by a server-class Pentium Pro machine running Novell DOS. Graphics were split across two adapters:

  • The main (out-the-window) display was rendered by one of the first pixel-pipeline 3D accelerator cards ever made, driven through Division Ltd.'s dVS/DPL libraries (libDPL — DPL, dsys, dvs, and the VPX headers; Division copyright 1995).
  • An S3 video adapter drove the other six cockpit displays (instrument and gauge screens — see the GAUGE content directories and the PCPIC.INC / L4GAU* gauge code).

Other hardware/OS interfaces:

  • Audio: HMI SOS (Sound Operating System) — sos/ libraries, with variants for Borland (bc4) and Watcom (wc).
  • Networking: pods were networked over Ethernet using WATTCP (DOS TCP/IP, with BOOTP) via VWE's NetNub layer.
  • Input: joystick/pedal/panel I/O in assembly (JOYSTICK.ASM) and the L4CTRL* control modules.

Toolchain

  • Borland C++ 5.0 (BCC) with TASM32 for assembly — see the .MAK makefiles (original build tree lived at D:\TESLA_RP\ and D:\BC5\).
  • Precompiled-header discipline throughout (.CSM headers, #pragma hdrstop).
  • VSSVER.SCC / MSSCCPRJ.SCC files are remnants of the original Visual SourceSafe source control.
  • File extensions: .CPP/.HPP C++ source/headers, .TCP/.THP C++ template source/headers, .MAK Borland makefiles.

Repository layout

ARTTOOLS/   (empty placeholder — art tools were not included in this snapshot)
BORLAND/    (empty placeholder — compiler was not included in this snapshot)
CODE/       Game and engine source (~200k lines of C++/asm)
CONTENT/    Game data: models, animations, audio, maps, textures, gauges
HEADOFF/    Head/camera offset calibration configs for the cockpit displays

CODE/

Both games share the same architecture: a portable simulation engine (MUNGA, VWE's in-house engine) plus a hardware layer (MUNGA_L4, the "L4" Tesla pod platform layer), with game-specific code and a game-specific L4 layer on top.

CODE/BT/                Tesla:BattleTech
  BT/                   Game logic: mechs, weapons (PPC, Gauss, missiles),
                        damage tables, teams, missions, scenario rules
  BT_L4/                BattleTech pod application layer (app modes, arena,
                        radar, playback, version)
  MUNGA/                Engine bricks: math (matrices, angles, splines),
                        containers, file streams, audio manager, events
  MUNGA_L4/             Pod hardware layer: video renderer manager, keyboard,
                        mouse, audio hardware, warehouse (resource loading)
    LIBDPL/             Division Ltd. dVS/DPL graphics library (headers +
                        LIBDPL.LIB + VREND*.BTL renderer modules)
    NETNUB/             WATTCP-based pod networking (headers + WATTCPLG.LIB)
    SOS/                HMI Sound Operating System libraries + drivers

CODE/RP/                Tesla:Red Planet (same structure)
  RP/                   Game logic: VTV (hover racer) power/subsystems,
                        pickups (booster, blocker, crusher, thruster)
  RP_L4/                Red Planet pod application layer
  MUNGA/                Engine (fullest copy — 351 files incl. all .CPP)
  MUNGA_L4/             Pod hardware layer (fullest copy, incl. JOYSTICK.ASM)
    libDPL/, NetNub/, sos/   as above
  */opt/                Compiled Borland C++ 5.0 object files from the
                        original build (preserved as found)

Note: the BT copies of MUNGA/MUNGA_L4 are partial (69/68 files) while the RP copies are complete (351/231 files) — the BT tree appears to hold only the files that diverged from the shared engine.

CONTENT/

CONTENT/BT/             Tesla:BattleTech content
CONTENT/BT3025/         Parallel BattleTech content set (3025-era variant;
                        mostly identical to BT/ with a different mech roster)
CONTENT/RP/             Tesla:Red Planet content

Per-game content directories:

Dir Contents
MODELS .MOD/.SUB/.DMG/.TBL — vehicle/mech models, subsystems, damage tables
ANIMS .ANI — animations (BT only)
AUDIO .MID MIDI music, .SCP audio scripts, .BNK/.BLD banks
GAUGE .GIM — gauge images for the six S3-driven cockpit displays
MAPS .MAP/.ZNE — arena/terrain maps and zones
SOLIDS .SLD — collision solids
VIDEO Division renderer data: GEO/ geometry, MAT/ materials, and TEX/ textures per environment (ARENA, DAY, NIGHT, DESERT, POLAR, CAVERN, …), .DZM skins, .BMF/.BGF binary geometry, BUILD/ sources
SCENES Scene definitions (RP only)
BTCAM Camera batch setups (BT only)

DIVISION.SAV subdirectories inside VIDEO/ are backup saves written by Division's tools. MTMCDAI.SYS (Mitsumi) and TAISATAP.SYS are DOS CD-ROM device drivers used on the pod machines.

HEADOFF/

INI-style calibration files (.XST/.CAM/.BAK) defining viewing extents and camera offsets ("head offset") for the cockpit's main display, including a [LAB_ONLY] configuration.

The team

From a published VWE BattleTech credits page (scan supplied to this archive, July 2026). The roster matches the 19941996 source in this tree — see the cross-references below the table.

Role Name(s)
Producer and Designer Jordan Weisman
Art Director David McCoy
Technical Director J.M. Albertson
Audio Director Eric Huffman
Corporate Director of Technology Bill Redmann
Software Engineers
— Framework and Simulation Design J.M. Albertson
— Secondary/Auxiliary Screens and Low Level I/O Chris Brewer
— Low Level I/O Design and Programming Marek Ciolek
— Framework and 3D Video Rendering Greg Corson
— Animation Simulations and Tools Jerry Edsall
— Macintosh Design and Programming Garth Hermanson
— Framework and 3D Audio System Eric Huffman
— Simulation Code and Cameras Joanna Mason
— Graphics Research and Art Tools Ken Olsen
— Simulation Code and 'Mech Internal Systems Gabe Underwood
Artists & Animators
— 3D Art and Animations Tom Burlington, Duane Molitor, David McCoy, Lex Story
— Allen Workshop 2D Art Victor Bonilla, Tom Peters
Software Tools Group Leader Ken Olsen
Sound Samples/Designs Bing McCoy, Tom Effinger, Eric Huffman

Cross-references to this tree:

  • // Author: headers in CODE/ name four of the credited engineers: J.M. Albertson (MUNGA math/debug bricks — LINE, SPHERE, DEBUG*), Jerry Edsall (TOOL, FILEUTIL, the BT/RP *TOOL modules), Ken Olsen (NAMELIST, NOTATION template containers), and Eric Huffman (CSTR, MEMREG, SCHAIN).
  • The pod-lab per-developer update scripts on the recovered developer drive (see HISTORY.md) are named Chris, Gabe, Joanna, and Jordan — matching Chris Brewer, Gabe Underwood, Joanna Mason, and Jordan Weisman.
  • Garth Hermanson's "Macintosh Design and Programming" credit fits the venue side: the operator console the pods connect to was a Macintosh application.

Provenance

  • Copyright (C) 19941996 Virtual World Entertainment, Inc. All rights reserved worldwide. Original headers mark the source as proprietary and confidential.
  • Third-party components retain their own copyrights: Division Ltd. (dVS/DPL), Human Machine Interfaces (SOS), Erick Engelke / University of Waterloo (WATTCP).
S
Description
No description provided
Readme
437 MiB
Languages
C++ 21.7%
1C Enterprise 21.3%
C 20.2%
Assembly 14.9%
Scheme 5.9%
Other 15.5%