• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Important Melee, Hacks, and You -- New Hackers Start Here, in the OP!

MuraRengan

Banned via Warnings
Joined
Mar 22, 2007
Messages
1,510
Location
New Orleans
For future refrence, I just made a backup of one of the older action replays that still allowed code changes. It will not work with backup discs, but if you do have an official disc it will work. This is good news for me because I haven't been in debug mode in 2 years T_T.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
Just for the record, uploaded the CSPs of all the characters... so if you've been interested in customizing your character selection screen, now you can! Enjoy. :)

~Please take note of the note in the PLACEMENTS text. Tells you what's up, and which character is where. Manual hexing required.
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
'kay, here it is. My first attempt at automating the hacking process.
I made a program, called tpl_insert, that reads the offset data from TXT files. This can get cumbersome, I found, so in the future, I plan to hard-code the values into the program once I get all the offset data from S.
http://www.megaupload.com/?d=1WZLO69E

Read the README. please. it should explain a lot.
Requires command prompt knowledge to be able to use well. It's meant to be used with S.'s texture dumps, so go download them. I've only tested it with a few of them, so try them out, see what happens.

This can
-replace TPLs in a specified DAT by offset and # of file (reads info from the TXT file)
-replace palette data if there is any (but only 32 lines, no less)
-replace MAGENTA in a palette (FC 1F) with 00 00 if it comes up
-run texconv, if you have it
among other things

however, if the palette has fewer lines in the DAT file, I can't find out using the program. It assumes that every palette has 32 lines in the DAT. Furthermore, it cannot perform subtraction on the TPL data for _9 textures that have smaller palettes because, well, it can't tell what a smaller palette is. So, it can't replace the wireframe textures, since they have only two lines of palette data per texture, for example.

****
This is experimental. A debugging process. So download it, test it out, and tell me what works and what doesn't so I can fix it later.

9/12 - Updated the link for v0.93
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
^ Sweet stuff, GodFed.
Shoot... I've seriously got to jot down a note on sending you those Placements. Just need to organize so you can figure out what is for what character. What I've got for them, anyway.

I'll likely test out your mini-MASH at another time. (Quite late here where I am.)
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
Excellent work with the CSPs, that's a heck of a lot to do.
On another note, I have done some audio hacking.
http://www.megaupload.com/?d=QN8BOT3X
This is emblem.ssm, from the audio/us folder, so it's Roy's us version audio. I successfully managed to change out his taunt "hiii-ya" with a sort of scratchy version of me saying "testing". Check it out. I used the SDK tool dspadpcm.exe to encode the WAV, and ssmex.exe from hcs to find the offset points in the SSM. (I think I uploaded the correct one...should be US-version Roy's taunt that's changed, nothing else)

Next step, the HPS files, if hcs does indeed make that converter
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
^ Are you sure you uploaded the correct .ssm? I just ran a test, and I didn't hear anything changed, not in battle nor in the Sound Test.
 

Tichinde925

Smash Legend
Joined
May 4, 2006
Messages
1,391
Location
U.S.A. (Warwick, RI)
Just for the record, uploaded the CSPs of all the characters... so if you've been interested in customizing your character selection screen, now you can! Enjoy. :)

~Please take note of the note in the PLACEMENTS text. Tells you what's up, and which character is where. Manual hexing required.

Arrange the characters on the select screen by Tiers!

Or have everyone be Captain Falcon.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
^ Are you sure you uploaded the correct .ssm? I just ran a test, and I didn't hear anything changed, not in battle nor in the Sound Test.
To go with that, I keep getting an error with your TPL Insert program...

tpl_insert PlFeRe.dat 01
tpl_insert v0.9 (updated 9/9/09)

All necessary parameters are in place.
***
Error: Cannot open TPL file for read.
I have cmd and TexConv copied into the root with the folders (in this case, Roy), but it can't seem to read them... Granted, I'm actually using Default Roy's textures, but I figured it'd be no different as all the Roy textures have the same placements.
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
@Steelia
It means it can't find the TPL. When it runs TexConv, the usual "bytes allocated...bytes whatever...created tpl 01.tpl" will show up, and it will create the TPL. To in fact run TexConv, type in "-t" as another parameter. --should be explained in the readme. ..and make sure that PlFeRe is in the folder, too :p

I found something interesting when I was testing on Roy. The offsets file I made for him must have been based off of an older folder system that you used to organize his textures, so 03, which should be some sword texture, I think, points to the 03Lion mentioned in the Placements file. I fixed it up, though, along with some programmatic things in the actual program.
Here's the new version, with updated offset TXTs for roy and v0.93 of theprogram
http://www.megaupload.com/?d=1WZLO69E

Hm, the SSM might have been the wrong one. I ripped this directly from my iso that I know is changed. If this still doesn't work, I'll upload the japanese version, if that's the one.
http://www.megaupload.com/?d=HTP4RKVM
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
Hm, the SSM might have been the wrong one. I ripped this directly from my iso that I know is changed. If this still doesn't work, I'll upload the japanese version, if that's the one.
http://www.megaupload.com/?d=HTP4RKVM
Ack, sorry about that, GodFed; I'm an idiot. I didn't realize Roy and co. had 2 audio files (one in the root of audio, and the other "us" folder I'd never seen before). <_>

In any case, made a quick video test run on the computer with your voice over Roy... TESTING.
Hope you can hear it. ;)

(If this works out, I'd love to hear Luigi get a complete voice makeover using his Brawl sounds. :}D )
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
Haha, great to see that it worked out! My only concern really is that the audio quality is a little poor - I'll try to tweak it around a little bit tomorrow to see if I can change it.
Too bad the emulator isn't fast enough to not make the audio skip (t-t-t-testing :) ) I'm glad you recorded that, though.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
Haha, great to see that it worked out! My only concern really is that the audio quality is a little poor - I'll try to tweak it around a little bit tomorrow to see if I can change it.
Too bad the emulator isn't fast enough to not make the audio skip (t-t-t-testing :) ) I'm glad you recorded that, though.
W'ey, no prob.
If you don't mind it, can you possibly PM me the original sound file of your "Testing" clip, before you put it into .ssm format and all that? I want to compare the one in-game and the original, to see if there's any difference (speeding up, slowing down, the like). If you still have it, anywho.

In any case, I know you were able to get one of Roy's voices... but does this confirm that it's possible to exchange/replace other character voice files? And if so, do you think we could expect some kind of mini-guide on what we would need and how to utilize it? :)
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
HPS Hacks

AUDIO HACKS : HPS FILES
Overview of Audio Format - HPS
HPS files are very similar to DSP files - they're just audio. HPS files, though, can loop. Since most of the HPS files are background music files, it makes sense that they loop. Some of the HPS files that don't loop are the victory music files for each character, and the music for the movies (the "How to Play" and the 15 minute long one). HPS files have two channels for audio, a Left and a Right channel.
Let's go over the structure of an HPS file in depth, since they're a bit more complicated imo. It looks like this:

HPS Header [0x00 - 0x80]
-info about the file
-data for 1st channel
-data for 2nd channel
Audio Data [0x80 - end ]
-1st block
---Block Header
---1st channel audio (DSP)
---2nd channel audio (DSP)
-2nd block
---Block Header
---1st channel audio, starting where the last one left off
---2nd channel audio, starting where the last one left off
....continue through blocks until the end.

Starting with the HPS Header, I'll break every bit (and byte) down. The header is like this
[0x00 - 0x07](8bytes) - "HALPST " - magic
[0x08 - 0x0B](4bytes) - sample rate
[0x0C - 0x0F](4bytes) - channels #
[0x10 - 0x13](4bytes) - length of largest block
[0x14 - 0x17](4bytes) - ??
[0x18 - 0x1B](4bytes) - "samples to read" number for left channel
[0x1C - 0x1F](4bytes) - ??
[0x20 - 0x3F](32bytes)- left channel decoder (coefficients)
[0x40 - 0x47](8bytes) - ??
[0x48 - 0x4B](4bytes) - see [0x10 - 0x13]
[0x4C - 0x4F](4bytes) - see [0x14 - 0x17]
[0x50 - 0x53](4bytes) - "samples to read" number for right channel
[0x53 - 0x57](4bytes) - ??
[0x58 - 0x77](32bytes)- right channel decoder (coefficients)
[0x78 - 0x7F](8bytes) - ??

Audio data is broken up into blocks. Once one block is finished playing, the next block immediately starts. The blocks start at 0x80, and continue to the end of the file. Here's what they look like.

First a Block Header:
[0x00 - 0x03](4bytes) - length of the block
[0x04 - 0x07](4bytes) - last byte to read in the block
[0x08 - 0x0B](4bytes) - offset for next block to read (looping done this way)
[0x0C - 0x13](8bytes) - left channel decoder state
[0x14 - 0x1B](8bytes) - right channel decoder state
[0x1B - 0x1F](4bytes) - empty (00 00 00 00)
Then the data for the Left channel in DSP format.
Then the data for the Right channel in DSP format.
Then comes the next block.

--Loops are done via the [0x08 - 0x0B] bytes. These bytes either point to the next block, or to an earlier block. The block that they point to will be the next one to play. When they point to an earlier block, that's basically your loop, as that earlier block is played as well as the ones after it again. You can change this [0x08 - 0x0B] value to a different number, to create a loop that loops to a different point in the audio.
--The "samples to read" numbers from the HPS Header above are very important for loops. This number is a timer for when to loop. It counts down until it hits 0, then, whatever block you're at, the audio will immediately loop. So, if you change the loop to be shorter, you have to change these values as well to be smaller, to make the loop good. Here's a formula for determining what the number is.
(number) = (seconds)(sample rate)(16/14) + 15
where seconds is the time until the loop will start, and sample rate is the sample rate (usually 32000). Round the answer down, then convert it to hexadecimal. That's your number.


HPS Hacking
Right. I finally got around to really figuring out HPS files and true music hacks. So here we go.
I assume that you read through the SSM/DSP overview at least (and the HPS overview), and are familiar with the business of hexing, and using dspadpcm.exe.

Tools:
-You need the same stuff as for the SSM hacks.
-For converting HPS to WAV format, I highly suggest vgmstream, an open-source video game sound player developed by hcs (Halley's Comet Software). It's constantly being updated with new types of video game audio, and it definitely works for HPS. This is very good for testing your HPS hacks, but the real test is on Dolphin or a Wii/GC.
-For hexing the DSP audio data into the HPS files, you can manually do it, but it takes forever. I have created a program that hexes the data automatically, and displays loop points, etc. I provided a link at the LINKS section, use at your own discretion.
-For this guide, I assume that you are using my program, hps_insert.exe.

Things I say a lot in this guide:
-"loop points": when you run vgmstream, it'll tell you when the audio loops. So, where the audio ends, and where it picks up again. These values are called loop points.
-"find your own loop points": I think that the audio I want to use would sound good looping from 30.099 secs to 122.901 secs instead of the 1.792 secs to 124.142 secs that its supposed to be. All I do is check out the file in a sound editor and find the times that I thought sounded good. I "found my own loop points" in that situation.
-"change the starting/ending loop point": In the Block Headers of each block is a value that points to the next block in line. This value, [0x08 - 0x0B], can be messed with to change where your loop points are. Let's say the original loop is 101.585 secs to 0 secs. So the last block starts at offset 0x0037BD00, and it points to 0x00000080 for the loop. I can change the value from 00 00 00 80 (that's 0 secs) to 00 04 01 00 (that's 7.166 secs into the audio). Now the HPS will loop from 101.585 secs to 7.166 secs. I just changed the starting loop point. Let's say I want it to loop from 76.670 secs to 7.166 secs. 76.670 secs, according to hps_insert, is right after the block at offset 0x0029D2C0. This block points to 0x002AD160 as the next block, but I'm going to change it to point to 0x00040100 like before. That's about it in a nutshell for these things. There's a little bit more to it, but I've used up enough space as is. Check out the guide for more detail.
-"modify the file to reflect the loop point": I want my audio to loop from 30.099 secs to 122.901 secs. Really, I do. But the thing is, the HPS is set up so that I can only point to specific parts of the audio to make my loop. I can point to 30.362 secs exactly, but not 30.099. 30.362 is the closest thing the HPS will let me do. So I have to stretch the audio in my sound editing program to compensate for this. I stretch it, cut it, whatever, so that the loop point I chose matches the loop point that the HPS offers.
-"samples": What's a sample? Well, the sample rate, like 32000 Hz, is the samples played per second. The higher the sample rate, the better the quality, and the larger the size of the audio file. A general formula relating sample rate, samples, and seconds is (sample rate = samples/seconds). Since vgmstream rounds seconds to two decimal places, you can use this formula to more precisely calculate the seconds.

0. Before actual hacking
I suggest getting WAV files from the HPS files under the "audio" folder in the ISO. Copy all the HPS files to a folder with the vgmstream (mine's called "test") program and cmd.exe. In cmd.exe, type
"test -o outputfile.wav inputfile.hps -i"
to create outputfile.wav from inputfile.hps, ignoring any loop-points. To create a simple loop, type
"test -o outputfile.wav inputfile.hps -l 1"
the last two parameters are "-L" lowercase and the number one. This tells vgmstream to loop once, and it creates outputfile.wav that loops once, before ending.
Do this for each HPS....or use billbaggins' batch program to do it for you. :D LINK.

With these WAV files, you can figure out what limitations you have with the audio tracks you want to insert. You cannot insert a track that is longer than the size of the original. Period. You can use smaller sized clips, but not longer ones.
EDIT: SleepyK says otherwise. He has 14:02-long clips for each normal stage, since he cut out a lot of unnecessary data from the ISO. I have yet to check this out for myself. Very cool, though.

1. Edit audio
I figure you have a specific audio clip to insert. Open it up in Soundbooth, Goldwave, what have you, and listen to it. Try to find good places to loop from, and work with the audio until you think you have a decent loop that would fit in the HPS you want. When you run vgmstream, it outputs some useful information regarding the HPS file, specifically, the loop points. You can use these points that are originally part of the HPS, or you can create your own!...with some limits, though. So we have two scenarios here - you either stick with the original loop points that the SSBM audio had, or you decide on loop points of your own.

a. Stick to the original
If you decide to use the original loop points, for simplicity, time constraints, laziness, etc. then you have to modify the audio that you want to exactly reflect those points. vgmstream will display the start loop point and the end loop point if you create a loop with it (add "-l 1" when you run it...see step 0.) In fact, it displays the start and end points in seconds, and in samples.
NOTE: What's a sample? Well, the sample rate, like 32000 Hz, is the samples played per second. The higher the sample rate, the better the quality, and the larger the size of the audio file. A general formula relating sample rate, samples, and seconds is (sample rate = samples/seconds). Since vgmstream rounds seconds to two decimal places, you can use this formula to more precisely calculate the seconds.
Since you have the loop points from vgmstream, edit your audio length to exactly match the HPS ones. That's all. If vgmstream says that it loops from 1.79 seconds to 123.49 seconds, then make one loop point at 1.792 seconds (more specific, using the formula) and the other at 2 min, 3.495 seconds. Then go to step 2.

b. Make your own loop points
If you instead decide to loop from 34.100 seconds to 123.000 seconds, then hold on a bit. We need to do a little hexing first. Actually, we just need to take a look at the hex data.
Starting loop points
We're going to run a "dummy" test of hps_insert to check out the HPS info. So copy your HPS to a folder with cmd.exe, dspadpcm stuff, and a WAV file. Make a copy of the WAV file, and run cmd.exe. Type this
"hps_insert hpsname.hps wavname.wav wavcopyname.wav"
which creates a "temp.hps" file, which you can delete. This also spits out a lot of useful info. It tells you where each block is located, the length of each block, the time each one takes, and the total time. With your loop points in mind (say, loop from 34.100 secs to 123.000 secs), take a look at the "total time" column. Find a value that is close to your loop point (if it says 33.897, that's very close to 34.100 - that's what the loop point will be), and write it down or something. You can do this for starting loop points, and for ending loop points. So the program may say that 33.897 and 122.550 are the closest values to what you want. Okay...just modify the audio file to reflect the loop points.
If any of you remember what I wrote earlier about a "counter", forget it. It was meant for manually finding loop points in the HPS file. With the program, you don't need to manually find them.

2. Hex-tastic - part 1
If you're satisfied that the audio clip will fit well into the HPS file, and loop right, then create two mono channels out of it, each at 32000 Hz sample rate, and 16 bit depth. One should be an R channel, the other an L channel. Now, we hex.
hps_insert - I reiterate what you need to run hps_insert here again.
Put your R and L files into a folder with dspadpcm, soundfile.dll, dsptool.dll perhaps, too, and cmd.exe. Oh, and hps_insert.exe...In cmd.exe, type
"hps_insert hpsname.hps lchannel.wav rchannel.wav"
where lchannel is the name of your left channel wav and rchannel is the right channel wav. This creates an HPS file called temp.hps. Rename it however you want. The only thing missing is working out those loop points, if you decided to create your own. If you're using the ones that the HPS originally used, then you're done. Yeah, done.

3. Hex-tastic - part 2

If you created your own loop points, then this is the final step. Open the temp.hps file (or if you renamed it, whatever you called it). Two sections coming up - one for starting loop points, and one for ending loop points.
Starting loops
If you only modified the starting loop, but the audio clip fits the original HPS size perfectly, this is the section. If you modified both starting and ending loop points, go to the next section. Now, navigate to the very last block of data. If you used hps_insert, it tells you the loop point offset, so go to there. The 8th through 11th byte in the block header is the offset that signifies a loop. It calls a previous block of data to be played, which effectively loops the audio. Remember your offset with your starting time? During step 1b., you should have found a time/offset where the seconds came close to your loop point, and you modified the audio to work with the seconds you got. Take that offset and type it in at the loop offset point. EG. If the line read 00010000 0000FFFF 0011A0C0 00500000, then change 0011A0C0 to the offset of your new start loop point.
Ending loops
For this, you need to know the starting loop point offset and the ending loop point offset. Go to the ending loop point offset, and in that line, find the third set of bytes (above, they were 0011A0C0). Replace these with the starting loop point offset. You don't need to edit the last block header in any way, since the audio will never see that block, always looping back to the beginning (Nonetheless, I always fill it with FF's for safety). What we do have to edit, though, is the HPS header, the bytes at the very beginning of the file. So go there. Look at offsets 0x18 and 0x50. They should be the same. They are the number of samples that the HPS goes through before "looping" and counting it as a loop. If they weren't edited correctly, then the audio would loop, and then it would loop again unexpectedly at random points in time. So let's calculate what it should be...Math time.
Info you need: sample rate (R), ending time point in seconds (T)
We'll first find the samples at the loop point:
R*T = samples
Then take that value (S) and multiply by 16/14, then add 15
[S*(16/14)]+15 = answer
Good, now convert that into hexadecimal, and type that value into 0x18 and 0x50 in the new HPS file. ...And we're done.

4 - Extra. The program (Once again, I'm going over how the program works)

The program, hps_insert, will take a HPS file, two WAV files (hopefully L and R channels) and run dspadpcm on both of them, inserting them into a copy of the HPS, called "temp.hps". It also tells you info on each block of audio, such as its offset, its length in bytes, its length in seconds, and the total time up to each offset.
When I change out the audio for a HPS file, I generally run a "dummy" test to see the loop points and the specific time intervals for each block. I copy the HPS to a folder with cmd.exe, hps_insert, the dspadpcm.exe stuff, and two WAVs. I run cmd.exe and type in
"hps_insert hpsname.hps wavL.wav wavR.wav"
hpsname.hps = the name of the HPS file
wavL.wav = the name of one of the WAV files, usually the left channel.
wavR.wav = the name of the other WAV file, usually a right channel.
This makes a "temp.hps", which I delete, but it also gives me incredibly useful info about the HPS, which helps out a lot when determining the best loop points in your audio.
When I actually edited my audio clip to reflect the loop points, then I run hps_insert seriously. I have a different folder for this, with the L and R channel WAVs, hps_insert, the HPS, cmd.exe, and the dspadpcm stuff. If I were editing pura.hps (poke floats), and I used "Pokemon Crystal 14.5 West Coast Radio" from OCRemix, I'd rename the L and R channels to something like "pkL.wav" and "pkR.wav", and I'd run cmd.exe:
"hps_insert pura.hps pkL.wav pkR.wav"
which spits out a temp.hps file. If I wanted to loop from 30.338 to 138.331 seconds, I'd open up temp.hps in a hex editor, look at the hps_insert output, and I'd change the offsets accordingly using the info there.

Troubleshooting HPS
My HPS hack has blips/cracks/pops/static when I listen to it in-game. Why?
Well, I'm sorry to say this, but the program hps_insert.exe is not yet perfect. Basically there are spots in the temp.hps audio file where the decoder coefficient at the start of a block is slightly wrong, so the resulting audio has a small defect. In other words, there's a small problem with the program when it creates the temp.hps file that I haven't been able to fix yet.

The audio plays fine in the game, but I hear silence for a few seconds before it loops.
Check your ending loop point. Chances are that you made the end loop point one or two blocks past where you should have. So open up your HPS hack in a hex editor, find the ending loop block where you told it to loop back near the beginning, and go backwards about 0xFEF0 (65264 in decimal) bytes to try and find the previous block. Then make that block loop back to your starting loop point. Maybe that will help. (btw that 0xFEF0 is just an approximation. But it should get you pretty close to the location of the previous block)

The audio loops sooner than I want it to.
Check your ending loop point. You might have made it loop too soon. So shift it one block back and then try it out. Check out the question above, too, which deals with shifting the ending loop point forward.

The audio loops at random points in time.
I think this is an issue with the HPS timer, also known as the "samples to read" value. This vaue is located at offsets 0x18 and 0x50, and basically counts the samples that are played in the audio. Once a certain number of samples are played, the audio loops automatically. To tell you the truth, I don't know the exact mechanism behind this value, I just tinkered with it until it worked out for me. Then I made a theory about how it works and what it does. Anyway, you just have to fix this value. To do that, follow these steps.
You need the sample rate (R) and the ending time point in seconds (T).
First find the number of samples at the loop point:
R*T = samples
Then take that value (S) and multiply by 16/14, then add 15
[S*(16/14)]+15 = answer.

SSBM crashes when I play my audio hacks.
That's a problem with your coefficients. Assuming you used hps_insert.exe, this shouldn't be happening. Anyway, when the coefficients are way outta whack, the game will think that the data's so messed up that it crashes.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
^ Appreciate the stuff. :)

As mentioned before, received your stuff, and was actually able to figure out how most of the stuff went! Alternatively, you can always drag-and-drop .ssm files onto the ssmex.exe program instead of typing in a command prompt, but whatever works.~

Wish I had seen the guide before sending the PM, though, my bad; I didn't realize it was updated until about two seconds ago. Gonna try out your guide with Mewtwo (hopefully he works; he's a tad harder to work with as he has stereo-formatted sound effects).
~Ah, and to get mono format sounds, I used Androu1's BRSTM maker, just ripped a sound file in stereo format so I get 2 mono files, L and R. Copy-paste in L, copy-paste in R.
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
Hm, when I drag and drop, I get the offset data displayed, but no extracted DSPs...I wonder why. Well, great that it all helped. I might even work toward automating this, too, since hcs released the source for ssmex.

Good to hear the stereo worked out okay. I'd like to see (ha, hear) what you do with Mewtwo's sounds.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
Hoho, couldn't help but do a check-up.
I'm STILL working on my first Mewtwo voice-replace test thing, and couldn't help but notice your mini audio hack guide. Sounds rather tedious... I'd assume the reason for the two channels is that it's in stereo format? (What if you wanted it in Mono, would you just paste one large mono file?)

In any case, grand news to hear on the music hacks. Hopefully we will see a kind of automated system, ESPECIALLY for that.
 

SleepyK

Banned via Administration
Joined
Mar 26, 2006
Messages
5,871
i'm having some trouble replacing fox's reflector audio. i did as the guide said, but it still makes the blip blip noise when running it on the emulator.
that sound shouldn't exist anymore since it's been replaced, right?
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
^ Running certain sound effects on the emulator's quite strange. I know while doing some stuff for Mewtwo (particularly Mewtwo's Teleport sound effect), some sound absolutely garbled on the emulator. I have yet to hear what it sounds like while playing on an actual console, though, but this wouldn't be the first time the emulator jacked a test run of some sort.
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
@Steeilia:
yep, tiny update there. I didn't do a full guide for HPS since it's so dam tedious and error prone. Since it's stereo, half of each audio chunk is one channel, and half is the other. Kind of hard to explain. You would paste one channel up until the halfway point of a chunk, and the other channel until the endpoint of the chunk. The GameCube plays both parts at the same time.
For mono, just paste in your half0chunk as usual, but then, paste it again right after it. So the "second channel" is really just a copy of the first. And you have to replace the coefficients at the start of the file...

@SleepyK:
Are you sure you replaced the right file? You could have replaced a different sound effect, or you could have replaced the japanese version audio, and when you play us version fox, no change happens. Also, the emulator is a little weird like Steelia said. Try lowering the graphic settings if you're only testing audio. So maybe go into gfx options and enable wireframe or something...this might make it difficult to actually start a melee, though. :p
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
All right.
Gave a shot at trying a test music hack.

The one part I'm stuck on is here:

Read 0x80 in the HPS. Take the first value, say 0010000, and divide it by two (hex numbers, remember). This is the length of the first channel audio.
...Not sure what to make of that. I found line 0x80, no problem, but I have no idea what I'm doing there. I see
00 01 00 00 00 00 ff ff 00 01 00 a0 00 05 00 00
as the entire line, but have no idea what to do from there. (I'm working with Icicle Mountain's theme, "icemt.hps".)
 

SleepyK

Banned via Administration
Joined
Mar 26, 2006
Messages
5,871
ah, i forgot that the us was separated from the japanese voices. thanks.
 

Tichinde925

Smash Legend
Joined
May 4, 2006
Messages
1,391
Location
U.S.A. (Warwick, RI)
Sweet explanation! I changed the sound effect used by Captain Falcon's knee/dair, Ganondorf's dsmash, etc. in us/main.ssm to CF saying "yes!" With your guide to the hex edits, the only sucky part is finding the right dsp. I made a video: http://www.youtube.com/watch?v=p13meho4Zd4
Please post whatever it is you that you replaced with GC Tool onto the ISO pretty please! I want my Falcons to say "YES!" all the time too!

P.S.

http://www.youtube.com/watch?v=sBwwUfuJZr8
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
I found line 0x80, no problem, but I have no idea what I'm doing there. I see
00 01 00 00 00 00 ff ff 00 01 00 a0 00 05 00 00
as the entire line, but have no idea what to do from there. (I'm working with Icicle Mountain's theme, "icemt.hps".)
All right. The 00 01 00 00 is the length of the chunk. Half of that is 8008, in hex notation. I don't know why, but the next four bytes are always 00 00 ff ff after 00 01 00 00 . Go figure. The next four (00 01 00 a0) are the exact hex offset of the next chunk. And the last four are...uh, no clue. They're not important, really.

8008 is our magic (hex) number. So if you just made one DSP file, you copy the first 8008 bytes starting at 0x60. Then you paste them at 0x90 in the HPS. Then paste them again. Right after where you just pasted the first time. This represents the second channel. This should bring you to the next chunk, which should start with 00 01 0 00 or something similar.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
All right. The 00 01 00 00 is the length of the chunk. Half of that is 8008, in hex notation. I don't know why, but the next four bytes are always 00 00 ff ff after 00 01 00 00 . Go figure. The next four (00 01 00 a0) are the exact hex offset of the next chunk. And the last four are...uh, no clue. They're not important, really.

8008 is our magic (hex) number. So if you just made one DSP file, you copy the first 8008 bytes starting at 0x60. Then you paste them at 0x90 in the HPS. Then paste them again. Right after where you just pasted the first time. This represents the second channel. This should bring you to the next chunk, which should start with 00 01 0 00 or something similar.
Huh.
I keep getting 8000 as the magic hex number, whereas whenever I multiply 8008 by two, I get 10010. Dunno what I'm missing here (and I'm using scientific calculator), but I'll roll with it 'ere. Appreciate you clearing that bit up. :)

EDIT: LOL, I screwed up so horribly somewhere. Perhaps the file I'm using isn't big enough, or something. It semi-played the music I had, but both channels were off, and after a certain point the Ice Climbers' music began to play again (it, too, was off track).
Shoot. I'll likely have to sit this one out until it either eventually hits me, or becomes automated.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
lol is a good idea to keep the us version normal, so you can toggle modes by changing the language?
Quite right, at least in terms of audio hacks (excluding music hacks). I plan on making two language-exclusive Mewtwo audio hacks, for example.
 

voorhese

Smash Master
Joined
Dec 22, 2007
Messages
3,389
Location
Decatur, IN
Quite right, at least in terms of audio hacks (excluding music hacks). I plan on making two language-exclusive Mewtwo audio hacks, for example.
does the japanese setting have seperate graphics also?

so you could switch between the original, and the completely hacked one?

also is there a way you think where you could edit it, and make the japanese version PAL?
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
Huh.
I keep getting 8000 as the magic hex number, whereas whenever I multiply 8008 by two, I get 10010. Dunno what I'm missing here (and I'm using scientific calculator), but I'll roll with it 'ere. Appreciate you clearing that bit up. :)

EDIT: LOL, I screwed up so horribly somewhere. Perhaps the file I'm using isn't big enough, or something. It semi-played the music I had, but both channels were off, and after a certain point the Ice Climbers' music began to play again (it, too, was off track).
Shoot. I'll likely have to sit this one out until it either eventually hits me, or becomes automated.
Hehe, whoops. I'm thinking the wrong way. I know that 8008 is correct, though...I think I used the 1 00 00 as a reference, and tested 8000 twice and saw that I needed an extra line at the end. so I added 8. Same goes with f7 00 when it comes up. I divided by two, and got 7b80, but the correct half-point is 7b88.

Yeah. This is messed up stuff. There's so much room for error, and it takes forever. I'll possibly upload a modded yorster.hps that I did...but it's incomplete, so I'm thinking probably not yet.
c'mon, hcs...
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
^ On that similar note... something I noticed with the audio hacks.
If you've tested, have you noticed how some effects sound louder or softer than you made them, even if they were similar in volume as the effects you replaced?

Well, I took note of your whole music replacement process, and how you replaced those first two areas of data at the beginning of the music file -- and whaddya know, sound files have the same thing. Perhaps if I try replacing those, the sound files will change for the better... Testing as we speak. I'll let you on if'n this post is either replied or edited.
 

SleepyK

Banned via Administration
Joined
Mar 26, 2006
Messages
5,871
voorheese, i think it's just the audio. so no pal hax.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
For the love of god, someone change "3! 2! 1! Go!" to "3! 2! 1! Quit life!"
That'd have to be a very quick Quit Life!, as audio can only fit inside the boundaries of the audio file they're trying to replace. So it'd be like
Ready?
QUIFE!

lol.

Ah, and getting back to the audio hacks, I tested the same method used for the music hacks (replacing those first dozen or so lines with the lines found in the custom DSP files), using Mewtwo's Teleport sound effect. Now, before this point, I had replaced that file about three times, each file being slightly lower, slightly higher-pitched than each previous. And all I would get is a loud "BRRRRRCKKKK" as the sound effect.
I try that replacement method of the first lines? Beautiful "whuuuuuuuup" sound effect I was looking for. No crackles; just pure golden sound.

Best to update that on the DSP part of the guide, GodFed, or at least doing a copy-paste from your mini-mini music guide on the part of the very beginning audio replacements. :p
 

Stevo

Smash Champion
Joined
Mar 31, 2004
Messages
2,476
Location
150km north of nowhere, Canada
Im a newb at this stuff, but i am curious.

Do the .DAT files contain any other information that could be modified?

as in, could you modify hit boxes and the like by replacing that file?

Sorry for newby question but I am VERY curious as to what is possible with this hacking.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
^ To be honest, I don't really know. It wouldn't surprise me in the least, though. (However, I think there's a separate .DAT file altogether that contains each respective character's movements, hitboxes, attack effects, and the like. It's in a rather similar format to Brawl, if I'm correct.)
 

GodFed

Smash Apprentice
Joined
Mar 25, 2009
Messages
160
Location
Hendrick House, Urbana, IL
@Steelia:
The coefficient data? I think I mentioned it already...I'll check. If not, I'll update it. They are responsible for audio quality and volume, though...yup.

Edit: I think it's there already. Check out "5. Manual Hexing" in the Mini-Guide for SSM hacking. The last part of that step mentions copying the coefficient data (the jarbled looking 32-bytes of data) to the SSM. I think that's what you're talking about.
I didn't replace this data the first time, when I sent you the "testing" file, but later that day I figured it out and cleared the quality up.

@Stevo:
There are different types of DAT files. The ones that start with Pl are responsible for Player data. So the stuff like PlCaNr.dat is the costume for C. Falcon neutral color, while PlCa.dat is the general model data for C. Falcon. PlCaAJ.dat is the animation data for C. Falcon. (This is all educated guessing on my part here)

I haven't looked too deeply for hitbox info yet, because I don't yet understand the model data structure, or how the animations are coded. But, if you want to look, and you think you can find it, check the ones ending in AJ. The long ones that end in "Wait" are either demo files, or the "standing still" animations.

What's possible? Best case scenario would be - hack the models and animations and create a completely new character out of an existing one.
Right now, we've only figured out costumes (textures) and the audio effects. The next step, for me, is checking out the movie files, and then moving on to model data/animations/hitboxes.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
Well, after a couple days' worth of progress, finally got down to making my first fully-customized audio character... what I call Gameboy Mewtwo.

*Note that there's a bit of crackling in there, as this test was before I learned I had to paste those bits of data in the headers of the audio file, so it sounds MUCH better now. I'll likely make another upload when I've made my second audio hack for Mewtwo's Japanese voice... teased at the end of the video. ;)
 
Top Bottom