GoldenEye 007 PC port
=====================

WHAT IS AND ISN'T COVERED BY THIS PROJECT'S LICENSE
--------------------------------------------------

The MIT License in the LICENSE file covers the original work in this
repository:

  * the port layer            port/
  * the PC build system        CMakeLists.txt, cmake/, build-pc.sh
  * PC-port tooling            tools_pc/
  * macOS packaging            scripts/package-macos.sh, scripts/gen_macho_syms.py,
                               scripts/strip_weak_pragmas.py
  * agent-development tooling  pi/ (not part of the game build)
  * documentation              docs/, README.md

Third-party code vendored into the port layer keeps its own license:

  * port/fast3d/  - software RSP adapted from the Perfect Dark port /
    libultraship / sm64-port lineage; see port/fast3d/LICENSE.txt.
  * port/src/pngread.c - self-contained PNG->RGBA32 decoder (D615,
    texture packs), adapted from the Perfect Dark PC port's pngread.c
    (same lineage; zlib is already a build dependency).
  * port/fast3d/glad/ - generated OpenGL loader (glad), public domain / MIT.
  * port/src/xbla*.c, port/include/xbla*.h - the XBLA HD layer. Its draw
    passes are ports of perfect-dark-dabs-mod (Dab), MIT, Copyright (c) 2022
    Ryan Dwyer: the stage/build, backdrop, fog, doors, character, sky, rooms,
    props, pics, arena, leaf, material, mesh and picture-fix passes, adapted
    from Dab's port/src/gebeanstage.c, port/src/gebean.c and
    port/src/gebeansky.c onto GoldenEye's draw entry points. 31 of the 33
    files in the family carry a header naming the upstream file and line range
    they were ported from (18 of 19 .c, 13 of 14 .h); this port's own are
    port/src/xblacaff.c (CAFF container reading) and port/include/xbla.h. The
    archive halves are itemized separately below. The upstream MIT license text
    ships in-tree as port/src/LICENSE.dab.txt and travels in each download's
    licenses/ folder.
  * port/src/external/lzma/ - the LZMA SDK 9.20 (Igor Pavlov, public domain;
    the 7z reader and the LZMA / LZMA2 decoders, cut down to reading an
    archive and kept as it came, from perfect-dark-dabs-mod's copy), used by
    the XBLA release reader. Built as its own library (CMakeLists.txt).
  * port/src/xblaarchive.c, port/include/xblaarchive.h - the 7z half of
    perfect-dark-dabs-mod's archive module (Dab, MIT): archive listing and
    the streaming extraction of a solid LZMA / LZMA2 block (each function
    names its source), with the file helpers rewritten for this port.
  * port/src/rompatch.c, port/include/rompatch.h, tools_pc/modpatch/ - ROM
    patch decoder (xdelta/VCDIFF, BPS, IPS) from perfect-dark-dabs-mod (Dab),
    MIT, Copyright (c) 2022 Ryan Dwyer; unmodified except includes and the
    port's libc declarations.
  * port/src/modarchive.c, port/include/modarchive.h - mod-archive import
    (D1049): the .7z half calls port/src/xblaarchive.c (above); the .zip
    half is a hardened reader written for this port, with perfect-dark-dabs-
    mod's archive.c (Dab, MIT, Copyright (c) 2022 Ryan Dwyer) as the
    reference for the central-directory/local-header field layout (not
    ported verbatim — see the file header comment for what differs and why).
  * port/external/enet/ - ENet v1.3.17, the reliable UDP networking library
    (MIT-style "ENet license", Copyright (c) 2002-2020 Lee Salzman; the
    license text ships as port/external/LICENSE.enet). Vendored unmodified
    from the upstream v1.3.17 tag tarball (lsalzman/enet; provenance +
    sha256 in docs/dev/findings.md D1055), built as its own static library
    (CMakeLists.txt) for the co-op netplay layer (port/src/net/, D1055).

Runtime libraries bundled in the downloads (not in this repository) keep
their own licenses; each license text ships in the download's licenses/ folder:

  * SDL2 (all platforms) and SDL3 (macOS, loaded by sdl2-compat) - zlib license.
  * zlib - zlib license. Bundled on Windows (zlib1.dll, or libz-1.dll from newer MSYS2); on Linux and macOS the
    system copy is used and nothing zlib-related is shipped in the archive.
  * Windows: the MinGW-w64 runtime (libwinpthread, libgcc, libstdc++).
  * macOS: the GCC runtime (libgcc_s, libstdc++) - GPL-3.0 with the GCC
    Runtime Library Exception 3.1. The GPL-3.0 text the macOS package ships
    is tools_pc/dist/GPL-3.0.txt.
  * The first-run asset converter (prepare-assets/ge007-convert(.exe)) is not
    a library we link. It is a PyInstaller --onefile freeze of our own
    tools_pc/dist/prepare-assets/prepare-assets.py, so that one file carries,
    besides our own MIT Python source: PyInstaller's bootloader
    (GPL-2.0-or-later with PyInstaller's Bootloader Exception, which grants
    unlimited permission to link or embed the compiled bootloader in a program
    whose own licensing stays the author's - text shipped in-tree as
    tools_pc/dist/PyInstaller-COPYING.txt and in each download's licenses/
    folder); the CPython interpreter embedded with it (Python Software
    Foundation License; the interpreter is the build environment's own -
    3.8.20 in the Windows 7-capable freeze built per docs/building.md, the
    build image's system Python otherwise - text shipped in-tree as
    tools_pc/dist/CPython-LICENSE.txt and in each download's licenses/
    folder); and the Microsoft Visual C++ runtime that CPython's Windows build
    links (vcruntime140.dll, redistributed under Microsoft's redistributable
    terms; no separate copy of it is shipped in the archive). The converter
    carries no game content: it reads a ROM you own and writes the two asset
    directories the port needs.

The license texts the downloads carry come from the build environment where
it provides them, otherwise from tools_pc/dist/ (GPL-3.0.txt,
GCC-RUNTIME-EXCEPTION.txt, SDL2-LICENSE.txt, ZLIB-LICENSE.txt,
PyInstaller-COPYING.txt, CPython-LICENSE.txt).

Vendored build tooling keeps its own license (none of it is compiled or linked
into the PC port; it belongs to the N64 decompilation build):

  * tools/ido5.3_recomp/rabbitizer/ - disassembler library (rabbitizer), MIT,
    (c) 2022 Decompollaborate; license text in that directory's LICENSE file.
  * tools/armips.cpp - assembler (armips), MIT, (c) 2009-2020 Kingcom.
  * tools/extractor/puff.c, puff.h - puff-style inflate, zlib-style license,
    (c) Mark Adler.
  * tools/gzipsrc/ - gzip 1.x sources, GPL-2.0-or-later, (c) 1992-1993
    Jean-loup Gailly; the GPL-2.0 text is tools/gzipsrc/COPYING. These sources
    are build tooling only: they are never linked into the port, and they are
    not part of any download package.

Format knowledge (learned by reading the format; the code that *is* ported is
the families listed above, and nothing here ships as game content) used by
tools_pc/xbla/ and port/src/xbla.c
(the XBLA texture importer, a C port of our own Python tools; the user supplies their own dump, nothing from it ships):

  * perfect-dark-dabs-mod (Dab), MIT: CAFF bundle layout, rendergraph material
    records, Xenos texture tiling / pitch / packed-mip-tail rules
    (CLAUDE-notes/ge-bean.md, xbla.md). Also the public CAFF template by
    x1nixmzeng. See docs/dev/XBLA-TEXTURES.md.
  * perfect-dark-dabs-mod (Dab), MIT: the fitted XBLA prop table
    (port/src/geproptable.h -> port/src/xblaproptable.h, regenerated by
    tools_pc/xbla/gen_proptable.py with GoldenEye ROM file names).

It does NOT cover:

  * src/, include/, assets/, Makefile, tools/, rsp/, ld/, and the other
    files inherited from the GoldenEye 007 decompilation
    (https://github.com/n64decomp/007). The upstream project is published
    without an explicit license; those files are included here on the same
    basis, unmodified except where a PC-port ABI fix is marked `#ifdef PORT`
    and documented in docs/dev/findings.md. This repository is a downstream
    fork of that decompilation with a PC port added on top.

    As is standard for console decompilation projects, some game data is
    present as re-expressed source (animation tables, display lists, data
    tables) inherited verbatim from the upstream repository. The bulk game
    assets -- textures, audio, models, level geometry, in-game text -- are
    NOT included and are extracted from your own ROM at build time.

NO ROM DATA OR ORIGINAL ASSETS ARE DISTRIBUTED HERE
--------------------------------------------------

This repository contains NO ROM data and none of the original game assets
(textures, models, levels, audio, text), and no original Nintendo/Rare
binaries. The C source under src/ is the decompilation community's
reconstruction of the game's code (see above). Building a playable
executable requires a GoldenEye 007 Nintendo 64 ROM that you legally own;
the build extracts the required assets from that ROM on your own machine.

GoldenEye 007 is a trademark of its respective rights holders. This project
is a non-commercial, fan-made preservation and porting effort, and is not
affiliated with or endorsed by Nintendo, Rare, MGM, Danjaq, EON Productions,
or any other rights holder in GoldenEye or James Bond.

The optional XBLA HD layer (off by default in the shipped presets) reads an
XBLA-era GoldenEye build the user legally owns. Its HD overlay assets are that
build's content and are not distributed here or in any download; only the
format-reading and draw-pass code is ours-to-Dab under the MIT terms above.
