# Credits and licensing

fgbweb is licensed under the **GNU General Public License v3.0 or later**
(see LICENSE). It is a derivative work and could not be licensed otherwise.

## Lesserkuma/FlashGBX — GPL-3.0

https://github.com/Lesserkuma/FlashGBX

The overwhelming majority of the hard-won knowledge in this project is
Lesserkuma's. Ported from FlashGBX 4.6:

| From | To | What |
|---|---|---|
| `LK_Device.py` | `src/device/lk-device.js`, `src/mode/dmg.js`, `src/op/*` | command and variable tables, framing, resync, transfer loops |
| `Mapper.py` | `src/mapper/dmg-mbc.js` | MBC bank-switching sequences |
| `RomFileDMG.py` | `src/cart/rom-dmg.js` | header layout, checksums, title/game-code rules |
| `Util.py` | `src/util/util.js`, size tables | size and mapper tables, filename generation |
| `config/db_DMG.json` | `assets/db_DMG.json` | 3042-entry cartridge database, used unmodified |

Anything this port gets right about talking to a cartridge, it gets right
because FlashGBX worked it out first.

## fredemmott/chromatic_dumper — GPL-3.0

https://github.com/fredemmott/chromatic_dumper

The `cart_reader` gateware that makes a ModRetro Chromatic answer the FlashGBX
protocol at all, plus the FlashGBX patch that recognises it. Without this there
is no device for the browser to talk to. `src/transport/mock.js` is a software
model of that gateware's state machine.

## trabucayre/openFPGALoader — Apache-2.0

https://github.com/trabucayre/openFPGALoader

The FPGA side. `src/fpga/` is a port of:

| From | To |
|---|---|
| `src/gwu2x_jtag.cpp`, `src/jtag.cpp`, `src/cable.hpp` | `src/fpga/gwu2x.js` |
| `src/gowin.cpp` | `src/fpga/gowin.js` |
| `src/fsparser.cpp` | `src/fpga/fs-parser.js` |

Copyright (C) 2024 Gwenhael Goavec-Merou. Apache-2.0 is GPL-3.0 compatible, so
these files are redistributed here under GPL-3.0 as part of the combined work,
with the original copyright and licence notices retained in each file.

`assets/chromatic-dumper.fs.gz` is a build of commit `a0dc68e6` (tag
`cart-reader-1.1`) on the `uvc-dualres-with-cart-reader` branch of

https://github.com/germaneguise/oss-chromatic-console-fpga

which is that fork's `v18.8-uvc-dualres.2` release with fredemmott's cart reader
carried resident on top. The bitstream stamps its own USERCODE with that commit,
so the build running on a console names the source it came from and the page
displays it. It is loaded to FPGA **SRAM only** — a power cycle restores the
console exactly as it was.

The design is GPL-3.0, so shipping the bitstream obliges us to make that source
available; the branch above is how. If the link does not resolve, the obligation
is not being met and it should be reported as a bug.

## ModRetro/oss-chromatic-console-fpga — GPL-3.0

https://github.com/ModRetro/oss-chromatic-console-fpga

The Chromatic console FPGA design the dumper gateware is built on.

## Not vendored

FlashGBX and the gateware are referenced, not copied wholesale — this is a
reimplementation in JavaScript against the same wire protocol. The one file
used verbatim is `assets/db_DMG.json`.

## Trademarks

This project is not affiliated with, endorsed by, or supported by ModRetro or
Nintendo. ModRetro and Chromatic are trademarks of ModRetro, Inc. Game Boy and
Game Boy Color are trademarks of Nintendo.

They are named here to identify the hardware this software works with, which is
nominative use. No claim is made to them, and no ownership symbols are applied
to them: those are for the mark holder to use, not third parties.

