# Licence and third-party notices

## JFruit

JFruit, Copyright (c) 2026 Pete Walton, is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later version. It 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 Affero General Public
License (the file LICENSE) for more details.

Its complete source is the files it is served as (nothing is minified or compiled, except the two
WebAssembly files in src/vendor/libarchive, whose source and build script are beside them). The
whole is distributed as the release zip, linked from the About box as "Source code".

The parts below keep their own licences, all of which allow them to be part of an AGPL program.

## fml-decryptor (MFME 20 .fml layouts)

src/fml.js (the .fml decryption) and the encryption in src/fmlwrite.js are a JavaScript port of
Paul Maidment's fml-decryptor (github.com/paul-maidment/fml-decryptor), licensed under the GNU
Affero General Public License version 3 (LICENSE), with changes by Pete Walton.

## MFME 2.1 (Chris Wren)

Much of JFruit - the Barcrest MPU3 and MPU4, JPM System 80, MPS2, System 5 and Impact, Ace Sp.Ace
and System 1, BFM Scorpion 1 and 2 and the DM01 dot matrix, Maygay M1A/B, Project's Proconn, and
several CPU and device cores - is ported from MFME 2.1, written by Chris Wren (Wizard), RIP. Chris
released MFME's source publicly without a licence. It is used here with thanks and full credit, in
the spirit of that release, in a free, non-commercial project that carries his work on. Those
parts carry no licence from their author beyond that; the rest of JFruit's licence applies to
JFruit's own changes and additions. Where an MFME core was itself derived from older MAME code, it
is being re-based on MAME's current, BSD-licensed sources (see below).

## MAME

Parts of JFruit are ported from, or written after, source files of MAME
(https://github.com/mamedev/mame). Each file named below carries "license:BSD-3-Clause"
unless marked CC0, and its copyright holders are as listed in the file's header.

Ported or closely derived code:

- src/mame/misc/acefruit.cpp - smf, Stephane Humbert (driver by SMF & Guddler, inputs by
  Stephh) - src/acevideo.js
- src/devices/cpu/mcs48/mcs48.cpp - Dan Boris, Mirko Buffoni, Aaron Giles, Couriersud -
  src/cpu8048.js
- src/mame/shared/sec.cpp - David Haywood - src/mpu5.js (SEC)
- src/devices/machine/i8279.cpp - Robbbert - src/maygayv1.js
- src/mame/maygay/maygayv1.cpp - Philip Bennett - src/maygayv1.js, src/maygayv1_video.js,
  src/maygayv1_reels.js
- src/devices/sound/ymz280b.cpp - Aaron Giles - src/ymz280b.js
- src/devices/sound/upd7759.cpp - Juergen Buchmueller, Mike Balfour, Howie Cohen,
  Olivier Galibert, Aaron Giles - src/proconn.js (uPD7759 decoding)
- src/devices/cpu/m68000/m68k_in.lst, m68kmake.py - Olivier Galibert, Karl Stenerud;
  m68kcpu.cpp, m68kcpu.h - Karl Stenerud - src/cpu32_cycles.js, src/cpu32.js
- src/devices/cpu/m6809/m6809.cpp, m6809.h, m6809inl.h, m6809.lst, base6x09.lst - Nathan Woods
  (m6809.cpp also "Copyright John Butler"); m6809make.py - Olivier Galibert - src/cpu6809.js
  (ported from these in v3.55)
- src/devices/machine/z80ctc.cpp - Wilbert Pol (after Tatsuyuki Satoh, 1997); z80pio.cpp - Curt
  Coder - src/proconn.js (its Z80 CTC and PIO, written after these and Zilog's manual in v3.55)
- src/devices/machine/68340sim.cpp, 68340tmu.cpp, 68340ser.cpp - David Haywood,
  Joakim Larsson Edstrom; 68340dma.cpp - David Haywood - src/mc68340.js
- src/mame/barcrest/mpu4crystal.cpp - David Haywood - src/mpu4.js (Crystal descrambling)
- src/mame/bfm/bfm_comn.cpp - David Haywood - src/sys85.js (ROM decoding tables)
- src/mame/jpm/jpmsru.cpp - David Haywood, SomeRandomGuyIdk - src/sru-games.js, src/sru.js
- src/mame/barcrest/mpu1.cpp, src/devices/machine/em_reel.cpp - SomeRandomGuyIdk - src/mpu1.js
- src/devices/sound/digitalk.cpp, digitalk.h - Olivier Galibert - src/digitalker.js (the National
  Semiconductor DigiTalker / MM54104 decoding: its tables and waveform modes)

MAME-derived cores reached through MFME 2.1 (current MAME equivalents):

- src/devices/cpu/m6800/m6800.cpp, m6801.cpp - Aaron Giles - src/cpu6800.js, src/cpu6303.js
- src/devices/cpu/tms9900/99xxcore.h (MAME 0.165-0.175) - Raphael Nabet (original by
  Edward Swartz, converted by M. Coates) - src/cpu9980.js, src/cpu9995.js
- src/devices/machine/tms9902.cpp - Michael Zapf (after Raphael Nabet) - src/jpm-devices.js
- src/devices/sound/ay8910.cpp - Couriersud (after Ville Hallik, Michael Cuddy,
  Tatsuyuki Satoh, Fabrice Frances, Nicola Salmoria) - src/jpm-devices.js
- src/devices/sound/sn76496.cpp - Nicola Salmoria - src/jpm-devices.js
- src/devices/sound/saa1099.cpp - Juergen Buchmueller, Manuel Abadia - src/saa1099.js

Hardware facts only (clocks, memory maps, wiring, port lists): src/mame/misc/aces1.cpp,
astrafr.cpp, ecoinfr.cpp, ecoinf3.cpp, castle.cpp, proconn.cpp, acesp.cpp (David Haywood);
src/mame/bfm/bfm_ad5.cpp, bfm_sc4.cpp, bfm_sc5.cpp (David Haywood), bfm_sc1.cpp
(Nicola Salmoria), bfm_sc2.cpp, bfm_dm01.cpp, bfm_bda.cpp, bfmsys85.cpp (James Wallace);
src/mame/maygay/maygayep.cpp, maygay1b.cpp (David Haywood); src/mame/jpm/jpmimpct.cpp
(Philip Bennett, David Haywood); src/mame/barcrest/mpu3.cpp (James Wallace), mpu4.cpp
(David Haywood, James Wallace), mpu4vid.cpp (James Wallace, Philip Bennett),
mpu4plasma.cpp, mpu5.cpp (David Haywood); src/devices/machine/68307*.cpp (David Haywood),
mc68681.cpp (Mariusz Wojcieszek, R. Belmont, Joseph Zatarski), bacta_datalogger.cpp,
steppers.cpp (James Wallace); src/devices/video/roc10937.cpp (James Wallace);
src/devices/cpu/h8/h83002.cpp, h8_port.cpp, h8.lst (Olivier Galibert).

CC0-1.0 (no notice required, credited with thanks): src/mame/layout's jpmsru layouts (reel
strips); src/mame/jpm/nl_jpmsru.cpp (SomeRandomGuyIdk).

No GPL- or LGPL-licensed MAME file is used.

The BSD-3-Clause licence, which applies to each of the files above marked BSD-3-Clause:

    Copyright (c) the MAME authors / the copyright holders named above

    Redistribution and use in source and binary forms, with or without modification, are
    permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this list of
       conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright notice, this list of
       conditions and the following disclaimer in the documentation and/or other materials
       provided with the distribution.

    3. Neither the name of the copyright holder nor the names of its contributors may be used
       to endorse or promote products derived from this software without specific prior
       written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

## libarchive (RAR archives)

src/vendor/libarchive is libarchive 3.7.7 (Tim Kientzle and others; BSD 2-Clause, with a few files
in the public domain - see src/vendor/libarchive/LICENSE-libarchive.txt for the full notice)
compiled to WebAssembly with Emscripten, with a small wrapper (rarw.c) and its build script
(build.sh) beside it.

## emu2413 (YM2413 sound)

The YM2413 emulation (`src/opll.js`) is a port of emu2413 by Mitsutaka Okazaki, MIT licence.

## Fonts

The substitute fonts in `assets/fonts` are under the SIL Open Font License 1.1
(`assets/fonts/OFL.txt`) or the Apache License 2.0 (`assets/fonts/Apache-2.0.txt`); see
`assets/fonts/README.txt` for each font.

