The description of sound effect "instruments" start at 0xED3A3, and the Amazon's voice uses instrument 43 (@43), so the offset is:Shauing wrote: ↑January 5th, 2020, 7:11 pm Argh, I confused myself. I meant the 11 bytes that describe the Amazon's voice. Like the instruments, there's 11 bytes below the sound effects written space, but I couldn't find the Amazon; I even did an attempt where I erased all 11 bytes and pretty much every sound effect bar the Amazon was muted though I attempted it today and now it is muted...huh.
0xED3A3 + 43 * 11 = 0xED57C
(The original bytes are: 13 7F F2 00 00 00 00 00 00 00 00)
Just to clear up some possible confusions, there are *three* kinds of IDs related to sound effects:
(Parts of the following are a rephrase of the SNES format documentation.)
#1: IDs of sound effects.
This is what the game logic uses to select which sound effect to play.
That is, these numbers appear in the disassembly after LDA before "play sound" calls.
The list in my previous post is about these IDs.
When I wrote "yy is the ID of the sound effect or music to play", that too refers to this kind of ID.
This ID selects which (3-byte) element to use from the table at offsets 0xECE02-0xECE8E.
In case of the Amazon's voice this ID is 0x24, which is used at offset 0xCF08.
(The relevant line in the disassembly is: 01:CF07: a9 24 LDA #$24)
From this ID the command string is found in the following way:
At offset 0xECE02 + 3 * 0x24 = 0xECE6E are the bytes 0x05 0x9A 0x04, from which 0x049A is the (relative) offset to the command string.
At offset 0xECDE8 + 0x049A = 0xED282 you can find the command string for the Amazon's voice: T64V15@43O4D2P12#D5-BP0+C2C
#2: IDs of sound effect "instruments".
These are the numbers found after "@" in the command strings at offsets 0xECE97-0xED3A1.
This ID selects which (11-byte) element to use from the table at offsets 0xED3A3-0xED591.
In case of the Amazon's voice this ID is 43. (Or 0x2B, but numbers in command strings are always decimal.)
Therefore, the offset to the 11-byte description is 0xED3A3 + 43 * 11 = 0xED57C, as I wrote above.
#3: IDs of sound effect samples.
These are the numbers you find in the first byte of the 11-byte units which describe the instruments, at offsets 0xED3A3-0xED591.
In case of the Amazon's voice this ID is 0x13.
When you write "replacing a sample", exactly what were you replacing? My guess would be #3 above.
However, please note that music cues use a different set of samples than the sound effects, so you can't hear sound effect samples by changing which sample is referenced by a music cue.
Furthermore, sound samples (#3 above) are different from sound effects (#1 above).