xboxrecomp — third-party attribution
====================================

xboxrecomp is MIT licensed (see LICENSE). The components listed below are
not, and are included here under their original licences with their original
copyright intact. They are other people's work and are credited as such.


GPL-2.0-or-later — the MCPX DSP core, from xemu by way of Hatari
----------------------------------------------------------------

  READ THIS FIRST IF YOU DISTRIBUTE A BINARY.

  Everything else in this repository can be linked into a proprietary or
  MIT-licensed program. The files in src/apu/dsp/ cannot. They are the
  DSP56300 emulator that the Xbox's audio DSP runs on, and they descend from
  Hatari's DSP M56001 emulation, which is GPL:

    src/apu/dsp/dsp.c          MCPX DSP emulator
    src/apu/dsp/dsp.h          (c) 2015 espes; 2020-2025 Matt Borgerson
    src/apu/dsp/dsp_state.h    Adapted from Hatari DSP M56001 emulation,
    src/apu/dsp/dsp_cpu.c      (c) 2001-2008 ARAnyM developer team,
    src/apu/dsp/dsp_cpu.h      adaption to Hatari (c) 2008 Thomas Huth
    src/apu/dsp/dsp_cpu_regs.h
    src/apu/dsp/dsp_emu.c.inc
    src/apu/dsp/dsp_dis.c.inc
    src/apu/dsp/debug.h

  src/apu/dsp/dsp_compat.h is this project's own file, released under the
  same licence because it exists only to host the above. Our additions inside
  dsp_cpu.c and dsp_emu.c.inc (the EXTRACT/EXTRACTU/INSERT, BScc, shift, CLB
  and MERGE instructions, written from the DSP56300 Family Manual, and the
  non-fatal handling of unknown opcodes) are marked in place and are likewise
  GPL-2.0-or-later.

  Two files in that directory are LGPL-2.1-or-later, not GPL, and say so in
  their own headers: dsp_dma.c and dsp_dma.h.

  Licensed under the GNU General Public License, version 2 or (at your option)
  any later version. The full text is in LICENSES/GPL-2.0.txt.

  What this means in practice: an executable linked against src/apu/dsp/ is a
  combined work covered by the GPL. It may be distributed only under the GPL,
  with complete corresponding source offered to whoever receives it. The MIT
  files stay MIT on their own terms -- MIT is GPL-compatible, which is what
  makes the combination lawful -- but the binary as a whole is not MIT and
  must not be presented as such.

  Note that src/apu/apu_state.h includes dsp/dsp.h, dsp/dsp_cpu.h,
  dsp/dsp_dma.h and dsp/dsp_state.h for the DSP structure definitions, so the
  APU is bound to the GPL code at compile time and not merely at link time.
  Building a non-GPL audio path means removing those includes as well as the
  dsp/ sources from src/apu/CMakeLists.txt, and restoring the structure
  definitions apu_state.h used to carry. Turning the DSP off at run time
  (RECOMP_APU_DSP=0, the default) changes what executes; it does not change
  what the binary contains or the licence it carries.


LGPL-2.1-or-later — extracted from xemu
---------------------------------------

  https://github.com/xemu-project/xemu

  Files, with the copyright each one carries:

    src/apu/apu_core.c    MCPX APU core
                          (c) 2012 espes; 2018-2019 Jannik Vogel;
                          2019-2025 Matt Borgerson
    src/apu/apu_dsp.c     MCPX APU DSP (GP/EP)
                          (c) 2012 espes; 2019-2025 Matt Borgerson
    src/apu/apu_vp.c      MCPX APU voice processor
                          (c) 2012 espes; 2018-2019 Jannik Vogel;
                          2019-2025 Matt Borgerson
    src/apu/apu_regs.h    (c) 2012 espes; 2018-2019 Jannik Vogel;
                          2019-2021 Matt Borgerson
    src/apu/apu_state.h   (c) 2012 espes; 2018-2019 Jannik Vogel;
                          2019-2025 Matt Borgerson
    src/apu/apu_debug.h   (c) 2020-2021 Matt Borgerson
    src/apu/fpconv.h      (c) 2020-2025 Matt Borgerson
    src/nv2a/nv2a_regs.h  NV2A register definitions
                          (c) 2012 espes; 2015 Jannik Vogel

  src/apu/apu_shim.h is this project's own file but is released under the
  same licence, because it exists only to host the extracted APU code.

  Licensed under the GNU Lesser General Public License, version 2.1 or (at
  your option) any later version. The full text is in LICENSES/LGPL-2.1.txt;
  the canonical copy is
  https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt

  These files keep their own licence. Linking against them from MIT or
  proprietary code is expressly permitted by the LGPL — that is what
  distinguishes it from the GPL. What the LGPL asks in return is that the
  notices stay, that the source stays available, and that a user can relink
  against a modified version. Distributing this repository, source included,
  satisfies that.


Derived algorithms — credited, independently implemented
--------------------------------------------------------

  src/d3d/d3d8_swizzle.h
    Implements Xbox Z-order (Morton) texture unswizzling. The
    masked-increment technique is Fabian Giesen's, published on his blog;
    xemu's hw/xbox/nv2a/pgraph/swizzle.c is cited in the file as the
    reference that pointed us at it.

  src/d3d/d3d8_combiners.h
    NV2A register-combiner translation. Cites xemu's pgraph combiner
    implementation as a reference for the hardware's behaviour.

  Algorithms and hardware behaviour are not themselves copyrightable, and
  these are our own implementations. They are listed here because the debt is
  real and should be visible even where no licence obligation attaches. If
  anyone believes either file crosses from "implements the same algorithm"
  into "copies the expression", raise an issue and we will rewrite or
  relicense it — getting the credit right matters more to us than the licence
  label.


Reference material (no code taken)
-----------------------------------

  xemu, Cxbx-Reloaded and xboxdevwiki were used as references for hardware
  behaviour: register offsets, kernel export ordinals, structure layouts.
  Those are functional facts rather than expression, and no code was copied
  for them.


Contributors to xboxrecomp itself are credited in CONTRIBUTORS.md.
