Walkman in the browser: the source of doshd.com/walkman/

Walkman is by Maksym Bilan (M4X): walkman.c, a platformer for the terminal written as
one C file shaped like a Walkman. Source: github.com/maximbilan/walkman (MIT; see LICENSE).

What is here
  walkman.c      the author's file, byte for byte as at commit 77320dbc
  LICENSE        the author's MIT licence, byte for byte
  port/shim.h    force-included before walkman.c; renames fork, execlp, _exit, fflush
  port/shim.c    usleep, gettimeofday, getpid and system for a page
  port/pre.js    the terminal size, the keys and the output, handed to the page
  port/build.sh  the build (Emscripten 6.0.13)
  page/term.js   the page's terminal: draws the game's output, sends its keys, plays its sound

walkman.c is not changed. Everything a browser does differently lives in port/ and page/:
  usleep        waits for the browser instead of blocking the page
  gettimeofday  a clock that stands still while the page is paused
  getpid        a random level seed (a page has no process id)
  fork, execlp  play the game's own WAV files through the browser's audio
  system        stty does nothing: the page's terminal is already raw
  read, write   the page's keys in, the game's terminal bytes out
  ioctl         the terminal size the page picked

The port layer and term.js are MIT licensed too, under the same terms as LICENSE.
Made for doshd.com by Aviv with AI agents. Not for sale.
