# Third-party notices

This app is a browser front end for the image core of PIXELBOY, the
ESP32-P4X-EYE GB Camera project. That core is compiled into
`wasm/gbcam.wasm`; what follows is what is inside it, and what is not.

<!-- about:start - what the About dialog in the app shows. tools/gen_about.mjs
     reads this block and nothing else, so the file can carry the licence
     texts and the notes below without the dialog carrying them too. -->

## Licence and source

PIXELBOY Studio is released under the GNU General Public License v3.0 (`licence.txt`, also linked in the
footer). The files of this web app are served as written, not minified, and the C source of the engine
(`core/`, built into `pbcore.wasm` by `build_wasm.ps1`) goes with them. If you receive a copy of Studio
you may ask whoever gave it to you for that source.

## Code

| Code | License | Source |
|---|---|---|
| gb-photo (Toxa): contrast tables, dither patterns, threshold-matrix generation, auto-exposure logic | MIT, Copyright (c) 2022 Toxa | https://github.com/untoxa/gb-photo |
| Game Boy Printer Paper Simulation (Raphael Boichot): `studio/paper.js` is a port of `epaper_packet.m`; the burnt-pixel photographs in `studio/paper/samples/` and torn edges in `studio/paper/borders/` | GPL-3.0, Copyright (C) Raphael Boichot. PIXELBOY Studio as a whole is therefore distributed under the GPL-3.0 (see `LICENSE`) | https://github.com/Raphael-Boichot/GameboyPrinterPaperSimulation |
| Press Start 2P (codeman38) | SIL Open Font License 1.1 | https://fonts.google.com/specimen/Press+Start+2P |

## Colour palettes

### GB Camera palettes (4 colours each)

| Palette | Credit | Source |
|---|---|---|
| 2bit Demichrome | Space Sandwich | https://lospec.com/palette-list/2bit-demichrome |
| Autumn Chill | Doph | https://lospec.com/palette-list/autumn-chill |
| B&W (1-bit) | Generic 1-bit black/white ramp, project-original | None |
| Coldfire GB | Kerrie Lake | https://lospec.com/palette-list/coldfire-gb |
| Crimson | WildLeoKnight | https://lospec.com/palette-list/crimson |
| GB (bgb) | the bgb emulator's default palette | https://lospec.com/palette-list/nintendo-gameboy-bgb |
| Grayscale | Generic 4-step greyscale ramp, project-original | None |
| Hollow | Poltergasm | https://lospec.com/palette-list/hollow |
| Ice Cream GB | Kerrie Lake | https://lospec.com/palette-list/ice-cream-gb |
| Kirokaze GB | Kirokaze | https://lospec.com/palette-list/kirokaze-gameboy |
| Link's Awakening (SGB) | Drawn from the Super GB palette used by *The Legend of Zelda: Link's Awakening DX* | https://lospec.com/palette-list/links-awakening-sgb |
| Mist GB | Kerrie Lake | https://lospec.com/palette-list/mist-gb |
| Moonlight GB | Tofu | https://lospec.com/palette-list/moonlight-gb |
| Nostalgia | WildLeoKnight | https://lospec.com/palette-list/nostalgia |
| Rustic GB | Kerrie Lake | https://lospec.com/palette-list/rustic-gb |
| Sepia | Generic sepia ramp, project-original | None |
| SpaceHaze | WildLeoKnight | https://lospec.com/palette-list/spacehaze |
| Wish GB | Kerrie Lake | https://lospec.com/palette-list/wish-gb |

### Dither Cam palettes (2-64 colours each)

`2bit_demichrome` and `crimson` are shared with the list above (same palette,
same credit).

| Palette | Credit | Source |
|---|---|---|
| Ancient Interface | Jude Buffum | https://lospec.com/palette-list/ancient-interface |
| Early Autumn 8 | Shape | https://lospec.com/palette-list/early-autumn-8 |
| Apollo | AdamCYounis | https://lospec.com/palette-list/apollo |
| Berry Nebula | LostInIndigo | https://lospec.com/palette-list/berry-nebula |
| Blessing | Maruki | https://lospec.com/palette-list/blessing |
| Commodore 64 | The Commodore 64's hardware palette | https://lospec.com/palette-list/commodore64 |
| CMYK | Soeryo Nugroho ("Brotho") | https://lospec.com/palette-list/cmyk |
| Curiosities | sukinapan | https://lospec.com/palette-list/curiosities |
| DawnBringer 32 | DawnBringer | https://lospec.com/palette-list/dawnbringer-32 |
| Endesga 32 | ENDESGA | https://lospec.com/palette-list/endesga-32 |
| GB Internal | Submitted by Daniel Smith, from a palette used internally for GB screenshots, shared publicly by Kate Willaert | https://lospec.com/palette-list/nintendo-internal |
| Golden Days | Chicknhawk | https://lospec.com/palette-list/golden-days |
| Harvest Dusk | Project-original | None |
| Hope Diamond | patchouli | https://lospec.com/palette-list/hope-diamond |
| Ice Cream | Kerrie Lake | https://lospec.com/palette-list/ice-cream-gb |
| Journey | PineappleOnPizza | https://lospec.com/palette-list/journey |
| Lost Century | SurrealEmber | https://lospec.com/palette-list/lost-century |
| memory block 36 | Vsigos | https://lospec.com/palette-list/memory-block-36 |
| Midnight Ablaze | Inkpendude | https://lospec.com/palette-list/midnight-ablaze |
| Night 16 | Night (3rd place, PixelJoint 16-colour palette competition, 2015) | https://lospec.com/palette-list/night-16 |
| Oil 6 | GrafxKid | https://lospec.com/palette-list/oil-6 |
| Paperback-2 | Doph | https://lospec.com/palette-list/paperback-2 |
| pastel qt | polyphrog | https://lospec.com/palette-list/pastel-qt |
| PICO-8 | Lexaloffle Games | https://lospec.com/palette-list/pico-8 |
| pixelwave | DogesArePros | https://lospec.com/palette-list/pixelwave |
| Purple Slime | TechDweeb | https://www.youtube.com/techdweeb |
| Resurrect 64 | Kerrie Lake | https://lospec.com/palette-list/resurrect-64 |
| Root Beer | TechDweeb | https://www.youtube.com/techdweeb |
| Sweetie 16 | GrafxKid | https://lospec.com/palette-list/sweetie-16 |
| Vinik24 | Vinik | https://lospec.com/palette-list/vinik24 |

## Acknowledgments

No code copied, but [Raphael-Boichot](https://github.com/Raphael-Boichot), whose
GB Camera / Printer reverse-engineering work informed PIXELBOY's M64282FP
sensor behaviour and MAC-GBD protocol details, deserves a thank you. The
hardware style's claim to being pixel-identical to the Pan Docs reference
emulation rests on that work.

Also no code copied, but the HDR/AEB combine step was named after and checked
against [gb-printer-web](https://github.com/HerrZatacke/gb-printer-web)'s tool
of the same name (`average.js`), a plain per-pixel mean. Which is why this
project's own version instead averages already-dithered shades, reconstructing
extra apparent grey levels from independent dither patterns rather than from
raw pre-dither exposure data.


<!-- about:end -->

The font is self-hosted rather than linked from Google Fonts, because the app
works offline and a stylesheet from someone else's server is a dependency the
service worker cannot answer for. It is an 8x8 pixel font, so every size in
`style.css` is a whole multiple of 8 - at 11px it would be resampled, which is
the one thing a pixel font cannot survive. Where it has no glyph for a
character (the picker's caret, for one) the mark is drawn instead of typed, so
nothing falls through to a different typeface mid-label.

## Licences in full

The gb-photo code is in `native/components/gbcam/src/gbcam_dither.c` and
`gbcam.c`; the font in `fonts/press-start-2p.woff2`. Neither is modified.

### MIT licence text, as it stands in `gbcam_dither.c`

```
MIT License
Copyright (c) 2022 Toxa

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.
```


## What this app does *not* include

- **No GB Camera ROM data.** The decorative frame packs extracted from the
  original cartridge (`framegroup_*.json`, `frames_int_jp.json` and similar) are
  third-party copyrighted art and are not redistributed here, in any
  form - not as files, and not baked into the WASM module. This app ships only
  the five borders PIXELBOY itself drew (`native/firmware/main/frames_data.h`,
  generated by `tools/gen_frames.py` from `assets/frames/*.png`). PIXELBOY's own
  `tools/import_gb_frames.py` exists so that someone who owns the cartridge can
  convert their own copy locally; nothing in this repository automates or
  bundles that, and nothing here fetches it.
- **No GB emulator.** Peanut-GB and gb-photo's emulator-side code are part
  of PIXELBOY's firmware but have nothing to do with camera mode, so they are
  not compiled into this build.
- **No fonts or icons from the firmware.** The UI uses system fonts.
- No third-party JavaScript. The site has no runtime dependencies at all:
  `jsdom` is used only by `tools/test_page.mjs`, is never shipped, and is not
  vendored.
