# Third-party code and licences The core is **GPL-3.0** as a whole. The bitstream has GPL-3.0-or-later files in it (MiSTer's `arcade.sv` and `hps_ext.v`, Mazamars312's `MPU_AFP_CORE.v`), and the firmware has more (Minimig's OSD, Alastair Robinson's interrupt code) and is built round `cue.cpp`, a port of Main_MiSTer's `pcecdd.cpp`, which is GPL-3.0. Everything else in it allows that: GPL-2.0-or-later, MIT, BSD, or files whose licence names no version of the GPL (GPL-2.0's section 9 lets those be taken under any version). Analogue's framework and Intel's generated IP are under their makers' own terms, below. Each file's own header is what counts; this file is a map of them. The files below are in the tree, nothing is fetched at build time. ## The bitstream (`src/fpga`) ### MiSTer's TurboGrafx16 core – `src/fpga/core/rtl/` From [MiSTer-devel/TurboGrafx16_MiSTer](https://github.com/MiSTer-devel/TurboGrafx16_MiSTer) at `827d45f` (9 Jul 2026), by Gregory Estrade (the HuC6280 and the original FPGA PC Engine), srg320, greyrogue, Alexey Melnikov (Sorgelig) and dshadoff. | Files | Licence, as the file says | |---|---| | `arcade.sv`, `hps_ext.v` | © 2020 Alexey Melnikov, GPL-3.0-or-later | | `huc6202.vhd`, `sdram.sv`, `color_mix.sv`, `../sys/iir_filter.v` | © Sorgelig, GPL-2.0-or-later | | `mb128.sv` | © 2020 David Shadoff; no licence in the file | | `HUC6280/*`, `huc6260.vhd`, `huc6270.vhd`, `pce_top.vhd`, `cd/cd.vhd`, `cd/SCSI.vhd`, `cd/MSM5205.vhd`, `CEGen.vhd` | no header; MiSTer's repository has no licence file. They are published as part of MiSTer's GPL project and are taken on those terms | | `cd/CDDA_FIFO.vhd`, `cd/CDSUBC_FIFO.vhd`, `cd/SCSI_FIFO.vhd`, `dpram.vhd` | Intel's generated IP (below) | Changed here, each for a reason in the git history: Mazamars312's `almost_full` on the CD FIFOs and the MPU's path in `hps_ext.v`, as there is no ARM; for room, the MB128's and the ADPCM chip's memory moved out to the PSRAM, Populous's RAM to the SDRAM, and the VDC's sprite cache and the PSG's wave tables into RAM blocks; a save-state chain in every chip; the PSG LFO's wave minus 16, where MiSTer's flips bit 3; the SDRAM's refresh kept out of a request's way; the VCE out of reset with everything else; and the VDC's colour numbers brought out for Skip the Run screen. ### Mazamars312's openfpga-pcengine-cd [Mazamars312/openfpga-pcengine-cd](https://github.com/Mazamars312/openfpga-pcengine-cd), whose history this repo continues; its licence file is GPL-2.0, with no version named in most files. - `src/fpga/MPU/MPU_AFP_CORE.v`: © 2022 Murray Aickin (Mazamars312), GPL-3.0-or-later. The MPU round the CPU. - `src/fpga/MPU/`'s other hand-written files (`core_bridge_cmd.v` aside, which is Analogue's) and `main.sv`'s and `core_top.v`'s CD side: no header, under the repository's licence. - `src/fpga/MPU/VexRiscv.v`: generated by SpinalHDL from [VexRiscv](https://github.com/SpinalHDL/VexRiscv), © Spinal HDL contributors, MIT, with Mazamars312's configuration in `VexRiscv_APF.scala`. - `src/fpga/MPU/osd.v`, `controller_rom.v` and `simple_uart.vhd`: no header. ### agg23's openfpga-pcengine [agg23/openfpga-pcengine](https://github.com/agg23/openfpga-pcengine), GPL-2.0 (its licence file; the files name no version): `core_top.v`, `main.sv`, `audio.sv`, `linebuffer.v` as they began. From [agg23/analogue-pocket-utils](https://github.com/agg23/analogue-pocket-utils), © 2022 Adam Gastineau, MIT: `data_loader.sv`, `data_unloader.sv`, `sound_i2s.sv`, `sync_fifo.sv`. Keep their notices. ### RndMnkIII's Analogizer module – `src/fpga/analogizer/` The adapter module of RndMnkIII's [Analogizer](https://github.com/RndMnkIII/Analogizer) (`analogizer/` at `4b35f83`, © 2024 RndMnkIII, MIT, its notice in the folder's `LICENSE`), only the files it uses, as `analogizer.qip` lists them, taken as [Genesis-Pocket](https://github.com/Frazilpop/Genesis-Pocket) has them. Three carry their own licences: `yc_out.sv` (Mike Simone, GPL-2.0-or-later), `scandoubler.v` (Till Harbaum, from MiST, GPL-3.0-or-later) and `vga_out_sw.v` (after MiSTer's `vga_out`, by Sorgelig, GPL). The changes, marked "Local change" in the files: the scandoubler's divider an input of the module and four bits wide, its line's length a parameter, bank0's value with the module off an input, and the PlayStation pad reader left out, as its `dualshock_controller.v` is free for non-commercial use only, which the GPL does not allow. ### Analogue's openFPGA framework – `src/fpga/apf/` © Analogue Enterprises Limited, under Analogue's own licence, in each file's header (the Pocket EULA, for use with Analogue's products). Not GPL; it is the framework every Pocket core is built in, and is left as Analogue ship it. `src/fpga/MPU/core_bridge_cmd.v` is Analogue's too. ### Intel's generated IP The PLL (`mf_pllbase*`), the MPU's RAMs and FIFOs and the CD FIFOs above are made by Quartus's IP wizards, © Intel Corporation, under Intel's terms in each file's header: for use in Intel devices. ### This core's own `state_engine.sv`, `state_bridge.sv`, `mb128_psram.sv`, `adpcm_psram.sv`, `pocket_analogizer.sv`, and the rest of `core_top.v`, `main.sv` and the firmware's changes since 0.2.3: GPL-3.0, as the whole. ## The firmware (`src/cdfw`) The MPU's program, built into `pce_mpu_bios.bin`. | Files | Licence, as the file says | |---|---| | `drivers/cue/cue.cpp`, `cue.h` | a port of [Main_MiSTer](https://github.com/MiSTer-devel/Main_MiSTer)'s `support/pcecd/pcecdd.cpp`; Main_MiSTer is GPL-3.0 | | `drivers/cue/seektime.cpp` | © 2018 Dave Shadoff; no licence in the file | | `app/core.cpp`, `main.cpp`, `core.h`, `drivers/apf/*`, `drivers/uart/*`, `drivers/hps/*`, `drivers/osd/osd_menu.*`, `arch/riscv/timer.*` | © 2022 Murray Aickin, MIT | | `arch/riscv/riscprintf.*` | © 2014-2019 Marco Paland, MIT | | `arch/riscv/interrupts.*` | © 2020 Alastair M. Robinson (EightThirtyTwo), GPL-3.0-or-later | | `drivers/osd/osd.cpp` | © 2005-2009 Dennis van Weeren and Jakub Bednarski (Minimig), GPL-3.0-or-later | | `lib/vscanf.c`, `lib/sscanf.c`, `lib/stropen.c`, `lib/stream.h` (from uOS) | © 2000-2002 Serge Vakulenko, GPL-2.0-or-later with an exception for further uses | | `lib/strtol.c` | © 1990, 1993 The Regents of the University of California, BSD-3-Clause | | the rest of `lib/` (string functions, `malloc.c`, `printf.c`) | no header; came with Mazamars312's firmware | | `app/pcecd.cpp`, `app/state.h`, `app/save_size.h`, `app/core_settings.h`, `tests/host/` | no header; Mazamars312's (`pcecd.cpp`), CedricPelchat's tests (Mazamars312's PR 69) and this core's own, GPL-3.0 | ## Tools and the simulation (`tools`, `src/sim`) This core's own, GPL-3.0. They drive Quartus, GCC, Verilator, GHDL and MAME, none of which is in the repo. `src/sim/vdc/` compares the chips against an older commit of themselves. ## Not in the repo No system card, game or disc image, in the repo or the release.