News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Mega Man X3 Sound Effects  (Read 3397 times)


  • Hero Member
  • *****
  • Posts: 1641
  • Welp
    • View Profile
Mega Man X3 Sound Effects
« on: August 10, 2013, 05:55:19 am »
I've got noted that to help trace back locations of SFX, you load a game and then clock 'Snd DSP' right away.  In doing so, you'll see a 'Sample Directory: xx' value.  Doing that you x it by 100 and you'll get the value in ARAM for SFX pointers.

Did so in Mega Man X3, all that came up was 3900.. but that didn't help much.  Even tried a trace log (Which worked on Sailor Moon/Tales of Phantasia quite perfectly).. but all that came up was this code, repeatedly.

Code: [Select]
$00/C4C8 A9 1F       LDA #$1F                A:FFFF X:0012 Y:0040 P:eNvMXdIzc - Load 'Ding' SFX on X Select on Overworld
$00/C4CA 22 2B 80 01 JSL $01802B[$01:802B]   A:FF1F X:0012 Y:0040 P:envMXdIzc

$01/802B DA          PHX                     A:FF1F X:0012 Y:0040 P:envMXdIzc
$01/802C 5A          PHY                     A:FF1F X:0012 Y:0040 P:envMXdIzc
$01/802D 08          PHP                     A:FF1F X:0012 Y:0040 P:envMXdIzc
$01/802E E2 10       SEP #$10                A:FF1F X:0012 Y:0040 P:envMXdIzc
$01/8030 A0 00       LDY #$00                A:FF1F X:0012 Y:0040 P:envMXdIzc
$01/8032 E2 31       SEP #$31                A:FF1F X:0012 Y:0000 P:envMXdIZc
$01/8034 AE D3 09    LDX $09D3  [$06:09D3]   A:FF1F X:0012 Y:0000 P:envMXdIZC
$01/8037 9D A2 09    STA $09A2,x[$06:09A4]   A:FF1F X:0002 Y:0000 P:envMXdIzC - Store SFX value to RAM
$01/803A 98          TYA                     A:FF1F X:0002 Y:0000 P:envMXdIzC
$01/803B 9D A3 09    STA $09A3,x[$06:09A5]   A:FF00 X:0002 Y:0000 P:envMXdIZC
$01/803E E8          INX                     A:FF00 X:0002 Y:0000 P:envMXdIZC
$01/803F E8          INX                     A:FF00 X:0003 Y:0000 P:envMXdIzC
$01/8040 8A          TXA                     A:FF00 X:0004 Y:0000 P:envMXdIzC
$01/8041 29 1E       AND #$1E                A:FF04 X:0004 Y:0000 P:envMXdIzC
$01/8043 8D D3 09    STA $09D3  [$06:09D3]   A:FF04 X:0004 Y:0000 P:envMXdIzC
$01/8046 28          PLP                     A:FF04 X:0004 Y:0000 P:envMXdIzC
$01/8047 7A          PLY                     A:FF04 X:0004 Y:0000 P:envMXdIzc
$01/8048 FA          PLX                     A:FF04 X:0004 Y:0040 P:envMXdIzc
$01/8049 6B          RTL                     A:FF04 X:0012 Y:0040 P:envMXdIzc

$00/C4CE 60          RTS                     A:FF04 X:0012 Y:0040 P:envMXdIzc
*** NMI

$7E/2413 AD 42 21    LDA $2142  [$06:2142]   A:0000 X:0002 Y:0000 P:eNvMXdIzc
$7E/2416 CF FE FF 7E CMP $7EFFFE[$7E:FFFE]   A:0002 X:0002 Y:0000 P:envMXdIzc
$7E/241A D0 31       BNE $31    [$244D]      A:0002 X:0002 Y:0000 P:envMXdIZC
$7E/241C 1A          INC A                   A:0002 X:0002 Y:0000 P:envMXdIZC
$7E/241D 8F FE FF 7E STA $7EFFFE[$7E:FFFE]   A:0003 X:0002 Y:0000 P:envMXdIzC
$7E/2421 BC A3 09    LDY $09A3,x[$06:09A5]   A:0003 X:0002 Y:0000 P:envMXdIzC
$7E/2424 8C 41 21    STY $2141  [$06:2141]   A:0003 X:0002 Y:0000 P:envMXdIZC
$7E/2427 BD A2 09    LDA $09A2,x[$06:09A4]   A:0003 X:0002 Y:0000 P:envMXdIZC - Load SFX value
$7E/242A C9 F0       CMP #$F0                A:001F X:0002 Y:0000 P:envMXdIzC
$7E/242C 90 14       BCC $14    [$2442]      A:001F X:0002 Y:0000 P:envMXdIzc
$7E/2442 8D 40 21    STA $2140  [$06:2140]   A:001F X:0002 Y:0000 P:envMXdIzc - Store to VRAM??
$7E/2445 E8          INX                     A:001F X:0002 Y:0000 P:envMXdIzc
$7E/2446 E8          INX                     A:001F X:0003 Y:0000 P:envMXdIzc
$7E/2447 8A          TXA                     A:001F X:0004 Y:0000 P:envMXdIzc
$7E/2448 29 1E       AND #$1E                A:0004 X:0004 Y:0000 P:envMXdIzc
$7E/244A 8D D4 09    STA $09D4  [$06:09D4]   A:0004 X:0004 Y:0000 P:envMXdIzc
*** NMI

Though, I'm not really sure what to do to even start tracing backwards, forwards or anything in this case.  I haven't really experienced anything like this.

If this is correct.

$2140 = 1F
$2141 = 09
$2142 = 08

Not.. sure what any of this means.

'  2140h - APUI00  - Main CPU to Sound CPU Communication Port 0        (00h/00h)
  2141h - APUI01  - Main CPU to Sound CPU Communication Port 1        (00h/00h)
  2142h - APUI02  - Main CPU to Sound CPU Communication Port 2        (00h/00h)
  2143h - APUI03  - Main CPU to Sound CPU Communication Port 3        (00h/00h)
  2144h..217Fh    - APU Ports 2140-2143h mirrored to 2144h..217Fh'

Edit: 3900 is actually pointers to SFX or Musical Instruments in ARAM.  I'm not sure if it's both or just one or the other.  Not sure how it picks which values to use either..

Edit 2: I'm still confused on how some of these SFX work.  I figured out the game loads SFX pointers right when the game loads, and that's about it.

'$00/8445 B7 10       LDA [$10],y[$09:A97C]   A:BCEE X:5C53 Y:297C P:eNVMxdIzC'

That's loading the ROM data and storing it into ARAM.  Though apparently this is just the SPC Data/Instruments.

Apparently 2142/2143 would be the address for the data.. but that's not really helpful as none of that seems correct at all for these SFX.  I'm really confused.
« Last Edit: August 11, 2013, 03:04:41 am by justin3009 »
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'


  • Jr. Member
  • **
  • Posts: 38
    • View Profile
Re: Mega Man X3 Sound Effects
« Reply #1 on: August 12, 2013, 01:59:46 pm »
You're only looking at one side of the coin. At some point the 65816 program will send an SPC-700 program into the co-processor. "Co-processor" is the importnat term here because the sound chip on the SNES is a fully functioning processor, which is similar, but not identical, to a 6502. $2140-3 simply map to $f4-f7 inside the SPC700 address space so it could be doing anything. Most likely it has a bunch of SFXs loaded up inside the memory space of the APU and its polling the ports to see if and when it should play a sound. is a helpful start.

Best bet is to hit a trace on the SPC itself.