USF Ripping Help! by GreyDeath at 6:07 PM EDT on July 25, 2008
Would anyone have any idea why a USF that I've ripped is 3 minutes and 10 seconds of silence when I hear music during the ripping process? The code I've written successfully halts the game process and drops the CPU down to 25-30% usage. Depending where I create the save state I can hear sound effects playing.
Could PJ64usf only be listening to, and ripping, a certain few channels? Could it be something to do with the fact that the game I'm trying to rip, Forsaken 64, creates the audio sequence with alCSeqNew, but uses alCSPSetSeq, alCSPPlay, etc.? Maybe the priority of the music channel(s) are lower than those of the sound effects?
The USF players are only emulating the N64 (and doing a pretty decent job al things considered). As such, if any blame is to be placed, it would have to be placed on Nintendo for designing the hardware the way it was. The N64 doesn't use a channel system like the SNES does. All the sequenced music is mixed in realtime by the RSP. That is, to successfully mute channels, you'd have to do so *BEFORE* any emulation is started. In other words, to successfully mute channels, you'd have to *SPECIFICALLY* rip each and every sequenced piece of data (the songs) in such a way that you remove various aspects of the song. You *CAN'T* mute channels, because no such thing exists. At least, not on the hardware level. And 64th Note is emulating the hardware of an N64. It is entirely 100% unable to alter things from a software side, which is what you'd have to do to successfully have channel muting.
To clarify - If you wanted to play SPCs on a SNES, you can do so. There's even ways, through hardware, to mute various channels. That's how the system was made. The N64 can't do that. If you were to attempt playing a USF on the N64 (to do so would take some work in itself, but that's beside the point), you would be unable to mute channels on the hardware level. You'd have to create some form of Gameshark or Action Replay code, or hack the USF file itself. To do channel muting, it must be done on the software level. And that changes for *every* game (well, for the most part). In other words, not only can 64th Note not do channel muting, but it'd be completely idiotic for it to attempt to do so, because it would require a specific hack for any and every game you wanted to mute channels with.
Hopefully I've made this abundantly clear. Placing blame on the people who are correctly emulating the N64 hardware (well, reasonably closely anyway) is stupid. What you are asking is simply not possible with N64 hardware. And for emulator authors to even attempt to alter that would be stupid. Not because it differs so much from the N64 hardware, but because it's not an emulation or emulator issue. It's a N64 hardware and software issue that needs to be fixed at a higher level than hardware (and thus can't be done by emulators anyway). Mouser X over and out.
I don't think channel priority has anything to do with it. As mouser says the channel stuff is all in software. I really can't say what your problem is, but I'm guessing that the audio thread isn't running in the rip. Rather unfortunately there are substantial, buggy differences between 64th Note and pj64usf. Have you tried the "bug tags" as mentioned at the end of the spec?
In this case, if you can hear audio during the ripping process itself, then the channel volume themselves is right. BTW, you can adjust the volume, by the A1 argument of alCSPSetVol.
In this case the ripper does something that prevents the music from being loaded / started.
A way around this might be to start the rip a little later after the track has loaded, but before the music starts. This means that a savestate must be made for each track though.
hcs, I looked at the specification, and it says the big tags were removed, and _enablecompare tags were added. I tried those, but they made no difference.
I'll try creating the save state after the track is loaded. Forsaken has an odd music player... From what I can tell, its called once to load the sequence, once to play the sequence, then 80 times to fade it in (where I'm pretty sure the volume is being adjusted).
Thank-you for the suggestion, Josh! Don't know why I didn't think of it earlier... But it worked. I'm in the process of ripping the tracks now. Where should I upload them when they're done?