SPONSORED LINKS

USF - Nintendo Ultra 64 Sound Format

brute force ROMhacking since 2004
Greetings, guest, won't you sign the guestbook?

If you're familiar with PSF you'll immediately recognize USF: it's an attempt to do the same thing with the Nintendo 64. For the uninitiated...

USF is a file format which contains all the data needed to play a song from an N64 game. Once the song has been ripped into a USF file you can load it up in a player (such as the 64th Note Winamp Plugin) and listen to the music.
Ripping USFs is a nontrivial task which I will attempt to explain when I have enough knowledge... The gist of it is you fiddle with an N64 ROM until you get it doing nothing but playing music, then you run it through a series of utilities I've written to remove unused data. You can use a SIG file I've generated for the N64's standard library, libultra to aid you in navigating N64 ROMs with IDA, or you can generate your own based on other libraries you might have with my N64 OBJ to PAT parser.
In answer to the question I read a lot, I cannot forsee an automated USF ripping program.

Differences from PSF

PSF ripping is aided by the fact that PS games are segmented into files, and it is usually possible to isolate the sound code fairly thoroughly. N64 games are one huge chunk of code, and very little navigation aid is available beyond what can be determined from the use of library calls. Once a game has been reduced to playing only the song the ripper requests it is then reduced to what it needs to do this. Unfortunately it is likely that non-music code remains in the USF rip, which serves no purpose other than to slow down the entire system. This depends on the skill of the ripper.
As there is no standard N64 EXE format, as there is for PS, I had to come up with a way of quickly loading a bit of code without having to go through the entire N64 boot process. For this I include a save state in the file.
PSF files are internally compressed. USF files use a sparse storage scheme, in which only data which is not zero is stored. Any unused data in the ROM or save state is replaced with zeroes (as with PSF). This brings file size down by a lot (the elimination of zero data is the primary purpose for PSF's compression) but also allows for a more efficient external compression of the files, for example putting the whole soundtrack to a game in a single RAR archive.
Note:This is a flaw in the format as it currently stands, as a proper PSF file must contain zlib compressed data or existing tools will "choke on it". This means that no existing USF rip is final.

Current Sets

GameSizeTracksbyStatus
Super Mario 64965 KB34Adam Gashlin (hcs)preliminary rip complete
PilotWings 64656 KB31Adam Gashlin (hcs)preliminary rip complete
Goldeneye534 KB59someone42preliminary rip complete
The Legend of Zelda: Ocarina of Time2.25 MBapprox. 90Adam Gashlin (hcs)91% complete
Starfox 64someone42music select functions located
Note: There are certain tracks in SM64 that have multiple versions (for example, Dire, Dire Docks without the drums)
Note: certain tracks in LOZOOT are missing short intros
Note: certain tracks in LOZOOT could not be dumped
Note: certain tracks in LOZOOT are pieces of the Hyrule Field song

64th Note

64th Note is a USF plugin for
Winamp, based on Project64 by Zilmar and Jabo and Azimer's HLE Audio Plugin. It is able to run the available sets on a computer as slow as my 400 Mhz Celeron with 64 MB RAM and Windows 98. Unfortunately it will only play PilotWings 64 when running in the slower Interpreter CPU mode, for reasons which have not yet been determined. It crashes quite frequently under Windows 2000, and is not much more stable on other Windows OSes. It also uses far too much memory. These issues should be addressed before a final release.
Semi-complete buglist-ish-thing:
DescriptionStatus
Visualizations don't work rightfixed
DSP plugins not supportedfixing
Crashes on Win2k and XPcause unknown
Crashes in Goldeneye & PilotWings with recompilercause unknown
Excessive memory usagefixing
Audio HLE isn't too accurateno plans to fix
Poor path handling (can't find USFlib)fixing
No backwards seekingno plans to fix
Problems with opening output plugins multiple timesfixing
No tag editingfixing
Doesn't support PSF-compatible USF formatfixing
Reverb and tempo inaccuraciescause unknown
Junk at end of raw tagfixing
Noise on systems fast enough to run without skippingcause unknown
"cause unknown" means that I'm trying to figure out what the problem is,
"fixing" means I've found the problem and am working on it,
"fixed" means that this error is addressed in the current development version
"no plans to fix" means I don't see the point in going into this

Links to files have been removed as I don't really have the bandwidth to host them (though that will change shortly). You can get them at The Darkseid USF Mirror or Dextrose (though Dextrose is a bit out of date)
Install the plugin by placing in_usf.dll in your Winamp plugins directory (c:\program files\winamp\plugins\ or something) and rsp.dll in your main Winamp directory (c:\program files\winamp\ or wherever you have winamp.exe)
Do me a favor and don't copy any of my files onto your own web site without asking, or at least telling, me first.

You are requested to report any errors you encounter or improvements you suggest to halleyscometsoftware@hotmail.com
Last updated 6/1/04.
A production of Halley's Comet Software