Editing USF files by brncao at 6:21 PM EDT on April 18, 2009
I'm trying to hex edit the music files, but I want to know where the actual sequenced (midi) music is located. I'm trying to mute channels, change volume on certain channels, change the panning, etc. Where would this data be located: miniusf or usflib?
In most cases, the sequence data is going to be stored in the USFLIB. However, for those games which were ripped from the RAM (Tetrisphere for example), their sequence data will almost certainly be in the MINIUSF file. The problem is, that because MINIUSFs and the USFLIB work together, you might run into the issue of missing data in one (mini or lib) or the other.
You would likely be better off to convert the USF set back into the ROM/RAM form, and debug it in a N64 emulator. Here someone already asked about how to do that. The reason I suggest this method is because you'll have an easier time seeing what's going on, as it's happening, than you would by just looking at the stuff in HEX. The other option is to contact ugetab, because, if I recall correctly, he's already done some of the stuff you're wanting to do.
Hopefully that's somewhat helpful. Mouser X over and out.
Search for the 'USFLib Extractor' prog, if you want a Project64 Save State from the USFLib+Miniusf. Turning the save-states into an NEmu64-compatible version is still beyond my ability to fully automate with a program, but the method is usable if you're willing to work on matching up the main data between save-states using a hex editor or the program I use. Just save an uncompressed NEmu state near the title screen in most cases(try to get it on the same PC address as in the PJ64 state, or it likely won't work. Break on or near the address you're interested in, and when the debugger breaks, save-state from the menu, breakpoint the next line that will be executed, then run to make it save a state without losing your position in code), then use the conversion util to copy data, and hopefully end up with something usable in the debugger.
I've already got utilities beyond the above if you need the Debugger, so I'll just post what I've got, and let you deal with figuring it out.
Disable compression in NEmu Save States: http://www.gshi.org/vb/showthread.php?t=3319
Beta conversion utility for PJ64->Nemu (This will be it's first release into the wild): http://www.gshi.org/ugetab/USF/ConvertNEmuStates.zip
If you don't understand this process, either keep trying to understand it until you do, or quit and don't bug me about it.