diff options
| author | Alexander Kassouni <alex@kassouni.net> | 2026-09-08 20:11:06 -0700 |
|---|---|---|
| committer | Alexander Kassouni <alex@kassouni.net> | 2026-09-08 20:11:06 -0700 |
| commit | 9ca1a1c1c7bf56e39b516c299b4e0d3efe59652b (patch) | |
| tree | 7e41c6f8424fbd021b515f6a95deffda61b4a142 /docs/reference.html | |
| parent | 24ec2a92b56ca4296fe65b70524e36a8e1c67c2e (diff) | |
better docs
Diffstat (limited to 'docs/reference.html')
| -rw-r--r-- | docs/reference.html | 74 |
1 files changed, 70 insertions, 4 deletions
diff --git a/docs/reference.html b/docs/reference.html index 5b86ebb..1abf660 100644 --- a/docs/reference.html +++ b/docs/reference.html @@ -3,17 +3,42 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> -<title>9. Reference tables — Animalese</title> +<title>10. Reference tables — Animalese</title> <link rel="stylesheet" href="style.css"> </head> <body> -<nav class="crumb"><a href="index.html">Animalese pipeline</a> / 9. Reference tables</nav> +<nav class="crumb"><a href="index.html">Animalese pipeline</a> / 10. Reference tables</nav> -<h1>9. Reference tables</h1> +<h1>10. Reference tables</h1> <p class="lede">Everything needed to reimplement the pipeline, plus an index into the decomp.</p> +<h2>The character → voice code table</h2> + +<p><code>mMsg_sound_voice_get</code>'s full 256-byte array, indexed by the game character +code (row × 16 + column). <code>0x7F</code> and <code>0x80</code> hold <code>0xFF</code> +but the function returns −1 for them before the lookup.</p> + +<pre> x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF +0x00 85 85 5D 5D 5D 5D 5D 5D 5F 61 61 61 61 65 65 65 +0x10 65 60 6A 6B 6B 6B 6B 6B 85 71 71 71 71 5E 6C 5D +0x20 81 83 85 5D 5D 85 85 85 85 85 85 85 85 85 85 80 +0x30 53 54 55 56 57 58 59 5A 5B 5C 85 85 85 85 85 82 +0x40 85 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B +0x50 6C 6D 6E 6F 70 71 72 73 74 75 76 5D 85 5D 5D 85 +0x60 5F 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B +0x70 6C 6D 6E 6F 70 71 72 73 74 75 76 61 61 61 61 FF +0x80 FF 65 65 65 65 86 60 6A 6B 6B 6B 6B 6B 85 71 71 +0x90 85 71 71 75 75 6C 75 85 85 5D 6B 85 85 85 85 85 +0xA0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 +0xB0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 +0xC0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 +0xD0 85 85 81 81 85 85 85 85 85 85 85 85 85 85 85 85 +0xE0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 +0xF0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 81</pre> +<p class="src">Source: <code>src/game/m_msg_sound.c_inc:2</code>, verified verbatim.</p> + <h2>Voice codes</h2> <table> @@ -118,6 +143,32 @@ nothing at all.</p> <tr><td>9</td><td>243</td><td>156</td><td>0.70</td><td>0.65</td><td>Farley</td></tr> </table> +<h2>Per-code playback parameters</h2> + +<p>What each phoneme code actually plays — instrument, semitone, note delay, velocity, +per sequence — is tabulated on <a href="disc.html">the disc page</a>, extracted from the +shipped sequence data. The headline constants: dialogue phonemes play at semitone 44 +(seq 243), 41/39 (seq 244) or 39 (seq 245) against unity-at-48 +(<code>PITCHTABLE[i] = 2^((i−48)/12)</code>), velocity 110 (gain +<code>(110/127)² ≈ 0.75</code>); editor letter names at semitone 44 with a rising sweep +from 41, velocity 95; all samples tuned 0.689062 = 22050/32000.</p> + +<h2>Disc image quick reference (GAFE01 USA rev 0)</h2> + +<table> +<tr><th>Thing</th><th>Where</th></tr> +<tr><td>main DOL</td><td>disc <code>0x1E000</code> (from header <code>0x420</code>)</td></tr> +<tr><td>FST</td><td>disc <code>0xFE500</code>, size <code>0x102</code> (from header <code>0x424/0x428</code>)</td></tr> +<tr><td><code>/audiorom.img</code></td><td>disc <code>0x626D10</code>, size <code>0x7EA760</code></td></tr> +<tr><td>the five audio tables</td><td>DOL <code>.data5</code>; VAs <code>0x800CCA40</code> (seq), <code>0x800CD9E0</code> (bank), <code>0x800CE3E0</code> (wave), <code>0x800CE450</code> (data), <code>0x800CE490</code> (map)</td></tr> +<tr><td>seq 243 / 244 / 245</td><td>disc <code>0x6D2770</code> / <code>0x6D2DD0</code> / <code>0x6D3250</code>, sizes <code>0x660</code> / <code>0x480</code> / <code>0x660</code></td></tr> +<tr><td>bank 156 / 157 / 158</td><td>disc <code>0x752670</code> / <code>0x756B70</code> / <code>0x759B90</code></td></tr> +<tr><td>wave bank 5</td><td>disc <code>0xA23E50</code>, size <code>0x3ED620</code>; <code>smzwavetable.sample</code> is relative to this</td></tr> +</table> + +<p>Full derivations, structure layouts and the VADPCM decoder are on +<a href="disc.html">the disc page</a>.</p> + <h2>Text control codes that affect voice</h2> <table> @@ -208,8 +259,23 @@ nothing at all.</p> <tr><td><code>​:1399</code></td><td><code>SUBTRACK_CMD_SET_INSTRUMENT_BANK</code> — reverse bank-list index</td></tr> </table> +<h3>Sequence playback internals</h3> +<table> +<tr><td><code>include/jaudio_NES/audiocommon.h:405</code></td><td>common / group / subtrack / note command opcodes</td></tr> +<tr><td><code>internal/track.c:543</code></td><td><code>Nas_NoteSeq</code> — note layer interpreter</td></tr> +<tr><td><code>​:1028</code></td><td><code>__SetNote</code> — note byte → semitone/delay/velocity</td></tr> +<tr><td><code>​:780</code></td><td><code>__SetVoice</code> — <code>frequency_scale = PITCHTABLE[semitone] × tuning</code>, portamento</td></tr> +<tr><td><code>​:1746</code></td><td><code>MACRO_READ_PORT0</code> — destructive port read (resets to −1)</td></tr> +<tr><td><code>​:1877</code></td><td><code>GRP_CMD_SET_TEMPO</code> — tempo = byte × 48 tatums</td></tr> +<tr><td><code>internal/audiotable.c:321</code></td><td><code>PITCHTABLE</code> — <code>2^((i−48)/12)</code>, unity at 48</td></tr> +<tr><td><code>internal/memory.c:998</code></td><td><code>max_tempo</code> derivation (tick rate)</td></tr> +<tr><td><code>internal/audioconst.c:32</code></td><td><code>AGC</code> — <code>timeBase = 48</code></td></tr> +<tr><td><code>internal/dummyrom.c:68</code></td><td><code>Jac_InitARAM</code> — opens <code>/audiorom.img</code></td></tr> +<tr><td><code>internal/neosthread.c:56</code></td><td><code>DVDT_LoadtoARAM("/audiorom.img", …)</code></td></tr> +</table> + <div class="pager"> - <span><a href="quirks.html">← 8. Quirks & corrections</a></span> + <span><a href="quirks.html">← 9. Quirks & corrections</a></span> <span><a href="index.html">Index</a></span> </div> |