From 9ca1a1c1c7bf56e39b516c299b4e0d3efe59652b Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Tue, 8 Sep 2026 20:11:06 -0700 Subject: better docs --- docs/reference.html | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 4 deletions(-) (limited to 'docs/reference.html') 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 @@ -9. Reference tables — Animalese +10. Reference tables — Animalese - + -

9. Reference tables

+

10. Reference tables

Everything needed to reimplement the pipeline, plus an index into the decomp.

+

The character → voice code table

+ +

mMsg_sound_voice_get's full 256-byte array, indexed by the game character +code (row × 16 + column). 0x7F and 0x80 hold 0xFF +but the function returns −1 for them before the lookup.

+ +
      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
+

Source: src/game/m_msg_sound.c_inc:2, verified verbatim.

+

Voice codes

@@ -118,6 +143,32 @@ nothing at all.

92431560.700.65Farley
+

Per-code playback parameters

+ +

What each phoneme code actually plays — instrument, semitone, note delay, velocity, +per sequence — is tabulated on the disc page, 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 +(PITCHTABLE[i] = 2^((i−48)/12)), velocity 110 (gain +(110/127)² ≈ 0.75); editor letter names at semitone 44 with a rising sweep +from 41, velocity 95; all samples tuned 0.689062 = 22050/32000.

+ +

Disc image quick reference (GAFE01 USA rev 0)

+ + + + + + + + + + +
ThingWhere
main DOLdisc 0x1E000 (from header 0x420)
FSTdisc 0xFE500, size 0x102 (from header 0x424/0x428)
/audiorom.imgdisc 0x626D10, size 0x7EA760
the five audio tablesDOL .data5; VAs 0x800CCA40 (seq), 0x800CD9E0 (bank), 0x800CE3E0 (wave), 0x800CE450 (data), 0x800CE490 (map)
seq 243 / 244 / 245disc 0x6D2770 / 0x6D2DD0 / 0x6D3250, sizes 0x660 / 0x480 / 0x660
bank 156 / 157 / 158disc 0x752670 / 0x756B70 / 0x759B90
wave bank 5disc 0xA23E50, size 0x3ED620; smzwavetable.sample is relative to this
+ +

Full derivations, structure layouts and the VADPCM decoder are on +the disc page.

+

Text control codes that affect voice

@@ -208,8 +259,23 @@ nothing at all.

​:1399SUBTRACK_CMD_SET_INSTRUMENT_BANK — reverse bank-list index
+

Sequence playback internals

+ + + + + + + + + + + + +
include/jaudio_NES/audiocommon.h:405common / group / subtrack / note command opcodes
internal/track.c:543Nas_NoteSeq — note layer interpreter
​:1028__SetNote — note byte → semitone/delay/velocity
​:780__SetVoice — frequency_scale = PITCHTABLE[semitone] × tuning, portamento
​:1746MACRO_READ_PORT0 — destructive port read (resets to −1)
​:1877GRP_CMD_SET_TEMPO — tempo = byte × 48 tatums
internal/audiotable.c:321PITCHTABLE — 2^((i−48)/12), unity at 48
internal/memory.c:998max_tempo derivation (tick rate)
internal/audioconst.c:32AGC — timeBase = 48
internal/dummyrom.c:68Jac_InitARAM — opens /audiorom.img
internal/neosthread.c:56DVDT_LoadtoARAM("/audiorom.img", …)
+
- ← 8. Quirks & corrections + ← 9. Quirks & corrections Index
-- cgit v1.3.1