# Hatari + EmuTOS — built here, not modified in behaviour

| | |
|---|---|
| Hatari source | https://framagit.org/hatari/hatari.git |
| Pinned at | `f4d65f4cec7dec03510c01089e0be838dd8d58a4` |
| Licence | GPL-2.0-or-later (`LICENSE-hatari.txt`) |
| EmuTOS | 1.4, 192 and 256 KB images (`tos/`), GPL-2.0 (`LICENSE-emutos.txt`), unmodified, from https://sourceforge.net/projects/emutos/files/emutos/1.4/ |
| Refreshed by | `node tools/fetch-hatari.mjs` |

`hatari.js` and `hatari.wasm` are compiled from that commit with Emscripten.
**Do not edit them** — the next refresh overwrites them. The build changes two
CMake files, neither of which touches what the emulator does:

- `src/cpu/CMakeLists.txt` — a first `if(HATARI_PREGENERATED_CPU)` branch:
  the generated 68000 core is produced beforehand (their `build68k` and
  `gencpu`, compiled with emcc and run under Node, since the build machine
  has no host C compiler), so CMake takes the files as they are.
- `src/CMakeLists.txt` — the link line drops `--preload-file` (the TOS is
  written by the player) and exports `FS` and `callMain` with
  `INVOKE_RUN=0`, so the player starts `main()` itself with its arguments.

Two files are Emulo's, prefixed so a listing shows which:

- `emulo.html` — the page, hand-written.
- `emulo-player.js` — the protocol the shell speaks, over `postMessage`.
