Donkey Kong (1994)

Pauline's 'Help' voice

A few SGB games make use of sound-related SGB packets. Some that do, will send Kankichi (sound engine used by the SGB) data to SNES APU RAM at $2b00 (music score area) via SOU_TRN, then send a SOUND command to play 1 of the loaded in songs.

Donkey Kong takes it a step further. In bank $0c, address $5ddd (rom offset $61ddd), SOU_TRN data is sent to that music score area that can play the voice sample, and also has some misc Kankichi commands at certain periods to further manipulate the voice sample.

Then later, at address $6438 (rom offset $62438), more data is sent:

    dw $0004 ; size of transfer
    dw $4b08 ; apu dest
    dw $3b00, $46a3

    dw $0006
    dw $4c3c
    db $02, $ff, $e0, $b8, $02, $b0

    dw $0bb0
    dw $3b00
    <$bb0 bytes of sample data>
  • $4b08 - There are 63 DIR entries for samples and their loop points at $4b00. $4b08 is the entry for sample 2, which sets its address to $3b00
  • $4c3c - There is data for 63 instruments at $4c30, which determines sample to use, adsr1/adsr2/gain values and a pitch base multiplier
  • $3b00 - This is sample 2 data: the voice sample encoded in BRR format.