How to Import Custom DAC samples within S2's Clone Driver Made by Irixion/ErexFox Note: Do not reproduce without permission of creator, or I will hunt you down, and cut your penis off. On with the show! ======Table Of Contents====== 1. Credits 2. Special Thanks 3. Foreplay 4. Cream Filling 5. The Aftermath 6. Troubleshooting ======Credits:====== Tweaker - For pretty much all of this information :P, and saying that compression isn't needed, which prompted me to try this. Hayate - For also making me realize that compression isn't needed for this driver. Eduardo Knuckles - For helping me fix the clicking annoyance! Puto - For listing the samples' Pitch/Sample rate..table..thing. Irixion/ErexFox - For writing this lovely guide! ======Special Thanks:====== Flygon, and Kradorex for chilling with me while writing this. (Also for hugs ) Boredman for bugging me to figure this out. Someone validate him. (If you want <_<) S3K for having motherfucking sexy drums. ======Foreplay:====== So, now you have the Clone Driver. Now you want custom DAC? Oh shit, what am I going to do? Have no fear, for ErexFox is here! No seriously, this is some easy shit. Read on! ======Cream Filling:====== Get this: Code (Text): File type: Wav Bit Rate: 88kbps Audio sample size: 8 bit Channels: 1 (mono) Audio sample rate: 11 kHz Audio format: PCM MAKE SURE IT'S HEADER-LESS How do you check? If you media player can play it, it has a header. You can record a sample, and convert it using applications. If you have any recommended ones, please list them: Put this wav sample in your desired location. (So, "sounds\DAC\" is an example) Open up the sample's property box and go to 'PCM_table:' in your Clone Driver ASM. You may open windows calculator if you feel that it is necessary. Here is an example of the PCM table, and a description of what every line here does. Code (Text): PCM_Table Example/Format: dc.l $A00200, DAC1 Add $8 every time a new sample is added This is essentially the z80 RAM Address that the sample will be kept at. dc.w $269 Size of DAC sample in words. Take 'size' from file properties, Not 'size on disk') of sample and devide by $2 dc.b $19,0 This is the pitch at which the sample is played. It's reversed, so the higher value, lower pitch So, first line is the RAM address. Just add $8 (Notice that it's hex value, not decimal) to it to get the address for the next sample. Only do so if you're creating a new line in the PCM_Table, to add a new DAC sample. The second line is the size of the DAC sample in words. Open up the properties box, and take its 'size', (NOT its 'size on disk') and divide that number by the hex value of $2. An easy way to do this is: (If you're good at hex and decimal math, skip this bit.) <a href="http://forums.sonicretro.org/index.php?showtopic=19308&view=findpost&p=403073" target="_blank">Get this utility</a>, open your DAC file, and hit copy. then paste as the size in your ASM file. The last line is the pitch. It's reversed, so the higher the value, the lower the pitch is, and vice-versa. Once you're done in PCM table, go down to the DAC binclude area. Code (Text): DAC1: binclude sounds\dac1d.bin even Now, change it to binclude your file. In our example, it will be: Code (Text): DAC1: binclude sounds\DAC\Kick.wav even =====The Aftermath:=== Build and test! Enjoy your custom samples! Now don't you feel like a whore. =====Troubleshooting=== I'm getting a click at the end of my sample! WHAT IS THIS?! A few things could be wrong. Your sample most likely has a header. Open it up in a hex editor. Get rid of a bit at the beginning. Example: Code (Text): RIFF....WAVEfmt .........+...+......data I'm still getting a click at the end of my sample! It has no header! Then your converter left some garbage at the end of the file. Open it up in a hex editor, and delete all text at the end. Example: Code (Text): LISTJ...INFOISFT>...File created by GoldWave. GoldWave copyright (C) Chris Craig. I'm still getting a click at the end of my sample! You're not helping! If you followed the other two steps and still are getting a click, remove any 00 that you may have at the end of your file. Example: Remove the bolded text. Code (Text): 77FF 77FF FF[b]00 0000[/b] I don't know what I should set the pitch to! Halp? Play around with it, start at about $6. But like I said, experiment, until you get it sounding the way you want it to. <!--quoteo(post=396803:date=Jan 16 2010, 01:24 PM:name=Puto)--><div class='quotetop'>QUOTE (Puto @ Jan 16 2010, 01:24 PM) <a href="index.php?act=findpost&pid=396803"></a></div><div class='quotemain'><!--quotec-->Might as well mention some values here: Pitch $9 is 16KHz. Pitch $5 is ~22KHz. Pitch $13 is 11KHz, I think.<!--QuoteEnd--></div><!--QuoteEEnd--> Hopefully that should be of some help! Comments are welcomed. Be nice though :<. Oh, and feel free to put his up on the wiki, as I fail at wiki editing.