RustyNES Copyright 2026 DoubleGate (parobek@gmail.com) RustyNES is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. RustyNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with RustyNES (see the LICENSE file); if not, see . RustyNES is licensed GPL-3.0-or-later because it is a DERIVATIVE WORK of GPL-licensed NES emulators: it incorporates code derived from Mesen2 (GPL-3.0-or-later) and, for several mappers and the FDS drive model, from puNES, FCEUX, and Nestopia UE (all GPL-2.0-or-later). The complete per-file derivation record is in docs/originality-and-provenance.md (Section 1). An earlier version of this file incorrectly stated that no GPL emulator source was incorporated and licensed the project MIT/Apache-2.0; that was wrong and is corrected here. -------------------------------------------------------------------------------- Code derived from GPL-licensed emulators -------------------------------------------------------------------------------- The following upstream emulators' code was ported, adapted, or closely modeled into RustyNES. This is derivation, not oracle use, and is why RustyNES is GPL-3.0-or-later. See docs/originality-and-provenance.md Section 1 for the file-by-file table (source file, function, and line references). * Mesen2 / MesenCE -- Copyright Sour et al. -- GPL-3.0-or-later https://github.com/SourMesen/Mesen2 Derived: CPU unstable-store opcodes (NesCpu.h); the PPU sprite-evaluation FSM and OAM-data-bus model (NesPpu.cpp ProcessSpriteEvaluation / ReadSpriteRam); the PPU's optional OAM-decay model (NesPpu.cpp ReadSpriteRam / WriteSpriteRam, OamDecayCycleCount); ~15 mapper board implementations (Bandai EEPROM, JY Company, Waixing, Sachen, Txc, NTDEC, Kaiser, MMC3 variants, FK23C, CoolBoy, the Vs. DualSystem sub-console banking, the VRC7 audio register path, the mapper 244 scramble tables, the Nitra mapper 250 address decode); the APU's lazy $4015 frame-IRQ clear and PAL step table (ApuFrameCounter), the DMC-DMA _needHalt / _needDummyRead latches (NesCpu), the Vs. DualSystem stepping, reset seed and coin routing (NesConsole, VsControlManager) and the Namco 163 output weight (NesSoundMixer); the Power Pad serial layout (classified derived 2026-10-21; the layout is also on the NESdev Power Pad page); the raw NTSC composite-signal model ("raw palette"); the Bisqwit NTSC filter as Mesen2 implements it; the UNIF board tables; the debug-symbol importer (DbgImporter), and through it the DAP debugger's cc65 debug-file reader (classified derived 2026-11-03); and the PGO training harness (PGOHelper). * puNES -- Copyright FHorse -- GPL-2.0-or-later https://github.com/FHorse/puNES Derived: the JV001 security chip / mapper 147 (ported bit-for-bit from JV001.c / mapper_147.c), the per-CRC FDS drive-timing table (fds.c), and the mapper 244 scramble tables (mapper_244, shared with Mesen2). * FCEUX -- Copyright the FCEUX team -- GPL-2.0-or-later https://github.com/TASEmulators/fceux Derived: UNIF board handling (unif.cpp) and several mapper banking transforms. * Nestopia UE -- Copyright Martin Freij et al. -- GPL-2.0-or-later Derived: Sunsoft FME-7 / 5B audio detail (cross-referenced with Mesen2). All of the above grant "version N or (at your option) any later version," so the GPL-2.0-or-later material upgrades cleanly to v3 and the combined work is distributable as GPL-3.0-or-later. -------------------------------------------------------------------------------- Reference emulators consulted as behavioral oracles (no code derived) -------------------------------------------------------------------------------- Separately from the derived code above, these were used to observe and cross-check documented hardware behavior (no code incorporated): * GeraNES -- GPL-3.0-only -- reference / cross-check for several mapper boards and some frontend UI conventions. Its source was consulted (not purely black-box) as a cross-reference to confirm publicly-documented behavior -- the nesdev-wiki bus-conflict / address-decode masks and RetroArch's public `#pragma parameter` shader-UI convention -- but no GeraNES code was copied: the RustyNES implementations are independent Rust of that documented behavior. The maintainers' ASSESSMENT is that only the unprotectable documented behavior was relied on (not GeraNES's copyrightable expression), and therefore that no GPL-3.0-only code is incorporated and the project's "or-later" grant is unaffected. That is a position supported by a two-sided review, NOT a certification: whether a given coincidence is the single correct expression of a documented fact is a legal judgement, and this project does not self-certify license cleanliness. Offered for human and expert review; a qualified reviewer who disagrees should be treated as authoritative. See docs/originality-and-provenance.md sec. 3 for the evidence and the residual uncertainties. * higan -- GPL-3.0-or-later -- scheduler-structure reference / oracle. * ares -- ISC -- palette-integration reference and oracle; code derived from it is listed, with its notice, under "Incorporated third-party components" below. (Corrected 2026-11-15: this said BSD-2-Clause / Apache-2.0, a misreading of ares's LICENSE, whose own section has been ISC since 2021-07-05; its BSD-2 and Apache-2.0 sections cover components ares bundles, not ares itself.) (Mesen2, puNES, FCEUX, and Nestopia were used as oracles too, but because code was also derived from them they are listed above under derivation.) -------------------------------------------------------------------------------- Hardware documentation -------------------------------------------------------------------------------- Behaviors not covered above are written from public hardware documentation: the NESdev community wiki (https://www.nesdev.org/wiki/), the Visual 6502 / Visual 2C02 die studies (http://www.visual6502.org/), Disch's mapper write-ups, Brad Taylor's 2C02 technical reference, published Xicor/Intersil I2C serial-EEPROM and Yamaha YM2413 datasheets, and the documented 6502 unofficial-opcode behavior, pinned against public test ROMs (tests/roms/LICENSES.md). No code from those documentation projects is incorporated. -------------------------------------------------------------------------------- Incorporated third-party components (permissively licensed, GPL-compatible) -------------------------------------------------------------------------------- * emu2413 v1.5.9 -- Yamaha YM2413 (OPLL) FM synthesizer, used for VRC7 audio. Rust port in crates/rustynes-apu/src/opll.rs. https://github.com/digital-sound-antiques/emu2413 Copyright (c) 2020 Mitsutaka Okazaki -- MIT * TriCNES -- cycle-accurate C# NES emulator by the AccuracyCoin author, built around a detailed sub-cycle CPU/PPU/APU/DMA state machine (the author describes it as written "for playing back TASes" with "a focus on test-driven accuracy"); its PPU address/data-multiplex (ALE / octal-latch), OAM-corruption, per-cycle DMA-dispatch and DMC-DMA state models are ported into RustyNES (crates/rustynes-ppu, rustynes-cpu, rustynes-core, rustynes-apu). Its full source was vendored as a golden oracle under crates/rustynes-test-harness/golden/tricnes/ until v3.0.1, when it moved outside the repository (the committed cross-diff outputs remain). https://github.com/100thCoin/TriCNES Ported models were taken from commit 9199870; the last VENDORED oracle was commit 94f1b117 (re-synced 2026-09-19; this line said f388af0b until v3.0.1, one re-sync stale). The two are stated separately on purpose -- one records what was derived from, the other what was in the tree until the v3.0.1 removal, and this entry previously gave one id for both after the vendored copy moved on. Copyright (c) 2025 Chris Siebert -- MIT Note (v2.2.6 -> resolved v2.3.0): v2.2.6 disclosed that the octal-latch / hybrid-address *timing* had been calibrated to TriCNES's per-dot behavior rather than derived independently, and flagged a suspected TriCNES-specific artifact (mid-render $2006 writes mis-rendering, e.g. Rad Racer) for a v2.3.0 rework. v2.3.0 investigated it against the authoritative in-repo oracle: the model passes the AccuracyCoin "Hybrid Addresses" / "ALE + Read" tests (141/141 -- disabling the delayed-CopyV drops exactly that test to 140/141), and Rad Racer's road/horizon renders cleanly. The suspected artifact does NOT reproduce: it lived in the pre-v2.0.3 "+1 coarse-X" approximation, superseded by the 2-cycle-ALE / delayed-CopyV model promoted in v2.0.3 (ADR 0030). The current behavior is therefore documentation/oracle-derived -- it matches the NESdev-documented delayed-`CopyV`-during-render timing and is pinned by the MIT AccuracyCoin test ROM plus an exact-141/141 CI gate. TriCNES (MIT) remains the original cross-reference; its source was vendored with attribution until v3.0.1 and now lives outside the repository. See docs/originality-and-provenance.md sec. 4 and ADR 0030. * rcheevos v12.5.0 -- RetroAchievements client runtime, vendored at crates/rustynes-cheevos/vendor/rcheevos/ (compiled only under the optional `retroachievements` feature). https://github.com/RetroAchievements/rcheevos Copyright (c) 2018 RetroAchievements.org -- MIT * blip_buf -- band-limited synthesis, basis of crates/rustynes-apu/src/blip.rs. Copyright (c) Shay Green (Blargg) -- LGPL-2.1-or-later (GPLv3-compatible) * rust-libretro-sys 0.3.2 -- libretro bindings, vendored with a patch at vendor/rust-libretro-sys/ (v2.8.0): the generated `retro_game_info` is replaced by a hand-written one, because bindgen reduced it to an opaque byte and cores could not read the game a frontend loads. The patch is described in vendor/rust-libretro-sys/VENDORED.md; the upstream LICENSE is vendored alongside. The included libretro.h / libretro_vulkan.h carry their own MIT notices (The RetroArch team). https://github.com/max-m/rust-libretro Copyright 2022 Maximilian Mader -- MIT Its vulkan/ directory (vulkan.h, vulkan_core.h, vk_platform.h) is the Khronos Vulkan headers, read by bindgen at build time only: https://github.com/KhronosGroup/Vulkan-Headers Copyright (c) 2014-2018 The Khronos Group Inc. -- Apache-2.0 (GPLv3-compatible; a copy of the licence text, which Apache-2.0 section 4(a) requires be given with the files, is LICENSES/Apache-2.0.txt since 2026-11-15, and https://www.apache.org/licenses/LICENSE-2.0; each header carries its notice) * libretro.h (upstream, newer than the vendored copy) -- the RETRO_ENVIRONMENT_GET_AUDIO_SAMPLE_BATCH_FLOAT command number and the two declarations it uses (retro_audio_sample_batch_float_t, struct retro_audio_sample_float_callback), transcribed as Rust declarations into crates/rustynes-libretro/src/lib.rs (v3.6.0) from libretro-common/include/libretro.h in libretro/RetroArch, where commit 28f4c9c6a361 (2026-06-29) added them. Interface definitions only. https://github.com/libretro/RetroArch Copyright (C) 2010-2024 The RetroArch team -- MIT * Lua 5.4.9 -- the pattern matcher and the string.find / match / gmatch / gsub drivers of lstrlib.c, re-expressed in Rust with step metering in crates/rustynes-script/src/lua_pattern.rs (v2.9.0, re-audit NF-02), so a script's pattern matching is charged to the sandbox's instruction budget. Read from the copy the mlua crate vendors (lua-src 551.0.2). Lua itself is also linked, unmodified, into builds with the optional `scripting` feature. https://www.lua.org/ Copyright (C) 1994-2026 Lua.org, PUC-Rio -- MIT * ares -- the colour integration in crates/rustynes-ppu/src/palette_gen.rs follows ares's fc/ppu/color.cpp (with Bisqwit's documented palette method; docs/originality-and-provenance.md section 1). Added here 2026-11-15: until then the ISC notice below, which the licence requires in all copies, was not reproduced. https://github.com/ares-emulator/ares Copyright (c) 2004-2025 ares team, Near et al -- ISC Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. The MIT License text (for emu2413, TriCNES, rcheevos, rust-libretro-sys, libretro.h, Lua): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- Bundled fonts -------------------------------------------------------------------------------- * Font Awesome Free -- Fonticons, Inc. -- see crates/rustynes-frontend/assets/fonts/LICENSE-FontAwesome.txt. * Press Start 2P -- CodeMan38 -- SIL Open Font License 1.1. The OFL text ships alongside each copy of the font: assets/RustyNES_Icon/OFL.txt (desktop), ios/RustyNES/Fonts/PressStart2P-OFL.txt (iOS), and android/app/src/main/assets/PressStart2P-OFL.txt (Android). -------------------------------------------------------------------------------- Video shaders and NTSC filters -------------------------------------------------------------------------------- RustyNES's optional CRT shader stack (crates/rustynes-gfx-shaders/) and NTSC filters (crates/rustynes-frontend/src/ntsc_bisqwit.rs, ntsc_lmp88959.rs, and the generated copy of the Bisqwit pass in crates/rustynes-gfx-shaders/src/bisqwit.wgsl): * The Bisqwit NTSC filter's numeric coefficient tables were ported verbatim (via Mesen2's implementation) and are therefore GPL-derived (listed above and in docs/originality-and-provenance.md Section 1). Copyright Joel Yliluoma (Bisqwit) -- the filter's author; the name his homepage gives (https://bisqwit.iki.fi/, read 2026-11-15). Received through Mesen2's BisqwitNtscFilter, GPL-3.0-or-later. His palette method, which crates/rustynes-ppu/src/palette_gen.rs follows, is the same author's. (Added 2026-11-15: until then no holder was named.) The two-level NES composite signal shape is documented at the NESdev wiki ("NTSC video"). * The CRT shaders (CRT-Royale -- TroggleMonkey, GPL-2.0-or-later; crt-guest-advanced -- guest.r; Sony Megatron -- MajorPainInTheCactus) are single-pass WGSL reimplementations of the upstream multi-pass looks. Whether or not that reimplementation is a derivative work of the shader code, the whole project is GPL-3.0-or-later, so these are covered; they are credited as the looks they reproduce. * NTSC-CRT -- EMMIR (LMP88959) -- https://github.com/LMP88959/NTSC-CRT -- free use, credit appreciated. -------------------------------------------------------------------------------- Bundled test ROMs -------------------------------------------------------------------------------- The ROMs committed under tests/roms/ are homebrew test programs, catalogued per-author in tests/roms/LICENSES.md. Some are permissively licensed; for others no licence was found (see below). No commercial Nintendo software is bundled. Notices that must be preserved include: * AccuracyCoin -- Chris Siebert (100thCoin) -- MIT -- upstream LICENSE vendored at tests/roms/accuracycoin/LICENSE. * Holy Mapperel and other Damian Yerrick test ROMs -- zlib -- notices preserved with the ROMs (see tests/roms/LICENSES.md). * Brad Smith (bbbradsmith) nes-audio-tests -- his own permissive grant, quoted in LICENSES/LicenseRef-bbbradsmith-permissive.txt. Correction, 2026-11-15: this file said until 2026-11-15 that "blargg's and kevtris's suites are public domain". No public-domain dedication or licence was found for them, nor for the other ROMs mirrored from christopherpow/nes-test-roms (nes-test-roms/, mmc5/, m22/, mmc1_a12/). Checked: the suites' own readme files, the NESdev wiki page Emulator_tests (https://www.nesdev.org/wiki/Emulator_tests), and christopherpow/nes-test-roms, which has no LICENSE and no README. These ROMs are redistributed as widely mirrored test material under the label LicenseRef-NoStatedLicense (LICENSES/LicenseRef-NoStatedLicense.txt): copyright remains with their authors (Shay Green "blargg", Kevin Horton "kevtris", NewRisingSun, Bregalad, Quietust and others), RustyNES grants no licence to them, and the GPL does not cover them. See tests/roms/LICENSES.md for the full per-ROM provenance. -------------------------------------------------------------------------------- Other third-party files -------------------------------------------------------------------------------- * The "Nes Controller" font (ios/RustyNES/Fonts/NESController.ttf, android/app/src/main/res/font/nes_controller.ttf) -- author not identified, no licence found -- LicenseRef-NoStatedLicense. * Screenshots rendered from commercial games (screenshots/external/, screenshots/besteffort/, the montages, and two README images) -- the game artwork is copyright of its publishers, is not covered by the GPL, and no licence to it is granted -- LicenseRef-ThirdPartyGameImagery. The tree follows REUSE 3.3: REUSE.toml and the LICENSES/ directory state the holder and licence of every file. Run `reuse lint` to check.