Everything needed to reimplement the pipeline, plus an index into the decomp.
| Code | Char | Class |
|---|---|---|
0x53–0x5C | 0–9 | 2 (neither) |
0x5D 0x61 0x65 0x6A 0x6B 0x71 | a e i n o u | 0 (vowel) |
other of 0x5D–0x76 | b c d f g h j k l m p q r s t v w x y z | 1 (consonant) |
0x80–0x86, 0xFF | ♪ ␣ ? ! ⏎ mute click empty | 2 (neither) |
Letter L ↔ code: 0x5D + (L − 'a'). Digit D ↔ code:
0x53 + D.
Phoneme code v plays soundfont instrument v − 1. Code 0 is silence. Codes marked † are produced by more than one rule and therefore share a sample.
Sou_TanboinHenkan)a | i | u | e | o | n |
|---|---|---|---|---|---|
| 0x01 | 0x14 | 0x29 | 0x0A | 0x1D | 0x1B |
Sou_ChouboinHenkan)a | i | u | e | o | n |
|---|---|---|---|---|---|
| 0x02 † | 0x15 † | 0x2A † | 0x0E † | 0x1E | 0x1B |
Used only when class(a) == vowel && class(b) == consonant && c == 'e'.
The tables are otherwise byte-identical.
| Letter | Code | Notes |
|---|---|---|
b | 0x07 | |
c | 0x23 / 0x18 | soft (= s) if next letter is i or e, else hard (= k) |
d | 0x09 | |
f | 0x11 | |
g | 0x12 | |
h | 0x00 | silent — no instrument |
j | 0x17 | shares ge |
k q | 0x18 | |
l | 0x19 | |
m | 0x1A | |
p | 0x21 | |
r | 0x22 | |
s | 0x23 | |
t | 0x26 | shares digit 2 |
v | 0x2D | |
w | 0x2E | |
x | 0x31 | shares ks |
y | 0x15 | shares long i and ea |
z | 0x30 |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| 0x32 | 0x33 | 0x26 | 0x27 | 0x34 | 0x35 | 0x36 | 0x37 | 0x10 | 0x38 |
Sou_ConnectCheck) — 53 entries| Pair | Code | Pair | Code | Pair | Code | Pair | Code |
|---|---|---|---|---|---|---|---|
ai | 0x0F | go | 0x3E | no | 0x49 | si | 0x36 |
al | 0x02 | ha | 0x3F | of | 0x4A | so | 0x4F |
an | 0x39 | he | 0x40 | oh | 0x4B | su | 0x25 |
ar | 0x16 | hi | 0x41 | ok | 0x4C | th | 0x28 |
as | 0x3A | ho | 0x42 | on | 0x4D | to | 0x50 |
be | 0x3B | i␣ | 0x05 | oo | 0x2A | up | 0x51 |
by | 0x3C | if | 0x43 | or | 0x2C | we | 0x52 |
ch | 0x08 | in | 0x44 | ou | 0x20 | wo | 0x33 |
do | 0x3D | ir | 0x0C | ow | 0x06 | you | 0x77 |
ea | 0x15 | is | 0x45 | oy | 0x1F | ze | 0x32 |
er | 0x0D | it | 0x46 | re | 0x0E | ||
fa | 0x35 | ks | 0x31 | se | 0x37 | ||
fo | 0x34 | me | 0x47 | sh | 0x24 | ||
ge | 0x17 | my | 0x48 | na | 0x38 | ||
ng | 0x1C |
Of the 119 codes 0x01–0x77, the phonology engine produces 76.
The 43 it never produces are seven isolated gaps —
0x03 0x04 0x0B 0x13 0x2B 0x2F 0x4E — plus the 36-code block
0x53–0x76. The anti-repetition substitution can reach the first six
of the gaps (it only emits 0x00–0x3F); the block is reachable only
via the editor path; 0x4E appears to be reachable by
nothing at all.
| Spec | Seq | Bank | Vol | Pitch | Speaker |
|---|---|---|---|---|---|
| 2 | 243 | 156 | 0.65 | 1.00 | lazy & jock villagers; most special NPCs (default) |
| 3 | 244 | 157 | 0.65 | 1.00 | cranky villagers; Wendell, Pete, Booker, Jack |
| 4 | 245 | 158 | 0.65 | 1.00 | normal, peppy, snooty villagers; Pelly, Phyllis, Mabel, Sable, Blanca; event narration |
| 5 | 243 | 156 | 0.90 | 1.00 | player, male — text editor only |
| 6 | 245 | 158 | 0.90 | 1.00 | player, female — text editor only |
| 7 | 243 | 156 | 0.90 | 1.30 | Timmy & Tommy (via control code 93) |
| 8 | 245 | 158 | 0.90 | 0.75 | Joan |
| 9 | 243 | 156 | 0.70 | 0.65 | Farley |
| Value | Name | Effect |
|---|---|---|
| 3 | CURSOR_SET_TIME | pauses the cursor; lets a half-built window fire early |
| 75–79, 97 | SET_MESSAGE_CONTENTS_* | emotion state (normal / angry / sad / fun / sleepy / gloomy) |
| 81 | SOUND_CUT | plays system SE 0x54, sends the end code, suppresses voice |
| 84 | SET_CHAR_SCALE | changes glyph scale → the volume step |
| 90 | SET_LINE_SCALE | same, per line |
| 92 | VOICE_TRUE | restore spec (Timmy/Tommy only) |
| 93 | VOICE_FALSE | spec 7 (Timmy/Tommy only) |
Paths relative to the ac-decomp root. Line numbers are for commit
09ca8e8b.
src/game/m_msg_sound.c_inc:1 | mMsg_sound_voice_get — the 256-entry table |
:26 | mMsg_sound_voice_get_for_editor |
:44 | mMsg_sound_voice_get2 — newline injection |
:52 | mMsg_check_sound_special — forced-voice message ranges |
:66 | mMsg_check_sound_animal |
:85 | mMsg_sound_voice_entry — the (a, b, c) window |
:117 | mMsg_sound_voice_endcode_set |
:126 | mMsg_sound_CodeVoice |
:259 | mMsg_sound_voice_mode_get |
:288 | mMsg_sound_spec_change_voice_force |
:317 | mMsg_sound_spec_change_true/false — Timmy/Tommy |
src/game/m_msg_cursol.c_inc:1100 | mMsg_Main_Cursol_ControlCursol — the cursor loop |
:1184 | the NOT_PAUSE_FRAME toggle |
src/game/m_msg_draw_font.c_inc:35 | voice-fire decision |
src/game/m_font_main.c_inc:951 | mFontSentence_animal_voice_se — scale, and the call |
:1078 | the draw-loop trigger |
src/game/m_npc.c:32 | l_sp_actor_name — special-NPC spec table |
:4116 | mNpc_GetNpcSoundSpec |
src/game/m_submenu.c:364 | player voice, specs 5 / 6 |
src/game/m_editor_ovl.c:712 | the mode-1 editor path |
src/audio.c:96 | sAdo_VoiceSe |
:152 | sAdo_SetVoiceMode |
:216 | sAdo_SpecChange |
include/audio.h:45 | VOICE_STATUS_* |
include/audio_defs.h:10 | VOICE_MODE_* |
src/static/jaudio_NES/game/game64.c_inc:22 | VOICE_GROUP = NA_GROUP4 |
:97 | SOU_VOICE_SE struct |
:236 | SHIIN2BOIN (dead) |
:311 | sou_voice_se_init — pan 0x3F, reverb 0 |
:820 | Sou_VoiceStart |
:1174 | Sou_VoiceMake |
:1708 | Sou_SpecialRoutine10 — deferred syllable |
:1852 | Na_GameFrame |
:2146 | Sou_TanboinHenkan |
:2231 | Sou_ChouboinHenkan |
:2316 | Sou_ConnectCheck |
:2564 | Sou_BoinShiinCheck |
:2598 | Na_VoiceSe |
:3319 | Na_SetVoiceMode |
:3459 | Na_SpecChange |
melody.c:727 | Na_MelodyVoice — the ♪ handler |
audioheaders.c:4073 | bank 156–158 entries |
audioheaders.c:4176 | AudiodataHeaderStart — the three archives |
audioheaders.c:4717 | seq 243–245 → bank 156–158 |
include/jaudio_NES/audiostruct.h:74 | ArcEntry / ArcHeader |
:95 | adpcmloop, adpcmbook, smzwavetable, wtstr |
:348 | voicetable — the instrument |
:373 | voiceinfo — per-bank runtime info |
src/static/jaudio_NES/internal/system.c:772 | __Link_BankNum — alias entries |
:813 | Nas_BankOfsToAddr_Inner — offset → pointer |
:1171 | __SetVlute — param0/1/2 decode |
:1692 | __WaveTouch — sample vs bank relocation |
internal/channel.c:354 | NoteToVoice |
:368 | ProgToVp — instrument index → voicetable |
internal/track.c:1159 | Nas_ProgramChanger |
:1399 | SUBTRACK_CMD_SET_INSTRUMENT_BANK — reverse bank-list index |