# Doom Deck setup for an agent

Help the user install this extracted source pack. Read README.md and SETUP.md first. Work inside this folder and keep explanations short.

1. Confirm Windows x64 and the exact boards: Waveshare ESP32-P4-WIFI6-Touch-LCD-5 rev3.x, 32 MB flash, and three ESP32-S3-Touch-AMOLED-1.75, 16 MB flash / 8 MB PSRAM. Do not assume ports or reuse the creator's addresses.
2. Check Python 3.12, Git, CMake, Visual Studio C++ tools and ESP-IDF 5.5.5. Use the official links in SETUP.md for missing tools. Keep the app venv separate from IDF's environment.
3. Run prepare.py --sources. It fetches pinned upstream source and checks every modified file's hashes. Do not substitute a stock Crispy Doom executable: the telemetry hooks are required.
4. Obtain the original Doom 1.9 shareware archive from the SETUP.md link, or use the user's existing matching WAD. Run prepare.py --shareware-zip or --wad. Do not bundle or upload the WAD, artwork, music or generated sprites. Download SDL development packages separately, then run Build-Game.ps1 with their extracted paths.
5. Identify each round board's actual Wi-Fi station MAC. Ask which physical display should show health, ammo and mission. Run prepare.py with all three MAC flags. It creates private credentials used by both firmware builds; never log, publish or replace existing credentials silently.
6. Build P4 and S3 from the IDF terminal and run the host tests. Resolve build/test failures before flashing. Check the physical displays after installation.
7. Before flashing, show the user the exact board, port, role and firmware to be written and obtain their approval. Read and verify each board's full factory flash first; record identity and hash. Stop on unexpected chip/revision/flash size, secure boot or encryption. Never alter eFuses or C6 firmware. Use each board's own backup for recovery.
8. Explain that the large display connects directly to PC USB; round displays need wired power only and receive HUD data over private Wi-Fi. No router setup or internet-facing ports. Do not wire live power or join two 5 V sources.
9. Start-Doom.ps1 launches the patched game, local bridge and USB/wireless sender. Check actual gameplay values on all screens and reconnection after P4 reset with the user. Keyboard, mouse and sound stay on the PC.

Code map: `experiments/doom_hud/host` is the loopback bridge and HUD transport; `satellite/main` renders the round HUDs; `wireless/hud_wire.h` defines protocol/roles. `experiments/p4_pc_stream/pc` captures the game window and streams JPEGs over WinUSB. `source-changes.json` contains only changes/new code applied to fetched Crispy Doom and P4 sources. Local `wireless_private`, `runtime`, generated `doom_assets.*`, dependencies and build outputs are excluded from the distributed pack.

Follow the user's setup request. Get approval before flashing, and leave unrelated projects alone.
