« on: July 22, 2015, 01:47:37 pm »
SPC files consist of a minimum 256 byte (but could be larger) header meant for music players, a 64 kilobyte savestate of the S-SMP RAM, and a 256 byte savestate of the S-DSP registers. They are laid out in that order in the file. If you don't know, the S-SMP is what is commonly referred to as the SPC or the SPC-700, and it's the microprocessor along with 64K of ram. The S-DSP is another component that actually generates and mixes all the audio output. It's somewhat tightly coupled with the "SPC-700" as a whole. I don't know the specific techniques that people use to dump SPC files, but I imagine it could involve intentional slow down and possibly manipulation of game variables via cheat codes or use of a debugging emulator.
This approach only works, of course, if all of the song's data is held within the APU's (S-SMP) RAM at the time the savestate is stored. There was a small push in the past to rip SNES audio in a formats more analogous to that of the way PSX and GBA music is stored. In such a format, code on both the S-CPU and the S-SMP side would have to be packaged into the image. But again, one would only need such a format for music that needs updates from the S-CPU side after having been put into motion.
The long and short of it is that people doing SPC rips probably don't need to know all the specific information you're asking about, but I imagine for some games it could be of use if things were to go wrong, or they wanted to start the SPC at a specific time index (rewind, essentially). I imagine a lot of people doing rips just figure out enough to get the songs they want to play and then just savestate at an opportune time. Some games also have sound tests, which would make things much easier.
As for how you find music in a game, that could vary somewhat depending on your skill level and skill set. As someone that can debug pretty well, I might just look for writes to the $002140-3 registers and that would tell me at some point when music was being uploaded to the S-SMP.