.usf and a tracker. by Tom at 11:14 PM EDT on April 5, 2009
is there a .USF of tetrisphere or the new tetris? I changed azule lux.miniusf to .mod + a tracking program (madtracker, fasttracker 2, etc.) and got several samples that work, same with the new tetris.usflib
I played the .usflib in madtracker, but got very wiered sounds out of it. I thought if I get a .usf, I could modify the song or maybe create a new one out of those samples.
if there is a converter that converts a .miniusf to a .usf, it would be nice.
The way it works is that each track that plays is actually a combination of the .miniusf and the .usflib, so to get the plain ROM and RAM image for each you'd have to combine those one by one. If I remember correctly, this is done by a combination of usf2rom and recon.
To disassemble a miniusf or usflib, do: usf2rom.exe foo_1.miniusf.rom foo_1.miniusf.ram foo_1.miniusf to create foo_1.miniusf.rom and foo_1.miniusf.ram from foo_1.miniusf, or usf2rom.exe foo.usflib.rom foo.usflib.ram foo.usflib to create foo.usflib.rom and foo.usflib.ram from foo.usflib.
To combine the ROM or RAM images from a usflib and a miniusf, do: recon.exe foo_1.miniusf.rom foo_1.rom foo.usflib.rom a to create foo_1.rom from foo_1.miniusf.rom and foo.usflib.rom, or recon.exe foo_1.miniusf.rom foo_1.ram foo.usflib.ram a to create foo_1.ram from foo_1.miniusf.ram and foo.usflib.ram.
You'll have to use usf2rom for each miniusf and the usflib, and then recon for the rom and ram for each track (assuming that the samples are in RAM and ROM, they might just be in ROM, but I seem to recall that they had to be decompressed into RAM). Also you may have just gotten lucky with that one track, the rest might have samples in a stranger format. I really don't know anything more specific about it.
Edited to fix command lines, might still be wrong, I'm just looking at the usage info.
I don't know where the files are and it looks quite complex. if you could put the comand line, it would be alot easyer, and sure, I'll give you the samples of the chiptunes. ^_^
hcs said: If I remember correctly, this is done by a combination of usf2rom and recon.
Tom said: I don't know where the files are and it looks quite complex.
HCS linked the files you need, and gave you the information you needed to use the tools he linked to. In your case, think of the commandline stuff as such:
usf2rom.exe <NAME OF SONG>.miniusf.rom <NAME OF SONG>.miniusf.ram <NAME OF SONG>.miniusf
(where "<NAME OF SONG>" is the same file name). The same thing works for a USFLIB, but using a USFLIB instead of a miniUSF. At least, I would assume this, based on the commands that HCS gave.
If you have the Tetrisphere set, and the files that HCS linked (which I quoted), then you should be able to rebuild these yourself back into their USF (non-miniUSF) form. At least, that's what I assume based on HCS's post. Give it a try yourself. "If you give a man a fish, he eats for a day. If you teach a man to fish, he can eat for a lifetime." Basically, try it out. It really doesn't look too hard as long as you follow directions. Hope that helps. Mouser X over and out.
HCS said: To disassemble a miniusf or usflib, do: usf2rom.exe foo_1.miniusf.rom foo_1.miniusf.ram foo_1.miniusf to create foo_1.miniusf.rom and foo_1.miniusf.ram from foo_1.miniusf, or usf2rom.exe foo.usflib.rom foo.usflib.ram foo.usflib to create foo.usflib.rom and foo.usflib.ram from foo.usflib.
To combine the ROM or RAM images from a usflib and a miniusf, do: recon.exe foo_1.miniusf.rom foo_1.rom foo.usflib.rom a to create foo_1.rom from foo_1.miniusf.rom and foo.usflib.rom, or recon.exe foo_1.miniusf.rom foo_1.ram foo.usflib.ram a to create foo_1.ram from foo_1.miniusf.ram and foo.usflib.ram.
NOTE: The italics and bold parts? That's how you use the tools HCS linked. Replace "foo_1" (or "foo" for a USFLIB) with the file name of the files you want to work on. Just try it first before posting again, and see what happens. And no, you're not being rude, but I'm starting to be. Mouser X over and out.
(time to explain) as you said in a previous post from here mouser, it was pulled out from the ram instead of the rom, the same for the new tetris. now my question is, how do I compile it to a .usf with just the ram of the miniusf?
ohh and please ignore the above image and the previous posts, I'm just 15 so my apology... >_<
and to answer real quick on post 3, Neil used fasttracker 2 + his own 8 bit samples to make the music on both games.
I don't see what you're trying to do with "how do I compile it to a .usf with just the ram of the miniusf?" The miniusf is already a usf.
The process that I described allows you to build the foo_1.ram image, which is a copy of what was in RAM at the time that track was playing.
I went and tried it myself, and I think you may have messed up (and it turns out I had a typo, too). The .miniusfs don't contain a ROM section, so you shouldn't have gotten any foo_1.miniusf.rom, just a foo_1.miniusf.ram. So, just ignoring the ROM altogether: usf2rom.exe foo_1.miniusf.rom foo_1.miniusf.ram foo_1.miniusf usf2rom.exe foo.usflib.rom foo.usflib.ram foo.usflib recon.exe foo_1.miniusf.ram foo_1.ram foo.usflib.ram a <- this is where I had the typo, should have been "foo_1.miniusf.ram" instead of "foo_1.miniusf.rom".
Then there's one more step to make the raw RAM image (in a pj64 savestate):
recon.exe foo_1.ram foo_1.pj (this is the fundamental operation of recon, the name is short for "reconstitute")
I loaded foo_1.pj up in audacity and got some nice samples. Hope this helps.
Once you have the .pj you don't need anything else. You would have needed recon.exe from toolsbin.zip to get to that point, anyway. The only command lines you need are the ones I gave, bolded, in the last post, with "foo" and "foo_1" replaced with "tetrisphere" and "Tetrisphere - Prophetic - Title".
Why do you need a .usf? If you want to extract samples, the .pj is your best bet. You started out with a .usf (.miniusf and .usflib are the same thing as .usf in this sense).
I know, but those samples are already cut and in the right places while in the .pj it's all quite scrambled up. I thought the .usf would have everything complete and the samples in the right order and length to extract with madtracker.
Nope. The order in a usf is the same as in the pj. All this process (the tedious one I've been walking you through repeatedly) does is combine stuff from the miniusf and usflib and restore the empty space.
a friend of mine has been bothering me ever since I got the idea, but I told him a zillion times that it doesn't work, he says that he won't stop bothering me until I get those samples out, if it would be posible if you could post the comand line to put the *.pj into a *.usf for madtracker. (he's also an artist)
ps: you don't have to respond to the post if you wan't.
HCS wrote: Nope. The order in a usf is the same as in the pj. All this process (the tedious one I've been walking you through repeatedly) does is combine stuff from the miniusf and usflib and restore the empty space.
What HCS means by this is that you've essentially recreated the ROM. That is, you would have recreated the ROM, if the USF rip had been ripped from the ROM. Since it was ripped from the RAM, it recreated the RAM. And a savestate is just that. It's the RAM from the N64. In other words, you can't recreate the ROM (which is essentially what you're asking) from the savestate.
As HCS already said, the *.PJ file contains samples (at least, if he says it does, I believe him). If madtracker can't find any useful data, then open the *.pj file in a hex editor, and pull out the samples manually. No, I have no idea what to look for to do that. If your friend wants it as badly as you say he does, have him do it. The data is already there. At this point, it sounds like there isn't anything left to do, other than extraction. It's already been assembled, and re-ordered back into its original form (at least, as near as you can get it without using the ROM itself, which is compressed, so I doubt that would be helpful). If you want the audio samples (which HCS says is present), then you need to find some means to extract it. I don't know of any programs, which is why I suggest using a HEX editor.
Like I said, if you can't figure it out, tell you're friend "It's all there. We just need to extract it. I don't know what to look for in a HEX editor, so here you go. You can look through it and pull out the samples. Good luck." Hopefully that clarifies it a little. Mouser X over and out.
Tom, I suggest you do the following: 1) get audacity, it is a free audio editing program which is handy for this kind of thing. I'll assume you're using the Windows 1.2.6 version. 2) Start audacity, go to Project->Import Raw Data, select the .pj file, select signed 16-bit PCM and enter a sample rate of 22050, click the Import button You should now have a screen that looks vaguely like this. What you have now is an interpretation of the file as if it was a 16-bit PCM waveform. That only applies to certain parts of the file, though, but you should be able to find them. If you press the play button (not visible in my screenshot due to Wine sucking but pretty obvious) you'll get a bunch of high pitched junk for a while, but around 1:06 or so you'll hear the actual instrument samples. You can zoom in on a particular part of the waveform by selecting it and doing Ctrl+E, there are also zoom controls in the View menu. You can export parts of the file into independent WAV files (so you can deal with them however you deal with them) by selecting a region and going File->Export selection as WAV. That at least will give you something to work with.