# Third-Party Licenses

This file inventories every third-party component JoeyLib depends on,
either at runtime (linked into the produced binaries) or at build /
test time. Components are grouped by role; within each group entries
list the platforms that consume the component, the upstream URL, and
the license.

When upstream license terms change, update the corresponding row here.

---

## Runtime libraries (linked into joeylib output binaries)

These ship as part of, or are linked into, an executable built by
JoeyLib. License compatibility for these matters most.

### libxmp-lite

- **Used on:** DOS, Atari ST
- **URL:** <https://github.com/libxmp/libxmp>
- **License:** MIT
- **Role:** ProTracker / Amiga MOD replayer + SMIX SFX overlay. Linked
  into AUDIO binaries on the chunky-display platforms.
- **Vendored at:** `toolchains/audio/libxmp-lite/`

### NinjaTrackerPlus (NTP)

- **Used on:** Apple IIgs
- **URL:** <https://www.ninjaforce.com/html/products_software.html>
  (downloads from <https://www.ninjaforce.com/downloads/>)
- **License:** No explicit license in the source distribution; written
  by Jesse Blue (NinjaForce). Treated here as free for use; consult
  upstream before commercial redistribution.
- **Role:** Apple IIgs Ensoniq DOC `.NTP` module replayer + SFX
  streamer. Merlin32-assembled and **linked** into the AUDIO binary as
  bytes (see `make/iigs.mk` `$(NTP_HEADER)` rule).
- **Vendored at:** `toolchains/iigs/ntp/ninjatrackerplus.s` (source);
  build product baked into `examples/audio` AUDIO binary.

### PTPlayer

- **Used on:** Amiga
- **URL:** <http://aminet.net/mus/play/ptplayer.lha>
  (author Frank Wille, <http://aminet.net/package/mus/play/ptplayer>)
- **License:** Public Domain
- **Role:** ProTracker MOD replayer + `mt_playfx` SFX channel for the
  Paula audio HAL.
- **Vendored at:** `toolchains/amiga/ptplayer/`

---

## Build-time toolchains (NOT linked, used to produce binaries)

These run on the developer's machine to compile / assemble / link
JoeyLib for each target. They are not redistributed inside the
produced game binaries.

### llvm-mos (clang / llvm-mc / link816 w65816 toolchain)

- **Used on:** Apple IIgs
- **URL:** <https://github.com/llvm-mos/llvm-mos>
- **License:** Apache License 2.0 with LLVM Exceptions (the upstream
  LLVM license).
- **Role:** clang C compiler targeting the 65816, plus llvm-mc for
  assembling hand-written `.s` files and link816 for producing OMF
  S16 executables. Driven by `toolchains/iigs/clang-build.sh`; the
  toolchain root is located via the `LLVM816_ROOT` environment
  variable.
- **Vendored at:** `toolchains/iigs/llvm-mos/`

### Merlin32

- **Used on:** Apple IIgs
- **URL:** <https://brutaldeluxe.fr/products/crossdevtools/merlin/>
- **License:** Freely distributed by Brutal Deluxe Software
  (Olivier Zardini, Antoine Vignau). Source published with no
  formal open-source license header — Brutal Deluxe's "open source
  philosophy" but copyright is retained. Treat as "free to use,
  redistribute as part of a build chain; ask before forking
  commercially."
- **Role:** 65816 cross-assembler. Builds NinjaTrackerPlus.
- **Vendored at:** `toolchains/iigs/merlin32/`

### Bebbo m68k-amigaos GCC toolchain

- **Used on:** Amiga
- **URL:** <https://github.com/AmigaPorts/m68k-amigaos-gcc>
- **License:** GNU GPL v2 (gcc, binutils, libnix); per-component
  copyrights listed in upstream `README.md`. Includes assets covered
  by individual permissive notices (Roadshow, fd2pragma public
  domain, ira freeware, etc.).
- **Role:** AmigaOS HUNK-format gcc + binutils + libnix used to
  compile the Amiga port and link against PTPlayer.
- **Vendored at:** `toolchains/amiga/gcc/`

### vasm

- **Used on:** Amiga (PTPlayer only)
- **URL:** <http://sun.hasenbraten.de/vasm/>
- **License:** vasm custom license — © Volker Barthelmann; free for
  non-commercial use, plus an explicit **commercial-use exception
  for M68k + AmigaOS targets** (see vasm distribution README). Other
  commercial use requires written permission. JoeyLib's only
  remaining vasm invocation is `ptplayer.asm` on the Amiga path,
  which falls under the M68k+AmigaOS exception.
- **Role:** Assemble third-party `ptplayer.asm` (Frank Wille's
  Devpac/vasm-syntax source). Our own `.s` files are GAS syntax and
  go through `m68k-amigaos-as` (binutils, GPL) instead.
- **Vendored at:** `toolchains/amiga/vasm/`

### m68k-atari-mint GCC toolchain (Thorsten Otto builds)

- **Used on:** Atari ST
- **URL:** <https://tho-otto.de/download/mint/>
  (gcc upstream: GNU; mintlib: <https://github.com/freemint/mintlib>)
- **License:** GNU GPL v2 (gcc, binutils); mintlib is a mix of GPL
  and permissive (per-file headers).
- **Role:** GEMDOS-native gcc + binutils + mintlib used to compile
  the Atari ST port.
- **Vendored at:** `toolchains/atarist/gcc/`

### DJGPP (build-djgpp packaging)

- **Used on:** DOS
- **URL:** <https://github.com/andrewwutw/build-djgpp>
  (DJGPP upstream: <http://www.delorie.com/djgpp/>)
- **License:** Build script GNU GPL v3; bundled gcc/binutils GNU
  GPL v2; DJGPP runtime libraries (libc) are mostly public-domain or
  permissive — see DJGPP `readme.1st`.
- **Role:** 32-bit protected-mode gcc cross-compiler producing
  COFF binaries that run on 386+ DOS via DPMI.
- **Vendored at:** `toolchains/dos/djgpp/`

### CWSDPMI

- **Used on:** DOS
- **URL:** <https://sandmann.dotster.com/cwsdpmi/>
- **License:** Custom redistribution terms (Charles W. Sandmann,
  © 1995–2010). Binary may be redistributed without source provided
  the executables are unmodified and end users are notified of
  source availability — full terms in `cwsdpmi.doc`. Source is
  GPL-licensed if distributed.
- **Role:** Stubbed-into-binary DPMI server for DJGPP-compiled DOS
  executables (via `embed-dpmi.sh`).
- **Vendored at:** `toolchains/dos/cwsdpmi/`

### NASM

- **Used on:** DOS
- **URL:** <https://www.nasm.us/>
- **License:** 2-clause BSD
- **Role:** Assembler for x86 inline-asm support files in the DOS
  port.
- **Vendored at:** `toolchains/dos/nasm/`

---

## Test-time emulators (not shipped, not linked)

Used by `scripts/run-*.sh` to run the produced binaries on the
developer's machine. Not part of any redistributed artifact.

### GSplus (KEGS fork)

- **Used on:** Apple IIgs
- **URL:** <https://github.com/digarok/gsplus>
- **License:** GNU GPL v3
- **Vendored at:** `toolchains/emulators/gsplus/`

### MAME

- **Used on:** Apple IIgs (apple2gs driver, optional)
- **URL:** <https://www.mamedev.org/>
- **License:** GNU GPL v2+ (GPL-2.0-or-later) plus a 3-clause BSD
  alternative for some components.

### Hatari

- **Used on:** Atari ST
- **URL:** <https://www.hatari-emu.org/>
- **License:** GNU GPL v2

### DOSBox

- **Used on:** DOS
- **URL:** <https://www.dosbox.com/>
- **License:** GNU GPL v2

### FS-UAE

- **Used on:** Amiga
- **URL:** <https://fs-uae.net/>
- **License:** GNU GPL v2 (UAE codebase)

### EmuTOS

- **Used on:** Atari ST (TOS replacement for Hatari)
- **URL:** <https://emutos.sourceforge.io/>
- **License:** GNU GPL v2
- **Vendored at:** `toolchains/emulators/support/emutos-512k.img`

---

## System ROMs and disk images (used for testing only)

These are **not** part of JoeyLib distribution and **not**
redistributed. They are downloaded to the developer's local cache by
`toolchains/install.sh` for emulator-side testing only. License terms
prohibit redistribution; please consult the source if you intend to
ship anything that depends on them.

### Apple IIgs ROM 03

- **Used on:** Apple IIgs (GSplus, MAME)
- **URL:** Various preservation archives, e.g.
  <https://mirrors.apple2.org.za/ftp.apple.asimov.net/emulators/rom_images/>
- **License:** Apple Inc. proprietary firmware. Provided here for
  developer testing only; **do not redistribute** as part of any
  derivative project.

### Apple IIgs System 6.0.4

- **Used on:** Apple IIgs (GSplus boot disk)
- **URL:** <https://mirrors.apple2.org.za/ftp.apple.asimov.net/images/gs/os/gsos/>
- **License:** Apple Inc. proprietary OS. Same caveat as the ROM.

### Apple IIgs apple2gs MAME ROM set

- **Used on:** Apple IIgs (MAME testing path)
- **URL:** Same preservation archives as above.
- **License:** Apple Inc. proprietary firmware. Required for MAME's
  apple2gs driver but not redistributed.

### Amiga Kickstart ROM (optional)

- **Used on:** Amiga (FS-UAE, optional — falls back to AROS)
- **URL:** Cloanto / Amiga Forever (commercial), or original media.
- **License:** Cloanto / Amiga Corp. proprietary. JoeyLib does **not**
  bundle Kickstart; users supply their own ROM at
  `toolchains/emulators/support/kickstart.rom` if they have one.

---

## Maintenance

When adding a new third-party dependency:

1. Append a row in the appropriate section above.
2. Record platform(s), upstream URL, license name, and a one-line
   role description.
3. If the dependency is vendored, list the path under
   `toolchains/`.
4. If license terms restrict redistribution, call that out
   explicitly (as we do for Apple ROMs).
