Files
BT412/context/wintesla-port.md
T
arcattackandClaude Opus 4.8 52440e13b0 Audio: ENABLE the engine (relax dead AWE-card gate) + diagnose the real silence (task #50)
User reported never hearing any audio. Root-caused: the KB "Audio: DONE" was wrong.
The OpenAL playback chain IS fully implemented (device/buffers/sources; PlayNote
really calls alSourcePlay), but three gaps kept it silent:

1. GATED OFF (the "no sound" root cause): BTL4Application::MakeAudioRenderer returned
   NULL unless the pod's AWE_FRONT/AWE_REAR AWE32-card env vars were set -- authentic
   1995 pod behavior, dead on modern hardware, so the renderer was NEVER created.
   FIXED: default audio ON (BT_NO_AUDIO=1 restores silence; AWE vars still force-on).
   Verified: the OpenAL device now opens with no env vars ([audio] device OPENED).
2. Soundbank STUB: allPresets[2][100] (btstubs.cpp) is zero-init -> PRESET_isImplemented
   false -> 0 buffers load. Sample data exists (AUDIO1/2.RES: EnginePower/LaserAFire/...)
   but the event->sample map is gone (not in the decomp). STILL OPEN.
3. No triggering: the reconstructed game never creates AudioEntities on events. STILL OPEN.

So the device opens but nothing loads/plays yet -- enabling real sound needs the
soundbank reconstructed + the game triggers wired (a proper audio wave). Added a
BT_AUDIO_LOG trace harness across L4AUDRND/L4AUDRES/L4AUDLVL. KB corrected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 18:02:31 -05:00

3.8 KiB

id, title, status, source_sections, related_topics, key_terms
id title status source_sections related_topics key_terms
wintesla-port The WinTesla Windows Port — the base everything builds on established PROGRESS_LOG.md §5b, §8
source-completeness
rendering
build-and-run
multiplayer
WinTesla
L4D3D
MUNGA
RP
DPL

The WinTesla Windows Port

The Elsewhen RP411 archive is a working Windows port of the MUNGA engine (VS2005, WinTesla.sln). It means the hardest infrastructure is already solved — the bt411 build sits on top of it. Full detail: docs/PROGRESS_LOG.md §5b, §8.

What WinTesla already did (do NOT rebuild)

  • Renderer bypass: DONEMUNGA_L4/L4D3D.cpp + DXUtils replace libDPL / the IG board with Direct3D9. No libdpl.lib in the tree. (The early from-scratch D3D9 viewer was retired and removed.) [T1]
  • Audio: ENGINE ported but NOT wired end-to-end [T2, corrected 2026-07-15 — the old "DONE" was wrong]. OpenAL + libsndfile replace the HMI "SOS" engine, and the renderer→device→buffer→ source→play chain IS all implemented (L4AUDRND/L4AUDRES/L4AUDLVL; PatchLevelOfDetail::PlayNote really calls alSourcePlay). But there were THREE gaps, so the game is SILENT: (1) it was gated OFF — BTL4Application::MakeAudioRenderer returned NULL unless the pod's AWE_FRONT/AWE_REAR sound-card env vars were set (dead on modern HW; the real "no sound" root cause). RELAXED 2026-07-15 to default-on (BT_NO_AUDIO=1 disables); the OpenAL device now opens. (2) The soundbank preset table allPresets[2][100] (btstubs.cpp) is a zero-init STUB — no sound-event→sample mapping, so 0 buffers load. The sample DATA exists in AUDIO1/2.RES (EnginePower01, LaserAFire01-03, LaserASustain, …) but the map is gone (not in the decomp). (3) The reconstructed game never creates AudioEntities — no triggering on weapon fire / steps / engine. So enabling real audio = reconstruct the soundbank + wire the game triggers (a proper audio wave). Diagnostic harness: BT_AUDIO_LOG traces the chain (Initialize → device → buffers → play).
  • L4 HAL on Windows + the VS build system: DONE. [T1]
  • Red Planet game logic: COMPLETE & buildableVTV/VTVMPPR/WEAPSYS/.... RP is at/near playable. [T1]
  • Multiplayer: the DOS NETNUB driver is already replaced by a ~3.5k-line WinSock2 TCP reimplementation (MUNGA_L4/L4NET.CPP) + the master/replicant distributed-sim core. See multiplayer. [T1]

What BT still needs (the only remaining work below the game layer is NONE)

Everything below the game layer — engine, renderer, audio, HAL, build — exists and is shared. The ONLY thing BT needs is its game-logic source, which is gone (see source-completeness) → it must be reconstructed, with the three anchors (BT headers + the WinTesla engine to compile against + RP's parallel code + the binary oracle). [T2]

Build implications

  • WinTesla.sln is VS2005 and hard-depends on the legacy DirectX SDK (June 2010) (d3dx9, dinput, dxerr — all removed from the modern Windows SDK). The DXSDK is installed at C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\. [T2]
  • The shared engine builds GREEN to munga_engine.lib via CMake/MSVC Win32 (see build-and-run). Recipe gotchas (include-path shadowing, the CAMMGR/time.h fixes, the ATL shim) are in docs/PROGRESS_LOG.md §8. [T2]

Roadmap position

Old plan ("build a libDPL shim + port the engine") is superseded — WinTesla did it. New plan: reuse the WinTesla engine (shared) + reconstruct the BT game library (BT410_L4 + game logic). The from-scratch libDPL shim is no longer needed. Phases 4-8 (BT game layer + pod bring-up) still apply. [T2]

Key Relationships