# Credits and sources

Secret of Goku is an unofficial, vibe coded fan game, not intended for commercial purposes. It runs in a browser and in self-contained desktop builds. Game artwork and character designs retain their original ownership. Source attribution does not relicense game assets.

## Original game and extracted maps

**Secret of Mana / Seiken Densetsu 2 — Square, 1993.**

The runtime Potos, interior, cave and overworld PNGs prefixed `rom-`, and `assets/data/potos-rom.json`, were decoded directly from the user-supplied US ROM. These research extractions are retained with the archived prototype, and are not shipped in the hosted demo. The main game decodes maps from the locally selected ROM. No game ROM is included in the repository or static web build. Native release archives bundle the verified ROM supplied during packaging. See [ROM research](docs/agents/rom-research.md) for decoding and validation.

Goku's charge, beam, impact and aura reuse original **Lucent Beam, Thunderbolt and Lucid Barrier** artwork and palette cycles decoded from that same ROM. `engine/native-effects.json` contains only extraction descriptors and provenance. See [native effects](docs/agents/native-effects.md). The new attack choreography, branching lightning paths and gold ki palette combination are authored adaptations of that original art; Kamehameha remains blue.

The arrival crater reuses the original Potos hole (map131, foreground piece15, metatiles369–374, palette24), decoded at runtime with surrounding turf omitted. The new gold GOKU title silhouettes are project-authored pixel lettering; the title palette, “Secret of” artwork, and extended programmer credit font come from the original game. The new arrival dialogue and scene choreography are authored for this conversion and execute through the original event/dialogue systems.

Reference rips retained under `assets/maps/` helped verify coordinate alignment and the extracted images:

- [Potos Village, Davy Jones / Davias](https://www.spriters-resource.com/snes/secretofmana/asset/54501/).
- [Potos interiors, Barack Obama](https://www.spriters-resource.com/snes/secretofmana/asset/130072/).
- [Potos cave](https://www.spriters-resource.com/snes/secretofmana/asset/130628/).
- [Secret of Mana maps, Rick N. Bruns / SNES Maps](https://www.snesmaps.com/maps/SecretOfMana/SecretOfManaMapSelect.html): Potos, the opening path, and overworld reference.

## Character and enemy sheets

Original downloaded sheets and their embedded credit blocks are preserved in `assets/source/`. `scripts/prepare-assets.mjs` removes flat background colors into `assets/sprites/`; runtime animation selects sheet rectangles.

`engine/goku-animation-data.js` catalogs the supplied sheets' occupied cells, four direction rows, pivots and hand positions. Animation timings, combo sequencing, fall/recovery adaptations, projectile motion and transformation choreography are authored for this conversion; they are not a reconstruction of Buu's Fury's animation engine. Goku's character frames use these source sheets.

The Super Saiyan hair revisions use generated [Goku](assets/sprites/goku-ssj-hair.png) and [Vegeta](assets/sprites/vegeta-ssj-hair.png) reference atlases made with the built-in OpenAI image tool. [The source record](assets/sprites/saiyan-hair.source.json) contains both complete prompts. Only their hair texture is sampled: the original gameplay silhouettes, face pixels, body poses and foot anchors are retained. [prepare-saiyan-hair.mjs](scripts/prepare-saiyan-hair.mjs) rebuilds Goku's prepared sheets from the unmodified source sheets; Vegeta's runtime decoder uses the same four-color RGB555 gold ramp from `engine/saiyan-palette.js`.

The new **Shenron ending sprite** is generated fan artwork, created with OpenAI image generation and reduced to a transparent 160×168 image with SNES-style 5-bit RGB colors. [The sprite](assets/sprites/shenron.png) and [generation prompt and processing record](assets/sprites/shenron.json) are included. Its summoning, Dragon Balls, fallout, lighting and animation are authored in `engine/shenron-ending.js`.

- **Goku** — Dragon Ball Z: Buu's Fury, Webfoot Technologies / Atari. [Goku sheet](https://www.spriters-resource.com/game_boy_advance/dbzbuusfury/asset/47770/), original listing Mister Man; the currently downloaded sheet credits **SpYn_**.
- **Super Saiyan Goku** — same game. [Sheet by SpYn_](https://www.spriters-resource.com/game_boy_advance/dbzbuusfury/asset/509009/).
- **Secret of Mana NPCs** — [sheet by Davias](https://www.spriters-resource.com/snes/secretofmana/asset/40853/).
- **Secret of Mana named characters** — [sheet by Davias](https://www.spriters-resource.com/snes/secretofmana/asset/40854/).
- **Mantis Ant** — [sheet by Thanwe](https://www.spriters-resource.com/snes/secretofmana/asset/1503/).
- **Rabite** — [Secret of Mana sheet](https://www.spriters-resource.com/snes/secretofmana/asset/54947/), embedded sheet credit retained in the source image.

Dragon Ball characters originate with Akira Toriyama / Bird Studio and their respective rights holders. The original game supplies the main game's music, interface and much of its NPC dialogue. The arrival, Goku's responses, companion-dependent scenes and restoration ending are authored adaptations; see [story review](docs/agents/story-review.md). Goku combat/rendering hooks were authored for this project. The earlier JavaScript prototype is retained locally for research.

## Code and technical references

The Japanese Kamehameha voice is adapted from [“Son Goku - Kame Hame Ha [Original]”](https://www.tonosfrikis.com/melodias/movil/son_goku_kame_hame_ha_original_944.html), a Japanese Dragon Ball performance shared by **Carlos** on TonosFrikis on 2014-06-05. The listing does not identify the original episode or recording. `assets/audio/kamehameha-jp.json` records the source checksum, cut points and processing. A continuous charge excerpt retains the vowels; a separate shout starts on release. The voice was isolated using the vocal stem from [Demucs htdemucs](https://github.com/facebookresearch/demucs); learned separation can leave residual background effects. Pitch-preserving slowdown, EQ, compression and edge fades are reproducible with `scripts/prepare-kamehameha-audio.mjs`, the vocal stem and a local original recording. The charge energy is a separately controlled sample loop. Voice rights remain with their respective owners; attribution does not grant a new asset license.

Vegeta's Japanese **Final Flash** uses a short excerpt of [his original Dragon Ball Z callout against Cell, shared on Myinstants](https://www.myinstants.com/en/instant/vegeta-final-flash/). His beam-struggle **“Kakarotto!”** is isolated from the end of [Vegeta(35880), shared on 101soundboards](https://www.101soundboards.com/sounds/59071971-base-form-main-voice-files-vegeta35880-jie-zhao-wotsukeruzo-kakarotsuto), a Japanese character voice from *Dragon Ball Z: Budokai Tenkaichi 3* (PlayStation 2), originally catalogued by [The Sounds Resource](https://sounds.spriters-resource.com/playstation_2/dragonballzbudokaitenkaichi3/asset/425588/). `scripts/prepare-vegeta-audio.mjs` applies the same mono 16 kHz, 5.6 kHz low-pass, 10-bit quantization as Goku's voice, with EQ, compression, edge fades and a slight pitch-preserving slowdown for Kakarotto. [The manifest](assets/audio/dbz/vegeta.json) records the original URLs, hashes and cuts. Original recordings stay local; these short adaptations retain their original rights and are not covered by the code's MIT license.

The short DBZ sound effects were adapted from clips shared by **Soundsverse / Youtube Sound Effects**: [ki blast](https://soundsverse.com/dragon-ball-z/goku/ki-blast), [Kamehameha charge](https://soundsverse.com/dragon-ball-z/goku/kamehameha-charge), [Kamehameha fire](https://soundsverse.com/dragon-ball-z/goku/kamehameha-fire), [Instant Transmission](https://soundsverse.com/dragon-ball-z/goku/goku-instant-transmission), [punch/fight pack](https://soundsverse.com/dragon-ball-z/dragon-ball-z-punch-fight) (selected clips 4, 19, 22, 37), [flight rush](https://soundsverse.com/dragon-ball-z/cell/cell-flying-turbo), and [SSJ2 electricity](https://soundsverse.com/dragon-ball-z/son-gohan/son-gohan-ssj2-electricity-aura). Transformation and reversion use non-vocal charge, electricity and anime-whoosh excerpts rather than vocal power-up samples. Only selected short excerpts are included. `assets/audio/dbz/manifest.json` records source URLs, filenames, checksums, cuts, tempo and normalization. `scripts/prepare-dbz-audio.mjs` reproduces the trims and circular loop crossfades. These recordings retain their original rights; the project's MIT license covers its code, not third-party audio.

The Senzu Bean icon, browser-control SVG pictograms, and three-frame Saiyan pod pixel art in `engine/saiyan-pod.js` are original project artwork. The capsule depicts the Dragon Ball vehicle design.

Punch and kick windups use excerpts from [Anime Whoosh Sound 20](https://soundeffects.fandom.com/wiki/Anime_Whoosh_Sound_20) (the high-quality sample) and [Anime Whoosh Sound 16](https://soundeffects.fandom.com/wiki/Anime_Whoosh_Sound_16), catalogued by Soundeffects Wiki as used in the Dragon Ball television anime. These replace the former flight-rush swing sound. Flight also uses Sound 20, preceded by a short non-vocal charging excerpt; its sustained air is an envelope-leveled, filtered whoosh instead of a looping voiced power-up. The shared preparation code gives every added DBZ effect and Japanese vocal clip mono 16 kHz, 10-bit quantization with a 5.6 kHz low-pass (2.8 kHz for flight air). This is a SNES-style adaptation; the sources' original rights remain unchanged. Source filenames, checksums and cut points are in the manifests.

- [SnesJs — angelo_wf](https://github.com/angelo-wf/SnesJs/tree/b904fdb63be15dc0470b69091622ba5b1bde7275), pinned at `b904fdb63be15dc0470b69091622ba5b1bde7275`. The core under `vendor/snes/` includes a local correction to Mode 7 character-zero overflow sampling in `pipu.js`; the OBJ evaluator adapted in `engine/sprite-layer.js` also retains this MIT attribution; [MIT license](vendor/snes/LICENSE.txt). Browser mod and wrapper code are separate under `engine/`. Overflow behavior was cross-checked against [bsnes's Mode 7 renderer](https://github.com/bsnes-emu/bsnes/blob/master/bsnes/sfc/ppu-fast/mode7.cpp); no bsnes code is bundled.
- [SecretOfManaRandomizer — Moppleton / Moppu](https://github.com/Moppu/SecretOfManaRandomizer/tree/1404b7bd8552677399f24632c1e37cba37d491ef), pinned at `1404b7bd8552677399f24632c1e37cba37d491ef`. Map/event format adaptations under `tools/rom/`; [notice](tools/rom/NOTICE.md) and [LGPL-2.1 license](tools/rom/COPYING.LESSER).
- [smkerz / secret-of-mana-hacking](https://github.com/smkerz/secret-of-mana-hacking), [Hack of Mana](https://hackofmana.com/maps/), and the [Super Famicom Development Wiki](https://wiki.superfamicom.org/seiken-densetsu-2), cross-checked against the supplied ROM and live emulator state.
- [libretro.h — the RetroArch team](https://github.com/libretro/libretro-common/blob/master/include/libretro.h), the libretro API header, vendored unmodified in `snes/tools/retro-host/` under its own MIT license statement. The headless test host built on it loads the snes9x and bsnes libretro cores, which are fetched and built locally under `.local/` and never bundled.

The main game uses the original ROM font and graphics. Browser controls use system fonts. The developer lab and archived prototype retain Cinzel/DM Sans with local fallbacks.

The original `FastWhipPosts.cs` and `ElementSwaps.cs` in the pinned Randomizer reference helped locate whip-post descriptors and elemental-orb events. The browser adapters were separately implemented and checked against the user ROM's event interpreter and live RAM.

Vegeta's [gameplay sheet](assets/sprites/vegeta.png) was generated with the built-in OpenAI image tool, using the project's Goku and original Mana NPC sheets as style references. The [source record](assets/sprites/vegeta.source.json) preserves the complete prompt and pose layout. Runtime conversion uses one fixed pixel scale and authored foot anchors in 56×40 cells, matching Goku's facial scale with a 15-color RGB555 palette. Base and Super Saiyan share identical geometry; a masked hair texture from the revision above preserves the face and gloves. His attacks reuse the game's spell and explosion effects. The earlier combat/movement sheets and source records remain as previous art revisions. Vegeta's character design remains associated with Dragon Ball and its respective rights holders.

The Hyperbolic Time Chamber's [doorway pavilion](assets/sprites/time-chamber.png) was generated with the built-in OpenAI image tool; its [source record](assets/sprites/time-chamber.source.json) preserves the prompt and references. The training floor reuses palace stonework from the player's ROM, recolored at runtime. The room renders within the native background pipeline, with integer pixels and RGB555 color, before original fades, actors and menus.

Frieza's eight-pose sheet, `assets/sprites/frieza.png`, was generated with the built-in OpenAI image tool for this mod. The full generation prompt and pose order are in [frieza.json](assets/sprites/frieza.json). The runtime crops its transparent cells and renders them with nearest-neighbor sampling in the native RGB555 OBJ layer. Frieza's character design remains associated with Dragon Ball and its respective rights holders.

Frieza's laugh uses a short excerpt from [Frieza OHOHOHOHOH on Myinstants](https://www.myinstants.com/en/instant/frieza-ohohohohoh-46566/). The Death Ball uses `friezadeathball.wav` from the [DragonBallZ Sound Collection on Staredit Network](https://staredit.net/sc1db/file/1158/), uploaded by KiIIer2121; the original recording author is not identified there. The disc uses a voice-free, pitched and filtered adaptation of the [Soundsverse ki-blast effect](https://soundsverse.com/dragon-ball-z/goku/ki-blast). `scripts/prepare-frieza-audio.mjs` applies the same mono 16 kHz, 5.6 kHz low-pass, 10-bit treatment as the other DBZ effects. [The audio manifest](assets/audio/dbz/frieza.json) records source URLs, hashes, gain and trims. These short adapted recordings retain their original rights and are not covered by the code's MIT license.


The muscular Frieza sheet, seven Dragon Balls plus Dryad's eighth Ball, animated Death Ball, overhead King Kai planet map, King Kai poses and Bubbles walk cycles are generated fan artwork made with OpenAI image generation for this conversion. Prompts and layouts are recorded in [frieza-full-power.json](assets/sprites/frieza-full-power.json), [ki-art.json](assets/sprites/ki-art.json) and [kai-planet.json](assets/sprites/kai-planet.json). Runtime rendering samples these sheets at native resolution and quantizes them to RGB555; the map uses Snake Way and golden clouds throughout. No legacy King Kai sprite rip is bundled.

**Five Minutes**, the Frieza entrance cue, is an original project composition (MIT). Its D-minor root cycle, minor triads and tolling chime figure are arranged as an 80-second suspense cue for the same instrument bank as the themes below ([arrival-arrangement.js](engine/arrival-arrangement.js)).

The combat music adapts Shunsuke Kikuchi's **Kaibutsu Freeza vs Densetsu no Super Saiyajin**, using [the user-supplied reference](https://www.youtube.com/watch?v=5CpQ-uBRa78): the F-minor battle march and brass answers become a 76-second ground arrangement and a 93-second, faster orbital arrangement ([frieza-arrangement.js](engine/frieza-arrangement.js)). Vegeta's training music adapts **Vegeta's Theme** from the Faulconer Productions Music English-language Dragon Ball Z score, using [the user-supplied recording](https://www.youtube.com/watch?v=M954D_jyJbQ&t=3s): the tolling bell motif, G pedal and chromatic guitar figure anchor a 132 BPM training arrangement and a 152 BPM Super Saiyan variant ([vegeta-arrangement.js](engine/vegeta-arrangement.js)).

These cues are arranged for **Secret of Mana's own instrument bank** in the style of Hiroki Kikuta's boss music: unison brass and struck layers, galloping close-voiced strings, octave bass and kick/snare on a shared voice, with registers and drum pitches taken from the game's sequences. They are not shipped as audio. At runtime, [mana-instruments.js](engine/mana-instruments.js) reads the BRR samples, loop points, tuning and ADSR from the player's ROM, and [spc-score.js](engine/spc-score.js) renders eight voices at 32 kHz with gaussian interpolation, hardware envelope rates and echo, in a worker. The samples belong to Square Enix and never enter the repository. The reference recordings were used for transcription only. The underlying compositions remain with their respective rights holders; the project's MIT code license relicenses neither them nor the samples. `node scripts/render-mana-score.mjs [--stems]` renders review WAVs from a local ROM into `.local/mana-score/`; keep those out of commits.
